8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / man / man3dlpi / dlpi_get_physaddr.3dlpi
blob260ffcc66fea28f0d01420ad6d888c8bd8918066
1 '\" te
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"
7 .SH NAME
8 dlpi_get_physaddr \- get physical address using DLPI
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-ldlpi\fR [ \fIlibrary\fR... ]
13 #include <libdlpi.h>
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);
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
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:
25 .sp
26 .ne 2
27 .na
28 \fB\fBDL_FACT_PHYS_ADDR\fR\fR
29 .ad
30 .RS 21n
31 Factory physical address
32 .RE
34 .sp
35 .ne 2
36 .na
37 \fB\fBDL_CURR_PHYS_ADDR\fR\fR
38 .ad
39 .RS 21n
40 Current physical address
41 .RE
43 .sp
44 .LP
45 The operation can be performed in any \fBDLPI\fR state of \fIdh\fR.
46 .sp
47 .LP
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.
53 .SH RETURN VALUES
54 .sp
55 .LP
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.
60 .SH ERRORS
61 .sp
62 .ne 2
63 .na
64 \fB\fBDLPI_EBADMSG\fR\fR
65 .ad
66 .RS 18n
67 Bad DLPI message
68 .RE
70 .sp
71 .ne 2
72 .na
73 \fB\fBDLPI_EINHANDLE\fR\fR
74 .ad
75 .RS 18n
76 Invalid \fBDLPI\fR handle
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fBDLPI_EINVAL\fR\fR
83 .ad
84 .RS 18n
85 Invalid argument
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fBDLPI_ETIMEDOUT\fR\fR
92 .ad
93 .RS 18n
94 \fBDLPI\fR operation timed out
95 .RE
97 .SH ATTRIBUTES
98 .sp
99 .LP
100 See \fBattributes\fR(5) for description of the following attributes:
105 box;
106 c | c
107 l | l .
108 ATTRIBUTE TYPE  ATTRIBUTE VALUE
110 Interface Stability     Committed
112 MT-Level        Safe
115 .SH SEE ALSO
118 \fBdlpi_set_physaddr\fR(3DLPI), \fBlibdlpi\fR(3LIB), \fBattributes\fR(5)