17c478bdstevel@tonic-gate/*
27c478bdstevel@tonic-gate * CDDL HEADER START
37c478bdstevel@tonic-gate *
47c478bdstevel@tonic-gate * The contents of this file are subject to the terms of the
5db11e6fjacobs * Common Development and Distribution License (the "License").
6db11e6fjacobs * You may not use this file except in compliance with the License.
77c478bdstevel@tonic-gate *
87c478bdstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bdstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bdstevel@tonic-gate * See the License for the specific language governing permissions
117c478bdstevel@tonic-gate * and limitations under the License.
127c478bdstevel@tonic-gate *
137c478bdstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bdstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bdstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bdstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bdstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bdstevel@tonic-gate *
197c478bdstevel@tonic-gate * CDDL HEADER END
207c478bdstevel@tonic-gate */
215f10ef6Yuri Pankov
227c478bdstevel@tonic-gate/*
23943e986Lori Alt * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
245f10ef6Yuri Pankov * Copyright 2016 Nexenta Systems, Inc.
25b3d69c0Robert Mustacchi * Copyright 2019 Joyent, Inc.
267c478bdstevel@tonic-gate */
277c478bdstevel@tonic-gate
287c478bdstevel@tonic-gate#ifndef	_SYS_SYSEVENT_EVENTDEFS_H
297c478bdstevel@tonic-gate#define	_SYS_SYSEVENT_EVENTDEFS_H
307c478bdstevel@tonic-gate
317c478bdstevel@tonic-gate#ifdef	__cplusplus
327c478bdstevel@tonic-gateextern "C" {
337c478bdstevel@tonic-gate#endif
347c478bdstevel@tonic-gate
357c478bdstevel@tonic-gate/*
367c478bdstevel@tonic-gate * eventdefs.h contains public definitions for sysevent types (classes
377c478bdstevel@tonic-gate * and subclasses).  All additions/removal/changes are subject
387c478bdstevel@tonic-gate * to PSARC approval.
397c478bdstevel@tonic-gate */
407c478bdstevel@tonic-gate
417c478bdstevel@tonic-gate/* Sysevent Class definitions */
427c478bdstevel@tonic-gate#define	EC_NONE		"EC_none"
437c478bdstevel@tonic-gate#define	EC_PRIV		"EC_priv"
447c478bdstevel@tonic-gate#define	EC_PLATFORM	"EC_platform"	/* events private to platform */
457c478bdstevel@tonic-gate#define	EC_DR		"EC_dr"	/* Dynamic reconfiguration event class */
467c478bdstevel@tonic-gate#define	EC_ENV		"EC_env"	/* Environmental monitor event class */
477c478bdstevel@tonic-gate#define	EC_DOMAIN	"EC_domain"	/* Domain event class */
487c478bdstevel@tonic-gate#define	EC_AP_DRIVER	"EC_ap_driver"	/* Alternate Pathing event class */
497c478bdstevel@tonic-gate#define	EC_IPMP		"EC_ipmp"	/* IP Multipathing event class */
507c478bdstevel@tonic-gate#define	EC_DEV_ADD	"EC_dev_add"	/* device add event class */
517c478bdstevel@tonic-gate#define	EC_DEV_REMOVE	"EC_dev_remove"	/* device remove event class */
527c478bdstevel@tonic-gate#define	EC_DEV_BRANCH	"EC_dev_branch"	/* device tree branch event class */
53af00705yl#define	EC_DEV_STATUS	"EC_dev_status"	/* device status event class */
547c478bdstevel@tonic-gate#define	EC_FM		"EC_fm"		/* FMA error report event */
553d7072feschrock#define	EC_ZFS		"EC_zfs"	/* ZFS event */
560dc974aCathy Zhou#define	EC_DATALINK	"EC_datalink"	/* datalink event */
571cb875aCathy Zhou#define	EC_VRRP		"EC_vrrp"	/* VRRP event */
58b3d69c0Robert Mustacchi#define	EC_PCIE		"EC_pcie"	/* PCIe event */
597c478bdstevel@tonic-gate
607c478bdstevel@tonic-gate/*
617c478bdstevel@tonic-gate * The following event class is reserved for exclusive use
627c478bdstevel@tonic-gate * by Sun Cluster software.
637c478bdstevel@tonic-gate */
647c478bdstevel@tonic-gate#define	EC_CLUSTER	"EC_Cluster"
657c478bdstevel@tonic-gate
667c478bdstevel@tonic-gate/*
677c478bdstevel@tonic-gate * EC_DR subclass definitions - supporting attributes (name/value pairs)
687c478bdstevel@tonic-gate * are found in sys/sysevent/dr.h
697c478bdstevel@tonic-gate */
707c478bdstevel@tonic-gate
717c478bdstevel@tonic-gate/* Attachment point state change */
727c478bdstevel@tonic-gate#define	ESC_DR_AP_STATE_CHANGE	"ESC_dr_ap_state_change"
737c478bdstevel@tonic-gate#define	ESC_DR_REQ		"ESC_dr_req"	/* Request DR */
74c2ed738yd#define	ESC_DR_TARGET_STATE_CHANGE	"ESC_dr_target_state_change"
757c478bdstevel@tonic-gate
767c478bdstevel@tonic-gate/*
777c478bdstevel@tonic-gate * EC_ENV subclass definitions - supporting attributes (name/value pairs)
787c478bdstevel@tonic-gate * are found in sys/sysevent/env.h
797c478bdstevel@tonic-gate */
807c478bdstevel@tonic-gate#define	ESC_ENV_TEMP	"ESC_env_temp"	/* Temperature change event subclass */
817c478bdstevel@tonic-gate#define	ESC_ENV_FAN	"ESC_env_fan"	/* Fan status change event subclass */
827c478bdstevel@tonic-gate#define	ESC_ENV_POWER	"ESC_env_power"	/* Power supply change event subclass */
837c478bdstevel@tonic-gate#define	ESC_ENV_LED	"ESC_env_led"	/* LED change event subclass */
847c478bdstevel@tonic-gate
857c478bdstevel@tonic-gate/*
867c478bdstevel@tonic-gate * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs)
877c478bdstevel@tonic-gate * are found in sys/sysevent/domain.h
887c478bdstevel@tonic-gate */
897c478bdstevel@tonic-gate
907c478bdstevel@tonic-gate/* Domain state change */
917c478bdstevel@tonic-gate#define	ESC_DOMAIN_STATE_CHANGE		"ESC_domain_state_change"
927c478bdstevel@tonic-gate/* Domain loghost name change */
937c478bdstevel@tonic-gate#define	ESC_DOMAIN_LOGHOST_CHANGE	"ESC_domain_loghost_change"
947c478bdstevel@tonic-gate
957c478bdstevel@tonic-gate/*
969113a79eschrock * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs)
977c478bdstevel@tonic-gate * are found in sys/sysevent/ap_driver.h
987c478bdstevel@tonic-gate */
997c478bdstevel@tonic-gate
1007c478bdstevel@tonic-gate/* Alternate Pathing path switch */
1017c478bdstevel@tonic-gate#define	ESC_AP_DRIVER_PATHSWITCH	"ESC_ap_driver_pathswitch"
1027c478bdstevel@tonic-gate/* Alternate Pathing database commit */
1037c478bdstevel@tonic-gate#define	ESC_AP_DRIVER_COMMIT		"ESC_ap_driver_commit"
1047c478bdstevel@tonic-gate/* Alternate Pathing physical path status change */
1057c478bdstevel@tonic-gate#define	ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE	\
1067c478bdstevel@tonic-gate	"ESC_ap_driver_phys_path_status_change"
1077c478bdstevel@tonic-gate
1087c478bdstevel@tonic-gate/*
1099113a79eschrock * EC_IPMP subclass definitions - supporting attributes (name/value pairs)
1107c478bdstevel@tonic-gate * are found in sys/sysevent/ipmp.h
1117c478bdstevel@tonic-gate */
1127c478bdstevel@tonic-gate
1137c478bdstevel@tonic-gate/* IPMP group has changed state */
1147c478bdstevel@tonic-gate#define	ESC_IPMP_GROUP_STATE		"ESC_ipmp_group_state"
1157c478bdstevel@tonic-gate
1167c478bdstevel@tonic-gate/* IPMP group has been created or removed */
1177c478bdstevel@tonic-gate#define	ESC_IPMP_GROUP_CHANGE		"ESC_ipmp_group_change"
1187c478bdstevel@tonic-gate
1197c478bdstevel@tonic-gate/* IPMP group has had an interface added or removed */
1207c478bdstevel@tonic-gate#define	ESC_IPMP_GROUP_MEMBER_CHANGE	"ESC_ipmp_group_member_change"
1217c478bdstevel@tonic-gate
1227c478bdstevel@tonic-gate/* Interface within an IPMP group has changed state or type */
1237c478bdstevel@tonic-gate#define	ESC_IPMP_IF_CHANGE		"ESC_ipmp_if_change"
1247c478bdstevel@tonic-gate
125e11c3f4meem/* IPMP probe has changed state */
126e11c3f4meem#define	ESC_IPMP_PROBE_STATE		"ESC_ipmp_probe_state"
1277c478bdstevel@tonic-gate
1287c478bdstevel@tonic-gate/*
1299113a79eschrock * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes
1307c478bdstevel@tonic-gate * (name/value pairs) are found in sys/sysevent/dev.h
1317c478bdstevel@tonic-gate */
1327c478bdstevel@tonic-gate#define	ESC_DISK	"disk"		/* disk device */
1337c478bdstevel@tonic-gate#define	ESC_NETWORK	"network"	/* network interface */
134db11e6fjacobs#define	ESC_PRINTER	"printer"	/* printer device */
1353029455phitran#define	ESC_LOFI	"lofi"		/* lofi device */
1367c478bdstevel@tonic-gate
1377c478bdstevel@tonic-gate/*
1389113a79eschrock * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs)
1397c478bdstevel@tonic-gate * are found in sys/sysevent/dev.h
1407c478bdstevel@tonic-gate */
1417c478bdstevel@tonic-gate
1427c478bdstevel@tonic-gate/* device tree branch added */
1437c478bdstevel@tonic-gate#define	ESC_DEV_BRANCH_ADD	"ESC_dev_branch_add"
1447c478bdstevel@tonic-gate
1457c478bdstevel@tonic-gate/* device tree branch removed */
1467c478bdstevel@tonic-gate#define	ESC_DEV_BRANCH_REMOVE	"ESC_dev_branch_remove"
1477c478bdstevel@tonic-gate
14897ddcdcArtem Kachitchkine/*
14997ddcdcArtem Kachitchkine * EC_DEV_STATUS subclass definitions
15097ddcdcArtem Kachitchkine *
15197ddcdcArtem Kachitchkine * device capacity dynamically changed
15297ddcdcArtem Kachitchkine */
153af00705yl#define	ESC_DEV_DLE		"ESC_dev_dle"
154af00705yl
15597ddcdcArtem Kachitchkine/* LUN has received an eject request from the user */
15697ddcdcArtem Kachitchkine#define	ESC_DEV_EJECT_REQUEST	"ESC_dev_eject_request"
15797ddcdcArtem Kachitchkine
1587c478bdstevel@tonic-gate/* FMA Fault and Error event protocol subclass */
1597c478bdstevel@tonic-gate#define	ESC_FM_ERROR		"ESC_FM_error"
1607c478bdstevel@tonic-gate#define	ESC_FM_ERROR_REPLAY	"ESC_FM_error_replay"
1619113a79eschrock
1629113a79eschrock/* Service processor subclass definitions */
1639113a79eschrock#define	ESC_PLATFORM_SP_RESET	"ESC_platform_sp_reset"
1649113a79eschrock
1657b840e5phitran/*
166d2ec54fphitran * EC_PWRCTL subclass definitions
1677b840e5phitran */
168d2ec54fphitran#define	EC_PWRCTL			"EC_pwrctl"
169d2ec54fphitran#define	ESC_PWRCTL_ADD			"ESC_pwrctl_add"
170d2ec54fphitran#define	ESC_PWRCTL_REMOVE		"ESC_pwrctl_remove"
171d2ec54fphitran#define	ESC_PWRCTL_WARN			"ESC_pwrctl_warn"
172d2ec54fphitran#define	ESC_PWRCTL_LOW			"ESC_pwrctl_low"
173d2ec54fphitran#define	ESC_PWRCTL_STATE_CHANGE		"ESC_pwrctl_state_change"
174d2ec54fphitran#define	ESC_PWRCTL_POWER_BUTTON		"ESC_pwrctl_power_button"
175d2ec54fphitran#define	ESC_PWRCTL_BRIGHTNESS_UP	"ESC_pwrctl_brightness_up"
176d2ec54fphitran#define	ESC_PWRCTL_BRIGHTNESS_DOWN	"ESC_pwrctl_brightness_down"
1777b840e5phitran
1782d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>/* EC_ACPIEV subclass definitions */
1792d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>#define	EC_ACPIEV			"EC_acpiev"
1802d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>#define	ESC_ACPIEV_DISPLAY_SWITCH	"ESC_acpiev_display_switch"
1812d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>#define	ESC_ACPIEV_SCREEN_LOCK		"ESC_acpiev_screen_lock"
1822d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>#define	ESC_ACPIEV_SLEEP		"ESC_acpiev_sleep"
1832d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>#define	ESC_ACPIEV_AUDIO_MUTE		"ESC_acpiev_audio_mute"
1842d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>#define	ESC_ACPIEV_WIFI			"ESC_acpiev_wifi"
1852d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>#define	ESC_ACPIEV_TOUCHPAD		"ESC_acpiev_touchpad"
1862d6b5eaGuoli Shu<Kerry.Shu@Sun.COM>
1873d7072feschrock/*
1883d7072feschrock * ZFS subclass definitions.  supporting attributes (name/value paris) are found
1893d7072feschrock * in sys/fs/zfs.h
1903d7072feschrock */
191943e986Lori Alt#define	ESC_ZFS_RESILVER_START		"ESC_ZFS_resilver_start"
192943e986Lori Alt#define	ESC_ZFS_RESILVER_FINISH		"ESC_ZFS_resilver_finish"
193943e986Lori Alt#define	ESC_ZFS_VDEV_REMOVE		"ESC_ZFS_vdev_remove"
19463364b0Alan Somers#define	ESC_ZFS_VDEV_REMOVE_AUX		"ESC_ZFS_vdev_remove_aux"
19563364b0Alan Somers#define	ESC_ZFS_VDEV_REMOVE_DEV		"ESC_ZFS_vdev_remove_dev"
1961437283Hans Rosenfeld#define	ESC_ZFS_POOL_CREATE		"ESC_ZFS_pool_create"
197943e986Lori Alt#define	ESC_ZFS_POOL_DESTROY		"ESC_ZFS_pool_destroy"
1981437283Hans Rosenfeld#define	ESC_ZFS_POOL_IMPORT		"ESC_ZFS_pool_import"
1991437283Hans Rosenfeld#define	ESC_ZFS_VDEV_ADD		"ESC_ZFS_vdev_add"
2001437283Hans Rosenfeld#define	ESC_ZFS_VDEV_ATTACH		"ESC_ZFS_vdev_attach"
201943e986Lori Alt#define	ESC_ZFS_VDEV_CLEAR		"ESC_ZFS_vdev_clear"
202943e986Lori Alt#define	ESC_ZFS_VDEV_CHECK		"ESC_ZFS_vdev_check"
2031437283Hans Rosenfeld#define	ESC_ZFS_VDEV_ONLINE		"ESC_ZFS_vdev_online"
204943e986Lori Alt#define	ESC_ZFS_CONFIG_SYNC		"ESC_ZFS_config_sync"
205943e986Lori Alt#define	ESC_ZFS_SCRUB_START		"ESC_ZFS_scrub_start"
206943e986Lori Alt#define	ESC_ZFS_SCRUB_FINISH		"ESC_ZFS_scrub_finish"
207301fd1dSean Eric Fagan#define	ESC_ZFS_SCRUB_ABORT		"ESC_ZFS_scrub_abort"
208301fd1dSean Eric Fagan#define	ESC_ZFS_SCRUB_RESUME		"ESC_ZFS_scrub_resume"
209301fd1dSean Eric Fagan#define	ESC_ZFS_SCRUB_PAUSED		"ESC_ZFS_scrub_paused"
210943e986Lori Alt#define	ESC_ZFS_VDEV_SPARE		"ESC_ZFS_vdev_spare"
211943e986Lori Alt#define	ESC_ZFS_BOOTFS_VDEV_ATTACH	"ESC_ZFS_bootfs_vdev_attach"
212e9103aaGarrett D'Amore#define	ESC_ZFS_POOL_REGUID		"ESC_ZFS_pool_reguid"
213ce1577bDave Eddy#define	ESC_ZFS_HISTORY_EVENT		"ESC_ZFS_history_event"
214084fd14Brian Behlendorf#define	ESC_ZFS_TRIM_START		"ESC_ZFS_trim_start"
215084fd14Brian Behlendorf#define	ESC_ZFS_TRIM_FINISH		"ESC_ZFS_trim_finish"
216084fd14Brian Behlendorf#define	ESC_ZFS_TRIM_CANCEL		"ESC_ZFS_trim_cancel"
217084fd14Brian Behlendorf#define	ESC_ZFS_TRIM_RESUME		"ESC_ZFS_trim_resume"
218084fd14Brian Behlendorf#define	ESC_ZFS_TRIM_SUSPEND		"ESC_ZFS_trim_suspend"
2193d7072feschrock
2200dc974aCathy Zhou/*
221a25df66Robert Mustacchi * datalink subclass definitions. Supporting attributes for datalink state found
222a25df66Robert Mustacchi * in sys/sysevent/datalink.h.
2230dc974aCathy Zhou */
2240dc974aCathy Zhou#define	ESC_DATALINK_PHYS_ADD	"ESC_datalink_phys_add"	/* new physical link */
225a25df66Robert Mustacchi#define	ESC_DATALINK_LINK_STATE	"ESC_datalink_link_state"	/* link state */
2260dc974aCathy Zhou
2271cb875aCathy Zhou/*
2281cb875aCathy Zhou * VRRP subclass definitions. Supporting attributes (name/value paris) are
2291cb875aCathy Zhou * found in sys/sysevent/vrrp.h
2301cb875aCathy Zhou */
2311cb875aCathy Zhou#define	ESC_VRRP_STATE_CHANGE	"ESC_vrrp_state_change"
2321cb875aCathy Zhou
233b3d69c0Robert Mustacchi/*
234b3d69c0Robert Mustacchi * PCIe subclass definitions. Supporting attributes for PCIe state found in
235b3d69c0Robert Mustacchi * sys/sysevent/pcie.h.
236b3d69c0Robert Mustacchi */
237b3d69c0Robert Mustacchi#define	ESC_PCIE_LINK_STATE	"ESC_pcie_link_state"
238b3d69c0Robert Mustacchi
2397c478bdstevel@tonic-gate#ifdef	__cplusplus
2407c478bdstevel@tonic-gate}
2417c478bdstevel@tonic-gate#endif
2427c478bdstevel@tonic-gate
2437c478bdstevel@tonic-gate#endif /* _SYS_SYSEVENT_EVENTDEFS_H */
244