NAME
rtable_add
,
rtable_exists
, rtable_get
,
rtable_l2
, rtable_l2set
— routing tables and routing
domains interface
SYNOPSIS
#include
<net/route.h>
int
rtable_add
(u_int
id);
int
rtable_exists
(u_int
id);
struct radix_node_head *
rtable_get
(u_int
id, sa_family_t
af);
u_int
rtable_l2
(u_int
id);
void
rtable_l2set
(u_int
id, u_int
rdomain);
DESCRIPTION
Routing tables contain layer 2 and 3 forwarding information. Each address family in use will have its own routing table. Routing domains are a way of logically segmenting a router among multiple networks and may contain more than one routing table.
rtable_add
(u_int id)- Add routing table with ID of id to routing domain 0.
rtable_exists
(u_int id)- Return 1 if routing table with ID id exists, 0 otherwise.
rtable_get
(u_int id, sa_family_t af)- Return the root node for the family af of the routing table with ID of id if it exists, NULL otherwise.
rtable_l2
(u_int id)- Get the routing domain of routing table with ID of id.
rtable_l2set
(u_int id, u_int rdomain)- Place routing table with ID of id under the routing domain with ID of rdomain.
CONTEXT
rtable_add
(),
rtable_exists
(),
rtable_get
(), rtable_l2
(),
and task_l2set
() can be called during autoconf, from
process context, or from interrupt context.
RETURN VALUES
rtable_add
() may fail with:
- [
EEXIST
] - A routing table with ID of id already exists.
- [
ENOMEM
] - Memory could not be allocated to extend the list of routing domains.