Changeset 34 for trunk/src/dataFlowSet.c
- Timestamp:
- 04/25/07 17:05:21 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dataFlowSet.c
r32 r34 109 109 #ifdef DEBUG 110 110 fprintf(stderr,"{d id: %hu, lg %hu", (*myPtrs->currentFlowsetIdPtr), data_length); 111 if ( (*myPtrs->currentFlowsetIdPtr) > 270) {111 if ( (*myPtrs->currentFlowsetIdPtr) > TRESHOLD_TEMPLATE_ID ) { 112 112 /* fprintf(stderr,"Bad TID from router: %lu.%lu.%lu.%lu\n", */ 113 113 /* (*myPtrs->currentFlowsetIdPtr), */ … … 893 893 buffer4[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++; 894 894 if (pftmp->fieldType==34){ 895 if (myPtrs->currentRouterPtr->sampled != *((unsigned long*)&buffer4) ) { 895 if ((*((unsigned long*)&buffer4)==1) 896 || (*((unsigned long*)&buffer4)==10) 897 || (*((unsigned long*)&buffer4)==1000)) { 898 if (myPtrs->currentRouterPtr->sampled != *((unsigned long*)&buffer4) ) { 896 899 #ifdef DEBUGAGG 897 fprintf(stderr,"SV (p) %lu != %lu (r)\n", *((unsigned long*)&buffer4),898 900 fprintf(stderr,"\n SV (p) %lu != %lu (r)", *((unsigned long*)&buffer4), 901 myPtrs->currentRouterPtr->sampled); 899 902 #endif 900 myPtrs->currentRouterPtr->sampled = *((unsigned long*)&buffer4); 901 for (i=0; i<nbPV4; i++) { 902 /* we update the PrefixV4 structure with the sampled information */ 903 if ( myPtrs->currentRouterPtr->IpAddress == myPtrs->routersID[V4PTab[i].routerNb]) { 904 V4PTab[i].sampling = *((unsigned long*)&buffer4); 905 myPtrs->secondV4Tab[i].sampling = *((unsigned long*)&buffer4); 903 myPtrs->currentRouterPtr->sampled = *((unsigned long*)&buffer4); 904 for (i=0; i<nbPV4; i++) { 905 /* we update the PrefixV4 structure with the sampled information */ 906 if ( myPtrs->currentRouterPtr->IpAddress == myPtrs->routersID[V4PTab[i].routerNb]) { 907 V4PTab[i].sampling = *((unsigned long*)&buffer4); 908 myPtrs->secondV4Tab[i].sampling = *((unsigned long*)&buffer4); 909 } 906 910 } 907 911 }