Kernel Functions for Drivers netgetifname(9F)
NAME
netgetifname - determine the name given to a network inter-
face
SYNOPSIS
#include
int netgetifname(const netdatat net, const phyift ifp,
char *buffer, sizet buflen);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
net value returned from a successful call to
netprotocollookup(9F).
ifp value returned from a successful call to
netphylookup(9F) or netphygetnext(9F).
buffer pointer to the buffer in which to write the inter-
face name.
buflen size of the buffer in which to store the interface
name.
DESCRIPTION
The netgetifname() 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 netphygetnext(9F) for an
example on how to use this function.
RETURN VALUES
The netgetifname() function returns:
-1 The network protocol does not support this function.
0 Successful completion.
1 Unsuccessful.
SunOS 5.11 Last change: 1 May 2008 1
Kernel Functions for Drivers netgetifname(9F)
CONTEXT
The netgetifname() function may be called from user, ker-
nel, or interrupt context.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcsu
Interface Stability Committed
SEE ALSO
netphygetnext(9F), netphylookup(9F),
netprotocollookup(9F)
SunOS 5.11 Last change: 1 May 2008 2
|