- Timestamp:
- 07/30/10 16:12:20 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dataFlowSet.c
r119 r121 995 995 } 996 996 #else 997 997 998 if (myPtrs->currentRouterPtr->sampled != 0 ){ 998 999 /* IN ("traffic to the prefix/subnet") */ … … 1022 1023 res2 = bsearch(&prefixKey, V4PTab, nbPV4, 1023 1024 sizeof(struct PrefixV4), prefGlobalCmp); 1024 if (res2!=NULL){ 1025 if (res2!=NULL){ 1026 #if defined(MULTISAMPLING) 1027 if (myPtrs->currentRouterPtr->sampled != res2->sampling ){ 1028 ((struct POP *)((myPtrs->matrixPOP) 1029 +((res->routerNb)*ROUTER_INDEX_MAX) 1030 +((res2->routerNb))))->pktsNb += agCache.pkts*myPtrs->currentRouterPtr->sampled/res2->sampling; 1031 ((struct POP *)((myPtrs->matrixPOP) 1032 +((res->routerNb)*ROUTER_INDEX_MAX) 1033 +((res2->routerNb))))->bytesNb += agCache.bytes*myPtrs->currentRouterPtr->sampled/res2->sampling; 1034 ((struct POP *)((myPtrs->matrixPOP) 1035 +((res->routerNb)*ROUTER_INDEX_MAX) 1036 +((res2->routerNb))))->flowNb++; 1037 } else { 1038 ((struct POP *)((myPtrs->matrixPOP) 1039 +((res->routerNb)*ROUTER_INDEX_MAX) 1040 +((res2->routerNb))))->pktsNb += agCache.pkts; 1041 ((struct POP *)((myPtrs->matrixPOP) 1042 +((res->routerNb)*ROUTER_INDEX_MAX) 1043 +((res2->routerNb))))->bytesNb += agCache.bytes; 1044 ((struct POP *)((myPtrs->matrixPOP) 1045 +((res->routerNb)*ROUTER_INDEX_MAX) 1046 +((res2->routerNb))))->flowNb++; 1047 } 1048 #else 1025 1049 ((struct POP *)((myPtrs->matrixPOP) 1026 1050 +((res->routerNb)*ROUTER_INDEX_MAX) … … 1032 1056 +((res->routerNb)*ROUTER_INDEX_MAX) 1033 1057 +((res2->routerNb))))->flowNb++; 1034 } else { 1058 #endif 1059 } else { 1060 /* here we'll make the choice that in multisampling mode, 1061 * the virtual POP that represent the reste of world is 1062 * in 1:10 packets mode */ 1063 #if defined(MULTISAMPLING) 1064 ( 1065 ((struct POP *)(myPtrs->matrixPOP) 1066 +((res->routerNb)*ROUTER_INDEX_MAX) 1067 +((ROUTER_INDEX_MAX-1))))->pktsNb += agCache.pkts*myPtrs->currentRouterPtr->sampled/10; 1068 ( 1069 ((struct POP *)(myPtrs->matrixPOP) 1070 +((res->routerNb)*ROUTER_INDEX_MAX) 1071 +((ROUTER_INDEX_MAX-1))))->bytesNb += agCache.bytes*myPtrs->currentRouterPtr->sampled/10; 1072 ( 1073 ((struct POP *)(myPtrs->matrixPOP) 1074 +((res->routerNb)*ROUTER_INDEX_MAX) 1075 +((ROUTER_INDEX_MAX-1))))->flowNb++; 1076 #else 1035 1077 ( 1036 1078 ((struct POP *)(myPtrs->matrixPOP) … … 1044 1086 ((struct POP *)(myPtrs->matrixPOP) 1045 1087 +((res->routerNb)*ROUTER_INDEX_MAX) 1046 +((ROUTER_INDEX_MAX-1))))->flowNb++; 1088 +((ROUTER_INDEX_MAX-1))))->flowNb++; 1089 #endif 1047 1090 } 1048 1091 /* end interpop matrix accounting */ … … 1140 1183 #if defined(IPV4AGGIDR) 1141 1184 if ( myPtrs->routersID[res->routerNb] == agCache.routerAd ) { 1185 #if defined(MULTISAMPLING) 1186 if (myPtrs->currentRouterPtr->sampled != res->sampling ){ 1187 res->bytesNbIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 1188 res->pktsNbIN += agCache.pkts*myPtrs->currentRouterPtr->sampled/res->sampling; 1189 if (agCache.dscp>>2 == FIRST_CoS) { 1190 res->firstCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 1191 } else if (agCache.dscp>>2 == SECOND_CoS) { 1192 res->secondCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 1193 } else if (agCache.dscp>>2 == THIRD_CoS) { 1194 res->thirdCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 1195 } else { 1196 res->fourthCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 1197 } 1198 }else{ 1199 res->bytesNbIN += agCache.bytes; 1200 res->pktsNbIN += agCache.pkts; 1201 (res->flowNbIN)++; 1202 if (agCache.dscp>>2 == FIRST_CoS) { 1203 res->firstCoSIN += agCache.bytes; 1204 } else if (agCache.dscp>>2 == SECOND_CoS) { 1205 res->secondCoSIN += agCache.bytes; 1206 } else if (agCache.dscp>>2 == THIRD_CoS) { 1207 res->thirdCoSIN += agCache.bytes; 1208 } else { 1209 res->fourthCoSIN += agCache.bytes; 1210 } 1211 } 1212 #else 1142 1213 if (myPtrs->currentRouterPtr->sampled != 0 ){ 1143 1214 /* IN ("traffic to the prefix") */ … … 1155 1226 } 1156 1227 } 1228 #endif 1157 1229 } 1158 1230 if (res->sampling == 0 -
trunk/src/get_conf.c
r95 r121 251 251 { 252 252 #if defined(IPV4AGGIDR) 253 #if defined(MULTISAMPLING) 254 sscanf(prefixStrTab[i],"%hu.%hu.%hu.%hu/%hu-%hu %hu\n", 255 &n0,&n1,&n2,&n3,&n4,&n5,&n6); 256 #else 253 257 sscanf(prefixStrTab[i],"%hu.%hu.%hu.%hu/%hu-%hu\n", 254 258 &n0,&n1,&n2,&n3,&n4,&n5); 259 #endif 255 260 #endif 256 261 #if defined(IPV4AGGIDSNMP) -
trunk/src/renetcol.c
r120 r121 868 868 869 869 if ((ethernetPacket = pcap_next(myPcapHandle, &myPcapHeader)) == NULL) { 870 fprintf (stderr, "IP: %llu , UDP: %llu, NDEv9: %llu, drops: %llu, FS: %llu, Flows: %llu, realFl: %llu Diff:%llu\n", 871 myPtrs.currentMIB->ipPacketNb, 872 myPtrs.currentMIB->udpPacketNb, 873 myPtrs.currentMIB->v9PacketNb, 874 myPtrs.currentMIB->v9UnSeqNb, 875 myPtrs.currentMIB->flowSetNb, 876 myPtrs.currentMIB->flowNb, 877 myPtrs.currentMIB->realFlowNb, 878 myPtrs.currentMIB->flowNb - myPtrs.currentMIB->realFlowNb 879 ); 870 880 pcap_close(myPcapHandle); 871 881 exit(0); -
trunk/src/renetcolAgg.c
r115 r121 4 4 * Authors: ANDREU Francois-Xavier 5 5 * 6 * Copyright (C) 2007 - 20 09GIP RENATER6 * Copyright (C) 2007 - 2010 GIP RENATER 7 7 */ 8 8 … … 29 29 * When your system is too fast and the number of your subnet too big 30 30 * (> 1024), the create and update process can be too fast and before the 31 * creation end the maximum number of files which can be opened for one process32 * in the same time is reached. Sowe must temporize.31 * end of creation. So the maximum number of files which can be opened for one 32 * process in the same time is reached and we must temporize. 33 33 */ 34 34 -
trunk/src/renetcolAgg.h
r115 r121 4 4 * Authors: ANDREU Francois-Xavier 5 5 * 6 * Copyright (C) 2005 2006 2007GIP RENATER6 * Copyright (C) 2005-2010 GIP RENATER 7 7 */ 8 8