Locates the point-to-point interface with a given destination address.
#include <sys/types.h> #include <sys/errno.h> #include <sys/socket.h> #include <net/if.h>
struct ifaddr * ifa_ifwithdstaddr (addr) struct sockaddr *addr;
|addr||Specifies a destination address.|
The ifa_ifwithdstaddr kernel service searches the list of point-to-point addresses per interface and locates the connection with the destination address specified by the addr parameter.
The ifa_withdstaddr kernel service can be called from either the process or interrupt environment.
If successful, the ifa_ifwithdstaddr service returns the corresponding ifaddr structure associated with the point-to-point interface. If no interface is found, the ifa_ifwithdstaddr service returns a null pointer.
To locate the point-to-point interface with a given destination address, invoke the ifa_ifwithdstaddr kernel service as follows:
ifa_ifwithdstaddr((struct sockaddr *)&ipaddr);
The ifa_ifwithdstaddr kernel service is part of Base Operating System (BOS) Runtime.
The ifa_ifwithaddr kernel service, ifa_ifwithnet kernel service.
Network Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.