Loading include/linux/pkt_cls.h +1 −0 Original line number Diff line number Diff line Loading @@ -408,6 +408,7 @@ enum TCF_EM_NBYTE, TCF_EM_U32, TCF_EM_META, TCF_EM_TEXT, __TCF_EM_MAX }; Loading include/linux/rtnetlink.h +5 −2 Original line number Diff line number Diff line Loading @@ -892,10 +892,13 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi goto rtattr_failure; \ __rta_fill(skb, attrtype, attrlen, data); }) #define RTA_PUT_NOHDR(skb, attrlen, data) \ #define RTA_APPEND(skb, attrlen, data) \ ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ goto rtattr_failure; \ memcpy(skb_put(skb, RTA_ALIGN(attrlen)), data, attrlen); }) memcpy(skb_put(skb, attrlen), data, attrlen); }) #define RTA_PUT_NOHDR(skb, attrlen, data) \ RTA_APPEND(skb, RTA_ALIGN(attrlen), data) #define RTA_PUT_U8(skb, attrtype, value) \ ({ u8 _tmp = (value); \ Loading include/linux/tc_ematch/tc_em_text.h 0 → 100644 +19 −0 Original line number Diff line number Diff line #ifndef __LINUX_TC_EM_TEXT_H #define __LINUX_TC_EM_TEXT_H #include <linux/pkt_cls.h> #define TC_EM_TEXT_ALGOSIZ 16 struct tcf_em_text { char algo[TC_EM_TEXT_ALGOSIZ]; __u16 from_offset; __u16 to_offset; __u16 pattern_len; __u8 from_layer:4; __u8 to_layer:4; __u8 pad; }; #endif net/sched/Kconfig +11 −0 Original line number Diff line number Diff line Loading @@ -449,6 +449,17 @@ config NET_EMATCH_META To compile this code as a module, choose M here: the module will be called em_meta. config NET_EMATCH_TEXT tristate "Textsearch" depends on NET_EMATCH ---help--- Say Y here if you want to be ablt to classify packets based on textsearch comparisons. Please select the appropriate textsearch algorithms in the Library section. To compile this code as a module, choose M here: the module will be called em_text. config NET_CLS_ACT bool "Packet ACTION" depends on EXPERIMENTAL && NET_CLS && NET_QOS Loading net/sched/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -40,3 +40,4 @@ obj-$(CONFIG_NET_EMATCH_CMP) += em_cmp.o obj-$(CONFIG_NET_EMATCH_NBYTE) += em_nbyte.o obj-$(CONFIG_NET_EMATCH_U32) += em_u32.o obj-$(CONFIG_NET_EMATCH_META) += em_meta.o obj-$(CONFIG_NET_EMATCH_TEXT) += em_text.o Loading
include/linux/pkt_cls.h +1 −0 Original line number Diff line number Diff line Loading @@ -408,6 +408,7 @@ enum TCF_EM_NBYTE, TCF_EM_U32, TCF_EM_META, TCF_EM_TEXT, __TCF_EM_MAX }; Loading
include/linux/rtnetlink.h +5 −2 Original line number Diff line number Diff line Loading @@ -892,10 +892,13 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi goto rtattr_failure; \ __rta_fill(skb, attrtype, attrlen, data); }) #define RTA_PUT_NOHDR(skb, attrlen, data) \ #define RTA_APPEND(skb, attrlen, data) \ ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ goto rtattr_failure; \ memcpy(skb_put(skb, RTA_ALIGN(attrlen)), data, attrlen); }) memcpy(skb_put(skb, attrlen), data, attrlen); }) #define RTA_PUT_NOHDR(skb, attrlen, data) \ RTA_APPEND(skb, RTA_ALIGN(attrlen), data) #define RTA_PUT_U8(skb, attrtype, value) \ ({ u8 _tmp = (value); \ Loading
include/linux/tc_ematch/tc_em_text.h 0 → 100644 +19 −0 Original line number Diff line number Diff line #ifndef __LINUX_TC_EM_TEXT_H #define __LINUX_TC_EM_TEXT_H #include <linux/pkt_cls.h> #define TC_EM_TEXT_ALGOSIZ 16 struct tcf_em_text { char algo[TC_EM_TEXT_ALGOSIZ]; __u16 from_offset; __u16 to_offset; __u16 pattern_len; __u8 from_layer:4; __u8 to_layer:4; __u8 pad; }; #endif
net/sched/Kconfig +11 −0 Original line number Diff line number Diff line Loading @@ -449,6 +449,17 @@ config NET_EMATCH_META To compile this code as a module, choose M here: the module will be called em_meta. config NET_EMATCH_TEXT tristate "Textsearch" depends on NET_EMATCH ---help--- Say Y here if you want to be ablt to classify packets based on textsearch comparisons. Please select the appropriate textsearch algorithms in the Library section. To compile this code as a module, choose M here: the module will be called em_text. config NET_CLS_ACT bool "Packet ACTION" depends on EXPERIMENTAL && NET_CLS && NET_QOS Loading
net/sched/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -40,3 +40,4 @@ obj-$(CONFIG_NET_EMATCH_CMP) += em_cmp.o obj-$(CONFIG_NET_EMATCH_NBYTE) += em_nbyte.o obj-$(CONFIG_NET_EMATCH_U32) += em_u32.o obj-$(CONFIG_NET_EMATCH_META) += em_meta.o obj-$(CONFIG_NET_EMATCH_TEXT) += em_text.o