- Timestamp:
- 11/06/08 16:37:23 (14 years ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dataFlowSet.c
r80 r83 672 672 if ( myPtrs->currentRouterPtr->snmpIndexList[agCache.inputSnmp] == 1 ) { 673 673 #endif 674 675 /* OUT ("traffic from the prefix/subnet") */ 676 #if defined(MULTISAMPLING) 677 if (myPtrs->currentRouterPtr->sampled != res->sampling ){ 678 res->bytesNbOUT += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 679 res->pktsNbOUT += agCache.pkts*myPtrs->currentRouterPtr->sampled/res->sampling; 680 /* (res->flowNbOUT)++; FIXME : FIND SOMETHING*/ 681 }else{ 682 res->bytesNbOUT += agCache.bytes; 683 res->pktsNbOUT += agCache.pkts; 684 (res->flowNbOUT)++; 685 } 686 #else 674 687 if (myPtrs->currentRouterPtr->sampled != 0 ){ 675 /* OUT ("traffic from the prefix/subnet") */676 688 res->bytesNbOUT += agCache.bytes; 677 689 res->pktsNbOUT += agCache.pkts; … … 682 694 res->sampling = myPtrs->currentRouterPtr->sampled; 683 695 } 696 #endif 684 697 #if defined(IPV4AGGIDSNMP) 685 698 prefixKey.beginning = agCache.v4AdD>>(32-agCache.maskD)<<(32-agCache.maskD); … … 697 710 } 698 711 } 712 #if defined(MULTISAMPLING) 713 if (myPtrs->currentRouterPtr->sampled != res3->sampling ){ 714 res3->bytesNbIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res3->sampling; 715 res3->pktsNbIN += agCache.pkts*myPtrs->currentRouterPtr->sampled/res3->sampling; 716 /* (res3->flowNbIN)++; FIXME : FIND SOMETHING */ 717 }else{ 718 res3->bytesNbIN += agCache.bytes; 719 res3->pktsNbIN += agCache.pkts; 720 (res3->flowNbIN)++; 721 } 722 #else 699 723 if (myPtrs->currentRouterPtr->sampled != 0 ){ 700 724 /* IN ("traffic to the prefix/subnet") */ … … 707 731 res3->sampling = myPtrs->currentRouterPtr->sampled; 708 732 } 733 #endif 709 734 } 710 735 #endif -
trunk/src/get_conf.c
r80 r83 142 142 unsigned short counter = 0; 143 143 unsigned short n0, n1, n2, n3, n4; 144 #if defined(MULTISAMPLING) 145 unsigned short n6; 146 #endif 144 147 #if defined(IPV4AGGIDR) 145 148 unsigned short n5; … … 249 252 sscanf(prefixStrTab[i],"%hu.%hu.%hu.%hu/%hu-%hu\n", 250 253 &n0,&n1,&n2,&n3,&n4,&n5); 254 #endif 255 #if defined(IPV4AGGIDSNMP) 256 #if defined(MULTISAMPLING) 257 sscanf(prefixStrTab[i],"%hu.%hu.%hu.%hu %hu %hu\n", 258 &n0,&n1,&n2,&n3,&n4,&n6); 251 259 #else 252 260 sscanf(prefixStrTab[i],"%hu.%hu.%hu.%hu %hu\n", 253 261 &n0,&n1,&n2,&n3,&n4); 262 #endif 254 263 #endif 255 264 buffer4[0] = (unsigned char)n3; … … 277 286 *((unsigned long*)&buffer4[0]) +~(~0<<(32-n4)); 278 287 pV4TabPtr[i].mask = n4; 288 #if defined(MULTISAMPLING) 289 pV4TabPtr[i].sampling = n6; 290 #else 279 291 pV4TabPtr[i].sampling = 0; 292 #endif 280 293 #ifdef IPV4AGGIDR 281 294 pV4TabPtr[i].routerNb = n5; … … 321 334 *((unsigned long*)&buffer4[0]) +~(~0<<(32-n4)); 322 335 pV4SubTabPtr[subNetIndex].mask = n4; 323 pV4SubTabPtr[subNetIndex].sampling = 0; 336 #if defined(MULTISAMPLING) 337 pV4TabPtr[subNetIndex].sampling = n6; 338 #else 339 pV4TabPtr[subNetIndex].sampling = 0; 340 #endif 324 341 #ifdef IPV4AGGIDR 325 342 pV4SubTabPtr[subNetIndex].routerNb = n5; … … 358 375 *((unsigned long*)&buffer4[0]) +~(~0<<(32-n4)); 359 376 pV4TabPtr[superNetIndex].mask = n4; 377 #if defined(MULTISAMPLING) 378 pV4TabPtr[superNetIndex].sampling = n6; 379 #else 360 380 pV4TabPtr[superNetIndex].sampling = 0; 381 #endif 361 382 #ifdef IPV4AGGIDR 362 383 pV4TabPtr[superNetIndex].routerNb = n5;