xref: /titanic_50/usr/src/uts/common/sys/sysevent/ipmp.h (revision a6d42e7d71324c5193c3b94d57d96ba2925d52e1)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_SYSEVENT_IPMP_H
28 #define	_SYS_SYSEVENT_IPMP_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 
33 /*
34  * IPMP sysevent definitions.  Note that all of these definitions are
35  * Sun-private and are subject to change at any time.
36  */
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 
43 /*
44  * Event type EC_IPMP/ESC_IPMP_GROUP_STATE event schema
45  *
46  *	Event Class     - EC_IPMP
47  *	Event Sub-Class - ESC_IPMP_GROUP_STATE
48  *	Event Publisher - SUNW:usr:in.mpathd
49  *
50  * 	Attribute Name  - IPMP_EVENT_VERSION
51  *	Attribute Type  - SE_DATA_TYPE_UINT32
52  *	Attribute Value - <version>
53  *
54  *	Attribute Name  - IPMP_GROUP_NAME
55  *	Attribute Type  - SE_DATA_TYPE_STRING
56  *	Attribute Value - <group-name>
57  *
58  *	Attribute Name  - IPMP_GROUP_SIGNATURE
59  *	Attribute Type  - SE_DATA_TYPE_UINT64
60  * 	Attribute Value - <group-signature>
61  *
62  *	Attribute Name  - IPMP_GROUP_STATE
63  *	Attribute Type  - SE_DATA_TYPE_UINT32
64  *	Attribute Value - <group-state>
65  */
66 
67 #define	IPMP_EVENT_VERSION	"ipmp_event_version"
68 #define	IPMP_GROUP_NAME		"ipmp_group_name"
69 #define	IPMP_GROUP_SIGNATURE	"ipmp_group_signature"
70 #define	IPMP_GROUP_STATE	"ipmp_group_state"
71 
72 typedef enum {
73 	IPMP_GROUP_OK,		/* at least one interface in group is ok */
74 	IPMP_GROUP_FAILED	/* all interfaces in the group have failed */
75 } ipmp_group_state_t;
76 
77 #define	IPMP_EVENT_CUR_VERSION	1
78 
79 /*
80  * Event type EC_IPMP/ESC_IPMP_GROUP_CHANGE event schema
81  *
82  *	Event Class     - EC_IPMP
83  *	Event Sub-Class - ESC_IPMP_GROUP_CHANGE
84  *	Event Publisher - SUNW:usr:in.mpathd
85  *
86  *	Attribute Name  - IPMP_GROUP_NAME
87  *	Attribute Type  - SE_DATA_TYPE_STRING
88  *	Attribute Value - <group-name>
89  *
90  *	Attribute Name  - IPMP_EVENT_VERSION
91  *	Attribute Type  - SE_DATA_TYPE_UINT32
92  *	Attribute Value - <version>
93  *
94  *	Attribute Name  - IPMP_GROUPLIST_SIGNATURE
95  *	Attribute Type  - SE_DATA_TYPE_UINT64
96  *	Attribute Value - <grouplist-signature>
97  *
98  *	Attribute Name  - IPMP_GROUP_OPERATION
99  *	Attribute Type  - SE_DATA_TYPE_UINT32
100  *	Attribute Value - <group-change-op>
101  */
102 
103 #define	IPMP_GROUPLIST_SIGNATURE	"ipmp_grouplist_signature"
104 #define	IPMP_GROUP_OPERATION		"ipmp_group_operation"
105 
106 typedef enum {
107 	IPMP_GROUP_ADD,		/* a new IPMP group has been created */
108 	IPMP_GROUP_REMOVE	/* an existing IPMP group has been removed */
109 } ipmp_group_op_t;
110 
111 /*
112  * Event type EC_IPMP/ESC_IPMP_GROUP_MEMBER event schema
113  *
114  *	Event Class     - EC_IPMP
115  *	Event Sub-Class - ESC_IPMP_GROUP_MEMBER_CHANGE
116  *	Event Publisher - SUNW:usr:in.mpathd
117  *
118  *	Attribute Name  - IPMP_GROUP_NAME
119  *	Attribute Type  - SE_DATA_TYPE_STRING
120  *	Attribute Value - <group-name>
121  *
122  *	Attribute Name  - IPMP_EVENT_VERSION
123  *	Attribute Type  - SE_DATA_TYPE_UINT32
124  *	Attribute Value - <version>
125  *
126  *	Attribute Name  - IPMP_GROUP_SIGNATURE
127  *	Attribute Type  - SE_DATA_TYPE_UINT64
128  *	Attribute Value - <group-signature>
129  *
130  *	Attribute Name  - IPMP_IF_OPERATION
131  *	Attribute Type  - SE_DATA_TYPE_UINT32
132  *	Attribute Value - <interface-op>
133  *
134  *	Attribute Name  - IPMP_IF_NAME
135  *	Attribute Type  - SE_DATA_TYPE_STRING
136  *	Attribute Value - <if-name>
137  *
138  *	Attribute Name  - IPMP_IF_TYPE
139  *	Attribute Type  - SE_DATA_TYPE_UINT32
140  *	Attribute Value - <if-type>
141  *
142  *	Attribute Name  - IPMP_IF_STATE
143  *	Attribute Type  - SE_DATA_TYPE_UINT32
144  *	Attribute Value - <if-state>
145  */
146 
147 #define	IPMP_IF_OPERATION	"ipmp_if_operation"
148 #define	IPMP_IF_NAME		"ipmp_if_name"
149 #define	IPMP_IF_TYPE		"ipmp_if_type"
150 #define	IPMP_IF_STATE		"ipmp_if_state"
151 
152 typedef enum {
153 	IPMP_IF_ADD,		/* a new interface has joined the group */
154 	IPMP_IF_REMOVE 		/* an existing interface has left the group */
155 } ipmp_if_op_t;
156 
157 typedef enum {
158 	IPMP_IF_STANDBY,	/* the interface is a standby */
159 	IPMP_IF_NORMAL 		/* the interface is not a standby */
160 } ipmp_if_type_t;
161 
162 typedef enum {
163 	IPMP_IF_OK,		/* the interface is functional */
164 	IPMP_IF_FAILED,		/* the interface is in a failed state */
165 	IPMP_IF_OFFLINE,	/* the interface is offline */
166 	IPMP_IF_UNKNOWN		/* the interface may or may not be ok */
167 } ipmp_if_state_t;		/* (not enough probes have been sent) */
168 
169 /*
170  * Event type EC_IPMP/ESC_IPMP_IF_CHANGE event schema
171  *
172  *	Event Class     - EC_IPMP
173  *	Event Sub-Class - ESC_IPMP_IF_CHANGE
174  *	Event Publisher - SUNW:usr:in.mpathd
175  *
176  *	Attribute Name  - IPMP_GROUP_NAME
177  *	Attribute Type  - SE_DATA_TYPE_STRING
178  *	Attribute Value - <group-name>
179  *
180  *	Attribute Name  - IPMP_EVENT_VERSION
181  *	Attribute Type  - SE_DATA_TYPE_UINT32
182  *	Attribute Value - <version>
183  *
184  *	Attribute Name  - IPMP_GROUP_SIGNATURE
185  *	Attribute Type  - SE_DATA_TYPE_UINT64
186  *	Attribute Value - <group-signature>
187  *
188  *	Attribute Name  - IPMP_IF_NAME
189  *	Attribute Type  - SE_DATA_TYPE_STRING
190  *	Attribute Value - <if-name>
191  *
192  *	Attribute Name  - IPMP_IF_STATE
193  *	Attribute Type  - SE_DATA_TYPE_UINT32
194  *	Attribute Value - <if-state>
195  *
196  *	Attribute Name  - IPMP_IF_TYPE
197  *	Attribute Type  - SE_DATA_TYPE_UINT32
198  *	Attribute Value - <if-type>
199  */
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif /* _SYS_SYSEVENT_IPMP_H */
206