Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

Route Object
[Routing]


Detailed Description

Attributes
 Name                                           Default
 -------------------------------------------------------------
 routing table                                  RT_TABLE_MAIN
 scope                                          RT_SCOPE_NOWHERE
 tos                                            0
 protocol                                       RTPROT_STATIC
 prio                                           0
 family                                         AF_UNSPEC
 type                                           RTN_UNICAST
 iif                                            NULL


Modules

 Nexthop

Attributes

void rtnl_route_add_nexthop (struct rtnl_route *route, struct rtnl_nexthop *nh)
void rtnl_route_foreach_nexthop (struct rtnl_route *r, void(*cb)(struct rtnl_nexthop *, void *), void *arg)
struct nl_addr * rtnl_route_get_dst (struct rtnl_route *route)
uint8_t rtnl_route_get_family (struct rtnl_route *route)
uint32_t rtnl_route_get_flags (struct rtnl_route *route)
int rtnl_route_get_iif (struct rtnl_route *route)
int rtnl_route_get_metric (struct rtnl_route *route, int metric, uint32_t *value)
struct nl_list_head * rtnl_route_get_nexthops (struct rtnl_route *route)
int rtnl_route_get_nnexthops (struct rtnl_route *route)
struct nl_addr * rtnl_route_get_pref_src (struct rtnl_route *route)
uint32_t rtnl_route_get_priority (struct rtnl_route *route)
uint8_t rtnl_route_get_protocol (struct rtnl_route *route)
uint8_t rtnl_route_get_scope (struct rtnl_route *route)
struct nl_addr * rtnl_route_get_src (struct rtnl_route *route)
uint32_t rtnl_route_get_table (struct rtnl_route *route)
uint8_t rtnl_route_get_tos (struct rtnl_route *route)
uint8_t rtnl_route_get_type (struct rtnl_route *route)
struct rtnl_nexthop * rtnl_route_nexthop_n (struct rtnl_route *r, int n)
void rtnl_route_remove_nexthop (struct rtnl_route *route, struct rtnl_nexthop *nh)
int rtnl_route_set_dst (struct rtnl_route *route, struct nl_addr *addr)
int rtnl_route_set_family (struct rtnl_route *route, uint8_t family)
void rtnl_route_set_flags (struct rtnl_route *route, uint32_t flags)
void rtnl_route_set_iif (struct rtnl_route *route, int ifindex)
int rtnl_route_set_metric (struct rtnl_route *route, int metric, uint32_t value)
int rtnl_route_set_pref_src (struct rtnl_route *route, struct nl_addr *addr)
void rtnl_route_set_priority (struct rtnl_route *route, uint32_t prio)
void rtnl_route_set_protocol (struct rtnl_route *route, uint8_t protocol)
void rtnl_route_set_scope (struct rtnl_route *route, uint8_t scope)
int rtnl_route_set_src (struct rtnl_route *route, struct nl_addr *addr)
void rtnl_route_set_table (struct rtnl_route *route, uint32_t table)
void rtnl_route_set_tos (struct rtnl_route *route, uint8_t tos)
int rtnl_route_set_type (struct rtnl_route *route, uint8_t type)
void rtnl_route_unset_flags (struct rtnl_route *route, uint32_t flags)
int rtnl_route_unset_metric (struct rtnl_route *route, int metric)

Allocation/Freeing

struct rtnl_route * rtnl_route_alloc (void)
void rtnl_route_get (struct rtnl_route *route)
void rtnl_route_put (struct rtnl_route *route)

Utilities

int rtnl_route_guess_scope (struct rtnl_route *route)

Functions

static int parse_multipath (struct rtnl_route *route, struct nlattr *attr)
static char * route_attrs2str (int attrs, char *buf, size_t len)
static int route_clone (struct nl_object *_dst, struct nl_object *_src)
static int route_compare (struct nl_object *_a, struct nl_object *_b, uint32_t attrs, int flags)
static void route_constructor (struct nl_object *c)
static void route_dump_details (struct nl_object *a, struct nl_dump_params *p)
static void route_dump_env (struct nl_object *obj, struct nl_dump_params *p)
static void route_dump_line (struct nl_object *a, struct nl_dump_params *p)
static void route_dump_stats (struct nl_object *obj, struct nl_dump_params *p)
static void route_free_data (struct nl_object *c)
int rtnl_route_build_msg (struct nl_msg *msg, struct rtnl_route *route)
int rtnl_route_parse (struct nlmsghdr *nlh, struct rtnl_route **result)

Variables

static struct trans_tbl route_attrs []
static struct nla_policy route_policy [RTA_MAX+1]


Generated by  Doxygen 1.6.0   Back to index