diff options
author | Thomas Graf <tgraf@suug.ch> | 2005-06-24 00:00:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-24 00:00:58 -0400 |
commit | d675c989ed2d4ba23dff615330b04371aea83534 (patch) | |
tree | 856df6f7dc1fba81b134e2363e42dbf6022fa671 /include/linux | |
parent | 3fc7e8a6d842f72d16d2623b1022814a635ab961 (diff) |
[PKT_SCHED]: Packet classification based on textsearch (ematch)
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pkt_cls.h | 1 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 7 | ||||
-rw-r--r-- | include/linux/tc_ematch/tc_em_text.h | 19 |
3 files changed, 25 insertions, 2 deletions
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index d2aa214d6803..25d2d67c1faf 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -408,6 +408,7 @@ enum | |||
408 | TCF_EM_NBYTE, | 408 | TCF_EM_NBYTE, |
409 | TCF_EM_U32, | 409 | TCF_EM_U32, |
410 | TCF_EM_META, | 410 | TCF_EM_META, |
411 | TCF_EM_TEXT, | ||
411 | __TCF_EM_MAX | 412 | __TCF_EM_MAX |
412 | }; | 413 | }; |
413 | 414 | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index e68dbf0bf579..d021888b58f1 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -892,10 +892,13 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
892 | goto rtattr_failure; \ | 892 | goto rtattr_failure; \ |
893 | __rta_fill(skb, attrtype, attrlen, data); }) | 893 | __rta_fill(skb, attrtype, attrlen, data); }) |
894 | 894 | ||
895 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ | 895 | #define RTA_APPEND(skb, attrlen, data) \ |
896 | ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ | 896 | ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ |
897 | goto rtattr_failure; \ | 897 | goto rtattr_failure; \ |
898 | memcpy(skb_put(skb, RTA_ALIGN(attrlen)), data, attrlen); }) | 898 | memcpy(skb_put(skb, attrlen), data, attrlen); }) |
899 | |||
900 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ | ||
901 | RTA_APPEND(skb, RTA_ALIGN(attrlen), data) | ||
899 | 902 | ||
900 | #define RTA_PUT_U8(skb, attrtype, value) \ | 903 | #define RTA_PUT_U8(skb, attrtype, value) \ |
901 | ({ u8 _tmp = (value); \ | 904 | ({ u8 _tmp = (value); \ |
diff --git a/include/linux/tc_ematch/tc_em_text.h b/include/linux/tc_ematch/tc_em_text.h new file mode 100644 index 000000000000..7cd43e99c7f5 --- /dev/null +++ b/include/linux/tc_ematch/tc_em_text.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef __LINUX_TC_EM_TEXT_H | ||
2 | #define __LINUX_TC_EM_TEXT_H | ||
3 | |||
4 | #include <linux/pkt_cls.h> | ||
5 | |||
6 | #define TC_EM_TEXT_ALGOSIZ 16 | ||
7 | |||
8 | struct tcf_em_text | ||
9 | { | ||
10 | char algo[TC_EM_TEXT_ALGOSIZ]; | ||
11 | __u16 from_offset; | ||
12 | __u16 to_offset; | ||
13 | __u16 pattern_len; | ||
14 | __u8 from_layer:4; | ||
15 | __u8 to_layer:4; | ||
16 | __u8 pad; | ||
17 | }; | ||
18 | |||
19 | #endif | ||