Modules | |
Simple packet data comparison | |
Module Registration | |
int | rtnl_ematch_register (struct rtnl_ematch_ops *ops) |
Register ematch module. More... | |
int | rtnl_ematch_unregister (struct rtnl_ematch_ops *ops) |
Unregister ematch module. More... | |
struct rtnl_ematch_ops * | rtnl_ematch_lookup_ops (int kind) |
Lookup ematch module by kind. More... | |
struct rtnl_ematch_ops * | rtnl_ematch_lookup_ops_name (const char *name) |
Lookup ematch module by name. More... | |
Match | |
struct rtnl_ematch * | rtnl_ematch_alloc (struct rtnl_ematch_ops *ops) |
void | rtnl_ematch_add_child (struct rtnl_ematch *parent, struct rtnl_ematch *child) |
Add ematch to the end of the parent's list of children. More... | |
void | rtnl_ematch_unlink (struct rtnl_ematch *ematch) |
Remove ematch from the list it is linked to. More... | |
void | rtnl_ematch_free (struct rtnl_ematch *ematch) |
void | rtnl_ematch_set_flags (struct rtnl_ematch *ematch, uint16_t flags) |
void | rtnl_ematch_unset_flags (struct rtnl_ematch *ematch, uint16_t flags) |
uint16_t | rtnl_ematch_get_flags (struct rtnl_ematch *ematch) |
void * | rtnl_ematch_data (struct rtnl_ematch *ematch) |
Tree | |
struct rtnl_ematch_tree * | rtnl_ematch_tree_alloc (uint16_t progid) |
void | rtnl_ematch_tree_free (struct rtnl_ematch_tree *tree) |
void | rtnl_ematch_tree_add_tail (struct rtnl_ematch_tree *tree, struct rtnl_ematch *ematch) |
int | rtnl_ematch_parse (struct nlattr *attr, struct rtnl_ematch_tree **result) |
Parse ematch netlink attributes. More... | |
void | rtnl_ematch_tree_dump (struct rtnl_ematch_tree *tree, struct nl_dump_params *p) |
void rtnl_ematch_add_child | ( | struct rtnl_ematch * | parent, |
struct rtnl_ematch * | child | ||
) |
Add ematch to the end of the parent's list of children.
References rtnl_ematch::e_childs, and rtnl_ematch::e_list.
struct rtnl_ematch* rtnl_ematch_alloc | ( | struct rtnl_ematch_ops * | ops | ) |
References rtnl_ematch::e_childs, rtnl_ematch::e_kind, rtnl_ematch::e_list, rtnl_ematch::e_ops, rtnl_ematch_ops::eo_datalen, rtnl_ematch_ops::eo_kind, len, and NULL.
Referenced by rtnl_ematch_parse().
void* rtnl_ematch_data | ( | struct rtnl_ematch * | ematch | ) |
References rtnl_ematch::e_data.
Referenced by rtnl_ematch_cmp_get(), and rtnl_ematch_cmp_set().
void rtnl_ematch_free | ( | struct rtnl_ematch * | ematch | ) |
uint16_t rtnl_ematch_get_flags | ( | struct rtnl_ematch * | ematch | ) |
References rtnl_ematch::e_flags.
struct rtnl_ematch_ops* rtnl_ematch_lookup_ops | ( | int | kind | ) |
Lookup ematch module by kind.
References rtnl_ematch_ops::eo_kind, rtnl_ematch_ops::eo_list, nl_list_for_each_entry, and NULL.
Referenced by rtnl_ematch_parse(), and rtnl_ematch_register().
struct rtnl_ematch_ops* rtnl_ematch_lookup_ops_name | ( | const char * | name | ) |
Lookup ematch module by name.
References rtnl_ematch_ops::eo_list, rtnl_ematch_ops::eo_name, nl_list_for_each_entry, and NULL.
int rtnl_ematch_parse | ( | struct nlattr * | attr, |
struct rtnl_ematch_tree ** | result | ||
) |
Parse ematch netlink attributes.
References data, rtnl_ematch::e_flags, rtnl_ematch::e_id, rtnl_ematch::e_kind, rtnl_ematch_ops::eo_datalen, rtnl_ematch_ops::eo_parse, rtnl_ematch_tree::et_list, tcf_ematch_hdr::flags, tcf_ematch_hdr::kind, len, tcf_ematch_hdr::matchid, NLA_ALIGN, nla_data(), nla_for_each_nested, nla_len(), nla_parse_nested(), nla_total_size(), NLE_INVAL, NLE_MISSING_ATTR, NLE_NOMEM, NLE_RANGE, tcf_ematch_tree_hdr::nmatches, tcf_ematch_tree_hdr::progid, rtnl_ematch_alloc(), rtnl_ematch_lookup_ops(), rtnl_ematch_tree_alloc(), rtnl_ematch_tree_free(), tb, TCA_EMATCH_TREE_HDR, TCA_EMATCH_TREE_LIST, TCA_EMATCH_TREE_MAX, and TCF_EM_CONTAINER.
int rtnl_ematch_register | ( | struct rtnl_ematch_ops * | ops | ) |
Register ematch module.
References rtnl_ematch_ops::eo_kind, rtnl_ematch_ops::eo_list, NLE_EXIST, and rtnl_ematch_lookup_ops().
void rtnl_ematch_set_flags | ( | struct rtnl_ematch * | ematch, |
uint16_t | flags | ||
) |
References rtnl_ematch::e_flags, and flags.
void rtnl_ematch_tree_add_tail | ( | struct rtnl_ematch_tree * | tree, |
struct rtnl_ematch * | ematch | ||
) |
References rtnl_ematch::e_list, and rtnl_ematch_tree::et_list.
struct rtnl_ematch_tree* rtnl_ematch_tree_alloc | ( | uint16_t | progid | ) |
References rtnl_ematch_tree::et_list, rtnl_ematch_tree::et_progid, and NULL.
Referenced by rtnl_ematch_parse().
void rtnl_ematch_tree_dump | ( | struct rtnl_ematch_tree * | tree, |
struct nl_dump_params * | p | ||
) |
void rtnl_ematch_tree_free | ( | struct rtnl_ematch_tree * | tree | ) |
References rtnl_ematch_tree::et_list.
Referenced by rtnl_basic_set_ematch(), rtnl_cgroup_set_ematch(), and rtnl_ematch_parse().
void rtnl_ematch_unlink | ( | struct rtnl_ematch * | ematch | ) |
Remove ematch from the list it is linked to.
References rtnl_ematch::e_list.
int rtnl_ematch_unregister | ( | struct rtnl_ematch_ops * | ops | ) |
Unregister ematch module.
References rtnl_ematch_ops::eo_kind, rtnl_ematch_ops::eo_list, nl_list_for_each_entry, and NLE_OBJ_NOTFOUND.
void rtnl_ematch_unset_flags | ( | struct rtnl_ematch * | ematch, |
uint16_t | flags | ||
) |
References rtnl_ematch::e_flags.