libnl 3.10.0

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)
 
int rtnl_u32_get_classid (struct rtnl_cls *cls, uint32_t *classid)
 
int rtnl_u32_set_divisor (struct rtnl_cls *cls, uint32_t divisor)
 
int rtnl_u32_set_link (struct rtnl_cls *cls, uint32_t link)
 
int rtnl_u32_set_hashtable (struct rtnl_cls *cls, uint32_t ht)
 
int rtnl_u32_set_hashmask (struct rtnl_cls *cls, uint32_t hashmask, uint32_t offset)
 
int rtnl_u32_set_selector (struct rtnl_cls *cls, int offoff, uint32_t offmask, char offshift, uint16_t off, char flags)
 
int rtnl_u32_set_cls_terminal (struct rtnl_cls *cls)
 
int rtnl_u32_add_action (struct rtnl_cls *cls, struct rtnl_act *act)
 
struct rtnl_actrtnl_u32_get_action (struct rtnl_cls *cls)
 
int rtnl_u32_del_action (struct rtnl_cls *cls, struct rtnl_act *act)
 

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.
 
int rtnl_u32_add_mark (struct rtnl_cls *cls, uint32_t val, uint32_t mask)
 
int rtnl_u32_del_mark (struct rtnl_cls *cls)
 
int rtnl_u32_get_key (struct rtnl_cls *cls, uint8_t index, uint32_t *val, uint32_t *mask, int *off, int *offmask)
 Get the 32-bit key from the selector.
 
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.
 
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.
 
int rtnl_u32_add_key_in_addr (struct rtnl_cls *cls, const struct in_addr *addr, uint8_t bitmask, int off, int offmask)
 
int rtnl_u32_add_key_in6_addr (struct rtnl_cls *cls, const struct in6_addr *addr, uint8_t bitmask, int off, int offmask)
 

Detailed Description

Function Documentation

◆ rtnl_u32_set_handle()

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

Definition at line 475 of file u32.c.

◆ rtnl_u32_set_classid()

int rtnl_u32_set_classid ( struct rtnl_cls * cls,
uint32_t classid )

Definition at line 483 of file u32.c.

◆ rtnl_u32_get_classid()

int rtnl_u32_get_classid ( struct rtnl_cls * cls,
uint32_t * classid )

Definition at line 496 of file u32.c.

◆ rtnl_u32_set_divisor()

int rtnl_u32_set_divisor ( struct rtnl_cls * cls,
uint32_t divisor )

Definition at line 510 of file u32.c.

◆ rtnl_u32_set_link()

int rtnl_u32_set_link ( struct rtnl_cls * cls,
uint32_t link )

Definition at line 522 of file u32.c.

◆ rtnl_u32_set_hashtable()

int rtnl_u32_set_hashtable ( struct rtnl_cls * cls,
uint32_t ht )

Definition at line 534 of file u32.c.

◆ rtnl_u32_set_hashmask()

int rtnl_u32_set_hashmask ( struct rtnl_cls * cls,
uint32_t hashmask,
uint32_t offset )

Definition at line 546 of file u32.c.

◆ rtnl_u32_set_selector()

int rtnl_u32_set_selector ( struct rtnl_cls * cls,
int offoff,
uint32_t offmask,
char offshift,
uint16_t off,
char flags )

Definition at line 565 of file u32.c.

◆ rtnl_u32_set_cls_terminal()

int rtnl_u32_set_cls_terminal ( struct rtnl_cls * cls)

Definition at line 588 of file u32.c.

◆ rtnl_u32_add_action()

int rtnl_u32_add_action ( struct rtnl_cls * cls,
struct rtnl_act * act )

Definition at line 604 of file u32.c.

◆ rtnl_u32_get_action()

struct rtnl_act * rtnl_u32_get_action ( struct rtnl_cls * cls)

Definition at line 622 of file u32.c.

◆ rtnl_u32_del_action()

int rtnl_u32_del_action ( struct rtnl_cls * cls,
struct rtnl_act * act )

Definition at line 635 of file u32.c.

◆ rtnl_u32_set_flags()

int rtnl_u32_set_flags ( struct rtnl_cls * cls,
int flags )

Definition at line 665 of file u32.c.

◆ rtnl_u32_add_key()

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.

Parameters
clsclassifier to be modifier
valvalue to be matched (network byte-order)
maskmask to be applied before matching (network byte-order)
offoffset, in bytes, to start matching
offmaskoffset 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.

Definition at line 697 of file u32.c.

References nl_data_append(), rtnl_tc_data(), and TC_CAST.

Referenced by rtnl_u32_add_key_uint16(), and rtnl_u32_add_key_uint32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtnl_u32_add_mark()

int rtnl_u32_add_mark ( struct rtnl_cls * cls,
uint32_t val,
uint32_t mask )

Definition at line 731 of file u32.c.

◆ rtnl_u32_del_mark()

int rtnl_u32_del_mark ( struct rtnl_cls * cls)

Definition at line 751 of file u32.c.

◆ rtnl_u32_get_key()

int rtnl_u32_get_key ( struct rtnl_cls * cls,
uint8_t index,
uint32_t * val,
uint32_t * mask,
int * off,
int * offmask )

Get the 32-bit key from the selector.

Parameters
clsclassifier to be retrieve
indexthe index of the array of keys, start with 0
valpointer to store value after masked (network byte-order)
maskpointer to store the mask (network byte-order)
offpointer to store the offset
offmaskpointer to store offset mask

Definition at line 782 of file u32.c.

References rtnl_tc_data(), and TC_CAST.

+ Here is the call graph for this function:

◆ rtnl_u32_add_key_uint8()

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

Definition at line 806 of file u32.c.

◆ rtnl_u32_add_key_uint16()

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.

Parameters
clsclassifier to be modified
valvalue to be matched (host byte-order)
maskmask to be applied before matching (host byte-order)
offoffset, in bytes, to start matching
offmaskoffset mask

Definition at line 825 of file u32.c.

References rtnl_u32_add_key().

+ Here is the call graph for this function:

◆ rtnl_u32_add_key_uint32()

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.

Parameters
clsclassifier to be modified
valvalue to be matched (host byte-order)
maskmask to be applied before matching (host byte-order)
offoffset, in bytes, to start matching
offmaskoffset mask

Definition at line 846 of file u32.c.

References rtnl_u32_add_key().

+ Here is the call graph for this function:

◆ rtnl_u32_add_key_in_addr()

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

Definition at line 853 of file u32.c.

◆ rtnl_u32_add_key_in6_addr()

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

Definition at line 860 of file u32.c.