[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

ifa_ifwithaddr Kernel Service

Purpose

Locates an interface based on a complete address.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/socket.h>
#include  <net/if.h>
#include  <net/af.h>
struct ifaddr * ifa_ifwithaddr (addr)
struct sockaddr *addr;

Parameter

addr Specifies a complete address.

Description

The ifa_ifwithaddr kernel service is passed a complete address and locates the corresponding interface. If successful, the ifa_ifwithaddr service returns the ifaddr structure associated with that address.

Execution Environment

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

Return Values

If successful, the ifa_ifwithaddr service returns the corresponding ifaddr structure associated with the address it is passed. If no interface is found, the ifa_ifwithaddr service returns a null pointer.

Example

To locate an interface based on a complete address, invoke the ifa_ifwithaddr kernel service as follows:

ifa_ifwithaddr((struct sockaddr *)&ipaddr);

Implementation Specifics

The ifa_ifwithaddr kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The ifa_ifwithdstaddr kernel service, ifa_ifwithnet kernel service.

Network Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]