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