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

Modules

 Addresses
 
 
 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
 

Realms

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

Sending

int nl_rtgen_request (struct nl_sock *sk, int type, int family, int flags)
 Send routing netlink request message. More...
 

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)
 

Realms Translations

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

Detailed Description

Macro Definition Documentation

#define RTNL_MAKE_REALM (   from,
  to 
)    ((RTNL_REALM_TO(from) << 16) & RTNL_REALM_TO(to))

Build a realms field.

#define RTNL_REALM_FROM (   realm)    ((realm) >> 16)

Extract FROM realm from a realms field.

Referenced by rtnl_realms2str().

#define RTNL_REALM_MASK   (0xFFFF)

Mask specying the size of each realm part.

#define RTNL_REALM_TO (   realm)    ((realm) & RTNL_REALM_MASK)

Extract TO realm from a realms field.

Referenced by rtnl_realms2str().

Function Documentation

int nl_rtgen_request ( struct nl_sock sk,
int  type,
int  family,
int  flags 
)

Send routing netlink request message.

  • sk Netlink socket.
  • 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.

References nl_send_simple(), and rtgenmsg::rtgen_family.

Here is the call graph for this function:

char* nl_rtntype2str ( int  type,
char *  buf,
size_t  size 
)

References __type2str(), and ARRAY_SIZE.

Here is the call graph for this function:

int nl_str2rtntype ( const char *  name)

References __str2type(), and ARRAY_SIZE.

Referenced by nl_cli_route_parse_type().

Here is the call graph for this function:

Here is the caller graph for this function:

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

References buf, RTNL_REALM_FROM, and RTNL_REALM_TO.

char* rtnl_scope2str ( int  scope,
char *  buf,
size_t  size 
)

References __type2str(), and ARRAY_SIZE.

Here is the call graph for this function:

int rtnl_str2scope ( const char *  name)

References __str2type(), and ARRAY_SIZE.

Referenced by nl_cli_addr_parse_scope(), and nl_cli_route_parse_scope().

Here is the call graph for this function:

Here is the caller graph for this function: