Forces a routing table entry with the specified destination to go through a given gateway.
Item | Description |
---|---|
dst | Specifies the destination address. |
gateway | Specifies the gateway address. |
netmask | Specifies the network mask for the route. |
flags | Indicates routing flags as defined in the /usr/include/net/route.h file. |
src | Identifies the source of the redirect request. |
rtp | Indicates the address of a pointer to a rtentry structure. Used to return a constructed route. |
The rtredirect kernel service forces a routing table entry for a specified destination to go through the given gateway. Typically, the rtredirect service is called as a result of a routing redirect message from the network layer. The dst, gateway, and flags parameters are passed to the rtrequest kernel service to process the request.
The rtredirect kernel service can be called from either the process or interrupt environment.
Item | Description |
---|---|
0 | Indicates a successful operation. |
If a bad redirect request is received, the routing statistics counter for bad redirects is incremented.
To force a routing table entry with the specified destination to go through the given gateway, invoke the rtredirect kernel service:
rtredirect(dst, gateway, netmask, flags, src, rtp);