Changeset 93 for trunk/src/dataFlowSet.c
 Timestamp:
 12/08/08 11:53:10 (14 years ago)
 Files:

 1 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 }