Title: nwio_route_t

nwio_route_t is used to get a route for the input or output routing table from a process and to send a route in the input or output routing table to a process.

typedef struct nwio_route

u32_t nwr_ent_no;
u32_t nwr_ent_count;
ipaddr_t nwr_dest;
ipaddr_t nwr_netmask;
ipaddr_t nwr_gateway;
u32_t nwr_dist;
u32_t nwr_flags;
u32_t nwr_pref;
u32_t nwr_mtu; /* Ignored, compatibility with VMD */
ipaddr_t nwr_ifaddr;
} nwio_route_t;
u32_t nwr_ent_no: The entry number within the table.

u32_t nwr_ent_count: nwr_ent_count is the size of the routing table and is used only when returning a route to a process. If the process requested an input route, nwr_ent_count is IROUTE_NR (512) and if the process requested an output route, nwr_ent_count is OROUTE_NR (32).

ipaddr_t nwr_dest:

The network address of the routing entry (e.g.,

ipaddr_t nwr_netmask:

The subnet mask of the routing entry (e.g.,

ipaddr_t nwr_gateway:

The gateway to which packets destined for this network are sent.

u32_t nwr_dist:

The distance. Routes with low distances are chosen over routes with high distances.

u32_t nwr_flags:

If the route is an input route, nwr_flags can be one of the following:

#define IRTF_EMPTY 0
#define IRTF_INUSE 1
#define IRTF_STATIC 2

Static input routes behave differently than dynamic input routes. If a static route is added to the input routing table, the route will not not replace any pre-existing route (static or dynamic) even if the values of the route (e.g., destination network) are the same. A dynamic input route, on the other hand, will replace another dynamic input route.

If the route is an output route, nwr_flags can be one of the following:

#define ORTF_EMPTY 0
#define ORTF_INUSE 1
#define ORTF_STATIC 2

u32_t nwr_pref:

The preference of the route. Routes with high preferences are chosen over routes with low preferences. The distance of a route is of higher importance. In other words, the relative preference of two routes is only significant if and only if these two routes are tied for the lowest distance.

ipaddr_t nwr_ifaddr: Each route is associated with an ip port. nwr_ifaddr is the ip address of this ip port.