netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
route.h File Reference
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/addr.h>
#include <netlink/data.h>
#include <netlink/route/nexthop.h>
#include <netlink/route/rtnl.h>
#include <linux/in_route.h>
Include dependency graph for route.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  rtnl_rtcacheinfo
 

Macros

#define ROUTE_CACHE_CONTENT   1
 

Functions

struct rtnl_routertnl_route_alloc (void)
 
void rtnl_route_put (struct rtnl_route *)
 
int rtnl_route_alloc_cache (struct nl_sock *, int, int, struct nl_cache **)
 Build a route cache holding all routes currently configured in the kernel. More...
 
void rtnl_route_get (struct rtnl_route *)
 
int rtnl_route_parse (struct nlmsghdr *, struct rtnl_route **)
 
int rtnl_route_build_msg (struct nl_msg *, struct rtnl_route *)
 
int rtnl_route_build_add_request (struct rtnl_route *, int, struct nl_msg **)
 
int rtnl_route_add (struct nl_sock *, struct rtnl_route *, int)
 
int rtnl_route_build_del_request (struct rtnl_route *, int, struct nl_msg **)
 
int rtnl_route_delete (struct nl_sock *, struct rtnl_route *, int)
 
void rtnl_route_set_table (struct rtnl_route *, uint32_t)
 
uint32_t rtnl_route_get_table (struct rtnl_route *)
 
void rtnl_route_set_scope (struct rtnl_route *, uint8_t)
 
uint8_t rtnl_route_get_scope (struct rtnl_route *)
 
void rtnl_route_set_tos (struct rtnl_route *, uint8_t)
 
uint8_t rtnl_route_get_tos (struct rtnl_route *)
 
void rtnl_route_set_protocol (struct rtnl_route *, uint8_t)
 
uint8_t rtnl_route_get_protocol (struct rtnl_route *)
 
void rtnl_route_set_priority (struct rtnl_route *, uint32_t)
 
uint32_t rtnl_route_get_priority (struct rtnl_route *)
 
int rtnl_route_set_family (struct rtnl_route *, uint8_t)
 
uint8_t rtnl_route_get_family (struct rtnl_route *)
 
int rtnl_route_set_type (struct rtnl_route *, uint8_t)
 
uint8_t rtnl_route_get_type (struct rtnl_route *)
 
void rtnl_route_set_flags (struct rtnl_route *, uint32_t)
 
void rtnl_route_unset_flags (struct rtnl_route *, uint32_t)
 
uint32_t rtnl_route_get_flags (struct rtnl_route *)
 
int rtnl_route_set_metric (struct rtnl_route *, int, unsigned int)
 
int rtnl_route_unset_metric (struct rtnl_route *, int)
 
int rtnl_route_get_metric (struct rtnl_route *, int, uint32_t *)
 
int rtnl_route_set_dst (struct rtnl_route *, struct nl_addr *)
 
struct nl_addrrtnl_route_get_dst (struct rtnl_route *)
 
int rtnl_route_set_src (struct rtnl_route *, struct nl_addr *)
 
struct nl_addrrtnl_route_get_src (struct rtnl_route *)
 
int rtnl_route_set_pref_src (struct rtnl_route *, struct nl_addr *)
 
struct nl_addrrtnl_route_get_pref_src (struct rtnl_route *)
 
void rtnl_route_set_iif (struct rtnl_route *, int)
 
int rtnl_route_get_iif (struct rtnl_route *)
 
int rtnl_route_get_src_len (struct rtnl_route *)
 
void rtnl_route_add_nexthop (struct rtnl_route *, struct rtnl_nexthop *)
 
void rtnl_route_remove_nexthop (struct rtnl_route *, struct rtnl_nexthop *)
 
struct nl_list_headrtnl_route_get_nexthops (struct rtnl_route *)
 
int rtnl_route_get_nnexthops (struct rtnl_route *)
 
void rtnl_route_foreach_nexthop (struct rtnl_route *r, void(*cb)(struct rtnl_nexthop *, void *), void *arg)
 
struct rtnl_nexthoprtnl_route_nexthop_n (struct rtnl_route *r, int n)
 
int rtnl_route_guess_scope (struct rtnl_route *)
 Guess scope of a route object. More...
 
char * rtnl_route_table2str (int, char *, size_t)
 
int rtnl_route_str2table (const char *)
 
int rtnl_route_read_table_names (const char *)
 
char * rtnl_route_proto2str (int, char *, size_t)
 
int rtnl_route_str2proto (const char *)
 
int rtnl_route_read_protocol_names (const char *)
 
char * rtnl_route_metric2str (int, char *, size_t)
 
int rtnl_route_str2metric (const char *)
 

Variables

struct nl_object_ops route_obj_ops
 

Macro Definition Documentation

#define ROUTE_CACHE_CONTENT   1

Referenced by main().

Function Documentation

int rtnl_route_get_src_len ( struct rtnl_route )
int rtnl_route_set_metric ( struct rtnl_route ,
int  ,
unsigned  int 
)

Referenced by nl_cli_route_parse_metric().

Here is the caller graph for this function:

Variable Documentation

struct nl_object_ops route_obj_ops

Referenced by rtnl_route_alloc().