Forces a routing table entry with the specified destination to go through a given gateway.
#include <sys/types.h> #include <sys/errno.h> #include <sys/mbuf.h> #include <net/route.h>
rtredirect (dst, gateway, netmask, flags, src, rtp) struct sockaddr *dst, *gateway, *netmask, *src; int flags; struct rtentry **rtp;
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.
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);
The rtredirect kernel service is part of Base Operating System (BOS) Runtime.
The rtinit kernel service.
Network Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.