1di_path_bus_addr(3DEVIDNeFvOi)ce Information Library Functdiio_npsath_bus_addr(3DEVINFO)
2
3
4
6 di_path_bus_addr, di_path_client_node, di_path_instance,
7 di_path_node_name, di_path_phci_node, di_path_state - return libdevinfo
8 path node information
9
11 cc [ flag... ] file... -ldevinfo [ library... ]
12 #include <libdevinfo.h>
13
14 char *di_path_bus_addr(di_path_t path);
15
16
17 di_node_t di_path_client_node(di_path_t path);
18
19
20 int di_path_instance(di_path_t path);
21
22
23 char *di_path_node_name(di_path_t path);
24
25
26 di_node_t di_path_phci_node(di_path_t path);
27
28
29 di_path_state_t di_path_state(di_path_t path);
30
31
33 path The handle to a path node in a di_init(3DEVINFO) snapshot.
34
35
37 These functions extract information associated with a path node.
38
40 The di_path_bus_addr() function returns a string representing the pHCI
41 child path node's unit-address. This function is the di_path_t peer of
42 di_bus_addr(3DEVINFO).
43
44
45 The di_path_client_node() function returns the di_node_t of the
46 'client' device node associated with the given path node. If the client
47 device node is not present in the current device tree snapshot,
48 DI_NODE_NIL is returned and errno is set to ENOTSUP.
49
50
51 The di_path_node_name() function returns a pointer to a null-terminated
52 string containing the path node name. This function is the di_path_t
53 peer of di_node_name(3DEVINFO).
54
55
56 The di_path_instance() function returns the instance number associated
57 with the given path node. A path node instance is persistent across
58 attach(9E)/detach(9E)and device reconfigurations, but not across
59 reboot. A path node instance is unrelated to a device node
60 di_instance(3DEVINFO).
61
62
63 The di_path_phci_node() function returns the di_node_t of the pHCI host
64 adapter associated with the given path node. If the pHCI device node
65 is not present in the current device tree snapshot, DI_NODE_NIL is
66 returned and errno is set to ENOTSUP.
67
68
69 The di_path_state() function returns the state of an I/O path. This
70 function may return one of the following values:
71
72 DI_PATH_STATE_ONLINE
73
74 Identifies that the path_info node is online and I/O requests can
75 be routed through this path.
76
77
78 DI_PATH_STATE_OFFLINE
79
80 Identifies that the path_info node is in offline state.
81
82
83 DI_PATH_STATE_FAULT
84
85 Identifies that the path_info node is in faulted state and not
86 ready for I/O operations.
87
88
89 DI_PATH_STATE_STANDBY
90
91 Identifies that the path_info node is in standby state and not
92 ready for I/O operations.
93
94
96 See attributes(5) for descriptions of the following attributes:
97
98
99
100
101 ┌─────────────────────────────┬─────────────────────────────┐
102 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
103 ├─────────────────────────────┼─────────────────────────────┤
104 │Interface Stability │Committed │
105 ├─────────────────────────────┼─────────────────────────────┤
106 │MT-Level │Safe │
107 └─────────────────────────────┴─────────────────────────────┘
108
110 di_bus_addr(3DEVINFO), di_devfs_path(3DEVINFO), di_init(3DEVINFO),
111 di_instance(3DEVINFO), di_node_name(3DEVINFO),
112 di_path_client_next_path(3DEVINFO), di_path_prop_next(3DEVINFO),
113 di_path_prop_bytes(3DEVINFO), di_path_prop_lookup_bytes(3DEVINFO),
114 di_path_prop_next(3DEVINFO), libdevinfo(3LIB), attributes(5)
115
116
117 Writing Device Drivers
118
119
120
121SunOS 5.11 15 May 2008 di_path_bus_addr(3DEVINFO)