netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Universal 32-bit Classifier
Collaboration diagram for Universal 32-bit Classifier:

Attribute Modifications

void rtnl_u32_set_handle (struct rtnl_cls *cls, int htid, int hash, int nodeid)
 
int rtnl_u32_set_classid (struct rtnl_cls *cls, uint32_t classid)
 

Selector Modifications

int rtnl_u32_set_flags (struct rtnl_cls *cls, int flags)
 
int rtnl_u32_add_key (struct rtnl_cls *cls, uint32_t val, uint32_t mask, int off, int offmask)
 Append new 32-bit key to the selector. More...
 
int rtnl_u32_add_key_uint8 (struct rtnl_cls *cls, uint8_t val, uint8_t mask, int off, int offmask)
 
int rtnl_u32_add_key_uint16 (struct rtnl_cls *cls, uint16_t val, uint16_t mask, int off, int offmask)
 Append new selector key to match a 16-bit number. More...
 
int rtnl_u32_add_key_uint32 (struct rtnl_cls *cls, uint32_t val, uint32_t mask, int off, int offmask)
 Append new selector key to match a 32-bit number. More...
 
int rtnl_u32_add_key_in_addr (struct rtnl_cls *cls, struct in_addr *addr, uint8_t bitmask, int off, int offmask)
 
int rtnl_u32_add_key_in6_addr (struct rtnl_cls *cls, struct in6_addr *addr, uint8_t bitmask, int off, int offmask)
 

Detailed Description

Function Documentation

int rtnl_u32_add_key ( struct rtnl_cls cls,
uint32_t  val,
uint32_t  mask,
int  off,
int  offmask 
)

Append new 32-bit key to the selector.

  • cls classifier to be modifier
  • val value to be matched (network byte-order)
  • mask mask to be applied before matching (network byte-order)
  • off offset, in bytes, to start matching
  • offmask offset mask

General selectors define the pattern, mask and offset the pattern will be matched to the packet contents. Using the general selectors you can match virtually any single bit in the IP (or upper layer) header.

References rtnl_u32::cu_mask, rtnl_u32::cu_selector, tc_u32_sel::keys, mask, tc_u32_key::mask, tc_u32_sel::nkeys, nl_data_append(), NLE_NOMEM, NULL, tc_u32_key::off, tc_u32_key::offmask, rtnl_cls_data(), and tc_u32_key::val.

Referenced by rtnl_u32_add_key_in6_addr(), rtnl_u32_add_key_in_addr(), rtnl_u32_add_key_uint16(), rtnl_u32_add_key_uint32(), and rtnl_u32_add_key_uint8().

Here is the call graph for this function:

Here is the caller graph for this function:

int rtnl_u32_add_key_in6_addr ( struct rtnl_cls cls,
struct in6_addr *  addr,
uint8_t  bitmask,
int  off,
int  offmask 
)

References mask, and rtnl_u32_add_key().

Here is the call graph for this function:

int rtnl_u32_add_key_in_addr ( struct rtnl_cls cls,
struct in_addr *  addr,
uint8_t  bitmask,
int  off,
int  offmask 
)

References mask, and rtnl_u32_add_key().

Here is the call graph for this function:

int rtnl_u32_add_key_uint16 ( struct rtnl_cls cls,
uint16_t  val,
uint16_t  mask,
int  off,
int  offmask 
)

Append new selector key to match a 16-bit number.

  • cls classifier to be modified
  • val value to be matched (host byte-order)
  • mask mask to be applied before matching (host byte-order)
  • off offset, in bytes, to start matching
  • offmask offset mask

References NLE_INVAL, and rtnl_u32_add_key().

Here is the call graph for this function:

int rtnl_u32_add_key_uint32 ( struct rtnl_cls cls,
uint32_t  val,
uint32_t  mask,
int  off,
int  offmask 
)

Append new selector key to match a 32-bit number.

  • cls classifier to be modified
  • val value to be matched (host byte-order)
  • mask mask to be applied before matching (host byte-order)
  • off offset, in bytes, to start matching
  • offmask offset mask

References rtnl_u32_add_key().

Here is the call graph for this function:

int rtnl_u32_add_key_uint8 ( struct rtnl_cls cls,
uint8_t  val,
uint8_t  mask,
int  off,
int  offmask 
)

References rtnl_u32_add_key().

Here is the call graph for this function:

int rtnl_u32_set_classid ( struct rtnl_cls cls,
uint32_t  classid 
)

References rtnl_u32::cu_classid, rtnl_u32::cu_mask, and rtnl_cls_data().

Here is the call graph for this function:

int rtnl_u32_set_flags ( struct rtnl_cls cls,
int  flags 
)

References rtnl_u32::cu_mask, tc_u32_sel::flags, flags, NLE_NOMEM, and rtnl_cls_data().

Here is the call graph for this function:

void rtnl_u32_set_handle ( struct rtnl_cls cls,
int  htid,
int  hash,
int  nodeid 
)

References tca_set_handle().

Here is the call graph for this function: