10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*8485SPeter.Memishian@Sun.COM * Common Development and Distribution License (the "License"). 6*8485SPeter.Memishian@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*8485SPeter.Memishian@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_SYSEVENT_IPMP_H 270Sstevel@tonic-gate #define _SYS_SYSEVENT_IPMP_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate /* 300Sstevel@tonic-gate * IPMP sysevent definitions. Note that all of these definitions are 310Sstevel@tonic-gate * Sun-private and are subject to change at any time. 320Sstevel@tonic-gate */ 330Sstevel@tonic-gate 340Sstevel@tonic-gate #ifdef __cplusplus 350Sstevel@tonic-gate extern "C" { 360Sstevel@tonic-gate #endif 370Sstevel@tonic-gate 38*8485SPeter.Memishian@Sun.COM /* 39*8485SPeter.Memishian@Sun.COM * Event channel associated with these events 40*8485SPeter.Memishian@Sun.COM */ 41*8485SPeter.Memishian@Sun.COM #define IPMP_EVENT_CHAN "com.sun:ipmp:events" 420Sstevel@tonic-gate 430Sstevel@tonic-gate /* 440Sstevel@tonic-gate * Event type EC_IPMP/ESC_IPMP_GROUP_STATE event schema 450Sstevel@tonic-gate * 460Sstevel@tonic-gate * Event Class - EC_IPMP 470Sstevel@tonic-gate * Event Sub-Class - ESC_IPMP_GROUP_STATE 48*8485SPeter.Memishian@Sun.COM * Event Vendor - com.sun 49*8485SPeter.Memishian@Sun.COM * Event Publisher - in.mpathd 500Sstevel@tonic-gate * 510Sstevel@tonic-gate * Attribute Name - IPMP_EVENT_VERSION 520Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 530Sstevel@tonic-gate * Attribute Value - <version> 540Sstevel@tonic-gate * 550Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_NAME 560Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 570Sstevel@tonic-gate * Attribute Value - <group-name> 580Sstevel@tonic-gate * 590Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_SIGNATURE 600Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT64 610Sstevel@tonic-gate * Attribute Value - <group-signature> 620Sstevel@tonic-gate * 630Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_STATE 640Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 650Sstevel@tonic-gate * Attribute Value - <group-state> 660Sstevel@tonic-gate */ 670Sstevel@tonic-gate 680Sstevel@tonic-gate #define IPMP_EVENT_VERSION "ipmp_event_version" 690Sstevel@tonic-gate #define IPMP_GROUP_NAME "ipmp_group_name" 700Sstevel@tonic-gate #define IPMP_GROUP_SIGNATURE "ipmp_group_signature" 710Sstevel@tonic-gate #define IPMP_GROUP_STATE "ipmp_group_state" 720Sstevel@tonic-gate 730Sstevel@tonic-gate typedef enum { 74*8485SPeter.Memishian@Sun.COM IPMP_GROUP_OK, /* all interfaces in the group are ok */ 75*8485SPeter.Memishian@Sun.COM IPMP_GROUP_FAILED, /* all interfaces in the group are unusable */ 76*8485SPeter.Memishian@Sun.COM IPMP_GROUP_DEGRADED /* some interfaces in the group are unusable */ 770Sstevel@tonic-gate } ipmp_group_state_t; 780Sstevel@tonic-gate 79*8485SPeter.Memishian@Sun.COM #define IPMP_EVENT_CUR_VERSION 2 800Sstevel@tonic-gate 810Sstevel@tonic-gate /* 820Sstevel@tonic-gate * Event type EC_IPMP/ESC_IPMP_GROUP_CHANGE event schema 830Sstevel@tonic-gate * 840Sstevel@tonic-gate * Event Class - EC_IPMP 850Sstevel@tonic-gate * Event Sub-Class - ESC_IPMP_GROUP_CHANGE 86*8485SPeter.Memishian@Sun.COM * Event Vendor - com.sun 87*8485SPeter.Memishian@Sun.COM * Event Publisher - in.mpathd 880Sstevel@tonic-gate * 890Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_NAME 900Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 910Sstevel@tonic-gate * Attribute Value - <group-name> 920Sstevel@tonic-gate * 930Sstevel@tonic-gate * Attribute Name - IPMP_EVENT_VERSION 940Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 950Sstevel@tonic-gate * Attribute Value - <version> 960Sstevel@tonic-gate * 970Sstevel@tonic-gate * Attribute Name - IPMP_GROUPLIST_SIGNATURE 980Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT64 990Sstevel@tonic-gate * Attribute Value - <grouplist-signature> 1000Sstevel@tonic-gate * 1010Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_OPERATION 1020Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 1030Sstevel@tonic-gate * Attribute Value - <group-change-op> 1040Sstevel@tonic-gate */ 1050Sstevel@tonic-gate 1060Sstevel@tonic-gate #define IPMP_GROUPLIST_SIGNATURE "ipmp_grouplist_signature" 1070Sstevel@tonic-gate #define IPMP_GROUP_OPERATION "ipmp_group_operation" 1080Sstevel@tonic-gate 1090Sstevel@tonic-gate typedef enum { 1100Sstevel@tonic-gate IPMP_GROUP_ADD, /* a new IPMP group has been created */ 1110Sstevel@tonic-gate IPMP_GROUP_REMOVE /* an existing IPMP group has been removed */ 1120Sstevel@tonic-gate } ipmp_group_op_t; 1130Sstevel@tonic-gate 1140Sstevel@tonic-gate /* 1150Sstevel@tonic-gate * Event type EC_IPMP/ESC_IPMP_GROUP_MEMBER event schema 1160Sstevel@tonic-gate * 1170Sstevel@tonic-gate * Event Class - EC_IPMP 1180Sstevel@tonic-gate * Event Sub-Class - ESC_IPMP_GROUP_MEMBER_CHANGE 119*8485SPeter.Memishian@Sun.COM * Event Vendor - com.sun 120*8485SPeter.Memishian@Sun.COM * Event Publisher - in.mpathd 1210Sstevel@tonic-gate * 1220Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_NAME 1230Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 1240Sstevel@tonic-gate * Attribute Value - <group-name> 1250Sstevel@tonic-gate * 1260Sstevel@tonic-gate * Attribute Name - IPMP_EVENT_VERSION 1270Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 1280Sstevel@tonic-gate * Attribute Value - <version> 1290Sstevel@tonic-gate * 1300Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_SIGNATURE 1310Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT64 1320Sstevel@tonic-gate * Attribute Value - <group-signature> 1330Sstevel@tonic-gate * 1340Sstevel@tonic-gate * Attribute Name - IPMP_IF_OPERATION 1350Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 1360Sstevel@tonic-gate * Attribute Value - <interface-op> 1370Sstevel@tonic-gate * 1380Sstevel@tonic-gate * Attribute Name - IPMP_IF_NAME 1390Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 1400Sstevel@tonic-gate * Attribute Value - <if-name> 1410Sstevel@tonic-gate * 1420Sstevel@tonic-gate * Attribute Name - IPMP_IF_TYPE 1430Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 1440Sstevel@tonic-gate * Attribute Value - <if-type> 1450Sstevel@tonic-gate * 1460Sstevel@tonic-gate * Attribute Name - IPMP_IF_STATE 1470Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 1480Sstevel@tonic-gate * Attribute Value - <if-state> 1490Sstevel@tonic-gate */ 1500Sstevel@tonic-gate 1510Sstevel@tonic-gate #define IPMP_IF_OPERATION "ipmp_if_operation" 1520Sstevel@tonic-gate #define IPMP_IF_NAME "ipmp_if_name" 1530Sstevel@tonic-gate #define IPMP_IF_TYPE "ipmp_if_type" 1540Sstevel@tonic-gate #define IPMP_IF_STATE "ipmp_if_state" 1550Sstevel@tonic-gate 1560Sstevel@tonic-gate typedef enum { 1570Sstevel@tonic-gate IPMP_IF_ADD, /* a new interface has joined the group */ 1580Sstevel@tonic-gate IPMP_IF_REMOVE /* an existing interface has left the group */ 1590Sstevel@tonic-gate } ipmp_if_op_t; 1600Sstevel@tonic-gate 1610Sstevel@tonic-gate typedef enum { 1620Sstevel@tonic-gate IPMP_IF_STANDBY, /* the interface is a standby */ 1630Sstevel@tonic-gate IPMP_IF_NORMAL /* the interface is not a standby */ 1640Sstevel@tonic-gate } ipmp_if_type_t; 1650Sstevel@tonic-gate 1660Sstevel@tonic-gate typedef enum { 1670Sstevel@tonic-gate IPMP_IF_OK, /* the interface is functional */ 1680Sstevel@tonic-gate IPMP_IF_FAILED, /* the interface is in a failed state */ 1690Sstevel@tonic-gate IPMP_IF_OFFLINE, /* the interface is offline */ 1700Sstevel@tonic-gate IPMP_IF_UNKNOWN /* the interface may or may not be ok */ 1710Sstevel@tonic-gate } ipmp_if_state_t; /* (not enough probes have been sent) */ 1720Sstevel@tonic-gate 1730Sstevel@tonic-gate /* 1740Sstevel@tonic-gate * Event type EC_IPMP/ESC_IPMP_IF_CHANGE event schema 1750Sstevel@tonic-gate * 1760Sstevel@tonic-gate * Event Class - EC_IPMP 1770Sstevel@tonic-gate * Event Sub-Class - ESC_IPMP_IF_CHANGE 178*8485SPeter.Memishian@Sun.COM * Event Vendor - com.sun 179*8485SPeter.Memishian@Sun.COM * Event Publisher - in.mpathd 1800Sstevel@tonic-gate * 1810Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_NAME 1820Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 1830Sstevel@tonic-gate * Attribute Value - <group-name> 1840Sstevel@tonic-gate * 1850Sstevel@tonic-gate * Attribute Name - IPMP_EVENT_VERSION 1860Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 1870Sstevel@tonic-gate * Attribute Value - <version> 1880Sstevel@tonic-gate * 1890Sstevel@tonic-gate * Attribute Name - IPMP_GROUP_SIGNATURE 1900Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT64 1910Sstevel@tonic-gate * Attribute Value - <group-signature> 1920Sstevel@tonic-gate * 1930Sstevel@tonic-gate * Attribute Name - IPMP_IF_NAME 1940Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 1950Sstevel@tonic-gate * Attribute Value - <if-name> 1960Sstevel@tonic-gate * 1970Sstevel@tonic-gate * Attribute Name - IPMP_IF_STATE 1980Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 1990Sstevel@tonic-gate * Attribute Value - <if-state> 2000Sstevel@tonic-gate * 2010Sstevel@tonic-gate * Attribute Name - IPMP_IF_TYPE 2020Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_UINT32 2030Sstevel@tonic-gate * Attribute Value - <if-type> 2040Sstevel@tonic-gate */ 2050Sstevel@tonic-gate 206*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_ID "ipmp_probe_id" 207*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_STATE "ipmp_probe_state" 208*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_START_TIME "ipmp_probe_start_time" 209*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_SENT_TIME "ipmp_probe_sent_time" 210*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_ACKRECV_TIME "ipmp_probe_ackrecv_time" 211*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_ACKPROC_TIME "ipmp_probe_ackproc_time" 212*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_TARGET "ipmp_probe_target" 213*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_TARGET_RTTAVG "ipmp_probe_target_rttavg" 214*8485SPeter.Memishian@Sun.COM #define IPMP_PROBE_TARGET_RTTDEV "ipmp_probe_target_rttdev" 215*8485SPeter.Memishian@Sun.COM 216*8485SPeter.Memishian@Sun.COM typedef enum { 217*8485SPeter.Memishian@Sun.COM IPMP_PROBE_SENT, /* the probe has been sent */ 218*8485SPeter.Memishian@Sun.COM IPMP_PROBE_ACKED, /* the probe has been acked */ 219*8485SPeter.Memishian@Sun.COM IPMP_PROBE_LOST /* the probe has been lost */ 220*8485SPeter.Memishian@Sun.COM } ipmp_probe_state_t; 221*8485SPeter.Memishian@Sun.COM 222*8485SPeter.Memishian@Sun.COM /* 223*8485SPeter.Memishian@Sun.COM * Event type EC_IPMP/ESC_IPMP_PROBE_STATE event schema 224*8485SPeter.Memishian@Sun.COM * 225*8485SPeter.Memishian@Sun.COM * Event Class - EC_IPMP 226*8485SPeter.Memishian@Sun.COM * Event Sub-Class - ESC_IPMP_PROBE_STATE 227*8485SPeter.Memishian@Sun.COM * Event Vendor - com.sun 228*8485SPeter.Memishian@Sun.COM * Event Publisher - in.mpathd 229*8485SPeter.Memishian@Sun.COM * 230*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_ID 231*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_UINT32 232*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-id> 233*8485SPeter.Memishian@Sun.COM * 234*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_EVENT_VERSION 235*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_UINT32 236*8485SPeter.Memishian@Sun.COM * Attribute Value - <version> 237*8485SPeter.Memishian@Sun.COM * 238*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_IF_NAME 239*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_STRING 240*8485SPeter.Memishian@Sun.COM * Attribute Value - <if-name> 241*8485SPeter.Memishian@Sun.COM * 242*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_STATE 243*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_UINT32 244*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-state> 245*8485SPeter.Memishian@Sun.COM * 246*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_START_TIME 247*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_TIME 248*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-start-time> 249*8485SPeter.Memishian@Sun.COM * 250*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_SENT_TIME 251*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_TIME 252*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-sent-time> 253*8485SPeter.Memishian@Sun.COM * 254*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_ACKRECV_TIME 255*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_TIME 256*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-ackrecv-time> 257*8485SPeter.Memishian@Sun.COM * 258*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_ACKPROC_TIME 259*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_TIME 260*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-ackproc-time> 261*8485SPeter.Memishian@Sun.COM * 262*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_TARGET 263*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_BYTES 264*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-target-ip> 265*8485SPeter.Memishian@Sun.COM * 266*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_TARGET_RTTAVG 267*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_UINT32 268*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-target-rttavg> 269*8485SPeter.Memishian@Sun.COM * 270*8485SPeter.Memishian@Sun.COM * Attribute Name - IPMP_PROBE_TARGET_RTTDEV 271*8485SPeter.Memishian@Sun.COM * Attribute Type - SE_DATA_TYPE_UINT32 272*8485SPeter.Memishian@Sun.COM * Attribute Value - <probe-target-rttdev> 273*8485SPeter.Memishian@Sun.COM */ 274*8485SPeter.Memishian@Sun.COM 2750Sstevel@tonic-gate #ifdef __cplusplus 2760Sstevel@tonic-gate } 2770Sstevel@tonic-gate #endif 2780Sstevel@tonic-gate 2790Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_IPMP_H */ 280