netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Collaboration diagram for Extended Match:

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_opsrtnl_ematch_lookup_ops (int kind)
 Lookup ematch module by kind. More...
 
struct rtnl_ematch_opsrtnl_ematch_lookup_ops_name (const char *name)
 Lookup ematch module by name. More...
 

Match

struct rtnl_ematchrtnl_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_treertnl_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)
 

Detailed Description

Function Documentation

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.

  • parent Parent ematch.
  • child Ematch to be added as new child of parent.

References rtnl_ematch::e_childs, and rtnl_ematch::e_list.

void* rtnl_ematch_data ( struct rtnl_ematch ematch)

References rtnl_ematch::e_data.

Referenced by rtnl_ematch_cmp_get(), and rtnl_ematch_cmp_set().

Here is the caller graph for this function:

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.

  • kind Module kind.
Returns
Module operations or NULL if not found.

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().

Here is the caller graph for this function:

struct rtnl_ematch_ops* rtnl_ematch_lookup_ops_name ( const char *  name)

Lookup ematch module by name.

  • name Name of ematch module.
Returns
Module operations or NULL if not fuond.

References rtnl_ematch_ops::eo_list, rtnl_ematch_ops::eo_name, nl_list_for_each_entry, and NULL.

int rtnl_ematch_register ( struct rtnl_ematch_ops ops)

Register ematch module.

  • ops Module operations.
Returns
0 on success or a negative error code.

References rtnl_ematch_ops::eo_kind, rtnl_ematch_ops::eo_list, NLE_EXIST, and rtnl_ematch_lookup_ops().

Here is the call graph for this function:

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 
)
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().

Here is the caller graph for this function:

void rtnl_ematch_tree_dump ( struct rtnl_ematch_tree tree,
struct nl_dump_params p 
)

References rtnl_ematch_tree::et_list, and nl_dump().

Here is the call graph for this function:

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().

Here is the caller graph for this function:

void rtnl_ematch_unlink ( struct rtnl_ematch ematch)

Remove ematch from the list it is linked to.

  • ematch Ematch to be unlinked.

References rtnl_ematch::e_list.

int rtnl_ematch_unregister ( struct rtnl_ematch_ops ops)

Unregister ematch module.

  • ops Module operations.
Returns
0 on success or a negative error code.

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.