Kernel functions net_getifname(9F) NAME net_getifname - determine the name given to a network inter- face SYNOPSIS #include int net_getifname(const net_data_t net, const phy_if_t ifp, char *buffer, size_t buflen); 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. buffer pointer to buffer to write the interface name into. buflen size of the buffer to store the name in. DESCRIPTION This function is used to copy the name of the network inter- face into the buffer provided. The name will always be null-terminated. If the buffer is too small to fit both the interface name and the null, the name in the buffer will be truncated to fit. RETURN VALUES This function returns -1 if it is not supported by the net- work protocol, 0 if it succeeds in copying the interface name into the buffer, including null-terminating it, and 1 if it is unable to copy the interface name in. SunOS 5.10 Last change: 25 March 2008 1 Kernel functions net_getifname(9F) EXAMPLES See net_phygetnext(9f). ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Interface Stability | Committed | |_____________________________|_____________________________| SEE ALSO net_phygetnext(9f), net_phylookup(9f) SunOS 5.10 Last change: 25 March 2008 2