1 diff -urN linux-2.6.20.orig/include/linux/pkt_sched.h linux-2.6.20/include/linux/pkt_sched.h
2 --- linux-2.6.20.orig/include/linux/pkt_sched.h 2007-02-04 19:44:54.000000000 +0100
3 +++ linux-2.6.20/include/linux/pkt_sched.h 2007-02-09 09:38:50.000000000 +0100
11 +#include <linux/if_ether.h>
13 /* Generic queue statistics, available for all the elements.
14 Particular schedulers may have also their private records.
18 #define NETEM_DIST_SCALE 8192
24 + * A sub weight and of a class
25 + * All numbers are represented as parts of (2^64-1).
27 +struct tc_wrr_class_weight {
28 + __u64 val; // Current value (0 is not valid)
29 + __u64 decr; // Value pr bytes (2^64-1 is not valid)
30 + __u64 incr; // Value pr seconds (2^64-1 is not valid)
31 + __u64 min; // Minimal value (0 is not valid)
32 + __u64 max; // Minimal value (0 is not valid)
33 + time_t tim; // The time where the above information was correct
36 +/* Packet send when modifying a class */
37 +struct tc_wrr_class_modf {
38 + /* Not-valid values are ignored */
39 + struct tc_wrr_class_weight weight1;
40 + struct tc_wrr_class_weight weight2;
43 +/* Packet returned when quering a class */
44 +struct tc_wrr_class_stats {
45 + char used; /* If this is false the information below is invalid */
46 + struct tc_wrr_class_modf class_modf;
47 + unsigned char addr[ETH_ALEN];
48 + char usemac; /* True if addr is a MAC address, else it is an IP address
49 + (this value is only for convience, it is always the same
50 + value as in the qdisc) */
51 + int heappos; /* Current heap position or 0 if not in heap */
52 + __u64 penal_ls; /* Penalty value in heap (ls) */
53 + __u64 penal_ms; /* Penalty value in heap (ms) */
56 +/* Qdisc-wide penalty information (boolean values - 2 not valid) */
57 +struct tc_wrr_qdisc_weight {
58 + signed char weight_mode; /* 0=No automatic change to weight
60 + 2=Also multiply with number of machines
61 + 3=Instead multiply with priority divided
62 + with priority of the other.
66 +/* Packet send when modifing a qdisc */
67 +struct tc_wrr_qdisc_modf {
68 + /* Not-valid values are ignored */
69 + struct tc_wrr_qdisc_weight weight1;
70 + struct tc_wrr_qdisc_weight weight2;
73 +/* Packet send when creating a qdisc */
74 +struct tc_wrr_qdisc_crt {
75 + struct tc_wrr_qdisc_modf qdisc_modf;
76 + char srcaddr; /* 1=lookup source, 0=lookup destination */
77 + char usemac; /* 1=Classify on MAC addresses, 0=classify on IP */
78 + char usemasq; /* 1=Classify based on masqgrading - only valid
79 + if usemac is zero */
80 + int bands_max; /* Maximal number of bands (i.e.: classes) */
81 + int proxy_maxconn; /* If differnt from 0 then we support proxy remapping
82 + of packets. And this is the number of maximal
83 + concurrent proxy connections. */
86 +/* Packet returned when quering a qdisc */
87 +struct tc_wrr_qdisc_stats {
88 + struct tc_wrr_qdisc_crt qdisc_crt;
90 + int nodes_in_heap; /* Current number of bands wanting to send something */
91 + int bands_cur; /* Current number of bands used (i.e.: MAC/IP addresses seen) */
92 + int bands_reused; /* Number of times this band has been reused. */
93 + int packets_requed; /* Number of times packets have been requeued. */
94 + __u64 priosum; /* Sum of priorities in heap where 1 is 2^32 */
97 +struct tc_wrr_qdisc_modf_std {
98 + char proxy; /* This indicates which of the tc_wrr_qdisc_modf structers this is. 0=This struct */
99 + char change_class; /* Should we also change a class? */
100 + struct tc_wrr_qdisc_modf qdisc_modf; /* Only valid if change_class is false */
101 + unsigned char addr[ETH_ALEN]; /* Class to change (non-used bytes should be 0). Valid only of change_class is true */
102 + struct tc_wrr_class_modf class_modf; /* The change */
105 +/* Used for proxyremapping */
106 +struct tc_wrr_qdisc_modf_proxy {
107 + char proxy; /* This indicates which of the tc_wrr_qdisc_modf structers this is. 1=This struct */
108 + char reset; /* This is 1 if the proxyremap information should be reset */
109 + int changec; /* changec is the number of elements in changes. */
110 + long changes[0]; /* This is an array of type ProxyRemapBlock */