xref: /illumos-gate/usr/src/uts/common/sys/sysevent/ipmp.h (revision e11c3f44f531fdff80941ce57c065d2ae861cefc)
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
5*e11c3f44Smeem  * Common Development and Distribution License (the "License").
6*e11c3f44Smeem  * 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  */
217c478bd9Sstevel@tonic-gate /*
22*e11c3f44Smeem  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef _SYS_SYSEVENT_IPMP_H
277c478bd9Sstevel@tonic-gate #define	_SYS_SYSEVENT_IPMP_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate /*
307c478bd9Sstevel@tonic-gate  * IPMP sysevent definitions.  Note that all of these definitions are
317c478bd9Sstevel@tonic-gate  * Sun-private and are subject to change at any time.
327c478bd9Sstevel@tonic-gate  */
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #ifdef __cplusplus
357c478bd9Sstevel@tonic-gate extern "C" {
367c478bd9Sstevel@tonic-gate #endif
377c478bd9Sstevel@tonic-gate 
38*e11c3f44Smeem /*
39*e11c3f44Smeem  * Event channel associated with these events
40*e11c3f44Smeem  */
41*e11c3f44Smeem #define	IPMP_EVENT_CHAN "com.sun:ipmp:events"
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate /*
447c478bd9Sstevel@tonic-gate  * Event type EC_IPMP/ESC_IPMP_GROUP_STATE event schema
457c478bd9Sstevel@tonic-gate  *
467c478bd9Sstevel@tonic-gate  *	Event Class     - EC_IPMP
477c478bd9Sstevel@tonic-gate  *	Event Sub-Class - ESC_IPMP_GROUP_STATE
48*e11c3f44Smeem  *	Event Vendor	- com.sun
49*e11c3f44Smeem  *	Event Publisher - in.mpathd
507c478bd9Sstevel@tonic-gate  *
517c478bd9Sstevel@tonic-gate  * 	Attribute Name  - IPMP_EVENT_VERSION
527c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
537c478bd9Sstevel@tonic-gate  *	Attribute Value - <version>
547c478bd9Sstevel@tonic-gate  *
557c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_NAME
567c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
577c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-name>
587c478bd9Sstevel@tonic-gate  *
597c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_SIGNATURE
607c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT64
617c478bd9Sstevel@tonic-gate  * 	Attribute Value - <group-signature>
627c478bd9Sstevel@tonic-gate  *
637c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_STATE
647c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
657c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-state>
667c478bd9Sstevel@tonic-gate  */
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate #define	IPMP_EVENT_VERSION	"ipmp_event_version"
697c478bd9Sstevel@tonic-gate #define	IPMP_GROUP_NAME		"ipmp_group_name"
707c478bd9Sstevel@tonic-gate #define	IPMP_GROUP_SIGNATURE	"ipmp_group_signature"
717c478bd9Sstevel@tonic-gate #define	IPMP_GROUP_STATE	"ipmp_group_state"
727c478bd9Sstevel@tonic-gate 
737c478bd9Sstevel@tonic-gate typedef enum {
74*e11c3f44Smeem 	IPMP_GROUP_OK,		/* all interfaces in the group are ok */
75*e11c3f44Smeem 	IPMP_GROUP_FAILED,	/* all interfaces in the group are unusable */
76*e11c3f44Smeem 	IPMP_GROUP_DEGRADED	/* some interfaces in the group are unusable */
777c478bd9Sstevel@tonic-gate } ipmp_group_state_t;
787c478bd9Sstevel@tonic-gate 
79*e11c3f44Smeem #define	IPMP_EVENT_CUR_VERSION	2
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate /*
827c478bd9Sstevel@tonic-gate  * Event type EC_IPMP/ESC_IPMP_GROUP_CHANGE event schema
837c478bd9Sstevel@tonic-gate  *
847c478bd9Sstevel@tonic-gate  *	Event Class     - EC_IPMP
857c478bd9Sstevel@tonic-gate  *	Event Sub-Class - ESC_IPMP_GROUP_CHANGE
86*e11c3f44Smeem  *	Event Vendor	- com.sun
87*e11c3f44Smeem  *	Event Publisher - in.mpathd
887c478bd9Sstevel@tonic-gate  *
897c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_NAME
907c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
917c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-name>
927c478bd9Sstevel@tonic-gate  *
937c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_EVENT_VERSION
947c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
957c478bd9Sstevel@tonic-gate  *	Attribute Value - <version>
967c478bd9Sstevel@tonic-gate  *
977c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUPLIST_SIGNATURE
987c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT64
997c478bd9Sstevel@tonic-gate  *	Attribute Value - <grouplist-signature>
1007c478bd9Sstevel@tonic-gate  *
1017c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_OPERATION
1027c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
1037c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-change-op>
1047c478bd9Sstevel@tonic-gate  */
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate #define	IPMP_GROUPLIST_SIGNATURE	"ipmp_grouplist_signature"
1077c478bd9Sstevel@tonic-gate #define	IPMP_GROUP_OPERATION		"ipmp_group_operation"
1087c478bd9Sstevel@tonic-gate 
1097c478bd9Sstevel@tonic-gate typedef enum {
1107c478bd9Sstevel@tonic-gate 	IPMP_GROUP_ADD,		/* a new IPMP group has been created */
1117c478bd9Sstevel@tonic-gate 	IPMP_GROUP_REMOVE	/* an existing IPMP group has been removed */
1127c478bd9Sstevel@tonic-gate } ipmp_group_op_t;
1137c478bd9Sstevel@tonic-gate 
1147c478bd9Sstevel@tonic-gate /*
1157c478bd9Sstevel@tonic-gate  * Event type EC_IPMP/ESC_IPMP_GROUP_MEMBER event schema
1167c478bd9Sstevel@tonic-gate  *
1177c478bd9Sstevel@tonic-gate  *	Event Class     - EC_IPMP
1187c478bd9Sstevel@tonic-gate  *	Event Sub-Class - ESC_IPMP_GROUP_MEMBER_CHANGE
119*e11c3f44Smeem  *	Event Vendor	- com.sun
120*e11c3f44Smeem  *	Event Publisher - in.mpathd
1217c478bd9Sstevel@tonic-gate  *
1227c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_NAME
1237c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
1247c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-name>
1257c478bd9Sstevel@tonic-gate  *
1267c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_EVENT_VERSION
1277c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
1287c478bd9Sstevel@tonic-gate  *	Attribute Value - <version>
1297c478bd9Sstevel@tonic-gate  *
1307c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_SIGNATURE
1317c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT64
1327c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-signature>
1337c478bd9Sstevel@tonic-gate  *
1347c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_IF_OPERATION
1357c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
1367c478bd9Sstevel@tonic-gate  *	Attribute Value - <interface-op>
1377c478bd9Sstevel@tonic-gate  *
1387c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_IF_NAME
1397c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
1407c478bd9Sstevel@tonic-gate  *	Attribute Value - <if-name>
1417c478bd9Sstevel@tonic-gate  *
1427c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_IF_TYPE
1437c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
1447c478bd9Sstevel@tonic-gate  *	Attribute Value - <if-type>
1457c478bd9Sstevel@tonic-gate  *
1467c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_IF_STATE
1477c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
1487c478bd9Sstevel@tonic-gate  *	Attribute Value - <if-state>
1497c478bd9Sstevel@tonic-gate  */
1507c478bd9Sstevel@tonic-gate 
1517c478bd9Sstevel@tonic-gate #define	IPMP_IF_OPERATION	"ipmp_if_operation"
1527c478bd9Sstevel@tonic-gate #define	IPMP_IF_NAME		"ipmp_if_name"
1537c478bd9Sstevel@tonic-gate #define	IPMP_IF_TYPE		"ipmp_if_type"
1547c478bd9Sstevel@tonic-gate #define	IPMP_IF_STATE		"ipmp_if_state"
1557c478bd9Sstevel@tonic-gate 
1567c478bd9Sstevel@tonic-gate typedef enum {
1577c478bd9Sstevel@tonic-gate 	IPMP_IF_ADD,		/* a new interface has joined the group */
1587c478bd9Sstevel@tonic-gate 	IPMP_IF_REMOVE 		/* an existing interface has left the group */
1597c478bd9Sstevel@tonic-gate } ipmp_if_op_t;
1607c478bd9Sstevel@tonic-gate 
1617c478bd9Sstevel@tonic-gate typedef enum {
1627c478bd9Sstevel@tonic-gate 	IPMP_IF_STANDBY,	/* the interface is a standby */
1637c478bd9Sstevel@tonic-gate 	IPMP_IF_NORMAL 		/* the interface is not a standby */
1647c478bd9Sstevel@tonic-gate } ipmp_if_type_t;
1657c478bd9Sstevel@tonic-gate 
1667c478bd9Sstevel@tonic-gate typedef enum {
1677c478bd9Sstevel@tonic-gate 	IPMP_IF_OK,		/* the interface is functional */
1687c478bd9Sstevel@tonic-gate 	IPMP_IF_FAILED,		/* the interface is in a failed state */
1697c478bd9Sstevel@tonic-gate 	IPMP_IF_OFFLINE,	/* the interface is offline */
1707c478bd9Sstevel@tonic-gate 	IPMP_IF_UNKNOWN		/* the interface may or may not be ok */
1717c478bd9Sstevel@tonic-gate } ipmp_if_state_t;		/* (not enough probes have been sent) */
1727c478bd9Sstevel@tonic-gate 
1737c478bd9Sstevel@tonic-gate /*
1747c478bd9Sstevel@tonic-gate  * Event type EC_IPMP/ESC_IPMP_IF_CHANGE event schema
1757c478bd9Sstevel@tonic-gate  *
1767c478bd9Sstevel@tonic-gate  *	Event Class     - EC_IPMP
1777c478bd9Sstevel@tonic-gate  *	Event Sub-Class - ESC_IPMP_IF_CHANGE
178*e11c3f44Smeem  *	Event Vendor	- com.sun
179*e11c3f44Smeem  *	Event Publisher - in.mpathd
1807c478bd9Sstevel@tonic-gate  *
1817c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_NAME
1827c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
1837c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-name>
1847c478bd9Sstevel@tonic-gate  *
1857c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_EVENT_VERSION
1867c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
1877c478bd9Sstevel@tonic-gate  *	Attribute Value - <version>
1887c478bd9Sstevel@tonic-gate  *
1897c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_GROUP_SIGNATURE
1907c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT64
1917c478bd9Sstevel@tonic-gate  *	Attribute Value - <group-signature>
1927c478bd9Sstevel@tonic-gate  *
1937c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_IF_NAME
1947c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
1957c478bd9Sstevel@tonic-gate  *	Attribute Value - <if-name>
1967c478bd9Sstevel@tonic-gate  *
1977c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_IF_STATE
1987c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
1997c478bd9Sstevel@tonic-gate  *	Attribute Value - <if-state>
2007c478bd9Sstevel@tonic-gate  *
2017c478bd9Sstevel@tonic-gate  *	Attribute Name  - IPMP_IF_TYPE
2027c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_UINT32
2037c478bd9Sstevel@tonic-gate  *	Attribute Value - <if-type>
2047c478bd9Sstevel@tonic-gate  */
2057c478bd9Sstevel@tonic-gate 
206*e11c3f44Smeem #define	IPMP_PROBE_ID			"ipmp_probe_id"
207*e11c3f44Smeem #define	IPMP_PROBE_STATE		"ipmp_probe_state"
208*e11c3f44Smeem #define	IPMP_PROBE_START_TIME		"ipmp_probe_start_time"
209*e11c3f44Smeem #define	IPMP_PROBE_SENT_TIME		"ipmp_probe_sent_time"
210*e11c3f44Smeem #define	IPMP_PROBE_ACKRECV_TIME		"ipmp_probe_ackrecv_time"
211*e11c3f44Smeem #define	IPMP_PROBE_ACKPROC_TIME		"ipmp_probe_ackproc_time"
212*e11c3f44Smeem #define	IPMP_PROBE_TARGET		"ipmp_probe_target"
213*e11c3f44Smeem #define	IPMP_PROBE_TARGET_RTTAVG	"ipmp_probe_target_rttavg"
214*e11c3f44Smeem #define	IPMP_PROBE_TARGET_RTTDEV	"ipmp_probe_target_rttdev"
215*e11c3f44Smeem 
216*e11c3f44Smeem typedef enum {
217*e11c3f44Smeem 	IPMP_PROBE_SENT,	/* the probe has been sent */
218*e11c3f44Smeem 	IPMP_PROBE_ACKED,	/* the probe has been acked */
219*e11c3f44Smeem 	IPMP_PROBE_LOST		/* the probe has been lost */
220*e11c3f44Smeem } ipmp_probe_state_t;
221*e11c3f44Smeem 
222*e11c3f44Smeem /*
223*e11c3f44Smeem  * Event type EC_IPMP/ESC_IPMP_PROBE_STATE event schema
224*e11c3f44Smeem  *
225*e11c3f44Smeem  *	Event Class     - EC_IPMP
226*e11c3f44Smeem  *	Event Sub-Class - ESC_IPMP_PROBE_STATE
227*e11c3f44Smeem  *	Event Vendor	- com.sun
228*e11c3f44Smeem  *	Event Publisher - in.mpathd
229*e11c3f44Smeem  *
230*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_ID
231*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_UINT32
232*e11c3f44Smeem  *	Attribute Value - <probe-id>
233*e11c3f44Smeem  *
234*e11c3f44Smeem  *	Attribute Name  - IPMP_EVENT_VERSION
235*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_UINT32
236*e11c3f44Smeem  *	Attribute Value - <version>
237*e11c3f44Smeem  *
238*e11c3f44Smeem  *	Attribute Name  - IPMP_IF_NAME
239*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_STRING
240*e11c3f44Smeem  *	Attribute Value - <if-name>
241*e11c3f44Smeem  *
242*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_STATE
243*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_UINT32
244*e11c3f44Smeem  *	Attribute Value - <probe-state>
245*e11c3f44Smeem  *
246*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_START_TIME
247*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_TIME
248*e11c3f44Smeem  *	Attribute Value - <probe-start-time>
249*e11c3f44Smeem  *
250*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_SENT_TIME
251*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_TIME
252*e11c3f44Smeem  *	Attribute Value - <probe-sent-time>
253*e11c3f44Smeem  *
254*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_ACKRECV_TIME
255*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_TIME
256*e11c3f44Smeem  *	Attribute Value - <probe-ackrecv-time>
257*e11c3f44Smeem  *
258*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_ACKPROC_TIME
259*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_TIME
260*e11c3f44Smeem  *	Attribute Value - <probe-ackproc-time>
261*e11c3f44Smeem  *
262*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_TARGET
263*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_BYTES
264*e11c3f44Smeem  *	Attribute Value - <probe-target-ip>
265*e11c3f44Smeem  *
266*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_TARGET_RTTAVG
267*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_UINT32
268*e11c3f44Smeem  *	Attribute Value - <probe-target-rttavg>
269*e11c3f44Smeem  *
270*e11c3f44Smeem  *	Attribute Name  - IPMP_PROBE_TARGET_RTTDEV
271*e11c3f44Smeem  *	Attribute Type  - SE_DATA_TYPE_UINT32
272*e11c3f44Smeem  *	Attribute Value - <probe-target-rttdev>
273*e11c3f44Smeem  */
274*e11c3f44Smeem 
2757c478bd9Sstevel@tonic-gate #ifdef __cplusplus
2767c478bd9Sstevel@tonic-gate }
2777c478bd9Sstevel@tonic-gate #endif
2787c478bd9Sstevel@tonic-gate 
2797c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_IPMP_H */
280