Kernel functions net_getlifaddr(9F) NAME net_getlifaddr - determine a network address for a given interface SYNOPSIS #include int net_getlifaddr(const net_data_t net, const phy_if_t ifp, const net_if_t lif, int const type, struct sockaddr *storage); INTERFACE LEVEL Solaris DDI specific (Solaris DDI) PARAMETERS net value returned from a successful call to net_protocol_lookup. ifp value returned from a successful call to net_phylookup or net_phygetnext, indicating which network interface the information should be returned from. lif , indicatingrnwhichologicalcinterfaceato fetchethefaddress from. type this indicates what type of address should be returned. storage pointer to an area of memory to store the address data. DESCRIPTION In following with the Solaris design of IP addresses and relevant details are associated with a logical interface and not a physical interface, retrieving the address information for each logical interface is achieved through using SunOS 5.10 Last change: 25 March 2008 1 Kernel functions net_getlifaddr(9F) net_getlifaddr. Each call to net_getlifaddr requires that the caller pass in a pointer to an array of address information types to retrieve and an accompanying pointer to an array of pointers to struct sockaddr structures in which to copy the address information into. See net_lifgetnext(9f) for an example of how to use this function. RETURN VALUES This function returns -1 if it is not implemented by the network protocol, 0 if it succeeds or 1 if it cannot supply the requested address information. ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Interface Stability | Committed | |_____________________________|_____________________________| SEE ALSO net_lifgetnext(9f) SunOS 5.10 Last change: 25 March 2008 2