NET_GETLIFADDR(9F) | Kernel Functions for Drivers | NET_GETLIFADDR(9F) |
net_getlifaddr - determine a network address for a given interface
#include <sys/neti.h> int net_getlifaddr(const net_data_t net, const phy_if_t ifp,
const net_if_t lif, int const type,
struct sockaddr* storage);
illumos DDI specific (illumos DDI).
net
ifp
lif
type
storage
The net_getlifaddr() function retrieves the address information for each logical interface. Each call to net_getlifaddr() requires that the caller pass a pointer to an array of address information types to retrieve, and an accompanying pointer to an array of pointers to struct sockaddr structures to which to copy the address information. See net_lifgetnext(9F) for an example on how to use this function.
Each member of the address type array should be one of the values listed here.
NA_ADDRESS
NA_PEER
NA_BROADCAST
NA_NETMASK
The net_getlifaddr() function returns:
-1
0
1
The net_getifaddr() function may be called from user, kernel, or interrupt context.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
net_lifgetnext(9F), net_phygetnext(9F), net_phylookup(9F), net_protocol_lookup(9F)
October 13, 2008 | OmniOS |