4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or https://opensource.org/licenses/CDDL-1.0.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_SYSEVENT_DEV_H
27 #define _SYS_SYSEVENT_DEV_H
29 #include <sys/sysevent/eventdefs.h>
36 * Event schema for EC_DEV_ADD/ESC_DISK
38 * Event Class - EC_DEV_ADD
39 * Event Sub-Class - ESC_DISK
41 * Attribute Name - EV_VERSION
42 * Attribute Type - DATA_TYPE_INT32
43 * Attribute Value - event version number
45 * Attribute Name - DEV_NAME
46 * Attribute Type - DATA_TYPE_STRING
47 * Attribute Value - /dev name to the raw device.
48 * The name does not include the slice number component.
50 * Attribute Name - DEV_PHYS_PATH
51 * Attribute Type - DATA_TYPE_STRING
52 * Attribute Value - physical path of the device without the "/devices"
55 * Attribute Name - DEV_DRIVER_NAME
56 * Attribute Type - DATA_TYPE_STRING
57 * Attribute Value - driver name
59 * Attribute Name - DEV_INSTANCE
60 * Attribute Type - DATA_TYPE_INT32
61 * Attribute Value - driver instance number
63 * Attribute Name - DEV_PROP_PREFIX<devinfo_node_property>
64 * Attribute Type - data type of the devinfo_node_property
65 * Attribute Value - value of the devinfo_node_property
68 * Event schema for EC_DEV_ADD/ESC_NETWORK
70 * Event Class - EC_DEV_ADD
71 * Event Sub-Class - ESC_NETWORK
73 * Attribute Name - EV_VERSION
74 * Attribute Type - DATA_TYPE_INT32
75 * Attribute Value - event version number
77 * Attribute Name - DEV_NAME
78 * Attribute Type - DATA_TYPE_STRING
79 * Attribute Value - /dev name associated with the device if exists.
80 * /dev name associated with the driver for DLPI
81 * Style-2 only drivers.
83 * Attribute Name - DEV_PHYS_PATH
84 * Attribute Type - DATA_TYPE_STRING
85 * Attribute Value - physical path of the device without the "/devices"
88 * Attribute Name - DEV_DRIVER_NAME
89 * Attribute Type - DATA_TYPE_STRING
90 * Attribute Value - driver name
92 * Attribute Name - DEV_INSTANCE
93 * Attribute Type - DATA_TYPE_INT32
94 * Attribute Value - driver instance number
96 * Attribute Name - DEV_PROP_PREFIX<devinfo_node_property>
97 * Attribute Type - data type of the devinfo_node_property
98 * Attribute Value - value of the devinfo_node_property
101 * Event schema for EC_DEV_ADD/ESC_PRINTER
103 * Event Class - EC_DEV_ADD
104 * Event Sub-Class - ESC_PRINTER
106 * Attribute Name - EV_VERSION
107 * Attribute Type - DATA_TYPE_INT32
108 * Attribute Value - event version number
110 * Attribute Name - DEV_NAME
111 * Attribute Type - DATA_TYPE_STRING
112 * Attribute Value - /dev/printers name associated with the device
114 * /dev name associated with the device if it exists
116 * Attribute Name - DEV_PHYS_PATH
117 * Attribute Type - DATA_TYPE_STRING
118 * Attribute Value - physical path of the device without the "/devices"
121 * Attribute Name - DEV_DRIVER_NAME
122 * Attribute Type - DATA_TYPE_STRING
123 * Attribute Value - driver name
125 * Attribute Name - DEV_INSTANCE
126 * Attribute Type - DATA_TYPE_INT32
127 * Attribute Value - driver instance number
129 * Attribute Name - DEV_PROP_PREFIX<devinfo_node_property>
130 * Attribute Type - data type of the devinfo_node_property
131 * Attribute Value - value of the devinfo_node_property
134 * Event schema for EC_DEV_REMOVE/ESC_DISK
136 * Event Class - EC_DEV_REMOVE
137 * Event Sub-Class - ESC_DISK
139 * Attribute Name - EV_VERSION
140 * Attribute Type - DATA_TYPE_INT32
141 * Attribute Value - event version number
143 * Attribute Name - DEV_NAME
144 * Attribute Type - DATA_TYPE_STRING
145 * Attribute Value - /dev name to the raw device.
146 * The name does not include the slice number component.
148 * Attribute Name - DEV_PHYS_PATH
149 * Attribute Type - DATA_TYPE_STRING
150 * Attribute Value - physical path of the device without the "/devices"
153 * Attribute Name - DEV_DRIVER_NAME
154 * Attribute Type - DATA_TYPE_STRING
155 * Attribute Value - driver name
157 * Attribute Name - DEV_INSTANCE
158 * Attribute Type - DATA_TYPE_INT32
159 * Attribute Value - driver instance number
162 * Event schema for EC_DEV_REMOVE/ESC_NETWORK
164 * Event Class - EC_DEV_REMOVE
165 * Event Sub-Class - ESC_NETWORK
167 * Attribute Name - EV_VERSION
168 * Attribute Type - DATA_TYPE_INT32
169 * Attribute Value - event version number
171 * Attribute Name - DEV_NAME
172 * Attribute Type - DATA_TYPE_STRING
173 * Attribute Value - /dev name associated with the device if exists.
174 * /dev name associated with the driver for DLPI
175 * Style-2 only drivers.
177 * Attribute Name - DEV_PHYS_PATH
178 * Attribute Type - DATA_TYPE_STRING
179 * Attribute Value - physical path of the device without the "/devices"
182 * Attribute Name - DEV_DRIVER_NAME
183 * Attribute Type - DATA_TYPE_STRING
184 * Attribute Value - driver name
186 * Attribute Name - DEV_INSTANCE
187 * Attribute Type - DATA_TYPE_INT32
188 * Attribute Value - driver instance number
191 * Event schema for EC_DEV_REMOVE/ESC_PRINTER
193 * Event Class - EC_DEV_REMOVE
194 * Event Sub-Class - ESC_PRINTER
196 * Attribute Name - EV_VERSION
197 * Attribute Type - DATA_TYPE_INT32
198 * Attribute Value - event version number
200 * Attribute Name - DEV_NAME
201 * Attribute Type - DATA_TYPE_STRING
202 * Attribute Value - /dev/printers name associated with the device
204 * /dev name associated with the device if it exists
206 * Attribute Name - DEV_PHYS_PATH
207 * Attribute Type - DATA_TYPE_STRING
208 * Attribute Value - physical path of the device without the "/devices"
211 * Attribute Name - DEV_DRIVER_NAME
212 * Attribute Type - DATA_TYPE_STRING
213 * Attribute Value - driver name
215 * Attribute Name - DEV_INSTANCE
216 * Attribute Type - DATA_TYPE_INT32
217 * Attribute Value - driver instance number
220 * Event schema for EC_DEV_BRANCH/ESC_DEV_BRANCH_ADD or ESC_DEV_BRANCH_REMOVE
222 * Event Class - EC_DEV_BRANCH
223 * Event Sub-Class - ESC_DEV_BRANCH_ADD or ESC_DEV_BRANCH_REMOVE
225 * Attribute Name - EV_VERSION
226 * Attribute Type - DATA_TYPE_INT32
227 * Attribute Value - event version number
229 * Attribute Name - DEV_PHYS_PATH
230 * Attribute Type - DATA_TYPE_STRING
231 * Attribute Value - physical path to the root node of the device subtree
232 * without the "/devices" prefix.
235 #define EV_VERSION "version"
236 #define DEV_PHYS_PATH "phys_path"
237 #define DEV_NAME "dev_name"
238 #define DEV_DRIVER_NAME "driver_name"
239 #define DEV_INSTANCE "instance"
240 #define DEV_PROP_PREFIX "prop-"
243 #define DEV_IDENTIFIER "devid"
244 #define DEV_PATH "path"
245 #define DEV_IS_PART "is_slice"
246 #define DEV_SIZE "dev_size"
248 /* Size of the whole parent block device (if dev is a partition) */
249 #define DEV_PARENT_SIZE "dev_parent_size"
250 #endif /* __linux__ */
254 /* maximum number of devinfo node properties added to the event */
255 #define MAX_PROP_COUNT 100
257 /* only properties with size less than PROP_LEN_LIMIT are added to the event */
258 #define PROP_LEN_LIMIT 1024
264 #endif /* _SYS_SYSEVENT_DEV_H */