2 .\" Copyright (c) 2007, 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 DLPI_GET_PHYSADDR 3DLPI "Aug 22, 2007"
8 dlpi_get_physaddr \- get physical address using DLPI
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-ldlpi\fR [ \fIlibrary\fR... ]
15 \fBint\fR \fBdlpi_get_physaddr\fR(\fBdlpi_handle_t\fR \fIdh\fR, \fBuint_t\fR \fItype\fR,
16 \fBvoid *\fR\fIaddrp\fR,\fBsize_t *\fR\fIaddrlenp\fR);
22 The \fBdlpi_get_physaddr()\fR function gets a physical address from the
23 \fBDLPI\fR link instance associated with \fBDLPI\fR handle \fIdh\fR. The
24 retrieved address depends upon \fItype\fR, which can be:
28 \fB\fBDL_FACT_PHYS_ADDR\fR\fR
31 Factory physical address
37 \fB\fBDL_CURR_PHYS_ADDR\fR\fR
40 Current physical address
45 The operation can be performed in any \fBDLPI\fR state of \fIdh\fR.
48 The caller must ensure that \fIaddrp\fR is at least \fBDLPI_PHYSADDR_MAX\fR
49 bytes in size and \fIaddrlenp\fR must contain the length of \fIaddrp\fR. Upon
50 success, \fIaddrp\fR contains the specified physical address, and
51 \fIaddrlenp\fR contains the physical address length. If a physical address is
52 not available, \fIaddrp\fR is not filled in and \fIaddrlenp\fR is set to zero.
56 Upon success, \fBDLPI_SUCCESS\fR is returned. If \fBDL_SYSERR\fR is returned,
57 \fBerrno\fR contains the specific UNIX system error value. Otherwise, a
58 \fBDLPI\fR error value defined in \fB<sys/dlpi.h>\fR or an error value listed
59 in the following section is returned.
64 \fB\fBDLPI_EBADMSG\fR\fR
73 \fB\fBDLPI_EINHANDLE\fR\fR
76 Invalid \fBDLPI\fR handle
82 \fB\fBDLPI_EINVAL\fR\fR
91 \fB\fBDLPI_ETIMEDOUT\fR\fR
94 \fBDLPI\fR operation timed out
100 See \fBattributes\fR(5) for description of the following attributes:
108 ATTRIBUTE TYPE ATTRIBUTE VALUE
110 Interface Stability Committed
118 \fBdlpi_set_physaddr\fR(3DLPI), \fBlibdlpi\fR(3LIB), \fBattributes\fR(5)