libnl
3.2.24-rc1
|
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_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. 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) |
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.
Definition at line 542 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().
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.
cls | classifier to be retrieve |
index | the index of the array of keys, start with 0 |
val | pointer to store value after masked (network byte-order) |
mask | pointer to store the mask (network byte-order) |
off | pointer to store the offset |
offmask | pointer to store offset mask |
Definition at line 584 of file u32.c.
References rtnl_tc_data(), and TC_CAST.
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 |
Definition at line 628 of file u32.c.
References rtnl_u32_add_key().
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 |
Definition at line 649 of file u32.c.
References rtnl_u32_add_key().