The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef __LINUX_PKT_SCHED_H |
| 13 | #define __LINUX_PKT_SCHED_H |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 15 | #include <linux/types.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 16 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | #define TC_PRIO_BESTEFFORT 0 |
| 18 | #define TC_PRIO_FILLER 1 |
| 19 | #define TC_PRIO_BULK 2 |
| 20 | #define TC_PRIO_INTERACTIVE_BULK 4 |
| 21 | #define TC_PRIO_INTERACTIVE 6 |
| 22 | #define TC_PRIO_CONTROL 7 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 23 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | #define TC_PRIO_MAX 15 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 25 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 26 | struct tc_stats |
| 27 | { |
| 28 | __u64 bytes; |
| 29 | __u32 packets; |
| 30 | __u32 drops; |
| 31 | __u32 overlimits; |
| 32 | __u32 bps; |
| 33 | __u32 pps; |
| 34 | __u32 qlen; |
| 35 | __u32 backlog; |
| 36 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 37 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 38 | struct tc_estimator |
| 39 | { |
| 40 | signed char interval; |
| 41 | unsigned char ewma_log; |
| 42 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 43 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | #define TC_H_MAJ_MASK (0xFFFF0000U) |
| 45 | #define TC_H_MIN_MASK (0x0000FFFFU) |
| 46 | #define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK) |
| 47 | #define TC_H_MIN(h) ((h)&TC_H_MIN_MASK) |
| 48 | #define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK)) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 49 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | #define TC_H_UNSPEC (0U) |
| 51 | #define TC_H_ROOT (0xFFFFFFFFU) |
| 52 | #define TC_H_INGRESS (0xFFFFFFF1U) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 53 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | struct tc_ratespec |
| 55 | { |
| 56 | unsigned char cell_log; |
| 57 | unsigned char __reserved; |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 58 | unsigned short overhead; |
| 59 | short cell_align; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 60 | unsigned short mpu; |
| 61 | __u32 rate; |
| 62 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 63 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 64 | #define TC_RTAB_SIZE 1024 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 65 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 66 | struct tc_sizespec { |
| 67 | unsigned char cell_log; |
| 68 | unsigned char size_log; |
| 69 | short cell_align; |
| 70 | int overhead; |
| 71 | unsigned int linklayer; |
| 72 | unsigned int mpu; |
| 73 | unsigned int mtu; |
| 74 | unsigned int tsize; |
| 75 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 76 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 77 | enum { |
| 78 | TCA_STAB_UNSPEC, |
| 79 | TCA_STAB_BASE, |
| 80 | TCA_STAB_DATA, |
| 81 | __TCA_STAB_MAX |
| 82 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 83 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 84 | #define TCA_STAB_MAX (__TCA_STAB_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 85 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 86 | struct tc_fifo_qopt |
| 87 | { |
| 88 | __u32 limit; |
| 89 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 90 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 91 | #define TCQ_PRIO_BANDS 16 |
| 92 | #define TCQ_MIN_PRIO_BANDS 2 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 93 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | struct tc_prio_qopt |
| 95 | { |
| 96 | int bands; |
| 97 | __u8 priomap[TC_PRIO_MAX+1]; |
| 98 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 99 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 100 | struct tc_multiq_qopt { |
| 101 | __u16 bands; |
| 102 | __u16 max_bands; |
| 103 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 104 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 105 | struct tc_tbf_qopt |
| 106 | { |
| 107 | struct tc_ratespec rate; |
| 108 | struct tc_ratespec peakrate; |
| 109 | __u32 limit; |
| 110 | __u32 buffer; |
| 111 | __u32 mtu; |
| 112 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 113 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 114 | enum |
| 115 | { |
| 116 | TCA_TBF_UNSPEC, |
| 117 | TCA_TBF_PARMS, |
| 118 | TCA_TBF_RTAB, |
| 119 | TCA_TBF_PTAB, |
| 120 | __TCA_TBF_MAX, |
| 121 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 122 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 123 | #define TCA_TBF_MAX (__TCA_TBF_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 124 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 125 | struct tc_sfq_qopt |
| 126 | { |
| 127 | unsigned quantum; |
| 128 | int perturb_period; |
| 129 | __u32 limit; |
| 130 | unsigned divisor; |
| 131 | unsigned flows; |
| 132 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 133 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 134 | struct tc_sfq_xstats |
| 135 | { |
| 136 | __s32 allot; |
| 137 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 138 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 139 | enum |
| 140 | { |
| 141 | TCA_RED_UNSPEC, |
| 142 | TCA_RED_PARMS, |
| 143 | TCA_RED_STAB, |
| 144 | __TCA_RED_MAX, |
| 145 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 146 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 147 | #define TCA_RED_MAX (__TCA_RED_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 148 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 149 | struct tc_red_qopt |
| 150 | { |
| 151 | __u32 limit; |
| 152 | __u32 qth_min; |
| 153 | __u32 qth_max; |
| 154 | unsigned char Wlog; |
| 155 | unsigned char Plog; |
| 156 | unsigned char Scell_log; |
| 157 | unsigned char flags; |
| 158 | #define TC_RED_ECN 1 |
| 159 | #define TC_RED_HARDDROP 2 |
| 160 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 161 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 162 | struct tc_red_xstats |
| 163 | { |
| 164 | __u32 early; |
| 165 | __u32 pdrop; |
| 166 | __u32 other; |
| 167 | __u32 marked; |
| 168 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 169 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 170 | #define MAX_DPs 16 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 171 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 172 | enum |
| 173 | { |
| 174 | TCA_GRED_UNSPEC, |
| 175 | TCA_GRED_PARMS, |
| 176 | TCA_GRED_STAB, |
| 177 | TCA_GRED_DPS, |
| 178 | __TCA_GRED_MAX, |
| 179 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 180 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 181 | #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 182 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 183 | struct tc_gred_qopt |
| 184 | { |
| 185 | __u32 limit; |
| 186 | __u32 qth_min; |
| 187 | __u32 qth_max; |
| 188 | __u32 DP; |
| 189 | __u32 backlog; |
| 190 | __u32 qave; |
| 191 | __u32 forced; |
| 192 | __u32 early; |
| 193 | __u32 other; |
| 194 | __u32 pdrop; |
| 195 | __u8 Wlog; |
| 196 | __u8 Plog; |
| 197 | __u8 Scell_log; |
| 198 | __u8 prio; |
| 199 | __u32 packets; |
| 200 | __u32 bytesin; |
| 201 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 202 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 203 | struct tc_gred_sopt |
| 204 | { |
| 205 | __u32 DPs; |
| 206 | __u32 def_DP; |
| 207 | __u8 grio; |
| 208 | __u8 flags; |
| 209 | __u16 pad1; |
| 210 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 211 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 212 | #define TC_HTB_NUMPRIO 8 |
| 213 | #define TC_HTB_MAXDEPTH 8 |
| 214 | #define TC_HTB_PROTOVER 3 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 215 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 216 | struct tc_htb_opt |
| 217 | { |
| 218 | struct tc_ratespec rate; |
| 219 | struct tc_ratespec ceil; |
| 220 | __u32 buffer; |
| 221 | __u32 cbuffer; |
| 222 | __u32 quantum; |
| 223 | __u32 level; |
| 224 | __u32 prio; |
| 225 | }; |
| 226 | struct tc_htb_glob |
| 227 | { |
| 228 | __u32 version; |
| 229 | __u32 rate2quantum; |
| 230 | __u32 defcls; |
| 231 | __u32 debug; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 232 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 233 | __u32 direct_pkts; |
| 234 | }; |
| 235 | enum |
| 236 | { |
| 237 | TCA_HTB_UNSPEC, |
| 238 | TCA_HTB_PARMS, |
| 239 | TCA_HTB_INIT, |
| 240 | TCA_HTB_CTAB, |
| 241 | TCA_HTB_RTAB, |
| 242 | __TCA_HTB_MAX, |
| 243 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 244 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 245 | #define TCA_HTB_MAX (__TCA_HTB_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 246 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 247 | struct tc_htb_xstats |
| 248 | { |
| 249 | __u32 lends; |
| 250 | __u32 borrows; |
| 251 | __u32 giants; |
| 252 | __u32 tokens; |
| 253 | __u32 ctokens; |
| 254 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 255 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 256 | struct tc_hfsc_qopt |
| 257 | { |
| 258 | __u16 defcls; |
| 259 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 260 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 261 | struct tc_service_curve |
| 262 | { |
| 263 | __u32 m1; |
| 264 | __u32 d; |
| 265 | __u32 m2; |
| 266 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 267 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 268 | struct tc_hfsc_stats |
| 269 | { |
| 270 | __u64 work; |
| 271 | __u64 rtwork; |
| 272 | __u32 period; |
| 273 | __u32 level; |
| 274 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 275 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 276 | enum |
| 277 | { |
| 278 | TCA_HFSC_UNSPEC, |
| 279 | TCA_HFSC_RSC, |
| 280 | TCA_HFSC_FSC, |
| 281 | TCA_HFSC_USC, |
| 282 | __TCA_HFSC_MAX, |
| 283 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 284 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 285 | #define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 286 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 287 | #define TC_CBQ_MAXPRIO 8 |
| 288 | #define TC_CBQ_MAXLEVEL 8 |
| 289 | #define TC_CBQ_DEF_EWMA 5 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 290 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 291 | struct tc_cbq_lssopt |
| 292 | { |
| 293 | unsigned char change; |
| 294 | unsigned char flags; |
| 295 | #define TCF_CBQ_LSS_BOUNDED 1 |
| 296 | #define TCF_CBQ_LSS_ISOLATED 2 |
| 297 | unsigned char ewma_log; |
| 298 | unsigned char level; |
| 299 | #define TCF_CBQ_LSS_FLAGS 1 |
| 300 | #define TCF_CBQ_LSS_EWMA 2 |
| 301 | #define TCF_CBQ_LSS_MAXIDLE 4 |
| 302 | #define TCF_CBQ_LSS_MINIDLE 8 |
| 303 | #define TCF_CBQ_LSS_OFFTIME 0x10 |
| 304 | #define TCF_CBQ_LSS_AVPKT 0x20 |
| 305 | __u32 maxidle; |
| 306 | __u32 minidle; |
| 307 | __u32 offtime; |
| 308 | __u32 avpkt; |
| 309 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 310 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 311 | struct tc_cbq_wrropt |
| 312 | { |
| 313 | unsigned char flags; |
| 314 | unsigned char priority; |
| 315 | unsigned char cpriority; |
| 316 | unsigned char __reserved; |
| 317 | __u32 allot; |
| 318 | __u32 weight; |
| 319 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 320 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 321 | struct tc_cbq_ovl |
| 322 | { |
| 323 | unsigned char strategy; |
| 324 | #define TC_CBQ_OVL_CLASSIC 0 |
| 325 | #define TC_CBQ_OVL_DELAY 1 |
| 326 | #define TC_CBQ_OVL_LOWPRIO 2 |
| 327 | #define TC_CBQ_OVL_DROP 3 |
| 328 | #define TC_CBQ_OVL_RCLASSIC 4 |
| 329 | unsigned char priority2; |
| 330 | __u16 pad; |
| 331 | __u32 penalty; |
| 332 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 333 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 334 | struct tc_cbq_police |
| 335 | { |
| 336 | unsigned char police; |
| 337 | unsigned char __res1; |
| 338 | unsigned short __res2; |
| 339 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 340 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 341 | struct tc_cbq_fopt |
| 342 | { |
| 343 | __u32 split; |
| 344 | __u32 defmap; |
| 345 | __u32 defchange; |
| 346 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 347 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 348 | struct tc_cbq_xstats |
| 349 | { |
| 350 | __u32 borrows; |
| 351 | __u32 overactions; |
| 352 | __s32 avgidle; |
| 353 | __s32 undertime; |
| 354 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 355 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 356 | enum |
| 357 | { |
| 358 | TCA_CBQ_UNSPEC, |
| 359 | TCA_CBQ_LSSOPT, |
| 360 | TCA_CBQ_WRROPT, |
| 361 | TCA_CBQ_FOPT, |
| 362 | TCA_CBQ_OVL_STRATEGY, |
| 363 | TCA_CBQ_RATE, |
| 364 | TCA_CBQ_RTAB, |
| 365 | TCA_CBQ_POLICE, |
| 366 | __TCA_CBQ_MAX, |
| 367 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 368 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 369 | #define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 370 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 371 | enum { |
| 372 | TCA_DSMARK_UNSPEC, |
| 373 | TCA_DSMARK_INDICES, |
| 374 | TCA_DSMARK_DEFAULT_INDEX, |
| 375 | TCA_DSMARK_SET_TC_INDEX, |
| 376 | TCA_DSMARK_MASK, |
| 377 | TCA_DSMARK_VALUE, |
| 378 | __TCA_DSMARK_MAX, |
| 379 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 380 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 381 | #define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 382 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 383 | enum { |
| 384 | TCA_ATM_UNSPEC, |
| 385 | TCA_ATM_FD, |
| 386 | TCA_ATM_PTR, |
| 387 | TCA_ATM_HDR, |
| 388 | TCA_ATM_EXCESS, |
| 389 | TCA_ATM_ADDR, |
| 390 | TCA_ATM_STATE, |
| 391 | __TCA_ATM_MAX, |
| 392 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 393 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 394 | #define TCA_ATM_MAX (__TCA_ATM_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 395 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 396 | enum |
| 397 | { |
| 398 | TCA_NETEM_UNSPEC, |
| 399 | TCA_NETEM_CORR, |
| 400 | TCA_NETEM_DELAY_DIST, |
| 401 | TCA_NETEM_REORDER, |
| 402 | TCA_NETEM_CORRUPT, |
| 403 | __TCA_NETEM_MAX, |
| 404 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 405 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 406 | #define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 407 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 408 | struct tc_netem_qopt |
| 409 | { |
| 410 | __u32 latency; |
| 411 | __u32 limit; |
| 412 | __u32 loss; |
| 413 | __u32 gap; |
| 414 | __u32 duplicate; |
| 415 | __u32 jitter; |
| 416 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 417 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 418 | struct tc_netem_corr |
| 419 | { |
| 420 | __u32 delay_corr; |
| 421 | __u32 loss_corr; |
| 422 | __u32 dup_corr; |
| 423 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 424 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 425 | struct tc_netem_reorder |
| 426 | { |
| 427 | __u32 probability; |
| 428 | __u32 correlation; |
| 429 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 430 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 431 | struct tc_netem_corrupt |
| 432 | { |
| 433 | __u32 probability; |
| 434 | __u32 correlation; |
| 435 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 436 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 437 | #define NETEM_DIST_SCALE 8192 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 438 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 439 | enum |
| 440 | { |
| 441 | TCA_DRR_UNSPEC, |
| 442 | TCA_DRR_QUANTUM, |
| 443 | __TCA_DRR_MAX |
| 444 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 445 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 446 | #define TCA_DRR_MAX (__TCA_DRR_MAX - 1) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 447 | |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 448 | struct tc_drr_stats |
| 449 | { |
| 450 | __u32 deficit; |
| 451 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 452 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 453 | #endif |