Changeset 72 for trunk/src

Show
Ignore:
Timestamp:
05/28/08 14:43:34 (14 years ago)
Author:
andreu
Message:

multi-filters and two parameters from CLI

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/dataFlowSet.c

    r61 r72  
    804804         * the process renetcolSender with an IPC message queue. But, the perf 
    805805         * of IPC Msg was very bad with a default system compilation. 
    806          * So, now, we send information directly from here. 
     806         * So, now, we send information directly from here via sockets. 
    807807         */ 
    808808        tmpRuleList = myPtrs->rulesListPtr; 
  • trunk/src/renetcolSender.c

    r58 r72  
    5555  char port[6]; 
    5656  char value[44]; 
     57  char filters[249]; 
    5758  char operator[2]; 
     59  char poubelle[2]; 
    5860  char lines[256][256]; 
    5961  char line[256]; 
     
    129131    } else { 
    130132      /* NEW RULE */ 
    131       if (sscanf(buffer, "%s %s %1s %s\n", 
     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", 
    132139                 port, 
    133                  field, 
    134                  operator, 
    135                  value) == 0) { 
     140                 poubelle, 
     141                 filters) == 0) { 
    136142        syslog (LOG_ERR, "error in recept rule: %s", buffer); 
    137143        close(sock); 
     
    145151        fprintf(ruleFile, "N %s\n", host); 
    146152        fprintf(ruleFile, "O socket %s %s\n", host, port); 
    147         fprintf(ruleFile, "C %s %s %s\n", field, operator, value); 
     153/*      fprintf(ruleFile, "C %s %s %s\n", field, operator, value); */ 
     154        fprintf(ruleFile, "%s\n", filters); 
    148155        fclose(ruleFile); 
    149156      }