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 */ 215f10ef69SYuri Pankov 227c478bd9Sstevel@tonic-gate /* 23943e9869SLori Alt * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 245f10ef69SYuri Pankov * Copyright 2016 Nexenta Systems, Inc. 25b3d69c05SRobert Mustacchi * Copyright 2019 Joyent, Inc. 267c478bd9Sstevel@tonic-gate */ 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate #ifndef _SYS_SYSEVENT_EVENTDEFS_H 297c478bd9Sstevel@tonic-gate #define _SYS_SYSEVENT_EVENTDEFS_H 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #ifdef __cplusplus 327c478bd9Sstevel@tonic-gate extern "C" { 337c478bd9Sstevel@tonic-gate #endif 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate /* 367c478bd9Sstevel@tonic-gate * eventdefs.h contains public definitions for sysevent types (classes 377c478bd9Sstevel@tonic-gate * and subclasses). All additions/removal/changes are subject 387c478bd9Sstevel@tonic-gate * to PSARC approval. 397c478bd9Sstevel@tonic-gate */ 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate /* Sysevent Class definitions */ 427c478bd9Sstevel@tonic-gate #define EC_NONE "EC_none" 437c478bd9Sstevel@tonic-gate #define EC_PRIV "EC_priv" 447c478bd9Sstevel@tonic-gate #define EC_PLATFORM "EC_platform" /* events private to platform */ 457c478bd9Sstevel@tonic-gate #define EC_DR "EC_dr" /* Dynamic reconfiguration event class */ 467c478bd9Sstevel@tonic-gate #define EC_ENV "EC_env" /* Environmental monitor event class */ 477c478bd9Sstevel@tonic-gate #define EC_DOMAIN "EC_domain" /* Domain event class */ 487c478bd9Sstevel@tonic-gate #define EC_AP_DRIVER "EC_ap_driver" /* Alternate Pathing event class */ 497c478bd9Sstevel@tonic-gate #define EC_IPMP "EC_ipmp" /* IP Multipathing event class */ 507c478bd9Sstevel@tonic-gate #define EC_DEV_ADD "EC_dev_add" /* device add event class */ 517c478bd9Sstevel@tonic-gate #define EC_DEV_REMOVE "EC_dev_remove" /* device remove event class */ 527c478bd9Sstevel@tonic-gate #define EC_DEV_BRANCH "EC_dev_branch" /* device tree branch event class */ 53af007057Syl #define EC_DEV_STATUS "EC_dev_status" /* device status event class */ 547c478bd9Sstevel@tonic-gate #define EC_FM "EC_fm" /* FMA error report event */ 553d7072f8Seschrock #define EC_ZFS "EC_zfs" /* ZFS event */ 560dc974a9SCathy Zhou #define EC_DATALINK "EC_datalink" /* datalink event */ 571cb875aeSCathy Zhou #define EC_VRRP "EC_vrrp" /* VRRP event */ 58b3d69c05SRobert Mustacchi #define EC_PCIE "EC_pcie" /* PCIe event */ 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate /* 617c478bd9Sstevel@tonic-gate * The following event class is reserved for exclusive use 627c478bd9Sstevel@tonic-gate * by Sun Cluster software. 637c478bd9Sstevel@tonic-gate */ 647c478bd9Sstevel@tonic-gate #define EC_CLUSTER "EC_Cluster" 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate /* 677c478bd9Sstevel@tonic-gate * EC_DR subclass definitions - supporting attributes (name/value pairs) 687c478bd9Sstevel@tonic-gate * are found in sys/sysevent/dr.h 697c478bd9Sstevel@tonic-gate */ 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate /* Attachment point state change */ 727c478bd9Sstevel@tonic-gate #define ESC_DR_AP_STATE_CHANGE "ESC_dr_ap_state_change" 737c478bd9Sstevel@tonic-gate #define ESC_DR_REQ "ESC_dr_req" /* Request DR */ 74c2ed7380Syd #define ESC_DR_TARGET_STATE_CHANGE "ESC_dr_target_state_change" 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate /* 777c478bd9Sstevel@tonic-gate * EC_ENV subclass definitions - supporting attributes (name/value pairs) 787c478bd9Sstevel@tonic-gate * are found in sys/sysevent/env.h 797c478bd9Sstevel@tonic-gate */ 807c478bd9Sstevel@tonic-gate #define ESC_ENV_TEMP "ESC_env_temp" /* Temperature change event subclass */ 817c478bd9Sstevel@tonic-gate #define ESC_ENV_FAN "ESC_env_fan" /* Fan status change event subclass */ 827c478bd9Sstevel@tonic-gate #define ESC_ENV_POWER "ESC_env_power" /* Power supply change event subclass */ 837c478bd9Sstevel@tonic-gate #define ESC_ENV_LED "ESC_env_led" /* LED change event subclass */ 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate /* 867c478bd9Sstevel@tonic-gate * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs) 877c478bd9Sstevel@tonic-gate * are found in sys/sysevent/domain.h 887c478bd9Sstevel@tonic-gate */ 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate /* Domain state change */ 917c478bd9Sstevel@tonic-gate #define ESC_DOMAIN_STATE_CHANGE "ESC_domain_state_change" 927c478bd9Sstevel@tonic-gate /* Domain loghost name change */ 937c478bd9Sstevel@tonic-gate #define ESC_DOMAIN_LOGHOST_CHANGE "ESC_domain_loghost_change" 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate /* 969113a79cSeschrock * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs) 977c478bd9Sstevel@tonic-gate * are found in sys/sysevent/ap_driver.h 987c478bd9Sstevel@tonic-gate */ 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate /* Alternate Pathing path switch */ 1017c478bd9Sstevel@tonic-gate #define ESC_AP_DRIVER_PATHSWITCH "ESC_ap_driver_pathswitch" 1027c478bd9Sstevel@tonic-gate /* Alternate Pathing database commit */ 1037c478bd9Sstevel@tonic-gate #define ESC_AP_DRIVER_COMMIT "ESC_ap_driver_commit" 1047c478bd9Sstevel@tonic-gate /* Alternate Pathing physical path status change */ 1057c478bd9Sstevel@tonic-gate #define ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE \ 1067c478bd9Sstevel@tonic-gate "ESC_ap_driver_phys_path_status_change" 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate /* 1099113a79cSeschrock * EC_IPMP subclass definitions - supporting attributes (name/value pairs) 1107c478bd9Sstevel@tonic-gate * are found in sys/sysevent/ipmp.h 1117c478bd9Sstevel@tonic-gate */ 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate /* IPMP group has changed state */ 1147c478bd9Sstevel@tonic-gate #define ESC_IPMP_GROUP_STATE "ESC_ipmp_group_state" 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate /* IPMP group has been created or removed */ 1177c478bd9Sstevel@tonic-gate #define ESC_IPMP_GROUP_CHANGE "ESC_ipmp_group_change" 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate /* IPMP group has had an interface added or removed */ 1207c478bd9Sstevel@tonic-gate #define ESC_IPMP_GROUP_MEMBER_CHANGE "ESC_ipmp_group_member_change" 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate /* Interface within an IPMP group has changed state or type */ 1237c478bd9Sstevel@tonic-gate #define ESC_IPMP_IF_CHANGE "ESC_ipmp_if_change" 1247c478bd9Sstevel@tonic-gate 125e11c3f44Smeem /* IPMP probe has changed state */ 126e11c3f44Smeem #define ESC_IPMP_PROBE_STATE "ESC_ipmp_probe_state" 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate /* 1299113a79cSeschrock * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes 1307c478bd9Sstevel@tonic-gate * (name/value pairs) are found in sys/sysevent/dev.h 1317c478bd9Sstevel@tonic-gate */ 1327c478bd9Sstevel@tonic-gate #define ESC_DISK "disk" /* disk device */ 1337c478bd9Sstevel@tonic-gate #define ESC_NETWORK "network" /* network interface */ 134db11e6feSjacobs #define ESC_PRINTER "printer" /* printer device */ 13530294554Sphitran #define ESC_LOFI "lofi" /* lofi device */ 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate /* 1389113a79cSeschrock * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs) 1397c478bd9Sstevel@tonic-gate * are found in sys/sysevent/dev.h 1407c478bd9Sstevel@tonic-gate */ 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate /* device tree branch added */ 1437c478bd9Sstevel@tonic-gate #define ESC_DEV_BRANCH_ADD "ESC_dev_branch_add" 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate /* device tree branch removed */ 1467c478bd9Sstevel@tonic-gate #define ESC_DEV_BRANCH_REMOVE "ESC_dev_branch_remove" 1477c478bd9Sstevel@tonic-gate 14897ddcdceSArtem Kachitchkine /* 14997ddcdceSArtem Kachitchkine * EC_DEV_STATUS subclass definitions 15097ddcdceSArtem Kachitchkine * 15197ddcdceSArtem Kachitchkine * device capacity dynamically changed 15297ddcdceSArtem Kachitchkine */ 153af007057Syl #define ESC_DEV_DLE "ESC_dev_dle" 154af007057Syl 15597ddcdceSArtem Kachitchkine /* LUN has received an eject request from the user */ 15697ddcdceSArtem Kachitchkine #define ESC_DEV_EJECT_REQUEST "ESC_dev_eject_request" 15797ddcdceSArtem Kachitchkine 1587c478bd9Sstevel@tonic-gate /* FMA Fault and Error event protocol subclass */ 1597c478bd9Sstevel@tonic-gate #define ESC_FM_ERROR "ESC_FM_error" 1607c478bd9Sstevel@tonic-gate #define ESC_FM_ERROR_REPLAY "ESC_FM_error_replay" 1619113a79cSeschrock 1629113a79cSeschrock /* Service processor subclass definitions */ 1639113a79cSeschrock #define ESC_PLATFORM_SP_RESET "ESC_platform_sp_reset" 1649113a79cSeschrock 1657b840e52Sphitran /* 166d2ec54f7Sphitran * EC_PWRCTL subclass definitions 1677b840e52Sphitran */ 168d2ec54f7Sphitran #define EC_PWRCTL "EC_pwrctl" 169d2ec54f7Sphitran #define ESC_PWRCTL_ADD "ESC_pwrctl_add" 170d2ec54f7Sphitran #define ESC_PWRCTL_REMOVE "ESC_pwrctl_remove" 171d2ec54f7Sphitran #define ESC_PWRCTL_WARN "ESC_pwrctl_warn" 172d2ec54f7Sphitran #define ESC_PWRCTL_LOW "ESC_pwrctl_low" 173d2ec54f7Sphitran #define ESC_PWRCTL_STATE_CHANGE "ESC_pwrctl_state_change" 174d2ec54f7Sphitran #define ESC_PWRCTL_POWER_BUTTON "ESC_pwrctl_power_button" 175d2ec54f7Sphitran #define ESC_PWRCTL_BRIGHTNESS_UP "ESC_pwrctl_brightness_up" 176d2ec54f7Sphitran #define ESC_PWRCTL_BRIGHTNESS_DOWN "ESC_pwrctl_brightness_down" 1777b840e52Sphitran 1782d6b5ea7SGuoli Shu /* EC_ACPIEV subclass definitions */ 1792d6b5ea7SGuoli Shu #define EC_ACPIEV "EC_acpiev" 1802d6b5ea7SGuoli Shu #define ESC_ACPIEV_DISPLAY_SWITCH "ESC_acpiev_display_switch" 1812d6b5ea7SGuoli Shu #define ESC_ACPIEV_SCREEN_LOCK "ESC_acpiev_screen_lock" 1822d6b5ea7SGuoli Shu #define ESC_ACPIEV_SLEEP "ESC_acpiev_sleep" 1832d6b5ea7SGuoli Shu #define ESC_ACPIEV_AUDIO_MUTE "ESC_acpiev_audio_mute" 1842d6b5ea7SGuoli Shu #define ESC_ACPIEV_WIFI "ESC_acpiev_wifi" 1852d6b5ea7SGuoli Shu #define ESC_ACPIEV_TOUCHPAD "ESC_acpiev_touchpad" 1862d6b5ea7SGuoli Shu 1873d7072f8Seschrock /* 1883d7072f8Seschrock * ZFS subclass definitions. supporting attributes (name/value paris) are found 1893d7072f8Seschrock * in sys/fs/zfs.h 1903d7072f8Seschrock */ 191943e9869SLori Alt #define ESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start" 192943e9869SLori Alt #define ESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish" 193943e9869SLori Alt #define ESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove" 19463364b0eSAlan Somers #define ESC_ZFS_VDEV_REMOVE_AUX "ESC_ZFS_vdev_remove_aux" 19563364b0eSAlan Somers #define ESC_ZFS_VDEV_REMOVE_DEV "ESC_ZFS_vdev_remove_dev" 19614372834SHans Rosenfeld #define ESC_ZFS_POOL_CREATE "ESC_ZFS_pool_create" 197943e9869SLori Alt #define ESC_ZFS_POOL_DESTROY "ESC_ZFS_pool_destroy" 19814372834SHans Rosenfeld #define ESC_ZFS_POOL_IMPORT "ESC_ZFS_pool_import" 19914372834SHans Rosenfeld #define ESC_ZFS_VDEV_ADD "ESC_ZFS_vdev_add" 20014372834SHans Rosenfeld #define ESC_ZFS_VDEV_ATTACH "ESC_ZFS_vdev_attach" 201943e9869SLori Alt #define ESC_ZFS_VDEV_CLEAR "ESC_ZFS_vdev_clear" 202943e9869SLori Alt #define ESC_ZFS_VDEV_CHECK "ESC_ZFS_vdev_check" 20314372834SHans Rosenfeld #define ESC_ZFS_VDEV_ONLINE "ESC_ZFS_vdev_online" 204943e9869SLori Alt #define ESC_ZFS_CONFIG_SYNC "ESC_ZFS_config_sync" 205943e9869SLori Alt #define ESC_ZFS_SCRUB_START "ESC_ZFS_scrub_start" 206943e9869SLori Alt #define ESC_ZFS_SCRUB_FINISH "ESC_ZFS_scrub_finish" 207301fd1d6SSean Eric Fagan #define ESC_ZFS_SCRUB_ABORT "ESC_ZFS_scrub_abort" 208301fd1d6SSean Eric Fagan #define ESC_ZFS_SCRUB_RESUME "ESC_ZFS_scrub_resume" 209301fd1d6SSean Eric Fagan #define ESC_ZFS_SCRUB_PAUSED "ESC_ZFS_scrub_paused" 210943e9869SLori Alt #define ESC_ZFS_VDEV_SPARE "ESC_ZFS_vdev_spare" 211943e9869SLori Alt #define ESC_ZFS_BOOTFS_VDEV_ATTACH "ESC_ZFS_bootfs_vdev_attach" 212e9103aaeSGarrett D'Amore #define ESC_ZFS_POOL_REGUID "ESC_ZFS_pool_reguid" 213ce1577b0SDave Eddy #define ESC_ZFS_HISTORY_EVENT "ESC_ZFS_history_event" 214*084fd14fSBrian Behlendorf #define ESC_ZFS_TRIM_START "ESC_ZFS_trim_start" 215*084fd14fSBrian Behlendorf #define ESC_ZFS_TRIM_FINISH "ESC_ZFS_trim_finish" 216*084fd14fSBrian Behlendorf #define ESC_ZFS_TRIM_CANCEL "ESC_ZFS_trim_cancel" 217*084fd14fSBrian Behlendorf #define ESC_ZFS_TRIM_RESUME "ESC_ZFS_trim_resume" 218*084fd14fSBrian Behlendorf #define ESC_ZFS_TRIM_SUSPEND "ESC_ZFS_trim_suspend" 2193d7072f8Seschrock 2200dc974a9SCathy Zhou /* 221a25df667SRobert Mustacchi * datalink subclass definitions. Supporting attributes for datalink state found 222a25df667SRobert Mustacchi * in sys/sysevent/datalink.h. 2230dc974a9SCathy Zhou */ 2240dc974a9SCathy Zhou #define ESC_DATALINK_PHYS_ADD "ESC_datalink_phys_add" /* new physical link */ 225a25df667SRobert Mustacchi #define ESC_DATALINK_LINK_STATE "ESC_datalink_link_state" /* link state */ 2260dc974a9SCathy Zhou 2271cb875aeSCathy Zhou /* 2281cb875aeSCathy Zhou * VRRP subclass definitions. Supporting attributes (name/value paris) are 2291cb875aeSCathy Zhou * found in sys/sysevent/vrrp.h 2301cb875aeSCathy Zhou */ 2311cb875aeSCathy Zhou #define ESC_VRRP_STATE_CHANGE "ESC_vrrp_state_change" 2321cb875aeSCathy Zhou 233b3d69c05SRobert Mustacchi /* 234b3d69c05SRobert Mustacchi * PCIe subclass definitions. Supporting attributes for PCIe state found in 235b3d69c05SRobert Mustacchi * sys/sysevent/pcie.h. 236b3d69c05SRobert Mustacchi */ 237b3d69c05SRobert Mustacchi #define ESC_PCIE_LINK_STATE "ESC_pcie_link_state" 238b3d69c05SRobert Mustacchi 2397c478bd9Sstevel@tonic-gate #ifdef __cplusplus 2407c478bd9Sstevel@tonic-gate } 2417c478bd9Sstevel@tonic-gate #endif 2427c478bd9Sstevel@tonic-gate 2437c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_EVENTDEFS_H */ 244