Routing Netlink
[Netlink Families]

Modules

 Addresses
 Links (Interfaces)
 Neighbours
 

The neighbour table establishes bindings between protocol addresses and link layer addresses for hosts sharing the same physical link.


 Neighbour Tables
 Routing
 Routing Rules
 Traffic Control

Routing Type Translations



char * nl_rtntype2str (int type, char *buf, size_t size)
int nl_str2rtntype (const char *name)

Scope Translations



char * rtnl_scope2str (int scope, char *buf, size_t size)
int rtnl_str2scope (const char *name)

Sending



int nl_rtgen_request (struct nl_handle *handle, int type, int family, int flags)
 Send routing netlink request message.

Realms Translations



char * rtnl_realms2str (uint32_t realms, char *buf, size_t len)

Realms



#define RTNL_REALM_MASK   (0xFFFF)
 Mask specying the size of each realm part.
#define RTNL_REALM_FROM(realm)   ((realm) >> 16)
 Extract FROM realm from a realms field.
#define RTNL_REALM_TO(realm)   ((realm) & RTNL_REALM_MASK)
 Extract TO realm from a realms field.
#define RTNL_MAKE_REALM(from, to)   ((RTNL_REALM_TO(from) << 16) & RTNL_REALM_TO(to))
 Build a realms field.
typedef uint32_t realm_t

Function Documentation

int nl_rtgen_request ( struct nl_handle *  handle,
int  type,
int  family,
int  flags 
)
Parameters:
handle Netlink handle.
type Netlink message type.
family Address family.
flags Additional netlink message flags.

Fills out a routing netlink request message and sends it out using nl_send_simple().

Returns:
0 on success or a negative error code.

Definition at line 40 of file rtnl.c.

References nl_send_simple().

00041 {
00042         struct rtgenmsg gmsg = {
00043                 .rtgen_family = family,
00044         };
00045 
00046         return nl_send_simple(handle, type, flags, &gmsg, sizeof(gmsg));
00047 }


Generated on 30 Oct 2009 for libnl by  doxygen 1.6.1