Carries out a request to change the routing table.
#include <sys/types.h> #include <sys/errno.h> #include <sys/mbuf.h> #include <net/if.h> #include <net/af.h> #include <net/route.h>
int rtrequest (req, dst, gateway, netmask, flags, ret_nrt) int req; struct sockaddr *dst, *gateway, *netmask; int flags; struct rtentry **ret_nrt;
The rtrequest kernel service carries out a request to change the routing table. Interfaces call the rtrequest service at boot time to make their local routes known for routing table ioctl operations. Interfaces also call the rtrequest service as the result of routing redirects. The request is either to add (if the req parameter has a value of RMT_ADD) or delete (the req parameter is a value of RMT_DELETE) the route.
The rtrequest kernel service can be called from either the process or interrupt environment.
To carry out a request to change the routing table, invoke the rtrequest kernel service as follows:
rtrequest(RTM_ADD, dst, gateway, netmask, flags, &rtp);
The rtrequest 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.