xref: /titanic_52/usr/src/uts/common/sys/sysevent/eventdefs.h (revision e373b6e444a487df89a5dc6a4a4030b5b2aa87f9)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5db11e6feSjacobs  * Common Development and Distribution License (the "License").
6db11e6feSjacobs  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
21*e373b6e4SYuri Pankov 
227c478bd9Sstevel@tonic-gate /*
23943e9869SLori Alt  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24*e373b6e4SYuri Pankov  * Copyright 2016 Nexenta Systems, Inc.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef	_SYS_SYSEVENT_EVENTDEFS_H
287c478bd9Sstevel@tonic-gate #define	_SYS_SYSEVENT_EVENTDEFS_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
317c478bd9Sstevel@tonic-gate extern "C" {
327c478bd9Sstevel@tonic-gate #endif
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate /*
357c478bd9Sstevel@tonic-gate  * eventdefs.h contains public definitions for sysevent types (classes
367c478bd9Sstevel@tonic-gate  * and subclasses).  All additions/removal/changes are subject
377c478bd9Sstevel@tonic-gate  * to PSARC approval.
387c478bd9Sstevel@tonic-gate  */
397c478bd9Sstevel@tonic-gate 
407c478bd9Sstevel@tonic-gate /* Sysevent Class definitions */
417c478bd9Sstevel@tonic-gate #define	EC_NONE		"EC_none"
427c478bd9Sstevel@tonic-gate #define	EC_PRIV		"EC_priv"
437c478bd9Sstevel@tonic-gate #define	EC_PLATFORM	"EC_platform"	/* events private to platform */
447c478bd9Sstevel@tonic-gate #define	EC_DR		"EC_dr"	/* Dynamic reconfiguration event class */
457c478bd9Sstevel@tonic-gate #define	EC_ENV		"EC_env"	/* Environmental monitor event class */
467c478bd9Sstevel@tonic-gate #define	EC_DOMAIN	"EC_domain"	/* Domain event class */
477c478bd9Sstevel@tonic-gate #define	EC_AP_DRIVER	"EC_ap_driver"	/* Alternate Pathing event class */
487c478bd9Sstevel@tonic-gate #define	EC_IPMP		"EC_ipmp"	/* IP Multipathing event class */
497c478bd9Sstevel@tonic-gate #define	EC_DEV_ADD	"EC_dev_add"	/* device add event class */
507c478bd9Sstevel@tonic-gate #define	EC_DEV_REMOVE	"EC_dev_remove"	/* device remove event class */
517c478bd9Sstevel@tonic-gate #define	EC_DEV_BRANCH	"EC_dev_branch"	/* device tree branch event class */
52af007057Syl194034 #define	EC_DEV_STATUS	"EC_dev_status"	/* device status event class */
537c478bd9Sstevel@tonic-gate #define	EC_FM		"EC_fm"		/* FMA error report event */
543d7072f8Seschrock #define	EC_ZFS		"EC_zfs"	/* ZFS event */
550dc974a9SCathy Zhou #define	EC_DATALINK	"EC_datalink"	/* datalink event */
561cb875aeSCathy Zhou #define	EC_VRRP		"EC_vrrp"	/* VRRP event */
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate /*
597c478bd9Sstevel@tonic-gate  * The following event class is reserved for exclusive use
607c478bd9Sstevel@tonic-gate  * by Sun Cluster software.
617c478bd9Sstevel@tonic-gate  */
627c478bd9Sstevel@tonic-gate #define	EC_CLUSTER	"EC_Cluster"
637c478bd9Sstevel@tonic-gate 
647c478bd9Sstevel@tonic-gate /*
657c478bd9Sstevel@tonic-gate  * EC_DR subclass definitions - supporting attributes (name/value pairs)
667c478bd9Sstevel@tonic-gate  * are found in sys/sysevent/dr.h
677c478bd9Sstevel@tonic-gate  */
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate /* Attachment point state change */
707c478bd9Sstevel@tonic-gate #define	ESC_DR_AP_STATE_CHANGE	"ESC_dr_ap_state_change"
717c478bd9Sstevel@tonic-gate #define	ESC_DR_REQ		"ESC_dr_req"	/* Request DR */
72c2ed7380Syd196099 #define	ESC_DR_TARGET_STATE_CHANGE	"ESC_dr_target_state_change"
737c478bd9Sstevel@tonic-gate 
747c478bd9Sstevel@tonic-gate /*
757c478bd9Sstevel@tonic-gate  * EC_ENV subclass definitions - supporting attributes (name/value pairs)
767c478bd9Sstevel@tonic-gate  * are found in sys/sysevent/env.h
777c478bd9Sstevel@tonic-gate  */
787c478bd9Sstevel@tonic-gate #define	ESC_ENV_TEMP	"ESC_env_temp"	/* Temperature change event subclass */
797c478bd9Sstevel@tonic-gate #define	ESC_ENV_FAN	"ESC_env_fan"	/* Fan status change event subclass */
807c478bd9Sstevel@tonic-gate #define	ESC_ENV_POWER	"ESC_env_power"	/* Power supply change event subclass */
817c478bd9Sstevel@tonic-gate #define	ESC_ENV_LED	"ESC_env_led"	/* LED change event subclass */
827c478bd9Sstevel@tonic-gate 
837c478bd9Sstevel@tonic-gate /*
847c478bd9Sstevel@tonic-gate  * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs)
857c478bd9Sstevel@tonic-gate  * are found in sys/sysevent/domain.h
867c478bd9Sstevel@tonic-gate  */
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate /* Domain state change */
897c478bd9Sstevel@tonic-gate #define	ESC_DOMAIN_STATE_CHANGE		"ESC_domain_state_change"
907c478bd9Sstevel@tonic-gate /* Domain loghost name change */
917c478bd9Sstevel@tonic-gate #define	ESC_DOMAIN_LOGHOST_CHANGE	"ESC_domain_loghost_change"
927c478bd9Sstevel@tonic-gate 
937c478bd9Sstevel@tonic-gate /*
949113a79cSeschrock  * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs)
957c478bd9Sstevel@tonic-gate  * are found in sys/sysevent/ap_driver.h
967c478bd9Sstevel@tonic-gate  */
977c478bd9Sstevel@tonic-gate 
987c478bd9Sstevel@tonic-gate /* Alternate Pathing path switch */
997c478bd9Sstevel@tonic-gate #define	ESC_AP_DRIVER_PATHSWITCH	"ESC_ap_driver_pathswitch"
1007c478bd9Sstevel@tonic-gate /* Alternate Pathing database commit */
1017c478bd9Sstevel@tonic-gate #define	ESC_AP_DRIVER_COMMIT		"ESC_ap_driver_commit"
1027c478bd9Sstevel@tonic-gate /* Alternate Pathing physical path status change */
1037c478bd9Sstevel@tonic-gate #define	ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE	\
1047c478bd9Sstevel@tonic-gate 	"ESC_ap_driver_phys_path_status_change"
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate /*
1079113a79cSeschrock  * EC_IPMP subclass definitions - supporting attributes (name/value pairs)
1087c478bd9Sstevel@tonic-gate  * are found in sys/sysevent/ipmp.h
1097c478bd9Sstevel@tonic-gate  */
1107c478bd9Sstevel@tonic-gate 
1117c478bd9Sstevel@tonic-gate /* IPMP group has changed state */
1127c478bd9Sstevel@tonic-gate #define	ESC_IPMP_GROUP_STATE		"ESC_ipmp_group_state"
1137c478bd9Sstevel@tonic-gate 
1147c478bd9Sstevel@tonic-gate /* IPMP group has been created or removed */
1157c478bd9Sstevel@tonic-gate #define	ESC_IPMP_GROUP_CHANGE		"ESC_ipmp_group_change"
1167c478bd9Sstevel@tonic-gate 
1177c478bd9Sstevel@tonic-gate /* IPMP group has had an interface added or removed */
1187c478bd9Sstevel@tonic-gate #define	ESC_IPMP_GROUP_MEMBER_CHANGE	"ESC_ipmp_group_member_change"
1197c478bd9Sstevel@tonic-gate 
1207c478bd9Sstevel@tonic-gate /* Interface within an IPMP group has changed state or type */
1217c478bd9Sstevel@tonic-gate #define	ESC_IPMP_IF_CHANGE		"ESC_ipmp_if_change"
1227c478bd9Sstevel@tonic-gate 
123e11c3f44Smeem /* IPMP probe has changed state */
124e11c3f44Smeem #define	ESC_IPMP_PROBE_STATE		"ESC_ipmp_probe_state"
1257c478bd9Sstevel@tonic-gate 
1267c478bd9Sstevel@tonic-gate /*
1279113a79cSeschrock  * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes
1287c478bd9Sstevel@tonic-gate  * (name/value pairs) are found in sys/sysevent/dev.h
1297c478bd9Sstevel@tonic-gate  */
1307c478bd9Sstevel@tonic-gate #define	ESC_DISK	"disk"		/* disk device */
1317c478bd9Sstevel@tonic-gate #define	ESC_NETWORK	"network"	/* network interface */
132db11e6feSjacobs #define	ESC_PRINTER	"printer"	/* printer device */
13330294554Sphitran #define	ESC_LOFI	"lofi"		/* lofi device */
1347c478bd9Sstevel@tonic-gate 
1357c478bd9Sstevel@tonic-gate /*
1369113a79cSeschrock  * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs)
1377c478bd9Sstevel@tonic-gate  * are found in sys/sysevent/dev.h
1387c478bd9Sstevel@tonic-gate  */
1397c478bd9Sstevel@tonic-gate 
1407c478bd9Sstevel@tonic-gate /* device tree branch added */
1417c478bd9Sstevel@tonic-gate #define	ESC_DEV_BRANCH_ADD	"ESC_dev_branch_add"
1427c478bd9Sstevel@tonic-gate 
1437c478bd9Sstevel@tonic-gate /* device tree branch removed */
1447c478bd9Sstevel@tonic-gate #define	ESC_DEV_BRANCH_REMOVE	"ESC_dev_branch_remove"
1457c478bd9Sstevel@tonic-gate 
14697ddcdceSArtem Kachitchkine /*
14797ddcdceSArtem Kachitchkine  * EC_DEV_STATUS subclass definitions
14897ddcdceSArtem Kachitchkine  *
14997ddcdceSArtem Kachitchkine  * device capacity dynamically changed
15097ddcdceSArtem Kachitchkine  */
151af007057Syl194034 #define	ESC_DEV_DLE		"ESC_dev_dle"
152af007057Syl194034 
15397ddcdceSArtem Kachitchkine /* LUN has received an eject request from the user */
15497ddcdceSArtem Kachitchkine #define	ESC_DEV_EJECT_REQUEST	"ESC_dev_eject_request"
15597ddcdceSArtem Kachitchkine 
1567c478bd9Sstevel@tonic-gate /* FMA Fault and Error event protocol subclass */
1577c478bd9Sstevel@tonic-gate #define	ESC_FM_ERROR		"ESC_FM_error"
1587c478bd9Sstevel@tonic-gate #define	ESC_FM_ERROR_REPLAY	"ESC_FM_error_replay"
1599113a79cSeschrock 
1609113a79cSeschrock /* Service processor subclass definitions */
1619113a79cSeschrock #define	ESC_PLATFORM_SP_RESET	"ESC_platform_sp_reset"
1629113a79cSeschrock 
1637b840e52Sphitran /*
164d2ec54f7Sphitran  * EC_PWRCTL subclass definitions
1657b840e52Sphitran  */
166d2ec54f7Sphitran #define	EC_PWRCTL			"EC_pwrctl"
167d2ec54f7Sphitran #define	ESC_PWRCTL_ADD			"ESC_pwrctl_add"
168d2ec54f7Sphitran #define	ESC_PWRCTL_REMOVE		"ESC_pwrctl_remove"
169d2ec54f7Sphitran #define	ESC_PWRCTL_WARN			"ESC_pwrctl_warn"
170d2ec54f7Sphitran #define	ESC_PWRCTL_LOW			"ESC_pwrctl_low"
171d2ec54f7Sphitran #define	ESC_PWRCTL_STATE_CHANGE		"ESC_pwrctl_state_change"
172d2ec54f7Sphitran #define	ESC_PWRCTL_POWER_BUTTON		"ESC_pwrctl_power_button"
173d2ec54f7Sphitran #define	ESC_PWRCTL_BRIGHTNESS_UP	"ESC_pwrctl_brightness_up"
174d2ec54f7Sphitran #define	ESC_PWRCTL_BRIGHTNESS_DOWN	"ESC_pwrctl_brightness_down"
1757b840e52Sphitran 
1762d6b5ea7SGuoli Shu /* EC_ACPIEV subclass definitions */
1772d6b5ea7SGuoli Shu #define	EC_ACPIEV			"EC_acpiev"
1782d6b5ea7SGuoli Shu #define	ESC_ACPIEV_DISPLAY_SWITCH	"ESC_acpiev_display_switch"
1792d6b5ea7SGuoli Shu #define	ESC_ACPIEV_SCREEN_LOCK		"ESC_acpiev_screen_lock"
1802d6b5ea7SGuoli Shu #define	ESC_ACPIEV_SLEEP		"ESC_acpiev_sleep"
1812d6b5ea7SGuoli Shu #define	ESC_ACPIEV_AUDIO_MUTE		"ESC_acpiev_audio_mute"
1822d6b5ea7SGuoli Shu #define	ESC_ACPIEV_WIFI			"ESC_acpiev_wifi"
1832d6b5ea7SGuoli Shu #define	ESC_ACPIEV_TOUCHPAD		"ESC_acpiev_touchpad"
1842d6b5ea7SGuoli Shu 
1853d7072f8Seschrock /*
1863d7072f8Seschrock  * ZFS subclass definitions.  supporting attributes (name/value paris) are found
1873d7072f8Seschrock  * in sys/fs/zfs.h
1883d7072f8Seschrock  */
1893d7072f8Seschrock #define	ESC_ZFS_RESILVER_START		"ESC_ZFS_resilver_start"
1903d7072f8Seschrock #define	ESC_ZFS_RESILVER_FINISH		"ESC_ZFS_resilver_finish"
1913d7072f8Seschrock #define	ESC_ZFS_VDEV_REMOVE		"ESC_ZFS_vdev_remove"
19214372834SHans Rosenfeld #define	ESC_ZFS_POOL_CREATE		"ESC_ZFS_pool_create"
1933d7072f8Seschrock #define	ESC_ZFS_POOL_DESTROY		"ESC_ZFS_pool_destroy"
19414372834SHans Rosenfeld #define	ESC_ZFS_POOL_IMPORT		"ESC_ZFS_pool_import"
19514372834SHans Rosenfeld #define	ESC_ZFS_VDEV_ADD		"ESC_ZFS_vdev_add"
19614372834SHans Rosenfeld #define	ESC_ZFS_VDEV_ATTACH		"ESC_ZFS_vdev_attach"
1973d7072f8Seschrock #define	ESC_ZFS_VDEV_CLEAR		"ESC_ZFS_vdev_clear"
1983d7072f8Seschrock #define	ESC_ZFS_VDEV_CHECK		"ESC_ZFS_vdev_check"
19914372834SHans Rosenfeld #define	ESC_ZFS_VDEV_ONLINE		"ESC_ZFS_vdev_online"
200c5904d13Seschrock #define	ESC_ZFS_CONFIG_SYNC		"ESC_ZFS_config_sync"
201379c004dSEric Schrock #define	ESC_ZFS_SCRUB_START		"ESC_ZFS_scrub_start"
202379c004dSEric Schrock #define	ESC_ZFS_SCRUB_FINISH		"ESC_ZFS_scrub_finish"
2036809eb4eSEric Schrock #define	ESC_ZFS_VDEV_SPARE		"ESC_ZFS_vdev_spare"
204943e9869SLori Alt #define	ESC_ZFS_BOOTFS_VDEV_ATTACH	"ESC_ZFS_bootfs_vdev_attach"
205e9103aaeSGarrett D'Amore #define	ESC_ZFS_POOL_REGUID		"ESC_ZFS_pool_reguid"
2063d7072f8Seschrock 
2070dc974a9SCathy Zhou /*
2080dc974a9SCathy Zhou  * datalink subclass definitions.
2090dc974a9SCathy Zhou  */
2100dc974a9SCathy Zhou #define	ESC_DATALINK_PHYS_ADD	"ESC_datalink_phys_add"	/* new physical link */
2110dc974a9SCathy Zhou 
2121cb875aeSCathy Zhou /*
2131cb875aeSCathy Zhou  * VRRP subclass definitions. Supporting attributes (name/value paris) are
2141cb875aeSCathy Zhou  * found in sys/sysevent/vrrp.h
2151cb875aeSCathy Zhou  */
2161cb875aeSCathy Zhou #define	ESC_VRRP_STATE_CHANGE	"ESC_vrrp_state_change"
2171cb875aeSCathy Zhou 
2187c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
2197c478bd9Sstevel@tonic-gate }
2207c478bd9Sstevel@tonic-gate #endif
2217c478bd9Sstevel@tonic-gate 
2227c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_EVENTDEFS_H */
223