1net_getifname(9F)        Kernel Functions for Drivers        net_getifname(9F)
2
3
4

NAME

6       net_getifname - determine the name given to a network interface
7

SYNOPSIS

9       #include <sys/neti.h>
10
11       int net_getifname(const net_data_t net, const phy_if_t ifp,
12            char *buffer, size_t buflen);
13
14

INTERFACE LEVEL

16       Solaris DDI specific (Solaris DDI).
17

PARAMETERS

19       net       value   returned   from   a  successful  call  to  net_proto‐
20                 col_lookup(9F).
21
22
23       ifp       value returned from a successful call to net_phylookup(9F) or
24                 net_phygetnext(9F).
25
26
27       buffer    pointer to the buffer in which to write the interface name.
28
29
30       buflen    size of the buffer in which to store the interface name.
31
32

DESCRIPTION

34       The  net_getifname()  function copies the name of the network interface
35       into the buffer provided. The name will always be  null-terminated.  If
36       the  buffer  is  too small to fit both the interface name and the null-
37       terminated name, the name in  the  buffer  is  truncated  to  fit.  See
38       net_phygetnext(9F) for an example on how to use this function.
39

RETURN VALUES

41       The net_getifname() function returns:
42
43       -1    The network protocol does not support this function.
44
45
46       0     Successful completion.
47
48
49       1     Unsuccessful.
50
51

CONTEXT

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

ATTRIBUTES

57       See attributes(5) for descriptions of the following attributes:
58
59
60
61
62       ┌─────────────────────────────┬─────────────────────────────┐
63       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
64       ├─────────────────────────────┼─────────────────────────────┤
65       │Availability                 │SUNWcsu                      │
66       ├─────────────────────────────┼─────────────────────────────┤
67       │Interface Stability          │Committed                    │
68       └─────────────────────────────┴─────────────────────────────┘
69

SEE ALSO

71       net_phygetnext(9F), net_phylookup(9F), net_protocol_lookup(9F)
72
73
74
75SunOS 5.11                        1 May 2008                 net_getifname(9F)
Impressum