Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __LINUX_TC_PED_H |
| 2 | #define __LINUX_TC_PED_H |
| 3 | |
Jaswinder Singh Rajput | 5dbbf3b | 2009-01-30 20:11:22 +0530 | [diff] [blame] | 4 | #include <linux/types.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #include <linux/pkt_cls.h> |
| 6 | |
| 7 | #define TCA_ACT_PEDIT 7 |
| 8 | |
Eric Dumazet | d94d9fe | 2009-11-04 09:50:58 -0800 | [diff] [blame] | 9 | enum { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | TCA_PEDIT_UNSPEC, |
| 11 | TCA_PEDIT_TM, |
| 12 | TCA_PEDIT_PARMS, |
| 13 | __TCA_PEDIT_MAX |
| 14 | }; |
| 15 | #define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1) |
| 16 | |
Eric Dumazet | d94d9fe | 2009-11-04 09:50:58 -0800 | [diff] [blame] | 17 | struct tc_pedit_key { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | __u32 mask; /* AND */ |
| 19 | __u32 val; /*XOR */ |
| 20 | __u32 off; /*offset */ |
| 21 | __u32 at; |
| 22 | __u32 offmask; |
| 23 | __u32 shift; |
| 24 | }; |
| 25 | |
Eric Dumazet | d94d9fe | 2009-11-04 09:50:58 -0800 | [diff] [blame] | 26 | struct tc_pedit_sel { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | tc_gen; |
| 28 | unsigned char nkeys; |
| 29 | unsigned char flags; |
| 30 | struct tc_pedit_key keys[0]; |
| 31 | }; |
| 32 | #define tc_pedit tc_pedit_sel |
| 33 | |
| 34 | #endif |