libnl 3.11.0

Functions

int rtnl_route_nh_compare (struct rtnl_nexthop *a, struct rtnl_nexthop *b, uint32_t attrs, int loose)
 
int rtnl_route_nh_identical (struct rtnl_nexthop *a, struct rtnl_nexthop *b)
 Check if the fixed attributes of two nexthops are identical, and may only differ in flags or weight.
 
void rtnl_route_nh_dump (struct rtnl_nexthop *nh, struct nl_dump_params *dp)
 
void nh_set_encap (struct rtnl_nexthop *nh, struct rtnl_nh_encap *rtnh_encap)
 

Nexthop Flags Translations

char * rtnl_route_nh_flags2str (int flags, char *buf, size_t len)
 
int rtnl_route_nh_str2flags (const char *name)
 

Allocation/Freeing

struct rtnl_nexthop * rtnl_route_nh_alloc (void)
 
struct rtnl_nexthop * rtnl_route_nh_clone (struct rtnl_nexthop *src)
 
void rtnl_route_nh_free (struct rtnl_nexthop *nh)
 

Attributes

void rtnl_route_nh_set_weight (struct rtnl_nexthop *nh, uint8_t weight)
 
uint8_t rtnl_route_nh_get_weight (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_ifindex (struct rtnl_nexthop *nh, int ifindex)
 
int rtnl_route_nh_get_ifindex (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_gateway (struct rtnl_nexthop *nh, struct nl_addr *addr)
 
struct nl_addr * rtnl_route_nh_get_gateway (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_flags (struct rtnl_nexthop *nh, unsigned int flags)
 
void rtnl_route_nh_unset_flags (struct rtnl_nexthop *nh, unsigned int flags)
 
unsigned int rtnl_route_nh_get_flags (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_realms (struct rtnl_nexthop *nh, uint32_t realms)
 
uint32_t rtnl_route_nh_get_realms (struct rtnl_nexthop *nh)
 
int rtnl_route_nh_set_newdst (struct rtnl_nexthop *nh, struct nl_addr *addr)
 
struct nl_addr * rtnl_route_nh_get_newdst (struct rtnl_nexthop *nh)
 
int rtnl_route_nh_set_via (struct rtnl_nexthop *nh, struct nl_addr *addr)
 
struct nl_addr * rtnl_route_nh_get_via (struct rtnl_nexthop *nh)
 

Detailed Description

Function Documentation

◆ rtnl_route_nh_alloc()

struct rtnl_nexthop * rtnl_route_nh_alloc ( void )

Definition at line 39 of file nexthop.c.

◆ rtnl_route_nh_clone()

struct rtnl_nexthop * rtnl_route_nh_clone ( struct rtnl_nexthop * src)

Definition at line 52 of file nexthop.c.

◆ rtnl_route_nh_free()

void rtnl_route_nh_free ( struct rtnl_nexthop * nh)

Definition at line 96 of file nexthop.c.

◆ rtnl_route_nh_compare()

int rtnl_route_nh_compare ( struct rtnl_nexthop * a,
struct rtnl_nexthop * b,
uint32_t attrs,
int loose )

Definition at line 112 of file nexthop.c.

◆ rtnl_route_nh_identical()

int rtnl_route_nh_identical ( struct rtnl_nexthop * a,
struct rtnl_nexthop * b )

Check if the fixed attributes of two nexthops are identical, and may only differ in flags or weight.

Parameters
aa nexthop
banother nexthop
Returns
true if both nexthop have equal attributes, otherwise false.

Definition at line 148 of file nexthop.c.

◆ rtnl_route_nh_dump()

void rtnl_route_nh_dump ( struct rtnl_nexthop * nh,
struct nl_dump_params * dp )

Definition at line 246 of file nexthop.c.

◆ nh_set_encap()

void nh_set_encap ( struct rtnl_nexthop * nh,
struct rtnl_nh_encap * rtnh_encap )

Definition at line 264 of file nexthop.c.

◆ rtnl_route_nh_set_weight()

void rtnl_route_nh_set_weight ( struct rtnl_nexthop * nh,
uint8_t weight )

Definition at line 287 of file nexthop.c.

◆ rtnl_route_nh_get_weight()

uint8_t rtnl_route_nh_get_weight ( struct rtnl_nexthop * nh)

Definition at line 293 of file nexthop.c.

◆ rtnl_route_nh_set_ifindex()

void rtnl_route_nh_set_ifindex ( struct rtnl_nexthop * nh,
int ifindex )

Definition at line 298 of file nexthop.c.

◆ rtnl_route_nh_get_ifindex()

int rtnl_route_nh_get_ifindex ( struct rtnl_nexthop * nh)

Definition at line 304 of file nexthop.c.

◆ rtnl_route_nh_set_gateway()

void rtnl_route_nh_set_gateway ( struct rtnl_nexthop * nh,
struct nl_addr * addr )

Definition at line 310 of file nexthop.c.

◆ rtnl_route_nh_get_gateway()

struct nl_addr * rtnl_route_nh_get_gateway ( struct rtnl_nexthop * nh)

Definition at line 326 of file nexthop.c.

◆ rtnl_route_nh_set_flags()

void rtnl_route_nh_set_flags ( struct rtnl_nexthop * nh,
unsigned int flags )

Definition at line 331 of file nexthop.c.

◆ rtnl_route_nh_unset_flags()

void rtnl_route_nh_unset_flags ( struct rtnl_nexthop * nh,
unsigned int flags )

Definition at line 338 of file nexthop.c.

◆ rtnl_route_nh_get_flags()

unsigned int rtnl_route_nh_get_flags ( struct rtnl_nexthop * nh)

Definition at line 345 of file nexthop.c.

◆ rtnl_route_nh_set_realms()

void rtnl_route_nh_set_realms ( struct rtnl_nexthop * nh,
uint32_t realms )

Definition at line 350 of file nexthop.c.

◆ rtnl_route_nh_get_realms()

uint32_t rtnl_route_nh_get_realms ( struct rtnl_nexthop * nh)

Definition at line 356 of file nexthop.c.

◆ rtnl_route_nh_set_newdst()

int rtnl_route_nh_set_newdst ( struct rtnl_nexthop * nh,
struct nl_addr * addr )

Definition at line 361 of file nexthop.c.

◆ rtnl_route_nh_get_newdst()

struct nl_addr * rtnl_route_nh_get_newdst ( struct rtnl_nexthop * nh)

Definition at line 379 of file nexthop.c.

◆ rtnl_route_nh_set_via()

int rtnl_route_nh_set_via ( struct rtnl_nexthop * nh,
struct nl_addr * addr )

Definition at line 384 of file nexthop.c.

◆ rtnl_route_nh_get_via()

struct nl_addr * rtnl_route_nh_get_via ( struct rtnl_nexthop * nh)

Definition at line 402 of file nexthop.c.

◆ rtnl_route_nh_flags2str()

char * rtnl_route_nh_flags2str ( int flags,
char * buf,
size_t len )

Definition at line 420 of file nexthop.c.

◆ rtnl_route_nh_str2flags()

int rtnl_route_nh_str2flags ( const char * name)

Definition at line 425 of file nexthop.c.