rtfree Kernel Service
Purpose
Frees the routing table entry.
Syntax
#include <sys/types.h>
#include <sys/errno.h>
#include <net/route.h>
int rtfree ( rt)
register struct rtentry *rt;
register struct rtentry *rt;
Parameter
Item | Description |
---|---|
rt | Specifies the routing table entry. |
Description
The rtfree kernel service frees the entry it is passed from the routing table. If the route does not exist, the panic service is called. Otherwise, the rtfree service frees the mbuf structure that contains the route and decrements the routing reference counters.
Execution Environment
The rtfree kernel service can be called from either the process or interrupt environment.
Return Values
The rtfree kernel service has no return values.
Example
To free a routing table entry, invoke the rtfree kernel service as follows:
rtfree(rt);