Nexthop
[Routing]


Nexthop Allocation/Freeage

rtnl_nexthop * rtnl_route_nh_alloc (void)
 Allocate a routing nexthop.
void rtnl_route_nh_free (struct rtnl_nexthop *nh)
 Free a routing nexthop.

Attribute: Weight

void rtnl_route_nh_set_weight (struct rtnl_nexthop *nh, int weight)
 Set weight of routing nexthop.
int rtnl_route_nh_get_weight (struct rtnl_nexthop *nh)
 Get weight of routing nexthop.

Attribute: Interface Index

void rtnl_route_nh_set_ifindex (struct rtnl_nexthop *nh, int ifindex)
 Set interface index for outgoing interface of routing nexthop.
int rtnl_route_nh_get_ifindex (struct rtnl_nexthop *nh)
 Get interface index of outgoing index of routing nexthop.

Attribute: Gateway Address

void rtnl_route_nh_set_gateway (struct rtnl_nexthop *nh, struct nl_addr *addr)
 Set gateway address of routing nexthop.
nl_addr * rtnl_route_nh_get_gateway (struct rtnl_nexthop *nh)
 Get gateway address of routing nexthop.

Attribute: Flags

void rtnl_route_nh_set_flags (struct rtnl_nexthop *nh, unsigned int flags)
 Set flags of routing nexthop.
void rtnl_route_nh_unset_flags (struct rtnl_nexthop *nh, unsigned int flags)
 Unset flags of routing nexthop.
unsigned int rtnl_route_nh_get_flags (struct rtnl_nexthop *nh)
 Get flags of routing nexthop.


Function Documentation

struct rtnl_nexthop* rtnl_route_nh_alloc ( void   ) 

Allocate a routing nexthop.

Returns:
Newly allocated routing nexthop object.

Definition at line 41 of file nexthop.c.

void rtnl_route_nh_free ( struct rtnl_nexthop *  nh  ) 

Free a routing nexthop.

Parameters:
nh Routing nexthop to be freed.

Definition at line 60 of file nexthop.c.

References nl_addr_put().

void rtnl_route_nh_set_weight ( struct rtnl_nexthop *  nh,
int  weight 
)

Set weight of routing nexthop.

Parameters:
nh Routing nexthop.
weight New weight value.

Definition at line 76 of file nexthop.c.

int rtnl_route_nh_get_weight ( struct rtnl_nexthop *  nh  ) 

Get weight of routing nexthop.

Parameters:
nh Routing nexthop.
Returns:
Weight value or 0 if not available.

Definition at line 87 of file nexthop.c.

void rtnl_route_nh_set_ifindex ( struct rtnl_nexthop *  nh,
int  ifindex 
)

Set interface index for outgoing interface of routing nexthop.

Parameters:
nh Routing nexthop.
ifindex New interface index.

Definition at line 106 of file nexthop.c.

int rtnl_route_nh_get_ifindex ( struct rtnl_nexthop *  nh  ) 

Get interface index of outgoing index of routing nexthop.

Parameters:
nh Routing nexthop.
Returns:
Interface index or -1 if not available.

Definition at line 117 of file nexthop.c.

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

Set gateway address of routing nexthop.

Parameters:
nh Routing nexthop.
addr New gateway address.
An eventual existing gateway address will be freed and a reference is acquried of the new address.

Definition at line 139 of file nexthop.c.

References nl_addr_get(), and nl_addr_put().

struct nl_addr* rtnl_route_nh_get_gateway ( struct rtnl_nexthop *  nh  ) 

Get gateway address of routing nexthop.

Parameters:
nh Routing nexthop.
Returns:
Gateway address or NULL if not available.

Definition at line 155 of file nexthop.c.

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

Set flags of routing nexthop.

Parameters:
nh Routing nexthop.
flags Flags to be set.

Definition at line 174 of file nexthop.c.

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

Unset flags of routing nexthop.

Parameters:
nh Routing nexthop.
flags Flags to be unset.

Definition at line 186 of file nexthop.c.

unsigned int rtnl_route_nh_get_flags ( struct rtnl_nexthop *  nh  ) 

Get flags of routing nexthop.

Parameters:
nh Routing nexthop.
Returns:
Flags or 0 if not available.

Definition at line 198 of file nexthop.c.


Generated on Fri Apr 27 14:14:07 2007 for libnl by  doxygen 1.5.1