Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
rtnetlink.h File Reference
#include <linux/rtnetlink.h>
#include <net/netlink.h>

Go to the source code of this file.

Data Structures

struct  rtnl_link_ops
 
struct  rtnl_af_ops
 

Macros

#define MODULE_ALIAS_RTNL_LINK(kind)   MODULE_ALIAS("rtnl-link-" kind)
 

Typedefs

typedef int(* rtnl_doit_func )(struct sk_buff *, struct nlmsghdr *, void *)
 
typedef int(* rtnl_dumpit_func )(struct sk_buff *, struct netlink_callback *)
 
typedef u16(* rtnl_calcit_func )(struct sk_buff *, struct nlmsghdr *)
 

Functions

int __rtnl_register (int protocol, int msgtype, rtnl_doit_func, rtnl_dumpit_func, rtnl_calcit_func)
 
void rtnl_register (int protocol, int msgtype, rtnl_doit_func, rtnl_dumpit_func, rtnl_calcit_func)
 
int rtnl_unregister (int protocol, int msgtype)
 
void rtnl_unregister_all (int protocol)
 
int __rtnl_link_register (struct rtnl_link_ops *ops)
 
void __rtnl_link_unregister (struct rtnl_link_ops *ops)
 
int rtnl_link_register (struct rtnl_link_ops *ops)
 
void rtnl_link_unregister (struct rtnl_link_ops *ops)
 
int __rtnl_af_register (struct rtnl_af_ops *ops)
 
void __rtnl_af_unregister (struct rtnl_af_ops *ops)
 
int rtnl_af_register (struct rtnl_af_ops *ops)
 
void rtnl_af_unregister (struct rtnl_af_ops *ops)
 
struct netrtnl_link_get_net (struct net *src_net, struct nlattr *tb[])
 
struct net_devicertnl_create_link (struct net *src_net, struct net *net, char *ifname, const struct rtnl_link_ops *ops, struct nlattr *tb[])
 
int rtnl_configure_link (struct net_device *dev, const struct ifinfomsg *ifm)
 

Variables

struct nla_policy ifla_policy [IFLA_MAX+1]
 

Macro Definition Documentation

#define MODULE_ALIAS_RTNL_LINK (   kind)    MODULE_ALIAS("rtnl-link-" kind)

Definition at line 134 of file rtnetlink.h.

Typedef Documentation

typedef u16(* rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *)

Definition at line 9 of file rtnetlink.h.

typedef int(* rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *)

Definition at line 7 of file rtnetlink.h.

typedef int(* rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *)

Definition at line 8 of file rtnetlink.h.

Function Documentation

int __rtnl_af_register ( struct rtnl_af_ops ops)

__rtnl_af_register - Register rtnl_af_ops with rtnetlink. : struct rtnl_af_ops * to register

The caller must hold the rtnl_mutex.

Returns 0 on success or a negative error code.

Definition at line 413 of file rtnetlink.c.

void __rtnl_af_unregister ( struct rtnl_af_ops ops)

__rtnl_af_unregister - Unregister rtnl_af_ops from rtnetlink. : struct rtnl_af_ops * to unregister

The caller must hold the rtnl_mutex.

Definition at line 443 of file rtnetlink.c.

int __rtnl_link_register ( struct rtnl_link_ops ops)

__rtnl_link_register - Register rtnl_link_ops with rtnetlink. : struct rtnl_link_ops * to register

The caller must hold the rtnl_mutex. This function should be used by drivers that create devices during module initialization. It must be called before registering the devices.

Returns 0 on success or a negative error code.

Definition at line 297 of file rtnetlink.c.

void __rtnl_link_unregister ( struct rtnl_link_ops ops)

__rtnl_link_unregister - Unregister rtnl_link_ops from rtnetlink. : struct rtnl_link_ops * to unregister

The caller must hold the rtnl_mutex.

Definition at line 345 of file rtnetlink.c.

int __rtnl_register ( int  protocol,
int  msgtype,
rtnl_doit_func  ,
rtnl_dumpit_func  ,
rtnl_calcit_func   
)

Definition at line 182 of file rtnetlink.c.

int rtnl_af_register ( struct rtnl_af_ops ops)

rtnl_af_register - Register rtnl_af_ops with rtnetlink. : struct rtnl_af_ops * to register

Returns 0 on success or a negative error code.

Definition at line 426 of file rtnetlink.c.

void rtnl_af_unregister ( struct rtnl_af_ops ops)

rtnl_af_unregister - Unregister rtnl_af_ops from rtnetlink. : struct rtnl_af_ops * to unregister

Definition at line 453 of file rtnetlink.c.

int rtnl_configure_link ( struct net_device dev,
const struct ifinfomsg ifm 
)

Definition at line 1621 of file rtnetlink.c.

struct net_device* rtnl_create_link ( struct net src_net,
struct net net,
char ifname,
const struct rtnl_link_ops ops,
struct nlattr tb[] 
)
read

Definition at line 1641 of file rtnetlink.c.

struct net* rtnl_link_get_net ( struct net src_net,
struct nlattr tb[] 
)
read

Definition at line 1164 of file rtnetlink.c.

int rtnl_link_register ( struct rtnl_link_ops ops)

rtnl_link_register - Register rtnl_link_ops with rtnetlink. : struct rtnl_link_ops * to register

Returns 0 on success or a negative error code.

Definition at line 316 of file rtnetlink.c.

void rtnl_link_unregister ( struct rtnl_link_ops ops)

rtnl_link_unregister - Unregister rtnl_link_ops from rtnetlink. : struct rtnl_link_ops * to unregister

Definition at line 360 of file rtnetlink.c.

void rtnl_register ( int  protocol,
int  msgtype,
rtnl_doit_func  doit,
rtnl_dumpit_func  dumpit,
rtnl_calcit_func  calcit 
)

rtnl_register - Register a rtnetlink message type

Identical to __rtnl_register() but panics on failure. This is useful as failure of this function is very unlikely, it can only happen due to lack of memory when allocating the chain to store all message handlers for a protocol. Meant for use in init functions where lack of memory implies no sense in continuing.

Definition at line 223 of file rtnetlink.c.

int rtnl_unregister ( int  protocol,
int  msgtype 
)

Definition at line 241 of file rtnetlink.c.

void rtnl_unregister_all ( int  protocol)

Definition at line 265 of file rtnetlink.c.

Variable Documentation

struct nla_policy ifla_policy[IFLA_MAX+1]

Definition at line 1103 of file rtnetlink.c.