2 .\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH NET_GETLIFADDR 9F "Oct 13, 2008"
8 net_getlifaddr \- determine a network address for a given interface
14 \fBint\fR \fBnet_getlifaddr\fR(\fBconst\fR \fBnet_data_t\fR \fInet\fR, \fBconst\fR \fBphy_if_t\fR \fIifp\fR,
15 \fBconst\fR \fBnet_if_t\fR \fIlif\fR, \fBint\fR \fBconst\fR \fItype\fR,
16 \fBstruct\fR \fBsockaddr*\fR \fIstorage\fR);
22 Solaris DDI specific (Solaris DDI).
30 value returned from a successful call to \fBnet_protocol_lookup\fR(9F).
39 value returned from a successful call to \fBnet_phylookup\fR(9F) or
40 \fBnet_phygetnext\fR(9F), indicating which network interface the information
41 should be returned from.
50 indicates the logical interface from which to fetch the address.
59 indicates what type of address should be returned. See below for more details
69 pointer to an area of memory to store the address data.
75 The \fBnet_getlifaddr()\fR function retrieves the address information for each
76 logical interface. Each call to \fBnet_getlifaddr()\fR requires that the caller
77 pass a pointer to an array of address information types to retrieve, and an
78 accompanying pointer to an array of pointers to \fBstruct sockaddr\fR
79 structures to which to copy the address information. See
80 \fBnet_lifgetnext\fR(9F) for an example on how to use this function.
83 Each member of the address \fBtype\fR array should be one of the values listed
88 \fB\fBNA_ADDRESS\fR\fR
91 Return the network address associated with the logical interface (\fBlif\fR)
92 that belongs to the network interface (\fBifp\fR).
101 Return the address assigned to the remote host for point to point network
102 interfaces for the given network/logical interface.
108 \fB\fBNA_BROADCAST\fR\fR
111 Return the broadcast address assigned to the given network/logical interface
112 for network interfaces that support broadcast packets.
118 \fB\fBNA_NETMASK\fR\fR
121 Return the netmask associated with the given network/logical interface for
122 network interfaces that support broadcast packets.
128 The \fBnet_getlifaddr()\fR function returns:
135 The network protocol does not support this function.
144 Successful completion.
159 The \fBnet_getifaddr()\fR function may be called from user, kernel, or
164 See \fBattributes\fR(5) for descriptions of the following attributes:
172 ATTRIBUTE TYPE ATTRIBUTE VALUE
174 Interface Stability Committed
180 \fBnet_lifgetnext\fR(9F), \fBnet_phylookup\fR(9F),
181 \fBnet_phygetnext\fR(9F), \fBnet_protocol_lookup\fR(9F)