Virtual LAN link module.
More...
Virtual LAN link module.
Link Type Name: "vlan"
VLAN Documentation (Netlink Routing Development Guide)
◆ rtnl_link_vlan_alloc()
struct rtnl_link * rtnl_link_vlan_alloc |
( |
void |
| ) |
|
◆ rtnl_link_is_vlan()
int rtnl_link_is_vlan |
( |
struct rtnl_link * |
link | ) |
|
Check if link is a VLAN link.
- Parameters
-
- Returns
- True if link is a VLAN link, otherwise false is returned.
Definition at line 418 of file vlan.c.
◆ rtnl_link_vlan_set_id()
int rtnl_link_vlan_set_id |
( |
struct rtnl_link * |
link, |
|
|
uint16_t |
id |
|
) |
| |
Set VLAN ID.
- Parameters
-
link | Link object |
id | VLAN identifier |
- Returns
- 0 on success or a negative error code
Definition at line 430 of file vlan.c.
◆ rtnl_link_vlan_get_id()
int rtnl_link_vlan_get_id |
( |
struct rtnl_link * |
link | ) |
|
Get VLAN Id.
- Parameters
-
- Returns
- VLAN id, 0 if not set or a negative error code.
Definition at line 448 of file vlan.c.
◆ rtnl_link_vlan_set_protocol()
int rtnl_link_vlan_set_protocol |
( |
struct rtnl_link * |
link, |
|
|
uint16_t |
protocol |
|
) |
| |
Set VLAN protocol.
- Parameters
-
link | Link object |
protocol | VLAN protocol in network byte order. Probably you want to set it to something like htons(ETH_P_8021Q). |
- Returns
- 0 on success or a negative error code
Definition at line 468 of file vlan.c.
◆ rtnl_link_vlan_get_protocol()
int rtnl_link_vlan_get_protocol |
( |
struct rtnl_link * |
link | ) |
|
Get VLAN protocol.
- Parameters
-
- Returns
- VLAN protocol in network byte order like htons(ETH_P_8021Q), 0 if not set or a negative error code.
Definition at line 487 of file vlan.c.
◆ rtnl_link_vlan_set_flags()
int rtnl_link_vlan_set_flags |
( |
struct rtnl_link * |
link, |
|
|
unsigned int |
flags |
|
) |
| |
Set VLAN flags.
- Parameters
-
link | Link object |
flags | VLAN flags |
- Returns
- 0 on success or a negative error code.
Definition at line 506 of file vlan.c.
◆ rtnl_link_vlan_unset_flags()
int rtnl_link_vlan_unset_flags |
( |
struct rtnl_link * |
link, |
|
|
unsigned int |
flags |
|
) |
| |
Unset VLAN flags.
- Parameters
-
link | Link object |
flags | VLAN flags |
- Returns
- 0 on success or a negative error code.
Definition at line 526 of file vlan.c.
◆ rtnl_link_vlan_get_flags()
int rtnl_link_vlan_get_flags |
( |
struct rtnl_link * |
link | ) |
|
Get VLAN flags.
- Parameters
-
- Returns
- VLAN flags, 0 if none set, or a negative error code.
Definition at line 545 of file vlan.c.
◆ rtnl_link_vlan_set_ingress_map()
int rtnl_link_vlan_set_ingress_map |
( |
struct rtnl_link * |
link, |
|
|
int |
from, |
|
|
uint32_t |
to |
|
) |
| |
◆ rtnl_link_vlan_get_ingress_map()
uint32_t * rtnl_link_vlan_get_ingress_map |
( |
struct rtnl_link * |
link | ) |
|
◆ rtnl_link_vlan_set_egress_map()
int rtnl_link_vlan_set_egress_map |
( |
struct rtnl_link * |
link, |
|
|
uint32_t |
from, |
|
|
int |
to |
|
) |
| |
◆ rtnl_link_vlan_get_egress_map()
struct vlan_map * rtnl_link_vlan_get_egress_map |
( |
struct rtnl_link * |
link, |
|
|
int * |
negress |
|
) |
| |
◆ rtnl_link_vlan_flags2str()
char * rtnl_link_vlan_flags2str |
( |
int |
flags, |
|
|
char * |
buf, |
|
|
size_t |
len |
|
) |
| |
◆ rtnl_link_vlan_str2flags()
int rtnl_link_vlan_str2flags |
( |
const char * |
name | ) |
|