ifa_ifwithdstaddr Kernel Service

Purpose

Locates the point-to-point interface with a given destination address.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/socket.h>
#include <net/if.h>

struct ifaddr * ifa_ifwithdstaddr ( addr)
struct sockaddr *addr;

Parameter

Item Description
addr Specifies a destination address.

Description

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.

Execution Environment

The ifa_withdstaddr kernel service can be called from either the process or interrupt environment.

Return Values

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.

Example

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);