Changeset 60 for trunk/src/renetcol.c

Show
Ignore:
Timestamp:
10/25/07 07:23:46 (15 years ago)
Author:
andreu
Message:

new aggregation mode based on SNMP index and AS aggregation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/renetcol.c

    r59 r60  
    167167#endif 
    168168 
     169#ifdef ASACC 
     170  /* get the AS list */ 
     171  if ( (shmForAgg->ASNb = getAS(AS_LIST, &(shmForAgg->ASTab[0][0]))) < 1){ 
     172    fprintf(stderr, "renetcol: Error in %s\n", AS_LIST); 
     173    exit(1); 
     174  } else { 
     175    fprintf(stderr, "%hu AS are readed from %s\n",  
     176            shmForAgg->ASNb, 
     177            AS_LIST); 
     178  } 
     179  if ( (shmForAgg->ASNb = getAS(AS_LIST, &(shmForAgg->ASTab[1][0]))) < 1){ 
     180    fprintf(stderr, "renetcol: Error in %s\n", AS_LIST); 
     181    exit(1); 
     182  } 
     183#endif 
     184 
    169185  /* the fork */ 
    170186  fprintf(stderr, "renetcol: I become a deamon, next messages via syslogd. By.\n"); 
     
    207223  myPtrs.currentV4Tab = shmForAgg->prefixV4Tab[shmForAgg->currentTable]; 
    208224  myPtrs.secondV4Tab = shmForAgg->prefixV4Tab[shmForAgg->secondTable]; 
     225#ifdef ASACC 
     226  myPtrs.asNb = shmForAgg->ASNb; 
     227  myPtrs.currentASTab = shmForAgg->ASTab[shmForAgg->currentTable]; 
     228  myPtrs.secondASTab = shmForAgg->ASTab[shmForAgg->secondTable]; 
     229#endif 
    209230#ifdef MATRIX 
    210231  myPtrs.matrixPOP = &(shmForAgg->matrixPOP[shmForAgg->currentTable][0][0]); 
     
    433454      } 
    434455      shmForAgg->readed = 1; 
     456#ifdef ASACC 
     457      myPtrs.currentASTab = shmForAgg->ASTab[shmForAgg->currentTable]; 
     458#endif 
    435459#ifdef MATRIX 
    436460      myPtrs.matrixPOP = &(shmForAgg->matrixPOP[shmForAgg->currentTable][0][0]);