netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Collaboration diagram for Link Info API:

Modules

 VLAN
 

Data Structures

struct  rtnl_link_info_ops
 Link info operations. More...
 

Functions

struct rtnl_link_info_opsrtnl_link_info_ops_lookup (const char *name)
 
int rtnl_link_register_info (struct rtnl_link_info_ops *ops)
 
int rtnl_link_unregister_info (struct rtnl_link_info_ops *ops)
 

Detailed Description

1) Registering/Unregistering a new link info type
static struct rtnl_link_info_ops vlan_info_ops = {
.io_name = "vlan",
.io_alloc = vlan_alloc,
.io_parse = vlan_parse,
.io_dump[NL_DUMP_BRIEF] = vlan_dump_brief,
.io_dump[NL_DUMP_FULL] = vlan_dump_full,
.io_free = vlan_free,
};
static void __init vlan_init(void)
{
rtnl_link_register_info(&vlan_info_ops);
}
static void __exit vlan_exit(void)
{
rtnl_link_unregister_info(&vlan_info_ops);
}

Function Documentation

struct rtnl_link_info_ops* rtnl_link_info_ops_lookup ( const char *  name)

References rtnl_link_info_ops::io_name, rtnl_link_info_ops::io_next, and NULL.

Referenced by rtnl_link_register_info(), and rtnl_link_set_info_type().

Here is the caller graph for this function:

int rtnl_link_register_info ( struct rtnl_link_info_ops ops)