12 #ifndef NETLINK_CLS_EMATCH_H_ 13 #define NETLINK_CLS_EMATCH_H_ 15 #include <netlink/netlink.h> 16 #include <netlink/msg.h> 17 #include <netlink/route/classifier.h> 18 #include <linux/pkt_cls.h> 25 #define RTNL_EMATCH_PROGID 2 28 struct rtnl_ematch_tree;
40 int (*eo_parse)(
struct rtnl_ematch *,
void *, size_t);
41 void (*eo_dump)(
struct rtnl_ematch *,
43 int (*eo_fill)(
struct rtnl_ematch *,
struct nl_msg *);
44 void (*eo_free)(
struct rtnl_ematch *);
54 struct rtnl_ematch *);
56 extern void rtnl_ematch_free(
struct rtnl_ematch *);
58 extern void * rtnl_ematch_data(
struct rtnl_ematch *);
59 extern void rtnl_ematch_set_flags(
struct rtnl_ematch *,
61 extern void rtnl_ematch_unset_flags(
struct rtnl_ematch *,
63 extern uint16_t rtnl_ematch_get_flags(
struct rtnl_ematch *);
64 extern int rtnl_ematch_set_ops(
struct rtnl_ematch *,
66 extern int rtnl_ematch_set_kind(
struct rtnl_ematch *,
68 extern int rtnl_ematch_set_name(
struct rtnl_ematch *,
74 struct rtnl_ematch *);
77 struct rtnl_ematch_tree **);
78 extern int rtnl_ematch_fill_attr(
struct nl_msg *,
int,
79 struct rtnl_ematch_tree *);
80 extern void rtnl_ematch_tree_dump(
struct rtnl_ematch_tree *,
84 extern int rtnl_ematch_parse_expr(
const char *,
char **,
85 struct rtnl_ematch_tree **);
87 extern char * rtnl_ematch_offset2txt(uint8_t, uint16_t,
89 extern char * rtnl_ematch_opnd2txt(uint8_t,
char *,
size_t);
void rtnl_ematch_tree_add(struct rtnl_ematch_tree *, struct rtnl_ematch *)
Add ematch object to the end of the ematch tree.
struct rtnl_ematch_tree * rtnl_ematch_tree_alloc(uint16_t)
Allocate ematch tree object.
void rtnl_ematch_tree_free(struct rtnl_ematch_tree *)
Free ematch tree object.
struct rtnl_ematch_ops * rtnl_ematch_lookup_ops(int)
Lookup ematch module by identification number.
struct rtnl_ematch_ops * rtnl_ematch_lookup_ops_by_name(const char *)
Lookup ematch module by name.
struct rtnl_ematch * rtnl_ematch_alloc(void)
Allocate ematch object.
int rtnl_ematch_parse_attr(struct nlattr *, struct rtnl_ematch_tree **)
Parse ematch netlink attributes.
int rtnl_ematch_register(struct rtnl_ematch_ops *)
Register ematch module.
void rtnl_ematch_unlink(struct rtnl_ematch *)
Remove ematch from the list of ematches it is linked to.
Extended Match Operations.
int rtnl_ematch_add_child(struct rtnl_ematch *, struct rtnl_ematch *)
Add ematch to the end of the parent's list of children.