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

NAME

6       net_getlifaddr - determine a network address for a given interface
7

SYNOPSIS

9       #include <sys/neti.h>
10
11       int net_getlifaddr(const net_data_t net, const phy_if_t ifp,
12            const net_if_t lif, int const type,
13            struct sockaddr* storage);
14
15

INTERFACE LEVEL

17       Solaris DDI specific (Solaris DDI).
18

PARAMETERS

20       net        value   returned   from  a  successful  call  to  net_proto‐
21                  col_lookup(9F).
22
23
24       ifp        value returned from a successful call  to  net_phylookup(9F)
25                  or  net_phygetnext(9F),  indicating  which network interface
26                  the information should be returned from.
27
28
29       lif        indicates the logical interface  from  which  to  fetch  the
30                  address.
31
32
33       type       indicates what type of address should be returned. See below
34                  for more details on this field.
35
36
37       storage    pointer to an area of memory to store the address data.
38
39

DESCRIPTION

41       The net_getlifaddr() function retrieves  the  address  information  for
42       each logical interface. Each call to net_getlifaddr() requires that the
43       caller pass a pointer to an  array  of  address  information  types  to
44       retrieve, and an accompanying pointer to an array of pointers to struct
45       sockaddr structures to which  to  copy  the  address  information.  See
46       net_lifgetnext(9F) for an example on how to use this function.
47
48
49       Each  member  of  the  address  type  array should be one of the values
50       listed here.
51
52       NA_ADDRESS      Return the network address associated with the  logical
53                       interface  (lif)  that belongs to the network interface
54                       (ifp).
55
56
57       NA_PEER         Return the address assigned  to  the  remote  host  for
58                       point  to  point  network interfaces for the given net‐
59                       work/logical interface.
60
61
62       NA_BROADCAST    Return the broadcast address assigned to the given net‐
63                       work/logical interface for network interfaces that sup‐
64                       port broadcast packets.
65
66
67       NA_NETMASK      Return the  netmask  associated  with  the  given  net‐
68                       work/logical interface for network interfaces that sup‐
69                       port broadcast packets.
70
71

RETURN VALUES

73       The net_getlifaddr() function returns:
74
75       -1    The network protocol does not support this function.
76
77
78       0     Successful completion.
79
80
81       1     Unsuccessful.
82
83

CONTEXT

85       The net_getifaddr() function may be called from user, kernel, or inter‐
86       rupt context.
87

ATTRIBUTES

89       See attributes(5) for descriptions of the following attributes:
90
91
92
93
94       ┌─────────────────────────────┬─────────────────────────────┐
95       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
96       ├─────────────────────────────┼─────────────────────────────┤
97       │Availability                 │SUNWcsu                      │
98       ├─────────────────────────────┼─────────────────────────────┤
99       │Interface Stability          │Committed                    │
100       └─────────────────────────────┴─────────────────────────────┘
101

SEE ALSO

103       net_lifgetnext(9F),   net_phylookup(9F),   net_phygetnext(9F)net_proto‐
104       col_lookup(9F)
105
106
107
108SunOS 5.11                        13 Oct 2008               net_getlifaddr(9F)
Impressum