Changeset 22 for trunk/src/get_conf.c

Show
Ignore:
Timestamp:
01/17/07 18:37:59 (16 years ago)
Author:
andreu
Message:

aggregation et timer

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/get_conf.c

    r17 r22  
    141141  unsigned char buffer4[4]; 
    142142  int i = 0; 
    143   char prefixStrTab[10000][50]; 
     143  char prefixStrTab[MAX_IPV4_PREFIX][50]; 
    144144 
    145145  if (!(prefixFile = fopen(filename, "r"))) { 
     
    151151      strcpy(prefixStrTab[counter], line); 
    152152      counter++; 
    153       if (counter == 10000) { 
     153      if (counter == MAX_IPV4_PREFIX) { 
    154154        fprintf(stderr, "bufferoverflow in getPrefixV4 function (get_conf.c)\ 
    155 change the value of prefixStrTab declaration and recompile \n"); 
     155change the value of MAX_IPV4_PREFIX declaration and recompile \n"); 
    156156        exit(1); 
    157157      } 
     
    172172      pV4TabPtr[i].mask = n4; 
    173173      pV4TabPtr[i].routerNb = n5; 
     174      pV4TabPtr[i].flowNb = 0; 
     175      pV4TabPtr[i].bytesNb = 0; 
     176      pV4TabPtr[i].pktsNb = 0; 
     177      pV4TabPtr[i].udpPktsNb = 0; 
     178      pV4TabPtr[i].tcpPktsNb = 0; 
     179      pV4TabPtr[i].icmpPktsNb = 0; 
     180      pV4TabPtr[i].othersPktsNb = 0; 
     181      pV4TabPtr[i].udpBytesNb = 0; 
     182      pV4TabPtr[i].tcpBytesNb = 0; 
     183      pV4TabPtr[i].icmpBytesNb = 0; 
     184      pV4TabPtr[i].othersBytesNb = 0; 
    174185    } 
    175186  if( fclose(prefixFile) == 0) {