]> git.proxmox.com Git - mirror_zfs-debian.git/blob - include/sys/sysevent/eventdefs.h
fc2687842ccd6581baeb64eae7a95ff983857030
[mirror_zfs-debian.git] / include / sys / sysevent / eventdefs.h
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 * Copyright 2017 Joyent, Inc.
25 */
26
27 #ifndef _SYS_SYSEVENT_EVENTDEFS_H
28 #define _SYS_SYSEVENT_EVENTDEFS_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /*
35 * eventdefs.h contains public definitions for sysevent types (classes
36 * and subclasses). All additions/removal/changes are subject
37 * to PSARC approval.
38 */
39
40 /* Sysevent Class definitions */
41 #define EC_NONE "EC_none"
42 #define EC_PRIV "EC_priv"
43 #define EC_PLATFORM "EC_platform" /* events private to platform */
44 #define EC_DR "EC_dr" /* Dynamic reconfiguration event class */
45 #define EC_ENV "EC_env" /* Environmental monitor event class */
46 #define EC_DOMAIN "EC_domain" /* Domain event class */
47 #define EC_AP_DRIVER "EC_ap_driver" /* Alternate Pathing event class */
48 #define EC_IPMP "EC_ipmp" /* IP Multipathing event class */
49 #define EC_DEV_ADD "EC_dev_add" /* device add event class */
50 #define EC_DEV_REMOVE "EC_dev_remove" /* device remove event class */
51 #define EC_DEV_BRANCH "EC_dev_branch" /* device tree branch event class */
52 #define EC_DEV_STATUS "EC_dev_status" /* device status event class */
53 #define EC_FM "EC_fm" /* FMA error report event */
54 #define EC_ZFS "EC_zfs" /* ZFS event */
55 #define EC_DATALINK "EC_datalink" /* datalink event */
56 #define EC_VRRP "EC_vrrp" /* VRRP event */
57
58 /*
59 * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes
60 * (name/value pairs) are found in sys/sysevent/dev.h
61 */
62 #define ESC_DISK "disk" /* disk device */
63 #define ESC_NETWORK "network" /* network interface */
64 #define ESC_PRINTER "printer" /* printer device */
65 #define ESC_LOFI "lofi" /* lofi device */
66
67 /*
68 * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs)
69 * are found in sys/sysevent/dev.h
70 */
71
72 /* device tree branch added */
73 #define ESC_DEV_BRANCH_ADD "dev_branch_add"
74
75 /* device tree branch removed */
76 #define ESC_DEV_BRANCH_REMOVE "dev_branch_remove"
77
78 /*
79 * EC_DEV_STATUS subclass definitions
80 *
81 * device capacity dynamically changed
82 */
83 #define ESC_DEV_DLE "dev_dle"
84
85 /* LUN has received an eject request from the user */
86 #define ESC_DEV_EJECT_REQUEST "dev_eject_request"
87
88 /* FMA Fault and Error event protocol subclass */
89 #define ESC_FM_ERROR "error"
90 #define ESC_FM_ERROR_REPLAY "error_replay"
91
92 /*
93 * ZFS subclass definitions. supporting attributes (name/value paris) are found
94 * in sys/fs/zfs.h
95 */
96 #define ESC_ZFS_RESILVER_START "resilver_start"
97 #define ESC_ZFS_RESILVER_FINISH "resilver_finish"
98 #define ESC_ZFS_VDEV_REMOVE "vdev_remove"
99 #define ESC_ZFS_VDEV_REMOVE_AUX "vdev_remove_aux"
100 #define ESC_ZFS_VDEV_REMOVE_DEV "vdev_remove_dev"
101 #define ESC_ZFS_POOL_CREATE "pool_create"
102 #define ESC_ZFS_POOL_DESTROY "pool_destroy"
103 #define ESC_ZFS_POOL_IMPORT "pool_import"
104 #define ESC_ZFS_VDEV_ADD "vdev_add"
105 #define ESC_ZFS_VDEV_ATTACH "vdev_attach"
106 #define ESC_ZFS_VDEV_CLEAR "vdev_clear"
107 #define ESC_ZFS_VDEV_CHECK "vdev_check"
108 #define ESC_ZFS_VDEV_ONLINE "vdev_online"
109 #define ESC_ZFS_CONFIG_SYNC "config_sync"
110 #define ESC_ZFS_SCRUB_START "scrub_start"
111 #define ESC_ZFS_SCRUB_FINISH "scrub_finish"
112 #define ESC_ZFS_VDEV_SPARE "vdev_spare"
113 #define ESC_ZFS_VDEV_AUTOEXPAND "vdev_autoexpand"
114 #define ESC_ZFS_BOOTFS_VDEV_ATTACH "bootfs_vdev_attach"
115 #define ESC_ZFS_POOL_REGUID "pool_reguid"
116 #define ESC_ZFS_HISTORY_EVENT "history_event"
117
118 /*
119 * datalink subclass definitions.
120 */
121 #define ESC_DATALINK_PHYS_ADD "datalink_phys_add" /* new physical link */
122
123 #ifdef __cplusplus
124 }
125 #endif
126
127 #endif /* _SYS_SYSEVENT_EVENTDEFS_H */