Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man3devinfo / di_path_bus_addr.3devinfo
blob54e1e47dec17049fe10cd261b814c88201ec2ba4
1 '\" te
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 DI_PATH_BUS_ADDR 3DEVINFO "May 15, 2008"
7 .SH NAME
8 di_path_bus_addr, di_path_client_node, di_path_instance, di_path_node_name,
9 di_path_phci_node, di_path_state \- return libdevinfo path node information
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-ldevinfo\fR [ \fIlibrary\fR... ]
14 #include <libdevinfo.h>
16 \fBchar *\fR\fBdi_path_bus_addr\fR(\fBdi_path_t\fR \fIpath\fR);
17 .fi
19 .LP
20 .nf
21 \fBdi_node_t\fR \fBdi_path_client_node\fR(\fBdi_path_t\fR \fIpath\fR);
22 .fi
24 .LP
25 .nf
26 \fBint\fR \fBdi_path_instance\fR(\fBdi_path_t\fR \fIpath\fR);
27 .fi
29 .LP
30 .nf
31 \fBchar *\fR\fBdi_path_node_name\fR(\fBdi_path_t\fR \fIpath\fR);
32 .fi
34 .LP
35 .nf
36 \fBdi_node_t\fR \fBdi_path_phci_node\fR(\fBdi_path_t\fR \fIpath\fR);
37 .fi
39 .LP
40 .nf
41 \fBdi_path_state_t\fR \fBdi_path_state\fR(\fBdi_path_t\fR \fIpath\fR);
42 .fi
44 .SH PARAMETERS
45 .sp
46 .ne 2
47 .na
48 \fB\fIpath\fR\fR
49 .ad
50 .RS 8n
51 The handle to a path node in a \fBdi_init\fR(3DEVINFO) snapshot.
52 .RE
54 .SH DESCRIPTION
55 .sp
56 .LP
57 These functions extract information associated with a path node.
58 .SH RETURN VALUES
59 .sp
60 .LP
61 The \fBdi_path_bus_addr()\fR function returns a string representing the pHCI
62 child path node's unit-address. This function is the \fBdi_path_t\fR peer of
63 \fBdi_bus_addr\fR(3DEVINFO).
64 .sp
65 .LP
66 The \fBdi_path_client_node()\fR function returns the \fBdi_node_t\fR of
67 the 'client' device node associated with the given path node. If the client device
68 node is not present in the current device tree snapshot, \fBDI_NODE_NIL\fR is
69 returned and \fBerrno\fR is set to \fBENOTSUP\fR.
70 .sp
71 .LP
72 The \fBdi_path_node_name()\fR function returns a pointer to a null-terminated
73 string containing the path node name. This function is the \fBdi_path_t\fR peer
74 of \fBdi_node_name\fR(3DEVINFO).
75 .sp
76 .LP
77 The \fBdi_path_instance()\fR function returns the instance number associated
78 with the given path node.  A path node instance is persistent across
79 \fBattach\fR(9E)/\fBdetach\fR(9E)and device reconfigurations, but not across
80 reboot.  A path node instance is unrelated to a device node
81 \fBdi_instance\fR(3DEVINFO).
82 .sp
83 .LP
84 The \fBdi_path_phci_node()\fR function returns the \fBdi_node_t\fR of the pHCI
85 host adapter associated with the given path node.  If the pHCI device node is
86 not present in the current device tree snapshot, \fBDI_NODE_NIL\fR is returned
87 and \fBerrno\fR is set to \fBENOTSUP\fR.
88 .sp
89 .LP
90 The \fBdi_path_state()\fR function returns the state of an I/O path. This
91 function may return one of the following values:
92 .sp
93 .ne 2
94 .na
95 \fB\fBDI_PATH_STATE_ONLINE\fR\fR
96 .ad
97 .sp .6
98 .RS 4n
99 Identifies that the \fBpath_info\fR node is online and I/O requests can be
100 routed through this path.
104 .ne 2
106 \fB\fBDI_PATH_STATE_OFFLINE\fR\fR
108 .sp .6
109 .RS 4n
110 Identifies that the \fBpath_info\fR node is in offline state.
114 .ne 2
116 \fB\fBDI_PATH_STATE_FAULT\fR\fR
118 .sp .6
119 .RS 4n
120 Identifies that the \fBpath_info\fR node is in faulted state and not ready for
121 I/O operations.
125 .ne 2
127 \fB\fBDI_PATH_STATE_STANDBY\fR\fR
129 .sp .6
130 .RS 4n
131 Identifies that the \fBpath_info\fR node is in standby state and not ready for
132 I/O operations.
135 .SH ATTRIBUTES
138 See \fBattributes\fR(5)  for descriptions of the following attributes:
143 box;
144 c | c
145 l | l .
146 ATTRIBUTE TYPE  ATTRIBUTE VALUE
148 Interface Stability     Committed
150 MT-Level        Safe
153 .SH SEE ALSO
156 \fBdi_bus_addr\fR(3DEVINFO), \fBdi_devfs_path\fR(3DEVINFO),
157 \fBdi_init\fR(3DEVINFO), \fBdi_instance\fR(3DEVINFO),
158 \fBdi_node_name\fR(3DEVINFO), \fBdi_path_client_next_path\fR(3DEVINFO),
159 \fBdi_path_prop_next\fR(3DEVINFO), \fBdi_path_prop_bytes\fR(3DEVINFO),
160 \fBdi_path_prop_lookup_bytes\fR(3DEVINFO), \fBdi_path_prop_next\fR(3DEVINFO),
161 \fBlibdevinfo\fR(3LIB), \fBattributes\fR(5)
164 \fIWriting Device Drivers\fR