xref: /onnv-gate/usr/src/uts/common/sys/sysevent/eventdefs.h (revision 12865:08987220809a)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
52441Sjacobs  * Common Development and Distribution License (the "License").
62441Sjacobs  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*12865Slori.alt@oracle.com  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
230Sstevel@tonic-gate  */
240Sstevel@tonic-gate 
250Sstevel@tonic-gate #ifndef	_SYS_SYSEVENT_EVENTDEFS_H
260Sstevel@tonic-gate #define	_SYS_SYSEVENT_EVENTDEFS_H
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #ifdef	__cplusplus
290Sstevel@tonic-gate extern "C" {
300Sstevel@tonic-gate #endif
310Sstevel@tonic-gate 
320Sstevel@tonic-gate /*
330Sstevel@tonic-gate  * eventdefs.h contains public definitions for sysevent types (classes
340Sstevel@tonic-gate  * and subclasses).  All additions/removal/changes are subject
350Sstevel@tonic-gate  * to PSARC approval.
360Sstevel@tonic-gate  */
370Sstevel@tonic-gate 
380Sstevel@tonic-gate /* Sysevent Class definitions */
390Sstevel@tonic-gate #define	EC_NONE		"EC_none"
400Sstevel@tonic-gate #define	EC_PRIV		"EC_priv"
410Sstevel@tonic-gate #define	EC_PLATFORM	"EC_platform"	/* events private to platform */
420Sstevel@tonic-gate #define	EC_DR		"EC_dr"	/* Dynamic reconfiguration event class */
430Sstevel@tonic-gate #define	EC_ENV		"EC_env"	/* Environmental monitor event class */
440Sstevel@tonic-gate #define	EC_DOMAIN	"EC_domain"	/* Domain event class */
450Sstevel@tonic-gate #define	EC_AP_DRIVER	"EC_ap_driver"	/* Alternate Pathing event class */
460Sstevel@tonic-gate #define	EC_IPMP		"EC_ipmp"	/* IP Multipathing event class */
470Sstevel@tonic-gate #define	EC_DEV_ADD	"EC_dev_add"	/* device add event class */
480Sstevel@tonic-gate #define	EC_DEV_REMOVE	"EC_dev_remove"	/* device remove event class */
490Sstevel@tonic-gate #define	EC_DEV_BRANCH	"EC_dev_branch"	/* device tree branch event class */
506590Syl194034 #define	EC_DEV_STATUS	"EC_dev_status"	/* device status event class */
510Sstevel@tonic-gate #define	EC_FM		"EC_fm"		/* FMA error report event */
524451Seschrock #define	EC_ZFS		"EC_zfs"	/* ZFS event */
537323SCathy.Zhou@Sun.COM #define	EC_DATALINK	"EC_datalink"	/* datalink event */
5411076SCathy.Zhou@Sun.COM #define	EC_VRRP		"EC_vrrp"	/* VRRP event */
550Sstevel@tonic-gate 
560Sstevel@tonic-gate /*
570Sstevel@tonic-gate  * The following event class is reserved for exclusive use
580Sstevel@tonic-gate  * by Sun Cluster software.
590Sstevel@tonic-gate  */
600Sstevel@tonic-gate #define	EC_CLUSTER	"EC_Cluster"
610Sstevel@tonic-gate 
620Sstevel@tonic-gate /*
630Sstevel@tonic-gate  * The following classes are exclusively reserved for use by the
640Sstevel@tonic-gate  * Solaris Volume Manager (SVM)
650Sstevel@tonic-gate  */
660Sstevel@tonic-gate #define	EC_SVM_CONFIG	"EC_SVM_Config"
670Sstevel@tonic-gate #define	EC_SVM_STATE	"EC_SVM_State"
680Sstevel@tonic-gate 
690Sstevel@tonic-gate /*
700Sstevel@tonic-gate  * EC_SVM_CONFIG subclass definitions - supporting attributes (name/value pairs)
710Sstevel@tonic-gate  * are found in sys/sysevent/svm.h
720Sstevel@tonic-gate  */
730Sstevel@tonic-gate #define	ESC_SVM_CREATE		"ESC_SVM_Create"
740Sstevel@tonic-gate #define	ESC_SVM_DELETE		"ESC_SVM_Delete"
750Sstevel@tonic-gate #define	ESC_SVM_ADD		"ESC_SVM_Add"
760Sstevel@tonic-gate #define	ESC_SVM_REMOVE		"ESC_SVM_Remove"
770Sstevel@tonic-gate #define	ESC_SVM_REPLACE		"ESC_SVM_Replace"
780Sstevel@tonic-gate #define	ESC_SVM_GROW		"ESC_SVM_Grow"
790Sstevel@tonic-gate #define	ESC_SVM_RENAME_SRC	"ESC_SVM_Rename_Src"
800Sstevel@tonic-gate #define	ESC_SVM_RENAME_DST	"ESC_SVM_Rename_Dst"
810Sstevel@tonic-gate #define	ESC_SVM_MEDIATOR_ADD	"ESC_SVM_Mediator_Add"
820Sstevel@tonic-gate #define	ESC_SVM_MEDIATOR_DELETE	"ESC_SVM_Mediator_Delete"
830Sstevel@tonic-gate #define	ESC_SVM_HOST_ADD	"ESC_SVM_Host_Add"
840Sstevel@tonic-gate #define	ESC_SVM_HOST_DELETE	"ESC_SVM_Host_Delete"
850Sstevel@tonic-gate #define	ESC_SVM_DRIVE_ADD	"ESC_SVM_Drive_Add"
860Sstevel@tonic-gate #define	ESC_SVM_DRIVE_DELETE	"ESC_SVM_Drive_Delete"
870Sstevel@tonic-gate #define	ESC_SVM_DETACH		"ESC_SVM_Detach"
880Sstevel@tonic-gate #define	ESC_SVM_DETACHING	"ESC_SVM_Detaching"
890Sstevel@tonic-gate #define	ESC_SVM_ATTACH		"ESC_SVM_Attach"
900Sstevel@tonic-gate #define	ESC_SVM_ATTACHING	"ESC_SVM_Attaching"
910Sstevel@tonic-gate 
920Sstevel@tonic-gate /*
930Sstevel@tonic-gate  * EC_SVM_STATE subclass definitions - supporting attributes (name/value pairs)
940Sstevel@tonic-gate  * are found in sys/sysevent/svm.h
950Sstevel@tonic-gate  */
960Sstevel@tonic-gate #define	ESC_SVM_INIT_START	"ESC_SVM_Init_Start"
970Sstevel@tonic-gate #define	ESC_SVM_INIT_FAILED	"ESC_SVM_Init_Failed"
980Sstevel@tonic-gate #define	ESC_SVM_INIT_FATAL	"ESC_SVM_Init_Fatal"
990Sstevel@tonic-gate #define	ESC_SVM_INIT_SUCCESS	"ESC_SVM_Init_Success"
1000Sstevel@tonic-gate #define	ESC_SVM_IOERR		"ESC_SVM_Ioerr"
1010Sstevel@tonic-gate #define	ESC_SVM_ERRED		"ESC_SVM_Erred"
1020Sstevel@tonic-gate #define	ESC_SVM_LASTERRED	"ESC_SVM_Lasterred"
1030Sstevel@tonic-gate #define	ESC_SVM_OK		"ESC_SVM_Ok"
1040Sstevel@tonic-gate #define	ESC_SVM_ENABLE		"ESC_SVM_Enable"
1050Sstevel@tonic-gate #define	ESC_SVM_RESYNC_START	"ESC_SVM_Resync_Start"
1060Sstevel@tonic-gate #define	ESC_SVM_RESYNC_FAILED	"ESC_SVM_Resync_Failed"
1070Sstevel@tonic-gate #define	ESC_SVM_RESYNC_SUCCESS	"ESC_SVM_Resync_Success"
1080Sstevel@tonic-gate #define	ESC_SVM_RESYNC_DONE	"ESC_SVM_Resync_Done"
1090Sstevel@tonic-gate #define	ESC_SVM_HOTSPARED	"ESC_SVM_Hotspared"
1100Sstevel@tonic-gate #define	ESC_SVM_HS_FREED	"ESC_SVM_HS_Freed"
1110Sstevel@tonic-gate #define	ESC_SVM_HS_CHANGED	"ESC_SVM_HS_Changed"
1120Sstevel@tonic-gate #define	ESC_SVM_TAKEOVER	"ESC_SVM_Takeover"
1130Sstevel@tonic-gate #define	ESC_SVM_RELEASE		"ESC_SVM_Release"
1140Sstevel@tonic-gate #define	ESC_SVM_OPEN_FAIL	"ESC_SVM_Open_Fail"
1150Sstevel@tonic-gate #define	ESC_SVM_OFFLINE		"ESC_SVM_Offline"
1160Sstevel@tonic-gate #define	ESC_SVM_ONLINE		"ESC_SVM_Online"
1170Sstevel@tonic-gate #define	ESC_SVM_CHANGE		"ESC_SVM_Change"
1180Sstevel@tonic-gate #define	ESC_SVM_EXCHANGE	"ESC_SVM_Exchange"
1190Sstevel@tonic-gate #define	ESC_SVM_REGEN_START	"ESC_SVM_Regen_Start"
1200Sstevel@tonic-gate #define	ESC_SVM_REGEN_DONE	"ESC_SVM_Regen_Done"
1210Sstevel@tonic-gate #define	ESC_SVM_REGEN_FAILED	"ESC_SVM_Regen_Failed"
1220Sstevel@tonic-gate 
1230Sstevel@tonic-gate /*
1240Sstevel@tonic-gate  * EC_DR subclass definitions - supporting attributes (name/value pairs)
1250Sstevel@tonic-gate  * are found in sys/sysevent/dr.h
1260Sstevel@tonic-gate  */
1270Sstevel@tonic-gate 
1280Sstevel@tonic-gate /* Attachment point state change */
1290Sstevel@tonic-gate #define	ESC_DR_AP_STATE_CHANGE	"ESC_dr_ap_state_change"
1300Sstevel@tonic-gate #define	ESC_DR_REQ		"ESC_dr_req"	/* Request DR */
1314724Syd196099 #define	ESC_DR_TARGET_STATE_CHANGE	"ESC_dr_target_state_change"
1320Sstevel@tonic-gate 
1330Sstevel@tonic-gate /*
1340Sstevel@tonic-gate  * EC_ENV subclass definitions - supporting attributes (name/value pairs)
1350Sstevel@tonic-gate  * are found in sys/sysevent/env.h
1360Sstevel@tonic-gate  */
1370Sstevel@tonic-gate #define	ESC_ENV_TEMP	"ESC_env_temp"	/* Temperature change event subclass */
1380Sstevel@tonic-gate #define	ESC_ENV_FAN	"ESC_env_fan"	/* Fan status change event subclass */
1390Sstevel@tonic-gate #define	ESC_ENV_POWER	"ESC_env_power"	/* Power supply change event subclass */
1400Sstevel@tonic-gate #define	ESC_ENV_LED	"ESC_env_led"	/* LED change event subclass */
1410Sstevel@tonic-gate 
1420Sstevel@tonic-gate /*
1430Sstevel@tonic-gate  * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs)
1440Sstevel@tonic-gate  * are found in sys/sysevent/domain.h
1450Sstevel@tonic-gate  */
1460Sstevel@tonic-gate 
1470Sstevel@tonic-gate /* Domain state change */
1480Sstevel@tonic-gate #define	ESC_DOMAIN_STATE_CHANGE		"ESC_domain_state_change"
1490Sstevel@tonic-gate /* Domain loghost name change */
1500Sstevel@tonic-gate #define	ESC_DOMAIN_LOGHOST_CHANGE	"ESC_domain_loghost_change"
1510Sstevel@tonic-gate 
1520Sstevel@tonic-gate /*
1533798Seschrock  * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs)
1540Sstevel@tonic-gate  * are found in sys/sysevent/ap_driver.h
1550Sstevel@tonic-gate  */
1560Sstevel@tonic-gate 
1570Sstevel@tonic-gate /* Alternate Pathing path switch */
1580Sstevel@tonic-gate #define	ESC_AP_DRIVER_PATHSWITCH	"ESC_ap_driver_pathswitch"
1590Sstevel@tonic-gate /* Alternate Pathing database commit */
1600Sstevel@tonic-gate #define	ESC_AP_DRIVER_COMMIT		"ESC_ap_driver_commit"
1610Sstevel@tonic-gate /* Alternate Pathing physical path status change */
1620Sstevel@tonic-gate #define	ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE	\
1630Sstevel@tonic-gate 	"ESC_ap_driver_phys_path_status_change"
1640Sstevel@tonic-gate 
1650Sstevel@tonic-gate /*
1663798Seschrock  * EC_IPMP subclass definitions - supporting attributes (name/value pairs)
1670Sstevel@tonic-gate  * are found in sys/sysevent/ipmp.h
1680Sstevel@tonic-gate  */
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate /* IPMP group has changed state */
1710Sstevel@tonic-gate #define	ESC_IPMP_GROUP_STATE		"ESC_ipmp_group_state"
1720Sstevel@tonic-gate 
1730Sstevel@tonic-gate /* IPMP group has been created or removed */
1740Sstevel@tonic-gate #define	ESC_IPMP_GROUP_CHANGE		"ESC_ipmp_group_change"
1750Sstevel@tonic-gate 
1760Sstevel@tonic-gate /* IPMP group has had an interface added or removed */
1770Sstevel@tonic-gate #define	ESC_IPMP_GROUP_MEMBER_CHANGE	"ESC_ipmp_group_member_change"
1780Sstevel@tonic-gate 
1790Sstevel@tonic-gate /* Interface within an IPMP group has changed state or type */
1800Sstevel@tonic-gate #define	ESC_IPMP_IF_CHANGE		"ESC_ipmp_if_change"
1810Sstevel@tonic-gate 
1828485SPeter.Memishian@Sun.COM /* IPMP probe has changed state */
1838485SPeter.Memishian@Sun.COM #define	ESC_IPMP_PROBE_STATE		"ESC_ipmp_probe_state"
1840Sstevel@tonic-gate 
1850Sstevel@tonic-gate /*
1863798Seschrock  * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes
1870Sstevel@tonic-gate  * (name/value pairs) are found in sys/sysevent/dev.h
1880Sstevel@tonic-gate  */
1890Sstevel@tonic-gate #define	ESC_DISK	"disk"		/* disk device */
1900Sstevel@tonic-gate #define	ESC_NETWORK	"network"	/* network interface */
1912441Sjacobs #define	ESC_PRINTER	"printer"	/* printer device */
1924211Sphitran #define	ESC_LOFI	"lofi"		/* lofi device */
1930Sstevel@tonic-gate 
1940Sstevel@tonic-gate /*
1953798Seschrock  * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs)
1960Sstevel@tonic-gate  * are found in sys/sysevent/dev.h
1970Sstevel@tonic-gate  */
1980Sstevel@tonic-gate 
1990Sstevel@tonic-gate /* device tree branch added */
2000Sstevel@tonic-gate #define	ESC_DEV_BRANCH_ADD	"ESC_dev_branch_add"
2010Sstevel@tonic-gate 
2020Sstevel@tonic-gate /* device tree branch removed */
2030Sstevel@tonic-gate #define	ESC_DEV_BRANCH_REMOVE	"ESC_dev_branch_remove"
2040Sstevel@tonic-gate 
20510459SArtem.Kachitchkin@Sun.COM /*
20610459SArtem.Kachitchkin@Sun.COM  * EC_DEV_STATUS subclass definitions
20710459SArtem.Kachitchkin@Sun.COM  *
20810459SArtem.Kachitchkin@Sun.COM  * device capacity dynamically changed
20910459SArtem.Kachitchkin@Sun.COM  */
2106590Syl194034 #define	ESC_DEV_DLE		"ESC_dev_dle"
2116590Syl194034 
21210459SArtem.Kachitchkin@Sun.COM /* LUN has received an eject request from the user */
21310459SArtem.Kachitchkin@Sun.COM #define	ESC_DEV_EJECT_REQUEST	"ESC_dev_eject_request"
21410459SArtem.Kachitchkin@Sun.COM 
2150Sstevel@tonic-gate /* FMA Fault and Error event protocol subclass */
2160Sstevel@tonic-gate #define	ESC_FM_ERROR		"ESC_FM_error"
2170Sstevel@tonic-gate #define	ESC_FM_ERROR_REPLAY	"ESC_FM_error_replay"
2183798Seschrock 
2193798Seschrock /* Service processor subclass definitions */
2203798Seschrock #define	ESC_PLATFORM_SP_RESET	"ESC_platform_sp_reset"
2213798Seschrock 
2224035Sphitran /*
2236573Sphitran  * EC_PWRCTL subclass definitions
2244035Sphitran  */
2256573Sphitran #define	EC_PWRCTL			"EC_pwrctl"
2266573Sphitran #define	ESC_PWRCTL_ADD			"ESC_pwrctl_add"
2276573Sphitran #define	ESC_PWRCTL_REMOVE		"ESC_pwrctl_remove"
2286573Sphitran #define	ESC_PWRCTL_WARN			"ESC_pwrctl_warn"
2296573Sphitran #define	ESC_PWRCTL_LOW			"ESC_pwrctl_low"
2306573Sphitran #define	ESC_PWRCTL_STATE_CHANGE		"ESC_pwrctl_state_change"
2316573Sphitran #define	ESC_PWRCTL_POWER_BUTTON		"ESC_pwrctl_power_button"
2326573Sphitran #define	ESC_PWRCTL_BRIGHTNESS_UP	"ESC_pwrctl_brightness_up"
2336573Sphitran #define	ESC_PWRCTL_BRIGHTNESS_DOWN	"ESC_pwrctl_brightness_down"
2344035Sphitran 
2358693SKerry.Shu@Sun.COM /* EC_ACPIEV subclass definitions */
2368693SKerry.Shu@Sun.COM #define	EC_ACPIEV			"EC_acpiev"
2378693SKerry.Shu@Sun.COM #define	ESC_ACPIEV_DISPLAY_SWITCH	"ESC_acpiev_display_switch"
2388693SKerry.Shu@Sun.COM #define	ESC_ACPIEV_SCREEN_LOCK		"ESC_acpiev_screen_lock"
2398693SKerry.Shu@Sun.COM #define	ESC_ACPIEV_SLEEP		"ESC_acpiev_sleep"
2408693SKerry.Shu@Sun.COM #define	ESC_ACPIEV_AUDIO_MUTE		"ESC_acpiev_audio_mute"
2418693SKerry.Shu@Sun.COM #define	ESC_ACPIEV_WIFI			"ESC_acpiev_wifi"
2428693SKerry.Shu@Sun.COM #define	ESC_ACPIEV_TOUCHPAD		"ESC_acpiev_touchpad"
2438693SKerry.Shu@Sun.COM 
2444451Seschrock /*
2454451Seschrock  * ZFS subclass definitions.  supporting attributes (name/value paris) are found
2464451Seschrock  * in sys/fs/zfs.h
2474451Seschrock  */
248*12865Slori.alt@oracle.com #define	ESC_ZFS_RESILVER_START		"ESC_ZFS_resilver_start"
249*12865Slori.alt@oracle.com #define	ESC_ZFS_RESILVER_FINISH		"ESC_ZFS_resilver_finish"
250*12865Slori.alt@oracle.com #define	ESC_ZFS_VDEV_REMOVE		"ESC_ZFS_vdev_remove"
251*12865Slori.alt@oracle.com #define	ESC_ZFS_POOL_DESTROY		"ESC_ZFS_pool_destroy"
252*12865Slori.alt@oracle.com #define	ESC_ZFS_VDEV_CLEAR		"ESC_ZFS_vdev_clear"
253*12865Slori.alt@oracle.com #define	ESC_ZFS_VDEV_CHECK		"ESC_ZFS_vdev_check"
254*12865Slori.alt@oracle.com #define	ESC_ZFS_CONFIG_SYNC		"ESC_ZFS_config_sync"
255*12865Slori.alt@oracle.com #define	ESC_ZFS_SCRUB_START		"ESC_ZFS_scrub_start"
256*12865Slori.alt@oracle.com #define	ESC_ZFS_SCRUB_FINISH		"ESC_ZFS_scrub_finish"
257*12865Slori.alt@oracle.com #define	ESC_ZFS_VDEV_SPARE		"ESC_ZFS_vdev_spare"
258*12865Slori.alt@oracle.com #define	ESC_ZFS_BOOTFS_VDEV_ATTACH	"ESC_ZFS_bootfs_vdev_attach"
2594451Seschrock 
2607323SCathy.Zhou@Sun.COM /*
2617323SCathy.Zhou@Sun.COM  * datalink subclass definitions.
2627323SCathy.Zhou@Sun.COM  */
2637323SCathy.Zhou@Sun.COM #define	ESC_DATALINK_PHYS_ADD	"ESC_datalink_phys_add"	/* new physical link */
2647323SCathy.Zhou@Sun.COM 
26511076SCathy.Zhou@Sun.COM /*
26611076SCathy.Zhou@Sun.COM  * VRRP subclass definitions. Supporting attributes (name/value paris) are
26711076SCathy.Zhou@Sun.COM  * found in sys/sysevent/vrrp.h
26811076SCathy.Zhou@Sun.COM  */
26911076SCathy.Zhou@Sun.COM #define	ESC_VRRP_STATE_CHANGE	"ESC_vrrp_state_change"
27011076SCathy.Zhou@Sun.COM 
2710Sstevel@tonic-gate #ifdef	__cplusplus
2720Sstevel@tonic-gate }
2730Sstevel@tonic-gate #endif
2740Sstevel@tonic-gate 
2750Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_EVENTDEFS_H */
276