libnl 3.12.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)

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)
int rtnl_route_nh_set_encap (struct rtnl_nexthop *nh, struct rtnl_nh_encap *nh_encap)
 Set nexthop encapsulation.

Detailed Description

Function Documentation

◆ rtnl_route_nh_alloc()

struct rtnl_nexthop * rtnl_route_nh_alloc ( void )

Definition at line 40 of file nexthop.c.

◆ rtnl_route_nh_clone()

struct rtnl_nexthop * rtnl_route_nh_clone ( struct rtnl_nexthop * src)

Definition at line 53 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 107 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 143 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 240 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 263 of file nexthop.c.

◆ rtnl_route_nh_get_weight()

uint8_t rtnl_route_nh_get_weight ( struct rtnl_nexthop * nh)

Definition at line 269 of file nexthop.c.

◆ rtnl_route_nh_set_ifindex()

void rtnl_route_nh_set_ifindex ( struct rtnl_nexthop * nh,
int ifindex )

Definition at line 274 of file nexthop.c.

◆ rtnl_route_nh_get_ifindex()

int rtnl_route_nh_get_ifindex ( struct rtnl_nexthop * nh)

Definition at line 280 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 286 of file nexthop.c.

◆ rtnl_route_nh_get_gateway()

struct nl_addr * rtnl_route_nh_get_gateway ( struct rtnl_nexthop * nh)

Definition at line 302 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 307 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 314 of file nexthop.c.

◆ rtnl_route_nh_get_flags()

unsigned int rtnl_route_nh_get_flags ( struct rtnl_nexthop * nh)

Definition at line 321 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 326 of file nexthop.c.

◆ rtnl_route_nh_get_realms()

uint32_t rtnl_route_nh_get_realms ( struct rtnl_nexthop * nh)

Definition at line 332 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 337 of file nexthop.c.

◆ rtnl_route_nh_get_newdst()

struct nl_addr * rtnl_route_nh_get_newdst ( struct rtnl_nexthop * nh)

Definition at line 355 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 360 of file nexthop.c.

◆ rtnl_route_nh_get_via()

struct nl_addr * rtnl_route_nh_get_via ( struct rtnl_nexthop * nh)

Definition at line 378 of file nexthop.c.

◆ rtnl_route_nh_set_encap()

int rtnl_route_nh_set_encap ( struct rtnl_nexthop * nh,
struct rtnl_nh_encap * nh_encap )

Set nexthop encapsulation.

Parameters
nhRoute nexthop object
nh_encapEncapsulation descriptor

Assigns ownership of the encapsulation object to the route's nexthop. Any previously configured encapsulation is released. Passing a NULL encapsulation clears the encapsulation on the nexthop.

On failure, the function consumes and frees nh_encap.

Returns
0 on success, or the appropriate error-code on failure.

Definition at line 396 of file nexthop.c.

◆ rtnl_route_nh_flags2str()

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

Definition at line 435 of file nexthop.c.

◆ rtnl_route_nh_str2flags()

int rtnl_route_nh_str2flags ( const char * name)

Definition at line 440 of file nexthop.c.