Changeset 73

Show
Ignore:
Timestamp:
07/24/08 10:47:32 (14 years ago)
Author:
andreu
Message:

last changes before next release

Location:
trunk
Files:
1 added
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/README

    r71 r73  
    2626  
    2727 ------------------------------------- 
    28 | Step 2: before configuration & start | 
     28| Step 2: before start                | 
    2929 ------------------------------------- 
    3030 
     
    4949 
    5050We recommand to use the script *check.sh* (in tool/) to launch renetcol.  
    51 This script required in parameters the path to renetcol. This file MUST be edited. 
     51This script required in parameters the path to renetcol and you must edit the file. 
    5252We can also put the script in your root crontab to verify the collector state,  
    5353for exemple: 
  • trunk/conf/AS.txt

    r60 r73  
    1 5511 
    2 3215 
    3 12322 
     165511 
     265215 
     365322 
  • trunk/conf/IPv4_Subnet_Aggregation_based_on_SNMP_index.txt

    r67 r73  
    1 195.98.247.0    24 
    2 195.98.248.0    24 
    3 195.98.249.0    24 
    4 195.98.250.0    24 
    5 195.98.251.0    24 
    6 195.98.252.0    24 
     1192.168.247.0    24 
     2192.168.248.0    24 
     3192.168.249.0    24 
     4192.168.250.0    24 
     5192.168.251.0    24 
     6192.168.252.0    24 
  • trunk/conf/IPv4_Subnet_Aggregation_based_on_routers_ident.txt

    r67 r73  
    1 195.221.248.0/24-15 
    2 195.221.249.0/24-21 
    3 195.221.250.0/24-17 
    4 195.221.252.0/24-12 
     1192.168.248.0/24-15 
     2192.168.249.0/24-21 
     3192.168.250.0/24-17 
     4192.168.252.0/24-12 
  • trunk/conf/routers.txt

    r71 r73  
    1 0 Name 0.0.0.5 null 
    2 1 Besancon 0.0.0.1 null 
    3 2 Bordeaux 0.0.0.2 0.0.0.12 
    4 3 Caen 0.0.0.3 null 
    5 4 Clermont 0.0.0.4 0.0.0.42 
     11 router1 192.68.0.1 null 
     22 router2 192.68.0.2 null 
     33 router3 192.68.0.3 null 
     44 router4 192.68.0.4 null 
  • trunk/conf/rules.txt

    r47 r73  
    11# This file is an exemple 
    2 # you must create your own rules 
     2# you must create your own filters 
    33 
    44# #: commented line 
    5 # N: rule name (string without space) 
     5# N: filter name (string without space) 
    66# O: output type (only socket in this release) 
    77# C: check field : C <field ID> <operator> <value>  
     
    1515# Example 
    1616# Dump on 10.0.01:1111 all MPLS flow (field 46 = 5) 
    17 #N test_MPLS 
    18 #O socket 10.0.0.1 1111 
    19 #C 46 = 5 
     17# Get this rule enable because the collector don't start without filter 
     18N BUG 
     19O socket 127.0.0.1 1111 
     20C 60 = 38 
    2021 
    2122# Example 
    22 # This rule depends on functionnality not present in this release 
     23# This filter depends on functionnality not present in this release 
    2324# from TCP flows 
    2425# prefix aggregation 
     
    3132 
    3233# Example 
    33 # This rule depends on functionnality not present in this release 
     34# This filter depends on functionnality not present in this release 
    3435# get all flows whom size between 15 & 16 Mo 
    3536# record all fields in a file 
  • trunk/src/dataFlowSet.c

    r72 r73  
    153153       * progression in a data flow Set  
    154154       * notes: 
    155        *   48=header ip + header netf 
    156        *   shift = shift if there is a template declaration  
     155       *   48= IP header size + NetFlow header size 
     156       *   shift = shift because we have a template declaration 
     157       *           inside data templates 
    157158       */ 
    158159      cpt++; 
     
    273274              (*myPtrs->offsetV9Ptr)++; 
    274275              /* FIXME : here , add a check on the field type */ 
    275               if ((pftmp->fieldType==8)||(pftmp->fieldType==12)){ 
     276              if ((pftmp->fieldType==8)||(pftmp->fieldType==12) 
     277                  ||(pftmp->fieldType==15)||(pftmp->fieldType==18)){ 
    276278                if ((((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.lvalue)  
    277279                    == (*((unsigned long*)&buffer4))>>(32-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)<<(32-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask) ) 
     
    804806         * the process renetcolSender with an IPC message queue. But, the perf 
    805807         * of IPC Msg was very bad with a default system compilation. 
    806          * So, now, we send information directly from here via sockets. 
     808         * So, now, we send information directly from here through sockets. 
    807809         */ 
    808810        tmpRuleList = myPtrs->rulesListPtr; 
  • trunk/src/renetcolParam.h

    r65 r73  
    4848 * FILE with your prefix/subnet  
    4949 */ 
    50 #define SUBNETS_LIST "<path to renetcol>/renetcol-0.0.12beta/conf/IPv4_prefix.txt" 
     50#define SUBNETS_LIST "<path to renetcol>/renetcol-0.0.12beta/conf/IPv4_Subnet_Aggregation_based_on_SNMP_index.txt" 
    5151/*  
    5252 * FILE with the list of AS with accounting 
     
    6767 * tagged "C"ustomers or "B"ackbone  
    6868 */ 
    69 #define INTERFACES_TYPE_LIST "" 
     69#define INTERFACES_TYPE_LIST "<path to renetcol>/renetcol-0.0.12beta/conf/SNMP_INDEX.txt" 
    7070/*  
    7171 * maximum SNMP index  
  • trunk/src/renetcolSender.c

    r72 r73  
    5252  FILE *ruleFile; 
    5353  FILE *tmpFile; 
    54   char field[4]; 
    5554  char port[6]; 
    56   char value[44]; 
    5755  char filters[249]; 
    58   char operator[2]; 
    59   char poubelle[2]; 
    6056  char lines[256][256]; 
    6157  char line[256]; 
     
    6662  int i = 0; 
    6763  int ruleToDelete = 0; 
     64  static char * fields; 
    6865 
    6966  while (1){ 
     
    131128    } else { 
    132129      /* NEW RULE */ 
    133       /*      if (sscanf(buffer, "%s %s %1s %s\n",*/ 
    134 /*               port, */ 
    135 /*               field, */ 
    136 /*               operator, */ 
    137 /*               value) == 0) { */ 
    138       if (sscanf(buffer, "%s %1s %s\n", 
    139                  port, 
    140                  poubelle, 
    141                  filters) == 0) { 
    142         syslog (LOG_ERR, "error in recept rule: %s", buffer); 
    143         close(sock); 
    144         return 1; 
    145       } 
     130      if (sscanf(buffer, "%s %s\n", 
     131                port, 
     132                filters) == 0) { 
     133        syslog (LOG_ERR, "error in rule syntax: %s", filters); 
     134        close(sock); 
     135        return 1; 
     136      } 
     137      subsstr(filters); 
    146138      if (!(ruleFile = fopen(RULES_FILE, "a"))) { 
    147         syslog (LOG_ERR, "error during %s opening", RULES_FILE); 
    148         close(sock); 
    149         return 1; 
     139        syslog (LOG_ERR, "error during %s opening", RULES_FILE); 
     140        close(sock); 
     141        return 1; 
    150142      } else { 
    151         fprintf(ruleFile, "N %s\n", host); 
    152         fprintf(ruleFile, "O socket %s %s\n", host, port); 
    153 /*      fprintf(ruleFile, "C %s %s %s\n", field, operator, value); */ 
    154         fprintf(ruleFile, "%s\n", filters); 
    155         fclose(ruleFile); 
    156       } 
     143        fprintf(ruleFile, "N %s\n", host); 
     144        fprintf(ruleFile, "O socket %s %s\n", host, port); 
     145        fprintf(ruleFile, "%s\n", filters); 
     146        fclose(ruleFile); 
     147      } 
     148 
    157149    } 
    158150  } 
  • trunk/tool/check.sh

    r57 r73  
    1414  echo "renetcolMsgCtl started" 
    1515  sleep 2 
    16   $1/src/renetcol $1/src/info_routeur_netflow.txt $1/src/donneesblocsadresses2 $1/src/rules.txt 
     16  $1/src/renetcol 
    1717  echo "renetcol restarted" 
    18   $1/src/renetcolSender $1/src/renetcol 1 $1/src/rules.txt 
     18  $1/src/renetcolSender $1/src/renetcol 1 
    1919  echo "renetcolSender restarted" 
    2020  $1/src/renetcolAgg 
  • trunk/tool/renetcolGUI.py

    r72 r73  
    5252collectorAddr = "127.0.0.1" 
    5353collectorAddr6 = "0::" 
    54 collectorPort = 52571  # if you change it, apply the modification on 
    55                        # the renetcolSender.h file and recompil the collector  
     54collectorPort = 52571  # if you change this port number, apply the 
     55                       # modification on the renetcolSender.h file 
     56                       # and you'll need a new compilation of the colllector  
    5657############################################################################## 
    5758 
     
    599600    old_record_file.close() 
    600601    now2 = time.time() 
    601     reste = 86400-(operator.mod(now2,86400)) 
    602     myTimer = threading.Timer(300.0,timer_action) 
     602    reste = 360-(operator.mod(now2,360)) 
     603    myTimer = threading.Timer(360.0,timer_action) 
    603604    myTimer.start() 
    604605 
     
    612613            print "STARTING RECORD ROTATION" 
    613614            now2 = time.time() 
    614             reste = 86400-(operator.mod(now2,86400)) 
    615             myTimer = threading.Timer(300.0,timer_action) 
     615            reste = 360-(operator.mod(now2,360)) 
     616            myTimer = threading.Timer(360,timer_action) 
    616617            myTimer.start() 
    617618        if widget.get_active() == 0: 
     
    695696            coll_window.show_all() 
    696697            if (is_already_see==0): 
    697                 info_dialog(widget, None, "You should registered only one rule for each GUI parser ! Think of using the DELETE button !") 
     698                info_dialog(widget, None, "You should register only one rule for each GUI parser ! Think of using the DELETE button !") 
    698699                is_already_see=1 
    699700