libnl
3.2.21
|
Enumerations | |
enum | rtnl_link_bridge_flags { RTNL_BRIDGE_HAIRPIN_MODE = 0x0001, RTNL_BRIDGE_BPDU_GUARD = 0x0002, RTNL_BRIDGE_ROOT_BLOCK = 0x0004, RTNL_BRIDGE_FAST_LEAVE = 0x0008 } |
Bridge flags. |
Functions | |
struct rtnl_link * | rtnl_link_bridge_alloc (void) |
Allocate link object of type bridge. | |
int | rtnl_link_is_bridge (struct rtnl_link *link) |
Check if a link is a bridge. | |
int | rtnl_link_bridge_has_ext_info (struct rtnl_link *link) |
Check if bridge has extended information. | |
int | rtnl_link_bridge_set_port_state (struct rtnl_link *link, uint8_t state) |
Set Spanning Tree Protocol (STP) port state. | |
int | rtnl_link_bridge_get_port_state (struct rtnl_link *link) |
Get Spanning Tree Protocol (STP) port state. | |
int | rtnl_link_bridge_set_priority (struct rtnl_link *link, uint16_t prio) |
Set priority. | |
int | rtnl_link_bridge_get_priority (struct rtnl_link *link) |
Get priority. | |
int | rtnl_link_bridge_set_cost (struct rtnl_link *link, uint32_t cost) |
Set Spanning Tree Protocol (STP) path cost. | |
int | rtnl_link_bridge_get_cost (struct rtnl_link *link, uint32_t *cost) |
Get Spanning Tree Protocol (STP) path cost. | |
int | rtnl_link_bridge_unset_flags (struct rtnl_link *link, unsigned int flags) |
Unset flags. | |
int | rtnl_link_bridge_set_flags (struct rtnl_link *link, unsigned int flags) |
Set flags. | |
int | rtnl_link_bridge_get_flags (struct rtnl_link *link) |
Get flags. |
|
read |
Allocate link object of type bridge.
Definition at line 191 of file bridge.c.
References rtnl_link_alloc(), rtnl_link_put(), and rtnl_link_set_type().
int rtnl_link_is_bridge | ( | struct rtnl_link * | link | ) |
Check if a link is a bridge.
link | Link object |
Definition at line 213 of file bridge.c.
Referenced by rtnl_link_bridge_has_ext_info().
int rtnl_link_bridge_has_ext_info | ( | struct rtnl_link * | link | ) |
Check if bridge has extended information.
link | Link object of type bridge |
Checks if the bridge object has been constructed based on information that is only available in newer kernels. This affectes the following functions:
Definition at line 232 of file bridge.c.
References rtnl_link_is_bridge().
int rtnl_link_bridge_set_port_state | ( | struct rtnl_link * | link, |
uint8_t | state | ||
) |
Set Spanning Tree Protocol (STP) port state.
link | Link object of type bridge |
state | New STP port state |
The value of state must be one of the following:
-NLE_OPNOTSUPP | Link is not a bridge |
-NLE_INVAL | Invalid state value (0..BR_STATE_BLOCKING) |
int rtnl_link_bridge_get_port_state | ( | struct rtnl_link * | link | ) |
Get Spanning Tree Protocol (STP) port state.
link | Link object of type bridge |
-NLE_OPNOTSUPP | Link is not a bridge |
int rtnl_link_bridge_set_priority | ( | struct rtnl_link * | link, |
uint16_t | prio | ||
) |
Set priority.
link | Link object of type bridge |
prio | Bridge priority |
-NLE_OPNOTSUPP | Link is not a bridge |
int rtnl_link_bridge_get_priority | ( | struct rtnl_link * | link | ) |
Get priority.
link | Link object of type bridge |
-NLE_OPNOTSUPP | Link is not a bridge |
int rtnl_link_bridge_set_cost | ( | struct rtnl_link * | link, |
uint32_t | cost | ||
) |
Set Spanning Tree Protocol (STP) path cost.
link | Link object of type bridge |
cost | New STP path cost value |
-NLE_OPNOTSUPP | Link is not a bridge |
int rtnl_link_bridge_get_cost | ( | struct rtnl_link * | link, |
uint32_t * | cost | ||
) |
Get Spanning Tree Protocol (STP) path cost.
link | Link object of type bridge |
cost | Pointer to store STP cost value |
-NLE_OPNOTSUPP | Link is not a bridge |
-NLE_INVAL | cost is not a valid pointer |
int rtnl_link_bridge_unset_flags | ( | struct rtnl_link * | link, |
unsigned int | flags | ||
) |
Unset flags.
link | Link object of type bridge |
flags | Bridging flags to unset |
-NLE_OPNOTSUPP | Link is not a bridge |
int rtnl_link_bridge_set_flags | ( | struct rtnl_link * | link, |
unsigned int | flags | ||
) |
Set flags.
link | Link object of type bridge |
flags | Bridging flags to set |
Valid flags are:
-NLE_OPNOTSUPP | Link is not a bridge |
int rtnl_link_bridge_get_flags | ( | struct rtnl_link * | link | ) |
Get flags.
link | Link object of type bridge |
-NLE_OPNOTSUPP | Link is not a bridge |