xref: /illumos-gate/usr/src/uts/common/sys/sysevent/eventdefs.h (revision 74e12c43fe52f2c30f36e65a4d0fb0e8dfd7068a)
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24  * Copyright 2016 Nexenta Systems, Inc.
25  * Copyright 2019 Joyent, Inc.
26  */
27 
28 #ifndef	_SYS_SYSEVENT_EVENTDEFS_H
29 #define	_SYS_SYSEVENT_EVENTDEFS_H
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 /*
36  * eventdefs.h contains public definitions for sysevent types (classes
37  * and subclasses).  All additions/removal/changes are subject
38  * to PSARC approval.
39  */
40 
41 /* Sysevent Class definitions */
42 #define	EC_NONE		"EC_none"
43 #define	EC_PRIV		"EC_priv"
44 #define	EC_PLATFORM	"EC_platform"	/* events private to platform */
45 #define	EC_DR		"EC_dr"	/* Dynamic reconfiguration event class */
46 #define	EC_ENV		"EC_env"	/* Environmental monitor event class */
47 #define	EC_DOMAIN	"EC_domain"	/* Domain event class */
48 #define	EC_AP_DRIVER	"EC_ap_driver"	/* Alternate Pathing event class */
49 #define	EC_IPMP		"EC_ipmp"	/* IP Multipathing event class */
50 #define	EC_DEV_ADD	"EC_dev_add"	/* device add event class */
51 #define	EC_DEV_REMOVE	"EC_dev_remove"	/* device remove event class */
52 #define	EC_DEV_BRANCH	"EC_dev_branch"	/* device tree branch event class */
53 #define	EC_DEV_STATUS	"EC_dev_status"	/* device status event class */
54 #define	EC_FM		"EC_fm"		/* FMA error report event */
55 #define	EC_ZFS		"EC_zfs"	/* ZFS event */
56 #define	EC_DATALINK	"EC_datalink"	/* datalink event */
57 #define	EC_VRRP		"EC_vrrp"	/* VRRP event */
58 #define	EC_PCIE		"EC_pcie"	/* PCIe event */
59 
60 /*
61  * The following event class is reserved for exclusive use
62  * by Sun Cluster software.
63  */
64 #define	EC_CLUSTER	"EC_Cluster"
65 
66 /*
67  * EC_DR subclass definitions - supporting attributes (name/value pairs)
68  * are found in sys/sysevent/dr.h
69  */
70 
71 /* Attachment point state change */
72 #define	ESC_DR_AP_STATE_CHANGE	"ESC_dr_ap_state_change"
73 #define	ESC_DR_REQ		"ESC_dr_req"	/* Request DR */
74 #define	ESC_DR_TARGET_STATE_CHANGE	"ESC_dr_target_state_change"
75 
76 /*
77  * EC_ENV subclass definitions - supporting attributes (name/value pairs)
78  * are found in sys/sysevent/env.h
79  */
80 #define	ESC_ENV_TEMP	"ESC_env_temp"	/* Temperature change event subclass */
81 #define	ESC_ENV_FAN	"ESC_env_fan"	/* Fan status change event subclass */
82 #define	ESC_ENV_POWER	"ESC_env_power"	/* Power supply change event subclass */
83 #define	ESC_ENV_LED	"ESC_env_led"	/* LED change event subclass */
84 
85 /*
86  * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs)
87  * are found in sys/sysevent/domain.h
88  */
89 
90 /* Domain state change */
91 #define	ESC_DOMAIN_STATE_CHANGE		"ESC_domain_state_change"
92 /* Domain loghost name change */
93 #define	ESC_DOMAIN_LOGHOST_CHANGE	"ESC_domain_loghost_change"
94 
95 /*
96  * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs)
97  * are found in sys/sysevent/ap_driver.h
98  */
99 
100 /* Alternate Pathing path switch */
101 #define	ESC_AP_DRIVER_PATHSWITCH	"ESC_ap_driver_pathswitch"
102 /* Alternate Pathing database commit */
103 #define	ESC_AP_DRIVER_COMMIT		"ESC_ap_driver_commit"
104 /* Alternate Pathing physical path status change */
105 #define	ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE	\
106 	"ESC_ap_driver_phys_path_status_change"
107 
108 /*
109  * EC_IPMP subclass definitions - supporting attributes (name/value pairs)
110  * are found in sys/sysevent/ipmp.h
111  */
112 
113 /* IPMP group has changed state */
114 #define	ESC_IPMP_GROUP_STATE		"ESC_ipmp_group_state"
115 
116 /* IPMP group has been created or removed */
117 #define	ESC_IPMP_GROUP_CHANGE		"ESC_ipmp_group_change"
118 
119 /* IPMP group has had an interface added or removed */
120 #define	ESC_IPMP_GROUP_MEMBER_CHANGE	"ESC_ipmp_group_member_change"
121 
122 /* Interface within an IPMP group has changed state or type */
123 #define	ESC_IPMP_IF_CHANGE		"ESC_ipmp_if_change"
124 
125 /* IPMP probe has changed state */
126 #define	ESC_IPMP_PROBE_STATE		"ESC_ipmp_probe_state"
127 
128 /*
129  * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes
130  * (name/value pairs) are found in sys/sysevent/dev.h
131  */
132 #define	ESC_DISK	"disk"		/* disk device */
133 #define	ESC_NETWORK	"network"	/* network interface */
134 #define	ESC_PRINTER	"printer"	/* printer device */
135 #define	ESC_LOFI	"lofi"		/* lofi device */
136 
137 /*
138  * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs)
139  * are found in sys/sysevent/dev.h
140  */
141 
142 /* device tree branch added */
143 #define	ESC_DEV_BRANCH_ADD	"ESC_dev_branch_add"
144 
145 /* device tree branch removed */
146 #define	ESC_DEV_BRANCH_REMOVE	"ESC_dev_branch_remove"
147 
148 /*
149  * EC_DEV_STATUS subclass definitions
150  *
151  * device capacity dynamically changed
152  */
153 #define	ESC_DEV_DLE		"ESC_dev_dle"
154 
155 /* LUN has received an eject request from the user */
156 #define	ESC_DEV_EJECT_REQUEST	"ESC_dev_eject_request"
157 
158 /* FMA Fault and Error event protocol subclass */
159 #define	ESC_FM_ERROR		"ESC_FM_error"
160 #define	ESC_FM_ERROR_REPLAY	"ESC_FM_error_replay"
161 
162 /* Service processor subclass definitions */
163 #define	ESC_PLATFORM_SP_RESET	"ESC_platform_sp_reset"
164 
165 /*
166  * EC_PWRCTL subclass definitions
167  */
168 #define	EC_PWRCTL			"EC_pwrctl"
169 #define	ESC_PWRCTL_ADD			"ESC_pwrctl_add"
170 #define	ESC_PWRCTL_REMOVE		"ESC_pwrctl_remove"
171 #define	ESC_PWRCTL_WARN			"ESC_pwrctl_warn"
172 #define	ESC_PWRCTL_LOW			"ESC_pwrctl_low"
173 #define	ESC_PWRCTL_STATE_CHANGE		"ESC_pwrctl_state_change"
174 #define	ESC_PWRCTL_POWER_BUTTON		"ESC_pwrctl_power_button"
175 #define	ESC_PWRCTL_BRIGHTNESS_UP	"ESC_pwrctl_brightness_up"
176 #define	ESC_PWRCTL_BRIGHTNESS_DOWN	"ESC_pwrctl_brightness_down"
177 
178 /* EC_ACPIEV subclass definitions */
179 #define	EC_ACPIEV			"EC_acpiev"
180 #define	ESC_ACPIEV_DISPLAY_SWITCH	"ESC_acpiev_display_switch"
181 #define	ESC_ACPIEV_SCREEN_LOCK		"ESC_acpiev_screen_lock"
182 #define	ESC_ACPIEV_SLEEP		"ESC_acpiev_sleep"
183 #define	ESC_ACPIEV_AUDIO_MUTE		"ESC_acpiev_audio_mute"
184 #define	ESC_ACPIEV_WIFI			"ESC_acpiev_wifi"
185 #define	ESC_ACPIEV_TOUCHPAD		"ESC_acpiev_touchpad"
186 
187 /*
188  * ZFS subclass definitions.  supporting attributes (name/value paris) are found
189  * in sys/fs/zfs.h
190  */
191 #define	ESC_ZFS_RESILVER_START		"ESC_ZFS_resilver_start"
192 #define	ESC_ZFS_RESILVER_FINISH		"ESC_ZFS_resilver_finish"
193 #define	ESC_ZFS_VDEV_REMOVE		"ESC_ZFS_vdev_remove"
194 #define	ESC_ZFS_VDEV_REMOVE_AUX		"ESC_ZFS_vdev_remove_aux"
195 #define	ESC_ZFS_VDEV_REMOVE_DEV		"ESC_ZFS_vdev_remove_dev"
196 #define	ESC_ZFS_POOL_CREATE		"ESC_ZFS_pool_create"
197 #define	ESC_ZFS_POOL_DESTROY		"ESC_ZFS_pool_destroy"
198 #define	ESC_ZFS_POOL_IMPORT		"ESC_ZFS_pool_import"
199 #define	ESC_ZFS_VDEV_ADD		"ESC_ZFS_vdev_add"
200 #define	ESC_ZFS_VDEV_ATTACH		"ESC_ZFS_vdev_attach"
201 #define	ESC_ZFS_VDEV_CLEAR		"ESC_ZFS_vdev_clear"
202 #define	ESC_ZFS_VDEV_CHECK		"ESC_ZFS_vdev_check"
203 #define	ESC_ZFS_VDEV_ONLINE		"ESC_ZFS_vdev_online"
204 #define	ESC_ZFS_CONFIG_SYNC		"ESC_ZFS_config_sync"
205 #define	ESC_ZFS_SCRUB_START		"ESC_ZFS_scrub_start"
206 #define	ESC_ZFS_SCRUB_FINISH		"ESC_ZFS_scrub_finish"
207 #define	ESC_ZFS_SCRUB_ABORT		"ESC_ZFS_scrub_abort"
208 #define	ESC_ZFS_SCRUB_RESUME		"ESC_ZFS_scrub_resume"
209 #define	ESC_ZFS_SCRUB_PAUSED		"ESC_ZFS_scrub_paused"
210 #define	ESC_ZFS_VDEV_SPARE		"ESC_ZFS_vdev_spare"
211 #define	ESC_ZFS_BOOTFS_VDEV_ATTACH	"ESC_ZFS_bootfs_vdev_attach"
212 #define	ESC_ZFS_POOL_REGUID		"ESC_ZFS_pool_reguid"
213 #define	ESC_ZFS_HISTORY_EVENT		"ESC_ZFS_history_event"
214 #define	ESC_ZFS_TRIM_START		"ESC_ZFS_trim_start"
215 #define	ESC_ZFS_TRIM_FINISH		"ESC_ZFS_trim_finish"
216 #define	ESC_ZFS_TRIM_CANCEL		"ESC_ZFS_trim_cancel"
217 #define	ESC_ZFS_TRIM_RESUME		"ESC_ZFS_trim_resume"
218 #define	ESC_ZFS_TRIM_SUSPEND		"ESC_ZFS_trim_suspend"
219 
220 /*
221  * datalink subclass definitions. Supporting attributes for datalink state found
222  * in sys/sysevent/datalink.h.
223  */
224 #define	ESC_DATALINK_PHYS_ADD	"ESC_datalink_phys_add"	/* new physical link */
225 #define	ESC_DATALINK_LINK_STATE	"ESC_datalink_link_state"	/* link state */
226 
227 /*
228  * VRRP subclass definitions. Supporting attributes (name/value paris) are
229  * found in sys/sysevent/vrrp.h
230  */
231 #define	ESC_VRRP_STATE_CHANGE	"ESC_vrrp_state_change"
232 
233 /*
234  * PCIe subclass definitions. Supporting attributes for PCIe state found in
235  * sys/sysevent/pcie.h.
236  */
237 #define	ESC_PCIE_LINK_STATE	"ESC_pcie_link_state"
238 
239 #ifdef	__cplusplus
240 }
241 #endif
242 
243 #endif /* _SYS_SYSEVENT_EVENTDEFS_H */
244