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. 25ce1577b0SDave Eddy * Copyright 2017 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 */ 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate /* 607c478bd9Sstevel@tonic-gate * The following event class is reserved for exclusive use 617c478bd9Sstevel@tonic-gate * by Sun Cluster software. 627c478bd9Sstevel@tonic-gate */ 637c478bd9Sstevel@tonic-gate #define EC_CLUSTER "EC_Cluster" 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate /* 667c478bd9Sstevel@tonic-gate * EC_DR subclass definitions - supporting attributes (name/value pairs) 677c478bd9Sstevel@tonic-gate * are found in sys/sysevent/dr.h 687c478bd9Sstevel@tonic-gate */ 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate /* Attachment point state change */ 717c478bd9Sstevel@tonic-gate #define ESC_DR_AP_STATE_CHANGE "ESC_dr_ap_state_change" 727c478bd9Sstevel@tonic-gate #define ESC_DR_REQ "ESC_dr_req" /* Request DR */ 73c2ed7380Syd #define ESC_DR_TARGET_STATE_CHANGE "ESC_dr_target_state_change" 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gate /* 767c478bd9Sstevel@tonic-gate * EC_ENV subclass definitions - supporting attributes (name/value pairs) 777c478bd9Sstevel@tonic-gate * are found in sys/sysevent/env.h 787c478bd9Sstevel@tonic-gate */ 797c478bd9Sstevel@tonic-gate #define ESC_ENV_TEMP "ESC_env_temp" /* Temperature change event subclass */ 807c478bd9Sstevel@tonic-gate #define ESC_ENV_FAN "ESC_env_fan" /* Fan status change event subclass */ 817c478bd9Sstevel@tonic-gate #define ESC_ENV_POWER "ESC_env_power" /* Power supply change event subclass */ 827c478bd9Sstevel@tonic-gate #define ESC_ENV_LED "ESC_env_led" /* LED change event subclass */ 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate /* 857c478bd9Sstevel@tonic-gate * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs) 867c478bd9Sstevel@tonic-gate * are found in sys/sysevent/domain.h 877c478bd9Sstevel@tonic-gate */ 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate /* Domain state change */ 907c478bd9Sstevel@tonic-gate #define ESC_DOMAIN_STATE_CHANGE "ESC_domain_state_change" 917c478bd9Sstevel@tonic-gate /* Domain loghost name change */ 927c478bd9Sstevel@tonic-gate #define ESC_DOMAIN_LOGHOST_CHANGE "ESC_domain_loghost_change" 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate /* 959113a79cSeschrock * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs) 967c478bd9Sstevel@tonic-gate * are found in sys/sysevent/ap_driver.h 977c478bd9Sstevel@tonic-gate */ 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gate /* Alternate Pathing path switch */ 1007c478bd9Sstevel@tonic-gate #define ESC_AP_DRIVER_PATHSWITCH "ESC_ap_driver_pathswitch" 1017c478bd9Sstevel@tonic-gate /* Alternate Pathing database commit */ 1027c478bd9Sstevel@tonic-gate #define ESC_AP_DRIVER_COMMIT "ESC_ap_driver_commit" 1037c478bd9Sstevel@tonic-gate /* Alternate Pathing physical path status change */ 1047c478bd9Sstevel@tonic-gate #define ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE \ 1057c478bd9Sstevel@tonic-gate "ESC_ap_driver_phys_path_status_change" 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate /* 1089113a79cSeschrock * EC_IPMP subclass definitions - supporting attributes (name/value pairs) 1097c478bd9Sstevel@tonic-gate * are found in sys/sysevent/ipmp.h 1107c478bd9Sstevel@tonic-gate */ 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate /* IPMP group has changed state */ 1137c478bd9Sstevel@tonic-gate #define ESC_IPMP_GROUP_STATE "ESC_ipmp_group_state" 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate /* IPMP group has been created or removed */ 1167c478bd9Sstevel@tonic-gate #define ESC_IPMP_GROUP_CHANGE "ESC_ipmp_group_change" 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate /* IPMP group has had an interface added or removed */ 1197c478bd9Sstevel@tonic-gate #define ESC_IPMP_GROUP_MEMBER_CHANGE "ESC_ipmp_group_member_change" 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate /* Interface within an IPMP group has changed state or type */ 1227c478bd9Sstevel@tonic-gate #define ESC_IPMP_IF_CHANGE "ESC_ipmp_if_change" 1237c478bd9Sstevel@tonic-gate 124e11c3f44Smeem /* IPMP probe has changed state */ 125e11c3f44Smeem #define ESC_IPMP_PROBE_STATE "ESC_ipmp_probe_state" 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate /* 1289113a79cSeschrock * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes 1297c478bd9Sstevel@tonic-gate * (name/value pairs) are found in sys/sysevent/dev.h 1307c478bd9Sstevel@tonic-gate */ 1317c478bd9Sstevel@tonic-gate #define ESC_DISK "disk" /* disk device */ 1327c478bd9Sstevel@tonic-gate #define ESC_NETWORK "network" /* network interface */ 133db11e6feSjacobs #define ESC_PRINTER "printer" /* printer device */ 13430294554Sphitran #define ESC_LOFI "lofi" /* lofi device */ 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate /* 1379113a79cSeschrock * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs) 1387c478bd9Sstevel@tonic-gate * are found in sys/sysevent/dev.h 1397c478bd9Sstevel@tonic-gate */ 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate /* device tree branch added */ 1427c478bd9Sstevel@tonic-gate #define ESC_DEV_BRANCH_ADD "ESC_dev_branch_add" 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate /* device tree branch removed */ 1457c478bd9Sstevel@tonic-gate #define ESC_DEV_BRANCH_REMOVE "ESC_dev_branch_remove" 1467c478bd9Sstevel@tonic-gate 14797ddcdceSArtem Kachitchkine /* 14897ddcdceSArtem Kachitchkine * EC_DEV_STATUS subclass definitions 14997ddcdceSArtem Kachitchkine * 15097ddcdceSArtem Kachitchkine * device capacity dynamically changed 15197ddcdceSArtem Kachitchkine */ 152af007057Syl #define ESC_DEV_DLE "ESC_dev_dle" 153af007057Syl 15497ddcdceSArtem Kachitchkine /* LUN has received an eject request from the user */ 15597ddcdceSArtem Kachitchkine #define ESC_DEV_EJECT_REQUEST "ESC_dev_eject_request" 15697ddcdceSArtem Kachitchkine 1577c478bd9Sstevel@tonic-gate /* FMA Fault and Error event protocol subclass */ 1587c478bd9Sstevel@tonic-gate #define ESC_FM_ERROR "ESC_FM_error" 1597c478bd9Sstevel@tonic-gate #define ESC_FM_ERROR_REPLAY "ESC_FM_error_replay" 1609113a79cSeschrock 1619113a79cSeschrock /* Service processor subclass definitions */ 1629113a79cSeschrock #define ESC_PLATFORM_SP_RESET "ESC_platform_sp_reset" 1639113a79cSeschrock 1647b840e52Sphitran /* 165d2ec54f7Sphitran * EC_PWRCTL subclass definitions 1667b840e52Sphitran */ 167d2ec54f7Sphitran #define EC_PWRCTL "EC_pwrctl" 168d2ec54f7Sphitran #define ESC_PWRCTL_ADD "ESC_pwrctl_add" 169d2ec54f7Sphitran #define ESC_PWRCTL_REMOVE "ESC_pwrctl_remove" 170d2ec54f7Sphitran #define ESC_PWRCTL_WARN "ESC_pwrctl_warn" 171d2ec54f7Sphitran #define ESC_PWRCTL_LOW "ESC_pwrctl_low" 172d2ec54f7Sphitran #define ESC_PWRCTL_STATE_CHANGE "ESC_pwrctl_state_change" 173d2ec54f7Sphitran #define ESC_PWRCTL_POWER_BUTTON "ESC_pwrctl_power_button" 174d2ec54f7Sphitran #define ESC_PWRCTL_BRIGHTNESS_UP "ESC_pwrctl_brightness_up" 175d2ec54f7Sphitran #define ESC_PWRCTL_BRIGHTNESS_DOWN "ESC_pwrctl_brightness_down" 1767b840e52Sphitran 1772d6b5ea7SGuoli Shu /* EC_ACPIEV subclass definitions */ 1782d6b5ea7SGuoli Shu #define EC_ACPIEV "EC_acpiev" 1792d6b5ea7SGuoli Shu #define ESC_ACPIEV_DISPLAY_SWITCH "ESC_acpiev_display_switch" 1802d6b5ea7SGuoli Shu #define ESC_ACPIEV_SCREEN_LOCK "ESC_acpiev_screen_lock" 1812d6b5ea7SGuoli Shu #define ESC_ACPIEV_SLEEP "ESC_acpiev_sleep" 1822d6b5ea7SGuoli Shu #define ESC_ACPIEV_AUDIO_MUTE "ESC_acpiev_audio_mute" 1832d6b5ea7SGuoli Shu #define ESC_ACPIEV_WIFI "ESC_acpiev_wifi" 1842d6b5ea7SGuoli Shu #define ESC_ACPIEV_TOUCHPAD "ESC_acpiev_touchpad" 1852d6b5ea7SGuoli Shu 1863d7072f8Seschrock /* 1873d7072f8Seschrock * ZFS subclass definitions. supporting attributes (name/value paris) are found 1883d7072f8Seschrock * in sys/fs/zfs.h 1893d7072f8Seschrock */ 190943e9869SLori Alt #define ESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start" 191943e9869SLori Alt #define ESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish" 192943e9869SLori Alt #define ESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove" 19363364b0eSAlan Somers #define ESC_ZFS_VDEV_REMOVE_AUX "ESC_ZFS_vdev_remove_aux" 19463364b0eSAlan Somers #define ESC_ZFS_VDEV_REMOVE_DEV "ESC_ZFS_vdev_remove_dev" 19514372834SHans Rosenfeld #define ESC_ZFS_POOL_CREATE "ESC_ZFS_pool_create" 196943e9869SLori Alt #define ESC_ZFS_POOL_DESTROY "ESC_ZFS_pool_destroy" 19714372834SHans Rosenfeld #define ESC_ZFS_POOL_IMPORT "ESC_ZFS_pool_import" 19814372834SHans Rosenfeld #define ESC_ZFS_VDEV_ADD "ESC_ZFS_vdev_add" 19914372834SHans Rosenfeld #define ESC_ZFS_VDEV_ATTACH "ESC_ZFS_vdev_attach" 200943e9869SLori Alt #define ESC_ZFS_VDEV_CLEAR "ESC_ZFS_vdev_clear" 201943e9869SLori Alt #define ESC_ZFS_VDEV_CHECK "ESC_ZFS_vdev_check" 20214372834SHans Rosenfeld #define ESC_ZFS_VDEV_ONLINE "ESC_ZFS_vdev_online" 203943e9869SLori Alt #define ESC_ZFS_CONFIG_SYNC "ESC_ZFS_config_sync" 204943e9869SLori Alt #define ESC_ZFS_SCRUB_START "ESC_ZFS_scrub_start" 205943e9869SLori Alt #define ESC_ZFS_SCRUB_FINISH "ESC_ZFS_scrub_finish" 206*301fd1d6SSean Eric Fagan #define ESC_ZFS_SCRUB_ABORT "ESC_ZFS_scrub_abort" 207*301fd1d6SSean Eric Fagan #define ESC_ZFS_SCRUB_RESUME "ESC_ZFS_scrub_resume" 208*301fd1d6SSean Eric Fagan #define ESC_ZFS_SCRUB_PAUSED "ESC_ZFS_scrub_paused" 209943e9869SLori Alt #define ESC_ZFS_VDEV_SPARE "ESC_ZFS_vdev_spare" 210943e9869SLori Alt #define ESC_ZFS_BOOTFS_VDEV_ATTACH "ESC_ZFS_bootfs_vdev_attach" 211e9103aaeSGarrett D'Amore #define ESC_ZFS_POOL_REGUID "ESC_ZFS_pool_reguid" 212ce1577b0SDave Eddy #define ESC_ZFS_HISTORY_EVENT "ESC_ZFS_history_event" 2133d7072f8Seschrock 2140dc974a9SCathy Zhou /* 2150dc974a9SCathy Zhou * datalink subclass definitions. 2160dc974a9SCathy Zhou */ 2170dc974a9SCathy Zhou #define ESC_DATALINK_PHYS_ADD "ESC_datalink_phys_add" /* new physical link */ 2180dc974a9SCathy Zhou 2191cb875aeSCathy Zhou /* 2201cb875aeSCathy Zhou * VRRP subclass definitions. Supporting attributes (name/value paris) are 2211cb875aeSCathy Zhou * found in sys/sysevent/vrrp.h 2221cb875aeSCathy Zhou */ 2231cb875aeSCathy Zhou #define ESC_VRRP_STATE_CHANGE "ESC_vrrp_state_change" 2241cb875aeSCathy Zhou 2257c478bd9Sstevel@tonic-gate #ifdef __cplusplus 2267c478bd9Sstevel@tonic-gate } 2277c478bd9Sstevel@tonic-gate #endif 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_EVENTDEFS_H */ 230