1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 23 * Copyright 2015 Nexenta Systems, Inc. All rights reserved. 24 */ 25 26 #ifndef _SYS_SYSEVENT_EVENTDEFS_H 27 #define _SYS_SYSEVENT_EVENTDEFS_H 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 /* 34 * eventdefs.h contains public definitions for sysevent types (classes 35 * and subclasses). All additions/removal/changes are subject 36 * to PSARC approval. 37 */ 38 39 /* Sysevent Class definitions */ 40 #define EC_NONE "EC_none" 41 #define EC_PRIV "EC_priv" 42 #define EC_PLATFORM "EC_platform" /* events private to platform */ 43 #define EC_DR "EC_dr" /* Dynamic reconfiguration event class */ 44 #define EC_ENV "EC_env" /* Environmental monitor event class */ 45 #define EC_DOMAIN "EC_domain" /* Domain event class */ 46 #define EC_AP_DRIVER "EC_ap_driver" /* Alternate Pathing event class */ 47 #define EC_IPMP "EC_ipmp" /* IP Multipathing event class */ 48 #define EC_DEV_ADD "EC_dev_add" /* device add event class */ 49 #define EC_DEV_REMOVE "EC_dev_remove" /* device remove event class */ 50 #define EC_DEV_BRANCH "EC_dev_branch" /* device tree branch event class */ 51 #define EC_DEV_STATUS "EC_dev_status" /* device status event class */ 52 #define EC_FM "EC_fm" /* FMA error report event */ 53 #define EC_ZFS "EC_zfs" /* ZFS event */ 54 #define EC_DATALINK "EC_datalink" /* datalink event */ 55 #define EC_VRRP "EC_vrrp" /* VRRP event */ 56 57 /* 58 * The following event class is reserved for exclusive use 59 * by Sun Cluster software. 60 */ 61 #define EC_CLUSTER "EC_Cluster" 62 63 /* 64 * The following classes are exclusively reserved for use by the 65 * Solaris Volume Manager (SVM) 66 */ 67 #define EC_SVM_CONFIG "EC_SVM_Config" 68 #define EC_SVM_STATE "EC_SVM_State" 69 70 /* 71 * EC_SVM_CONFIG subclass definitions - supporting attributes (name/value pairs) 72 * are found in sys/sysevent/svm.h 73 */ 74 #define ESC_SVM_CREATE "ESC_SVM_Create" 75 #define ESC_SVM_DELETE "ESC_SVM_Delete" 76 #define ESC_SVM_ADD "ESC_SVM_Add" 77 #define ESC_SVM_REMOVE "ESC_SVM_Remove" 78 #define ESC_SVM_REPLACE "ESC_SVM_Replace" 79 #define ESC_SVM_GROW "ESC_SVM_Grow" 80 #define ESC_SVM_RENAME_SRC "ESC_SVM_Rename_Src" 81 #define ESC_SVM_RENAME_DST "ESC_SVM_Rename_Dst" 82 #define ESC_SVM_MEDIATOR_ADD "ESC_SVM_Mediator_Add" 83 #define ESC_SVM_MEDIATOR_DELETE "ESC_SVM_Mediator_Delete" 84 #define ESC_SVM_HOST_ADD "ESC_SVM_Host_Add" 85 #define ESC_SVM_HOST_DELETE "ESC_SVM_Host_Delete" 86 #define ESC_SVM_DRIVE_ADD "ESC_SVM_Drive_Add" 87 #define ESC_SVM_DRIVE_DELETE "ESC_SVM_Drive_Delete" 88 #define ESC_SVM_DETACH "ESC_SVM_Detach" 89 #define ESC_SVM_DETACHING "ESC_SVM_Detaching" 90 #define ESC_SVM_ATTACH "ESC_SVM_Attach" 91 #define ESC_SVM_ATTACHING "ESC_SVM_Attaching" 92 93 /* 94 * EC_SVM_STATE subclass definitions - supporting attributes (name/value pairs) 95 * are found in sys/sysevent/svm.h 96 */ 97 #define ESC_SVM_INIT_START "ESC_SVM_Init_Start" 98 #define ESC_SVM_INIT_FAILED "ESC_SVM_Init_Failed" 99 #define ESC_SVM_INIT_FATAL "ESC_SVM_Init_Fatal" 100 #define ESC_SVM_INIT_SUCCESS "ESC_SVM_Init_Success" 101 #define ESC_SVM_IOERR "ESC_SVM_Ioerr" 102 #define ESC_SVM_ERRED "ESC_SVM_Erred" 103 #define ESC_SVM_LASTERRED "ESC_SVM_Lasterred" 104 #define ESC_SVM_OK "ESC_SVM_Ok" 105 #define ESC_SVM_ENABLE "ESC_SVM_Enable" 106 #define ESC_SVM_RESYNC_START "ESC_SVM_Resync_Start" 107 #define ESC_SVM_RESYNC_FAILED "ESC_SVM_Resync_Failed" 108 #define ESC_SVM_RESYNC_SUCCESS "ESC_SVM_Resync_Success" 109 #define ESC_SVM_RESYNC_DONE "ESC_SVM_Resync_Done" 110 #define ESC_SVM_HOTSPARED "ESC_SVM_Hotspared" 111 #define ESC_SVM_HS_FREED "ESC_SVM_HS_Freed" 112 #define ESC_SVM_HS_CHANGED "ESC_SVM_HS_Changed" 113 #define ESC_SVM_TAKEOVER "ESC_SVM_Takeover" 114 #define ESC_SVM_RELEASE "ESC_SVM_Release" 115 #define ESC_SVM_OPEN_FAIL "ESC_SVM_Open_Fail" 116 #define ESC_SVM_OFFLINE "ESC_SVM_Offline" 117 #define ESC_SVM_ONLINE "ESC_SVM_Online" 118 #define ESC_SVM_CHANGE "ESC_SVM_Change" 119 #define ESC_SVM_EXCHANGE "ESC_SVM_Exchange" 120 #define ESC_SVM_REGEN_START "ESC_SVM_Regen_Start" 121 #define ESC_SVM_REGEN_DONE "ESC_SVM_Regen_Done" 122 #define ESC_SVM_REGEN_FAILED "ESC_SVM_Regen_Failed" 123 124 /* 125 * EC_DR subclass definitions - supporting attributes (name/value pairs) 126 * are found in sys/sysevent/dr.h 127 */ 128 129 /* Attachment point state change */ 130 #define ESC_DR_AP_STATE_CHANGE "ESC_dr_ap_state_change" 131 #define ESC_DR_REQ "ESC_dr_req" /* Request DR */ 132 #define ESC_DR_TARGET_STATE_CHANGE "ESC_dr_target_state_change" 133 134 /* 135 * EC_ENV subclass definitions - supporting attributes (name/value pairs) 136 * are found in sys/sysevent/env.h 137 */ 138 #define ESC_ENV_TEMP "ESC_env_temp" /* Temperature change event subclass */ 139 #define ESC_ENV_FAN "ESC_env_fan" /* Fan status change event subclass */ 140 #define ESC_ENV_POWER "ESC_env_power" /* Power supply change event subclass */ 141 #define ESC_ENV_LED "ESC_env_led" /* LED change event subclass */ 142 143 /* 144 * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs) 145 * are found in sys/sysevent/domain.h 146 */ 147 148 /* Domain state change */ 149 #define ESC_DOMAIN_STATE_CHANGE "ESC_domain_state_change" 150 /* Domain loghost name change */ 151 #define ESC_DOMAIN_LOGHOST_CHANGE "ESC_domain_loghost_change" 152 153 /* 154 * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs) 155 * are found in sys/sysevent/ap_driver.h 156 */ 157 158 /* Alternate Pathing path switch */ 159 #define ESC_AP_DRIVER_PATHSWITCH "ESC_ap_driver_pathswitch" 160 /* Alternate Pathing database commit */ 161 #define ESC_AP_DRIVER_COMMIT "ESC_ap_driver_commit" 162 /* Alternate Pathing physical path status change */ 163 #define ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE \ 164 "ESC_ap_driver_phys_path_status_change" 165 166 /* 167 * EC_IPMP subclass definitions - supporting attributes (name/value pairs) 168 * are found in sys/sysevent/ipmp.h 169 */ 170 171 /* IPMP group has changed state */ 172 #define ESC_IPMP_GROUP_STATE "ESC_ipmp_group_state" 173 174 /* IPMP group has been created or removed */ 175 #define ESC_IPMP_GROUP_CHANGE "ESC_ipmp_group_change" 176 177 /* IPMP group has had an interface added or removed */ 178 #define ESC_IPMP_GROUP_MEMBER_CHANGE "ESC_ipmp_group_member_change" 179 180 /* Interface within an IPMP group has changed state or type */ 181 #define ESC_IPMP_IF_CHANGE "ESC_ipmp_if_change" 182 183 /* IPMP probe has changed state */ 184 #define ESC_IPMP_PROBE_STATE "ESC_ipmp_probe_state" 185 186 /* 187 * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes 188 * (name/value pairs) are found in sys/sysevent/dev.h 189 */ 190 #define ESC_DISK "disk" /* disk device */ 191 #define ESC_NETWORK "network" /* network interface */ 192 #define ESC_PRINTER "printer" /* printer device */ 193 #define ESC_LOFI "lofi" /* lofi device */ 194 195 /* 196 * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs) 197 * are found in sys/sysevent/dev.h 198 */ 199 200 /* device tree branch added */ 201 #define ESC_DEV_BRANCH_ADD "ESC_dev_branch_add" 202 203 /* device tree branch removed */ 204 #define ESC_DEV_BRANCH_REMOVE "ESC_dev_branch_remove" 205 206 /* 207 * EC_DEV_STATUS subclass definitions 208 * 209 * device capacity dynamically changed 210 */ 211 #define ESC_DEV_DLE "ESC_dev_dle" 212 213 /* LUN has received an eject request from the user */ 214 #define ESC_DEV_EJECT_REQUEST "ESC_dev_eject_request" 215 216 /* FMA Fault and Error event protocol subclass */ 217 #define ESC_FM_ERROR "ESC_FM_error" 218 #define ESC_FM_ERROR_REPLAY "ESC_FM_error_replay" 219 220 /* Service processor subclass definitions */ 221 #define ESC_PLATFORM_SP_RESET "ESC_platform_sp_reset" 222 223 /* 224 * EC_PWRCTL subclass definitions 225 */ 226 #define EC_PWRCTL "EC_pwrctl" 227 #define ESC_PWRCTL_ADD "ESC_pwrctl_add" 228 #define ESC_PWRCTL_REMOVE "ESC_pwrctl_remove" 229 #define ESC_PWRCTL_WARN "ESC_pwrctl_warn" 230 #define ESC_PWRCTL_LOW "ESC_pwrctl_low" 231 #define ESC_PWRCTL_STATE_CHANGE "ESC_pwrctl_state_change" 232 #define ESC_PWRCTL_POWER_BUTTON "ESC_pwrctl_power_button" 233 #define ESC_PWRCTL_BRIGHTNESS_UP "ESC_pwrctl_brightness_up" 234 #define ESC_PWRCTL_BRIGHTNESS_DOWN "ESC_pwrctl_brightness_down" 235 236 /* EC_ACPIEV subclass definitions */ 237 #define EC_ACPIEV "EC_acpiev" 238 #define ESC_ACPIEV_DISPLAY_SWITCH "ESC_acpiev_display_switch" 239 #define ESC_ACPIEV_SCREEN_LOCK "ESC_acpiev_screen_lock" 240 #define ESC_ACPIEV_SLEEP "ESC_acpiev_sleep" 241 #define ESC_ACPIEV_AUDIO_MUTE "ESC_acpiev_audio_mute" 242 #define ESC_ACPIEV_WIFI "ESC_acpiev_wifi" 243 #define ESC_ACPIEV_TOUCHPAD "ESC_acpiev_touchpad" 244 245 /* 246 * ZFS subclass definitions. supporting attributes (name/value paris) are found 247 * in sys/fs/zfs.h 248 */ 249 #define ESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start" 250 #define ESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish" 251 #define ESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove" 252 #define ESC_ZFS_VDEV_REMOVE_AUX "ESC_ZFS_vdev_remove_aux" 253 #define ESC_ZFS_VDEV_REMOVE_DEV "ESC_ZFS_vdev_remove_dev" 254 #define ESC_ZFS_POOL_CREATE "ESC_ZFS_pool_create" 255 #define ESC_ZFS_POOL_DESTROY "ESC_ZFS_pool_destroy" 256 #define ESC_ZFS_POOL_IMPORT "ESC_ZFS_pool_import" 257 #define ESC_ZFS_VDEV_ADD "ESC_ZFS_vdev_add" 258 #define ESC_ZFS_VDEV_ATTACH "ESC_ZFS_vdev_attach" 259 #define ESC_ZFS_VDEV_CLEAR "ESC_ZFS_vdev_clear" 260 #define ESC_ZFS_VDEV_CHECK "ESC_ZFS_vdev_check" 261 #define ESC_ZFS_VDEV_ONLINE "ESC_ZFS_vdev_online" 262 #define ESC_ZFS_CONFIG_SYNC "ESC_ZFS_config_sync" 263 #define ESC_ZFS_SCRUB_START "ESC_ZFS_scrub_start" 264 #define ESC_ZFS_SCRUB_FINISH "ESC_ZFS_scrub_finish" 265 #define ESC_ZFS_VDEV_SPARE "ESC_ZFS_vdev_spare" 266 #define ESC_ZFS_BOOTFS_VDEV_ATTACH "ESC_ZFS_bootfs_vdev_attach" 267 #define ESC_ZFS_POOL_REGUID "ESC_ZFS_pool_reguid" 268 269 /* 270 * datalink subclass definitions. 271 */ 272 #define ESC_DATALINK_PHYS_ADD "ESC_datalink_phys_add" /* new physical link */ 273 274 /* 275 * VRRP subclass definitions. Supporting attributes (name/value paris) are 276 * found in sys/sysevent/vrrp.h 277 */ 278 #define ESC_VRRP_STATE_CHANGE "ESC_vrrp_state_change" 279 280 #ifdef __cplusplus 281 } 282 #endif 283 284 #endif /* _SYS_SYSEVENT_EVENTDEFS_H */ 285