- Timestamp:
- 12/08/08 11:53:10 (14 years ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dataFlowSet.c
r86 r93 765 765 res->pktsNbOUT += agCache.pkts*myPtrs->currentRouterPtr->sampled/res->sampling; 766 766 /* (res->flowNbOUT)++; FIXME : FIND SOMETHING*/ 767 if (agCache.dscp>>2 == FIRST_CoS) { 768 res->firstCoSOUT += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 769 } else if (agCache.dscp>>2 == SECOND_CoS) { 770 res->secondCoSOUT += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 771 } else if (agCache.dscp>>2 == THIRD_CoS) { 772 res->thirdCoSOUT += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 773 } else { 774 res->fourthCoSOUT += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 775 } 767 776 }else{ 768 777 res->bytesNbOUT += agCache.bytes; 769 778 res->pktsNbOUT += agCache.pkts; 770 (res->flowNbOUT)++; 779 (res->flowNbOUT)++; 780 if (agCache.dscp>>2 == FIRST_CoS) { 781 res->firstCoSOUT += agCache.bytes; 782 } else if (agCache.dscp>>2 == SECOND_CoS) { 783 res->secondCoSOUT += agCache.bytes; 784 } else if (agCache.dscp>>2 == THIRD_CoS) { 785 res->thirdCoSOUT += agCache.bytes; 786 } else { 787 res->fourthCoSOUT += agCache.bytes; 788 } 771 789 } 772 790 #else … … 775 793 res->pktsNbOUT += agCache.pkts; 776 794 (res->flowNbOUT)++; 795 if (agCache.dscp>>2 == FIRST_CoS) { 796 res->firstCoSOUT += agCache.bytes; 797 } else if (agCache.dscp>>2 == SECOND_CoS) { 798 res->secondCoSOUT += agCache.bytes; 799 } else if (agCache.dscp>>2 == THIRD_CoS) { 800 res->thirdCoSOUT += agCache.bytes; 801 } else { 802 res->fourthCoSOUT += agCache.bytes; 803 } 777 804 } 778 805 if (res->sampling == 0 … … 817 844 res3->pktsNbIN += agCache.pkts*myPtrs->currentRouterPtr->sampled/res3->sampling; 818 845 /* (res3->flowNbIN)++; FIXME : FIND SOMETHING */ 846 if (agCache.dscp>>2 == FIRST_CoS) { 847 res3->firstCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res3->sampling; 848 } else if (agCache.dscp>>2 == SECOND_CoS) { 849 res3->secondCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res3->sampling; 850 } else if (agCache.dscp>>2 == THIRD_CoS) { 851 res3->thirdCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res3->sampling; 852 } else { 853 res3->fourthCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res3->sampling; 854 } 819 855 }else{ 820 856 res3->bytesNbIN += agCache.bytes; 821 857 res3->pktsNbIN += agCache.pkts; 822 858 (res3->flowNbIN)++; 859 if (agCache.dscp>>2 == FIRST_CoS) { 860 res3->firstCoSIN += agCache.bytes; 861 } else if (agCache.dscp>>2 == SECOND_CoS) { 862 res3->secondCoSIN += agCache.bytes; 863 } else if (agCache.dscp>>2 == THIRD_CoS) { 864 res3->thirdCoSIN += agCache.bytes; 865 } else { 866 res3->fourthCoSIN += agCache.bytes; 867 } 823 868 } 824 869 #else … … 828 873 res3->pktsNbIN += agCache.pkts; 829 874 (res3->flowNbIN)++; 875 if (agCache.dscp>>2 == FIRST_CoS) { 876 res3->firstCoSIN += agCache.bytes; 877 } else if (agCache.dscp>>2 == SECOND_CoS) { 878 res3->secondCoSIN += agCache.bytes; 879 } else if (agCache.dscp>>2 == THIRD_CoS) { 880 res3->thirdCoSIN += agCache.bytes; 881 } else { 882 res3->fourthCoSIN += agCache.bytes; 883 } 830 884 } 831 885 if (res3->sampling == 0 … … 915 969 res->bytesNbIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 916 970 res->pktsNbIN += agCache.pkts*myPtrs->currentRouterPtr->sampled/res->sampling; 971 if (agCache.dscp>>2 == FIRST_CoS) { 972 res->firstCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 973 } else if (agCache.dscp>>2 == SECOND_CoS) { 974 res->secondCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 975 } else if (agCache.dscp>>2 == THIRD_CoS) { 976 res->thirdCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 977 } else { 978 res->fourthCoSIN += agCache.bytes*myPtrs->currentRouterPtr->sampled/res->sampling; 979 } 917 980 }else{ 918 981 res->bytesNbIN += agCache.bytes; 919 982 res->pktsNbIN += agCache.pkts; 920 983 (res->flowNbIN)++; 984 if (agCache.dscp>>2 == FIRST_CoS) { 985 res->firstCoSIN += agCache.bytes; 986 } else if (agCache.dscp>>2 == SECOND_CoS) { 987 res->secondCoSIN += agCache.bytes; 988 } else if (agCache.dscp>>2 == THIRD_CoS) { 989 res->thirdCoSIN += agCache.bytes; 990 } else { 991 res->fourthCoSIN += agCache.bytes; 992 } 921 993 } 922 994 #else … … 926 998 res->pktsNbIN += agCache.pkts; 927 999 (res->flowNbIN)++; 1000 if (agCache.dscp>>2 == FIRST_CoS) { 1001 res->firstCoSIN += agCache.bytes; 1002 } else if (agCache.dscp>>2 == SECOND_CoS) { 1003 res->secondCoSIN += agCache.bytes; 1004 } else if (agCache.dscp>>2 == THIRD_CoS) { 1005 res->thirdCoSIN += agCache.bytes; 1006 } else { 1007 res->fourthCoSIN += agCache.bytes; 1008 } 928 1009 } 929 1010 #endif … … 937 1018 res->pktsNbIN += agCache.pkts; 938 1019 (res->flowNbIN)++; 1020 if (agCache.dscp>>2 == FIRST_CoS) { 1021 res->firstCoSIN += agCache.bytes; 1022 } else if (agCache.dscp>>2 == SECOND_CoS) { 1023 res->secondCoSIN += agCache.bytes; 1024 } else if (agCache.dscp>>2 == THIRD_CoS) { 1025 res->thirdCoSIN += agCache.bytes; 1026 } else { 1027 res->fourthCoSIN += agCache.bytes; 1028 } 939 1029 } 940 1030 } -
trunk/src/renetcolParam.h
r80 r93 38 38 #define RECEPTION_PORT 1111 39 39 /* 40 * routers index max + 1 40 * routers index max + 1 (index of the beginning of the lines, and not number of routers) 41 41 */ 42 42 #define ROUTER_INDEX_MAX 55 … … 44 44 * FILE with your routers IP address 45 45 */ 46 #define ROUTERS_LIST "<path to renetcol>/renetcol-0.0.1 2beta/conf/routers.txt"46 #define ROUTERS_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/routers.txt" 47 47 /* 48 48 * FILE with your prefix/subnet 49 49 */ 50 #define SUBNETS_LIST "<path to renetcol>/renetcol-0.0.1 2beta/conf/IPv4_Subnet_Aggregation_based_on_SNMP_index.txt"50 #define SUBNETS_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/IPv4_Subnet_Aggregation_based_on_SNMP_index.txt" 51 51 /* 52 52 * FILE with the list of AS with accounting 53 53 */ 54 #define AS_LIST "<path to renetcol>/renetcol-0.0.1 2beta/conf/AS.txt"54 #define AS_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/AS.txt" 55 55 /* 56 56 * constants, here a subnet is include in a prefix … … 62 62 * FILE for the rules 63 63 */ 64 #define RULES_FILE "<path to renetcol>/renetcol-0.0.1 2beta/conf/rules.txt"64 #define RULES_FILE "<path to renetcol>/renetcol-0.0.14beta/conf/rules.txt" 65 65 /* 66 66 * FILE with SNMP index of the interfaces 67 67 * tagged "C"ustomers or "B"ackbone 68 68 */ 69 #define INTERFACES_TYPE_LIST "<path to renetcol>/renetcol-0.0.1 2beta/conf/SNMP_INDEX.txt"69 #define INTERFACES_TYPE_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/SNMP_INDEX.txt" 70 70 /* 71 71 * maximum SNMP index … … 79 79 #define AS_RRD_LOCATION "/mnt/data/RRD/RENATER/AS/" 80 80 81 /* 82 * Your CoS - DSCP field in decimal notation, EF PHB 101110 (46) == ToS 10111000 (184) 83 */ 84 #define FIRST_CoS 46 /* EF, Premium - dec 46, bin 101110 - ToS 10111000 */ 85 #define SECOND_CoS 34 /* AF41, Best than BE - dec 34, bin 100010 - ToS 10001000*/ 86 #define THIRD_CoS 8 /* CS1, Less than BE - dec 8, bin 001000 - 00100000 */ 87 #define FOURTH_CoS 0 /* Best Effort or All flows if not in the 3 others class */ 88 81 89 /**************************************************************** 82 90 * the following parameters CAN be changed but it's NOT REQUIRED 83 91 ***************************************************************/ 84 92 #define STEP 5 85 #define FIELD_TYPE_NUMBER 8993 #define FIELD_TYPE_NUMBER 216 86 94 #define MAX_RULES_PER_FIELD 10 87 95 #define SHMSIZE 33554432