libnl  3.2.24-rc1

Virtual LAN link module. More...

VLAN Object

struct rtnl_linkrtnl_link_vlan_alloc (void)
 Allocate link object of type VLAN. More...
 
int rtnl_link_is_vlan (struct rtnl_link *link)
 Check if link is a VLAN link. More...
 
int rtnl_link_vlan_set_id (struct rtnl_link *link, uint16_t id)
 Set VLAN ID. More...
 
int rtnl_link_vlan_get_id (struct rtnl_link *link)
 Get VLAN Id. More...
 
int rtnl_link_vlan_set_flags (struct rtnl_link *link, unsigned int flags)
 Set VLAN flags. More...
 
int rtnl_link_vlan_unset_flags (struct rtnl_link *link, unsigned int flags)
 Unset VLAN flags. More...
 
int rtnl_link_vlan_get_flags (struct rtnl_link *link)
 Get VLAN flags. More...
 

Quality of Service

int rtnl_link_vlan_set_ingress_map (struct rtnl_link *link, int from, uint32_t to)
 
uint32_t * rtnl_link_vlan_get_ingress_map (struct rtnl_link *link)
 
int rtnl_link_vlan_set_egress_map (struct rtnl_link *link, uint32_t from, int to)
 
struct vlan_maprtnl_link_vlan_get_egress_map (struct rtnl_link *link, int *negress)
 

Flag Translation

char * rtnl_link_vlan_flags2str (int flags, char *buf, size_t len)
 
int rtnl_link_vlan_str2flags (const char *name)
 

Detailed Description

Virtual LAN link module.

Link Type Name: "vlan"

VLAN Documentation (Netlink Routing Development Guide)

Function Documentation

struct rtnl_link* rtnl_link_vlan_alloc ( void  )
read

Allocate link object of type VLAN.

Returns
Allocated link object or NULL.

Definition at line 348 of file vlan.c.

References rtnl_link_alloc(), rtnl_link_put(), and rtnl_link_set_type().

+ Here is the call graph for this function:

int rtnl_link_is_vlan ( struct rtnl_link link)

Check if link is a VLAN link.

Parameters
linkLink object
Returns
True if link is a VLAN link, otherwise false is returned.

Definition at line 370 of file vlan.c.

int rtnl_link_vlan_set_id ( struct rtnl_link link,
uint16_t  id 
)

Set VLAN ID.

Parameters
linkLink object
idVLAN identifier
Returns
0 on success or a negative error code

Definition at line 382 of file vlan.c.

int rtnl_link_vlan_get_id ( struct rtnl_link link)

Get VLAN Id.

Parameters
linkLink object
Returns
VLAN id, 0 if not set or a negative error code.

Definition at line 400 of file vlan.c.

int rtnl_link_vlan_set_flags ( struct rtnl_link link,
unsigned int  flags 
)

Set VLAN flags.

Parameters
linkLink object
flagsVLAN flags
Returns
0 on success or a negative error code.

Definition at line 419 of file vlan.c.

int rtnl_link_vlan_unset_flags ( struct rtnl_link link,
unsigned int  flags 
)

Unset VLAN flags.

Parameters
linkLink object
flagsVLAN flags
Returns
0 on success or a negative error code.

Definition at line 439 of file vlan.c.

int rtnl_link_vlan_get_flags ( struct rtnl_link link)

Get VLAN flags.

Parameters
linkLink object
Returns
VLAN flags, 0 if none set, or a negative error code.

Definition at line 458 of file vlan.c.