Extended Match
[Classifiers]

Modules

 Simple packet data comparison

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.
void rtnl_ematch_tree_dump (struct rtnl_ematch_tree *tree, struct nl_dump_params *p)

Module Registration



int rtnl_ematch_register (struct rtnl_ematch_ops *ops)
 Register ematch module.
int rtnl_ematch_unregister (struct rtnl_ematch_ops *ops)
 Unregister ematch module.
struct rtnl_ematch_opsrtnl_ematch_lookup_ops (int kind)
 Lookup ematch module by kind.
struct rtnl_ematch_opsrtnl_ematch_lookup_ops_name (const char *name)
 Lookup ematch module by name.

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.
void rtnl_ematch_unlink (struct rtnl_ematch *ematch)
 Remove ematch from the list it is linked to.
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)

Function Documentation

int rtnl_ematch_register ( struct rtnl_ematch_ops ops  ) 
Parameters:
ops Module operations.
Returns:
0 on success or a negative error code.

Definition at line 39 of file ematch.c.

References rtnl_ematch_lookup_ops().

int rtnl_ematch_unregister ( struct rtnl_ematch_ops ops  ) 
Parameters:
ops Module operations.
Returns:
0 on success or a negative error code.

Definition at line 55 of file ematch.c.

struct rtnl_ematch_ops* rtnl_ematch_lookup_ops ( int  kind  )  [read]
Parameters:
kind Module kind.
Returns:
Module operations or NULL if not found.

Definition at line 75 of file ematch.c.

Referenced by rtnl_ematch_parse(), and rtnl_ematch_register().

struct rtnl_ematch_ops* rtnl_ematch_lookup_ops_name ( const char *  name  )  [read]
Parameters:
name Name of ematch module.
Returns:
Module operations or NULL if not fuond.

Definition at line 92 of file ematch.c.

void rtnl_ematch_add_child ( struct rtnl_ematch *  parent,
struct rtnl_ematch *  child 
)
Parameters:
parent Parent ematch.
child Ematch to be added as new child of parent.

Definition at line 133 of file ematch.c.

void rtnl_ematch_unlink ( struct rtnl_ematch *  ematch  ) 
Parameters:
ematch Ematch to be unlinked.

Definition at line 143 of file ematch.c.

int rtnl_ematch_parse ( struct nlattr *  attr,
struct rtnl_ematch_tree **  result 
)
Returns:
0 on success or a negative error code.

Definition at line 259 of file ematch.c.

References nla_data(), nla_for_each_nested, nla_len(), nla_parse_nested(), nla_total_size(), and rtnl_ematch_lookup_ops().

Generated on Tue May 25 14:50:23 2010 for libnl by  doxygen 1.6.3