ifaddr Struct Reference

#include <stdapis/net/if_var.h>

struct ifaddr
Public Attributes
struct if_dataif_data
struct sockaddr *ifa_addr
struct sockaddr *ifa_dstaddr
u_shortifa_flags
struct ifnet *ifa_ifp
intifa_metric
struct sockaddr *ifa_netmask
u_intifa_refcnt
Public Member Functions
TAILQ_ENTRY(ifaddr)
intifa_claim_addr(struct ifaddr *, struct sockaddr *)
voidifa_rtrequest(int, struct rtentry *, struct rt_addrinfo *)

Detailed Description

The ifaddr structure contains information about one address of an interface. They are maintained by the different address families, are allocated and attached when an address is set, and are linked together so all addresses for an interface can be located.

Member Attribute Documentation

if_data

struct if_dataif_data

not all members are meaningful

ifa_addr

struct sockaddr *ifa_addr

address of interface

ifa_dstaddr

struct sockaddr *ifa_dstaddr

other end of p-to-p link

ifa_flags

u_shortifa_flags

mostly rt_flags for cloning

ifa_ifp

struct ifnet *ifa_ifp

back-pointer to interface

ifa_metric

intifa_metric

cost of going out this interface

ifa_netmask

struct sockaddr *ifa_netmask

used to determine subnet

ifa_refcnt

u_intifa_refcnt

references to this structure

Member Function Documentation

TAILQ_ENTRY ( ifaddr )

TAILQ_ENTRY(ifaddr)

ifa_claim_addr ( struct ifaddr *, struct sockaddr * )

intifa_claim_addr(struct ifaddr *,
struct sockaddr *
)

check if an addr goes to this if

ifa_rtrequest ( int, struct rtentry *, struct rt_addrinfo * )

voidifa_rtrequest(int,
struct rtentry *,
struct rt_addrinfo *
)

check or clean routes