man pages section 9: DDI and DKI Kernel Functions
  Search only this book
View this book in:
Download this book in PDF (3391 KB)

net_getifname(9F)

Name | Synopsis | Interface Level | Parameters | Description | Return Values | Context | Attributes | See Also

Name

    net_getifname– determine the name given to a network interface

Synopsis

    #include <sys/neti.h>
    
    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

Description

    The net_getifname() function copies the name of the network interface 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-terminated name, the name in the buffer is truncated to fit. See net_phygetnext(9F) for an example on how to use this function.

Return Values

    The net_getifname() function returns:

    –1

    The network protocol does not support this function.

    0

    Successful completion.

    1

    Unsuccessful.

Context

    The net_getifname() function may be called from user, kernel, or interrupt context.

Attributes

    See attributes(5) for descriptions of the following attributes:

    ATTRIBUTE TYPE 

    ATTRIBUTE VALUE 

    Availability 

    SUNWcsu 

    Interface Stability 

    Committed 

See Also

SunOS 5.10  Last Revised 1 May 2008

Name | Synopsis | Interface Level | Parameters | Description | Return Values | Context | Attributes | See Also