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*4724Syd196099 * Common Development and Distribution License (the "License"). 6*4724Syd196099 * 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*4724Syd196099 * Copyright 2007 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_DR_H 270Sstevel@tonic-gate #define _SYS_SYSEVENT_DR_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 300Sstevel@tonic-gate 310Sstevel@tonic-gate #ifdef __cplusplus 320Sstevel@tonic-gate extern "C" { 330Sstevel@tonic-gate #endif 340Sstevel@tonic-gate 350Sstevel@tonic-gate /* 360Sstevel@tonic-gate * dr.h contains the publicly defined sysevent attribute names and values 370Sstevel@tonic-gate * for all DR type sysevents. Additions/removals/changes are subject to 380Sstevel@tonic-gate * PSARC approval. 390Sstevel@tonic-gate */ 400Sstevel@tonic-gate 410Sstevel@tonic-gate /* 420Sstevel@tonic-gate * Event type EC_DR/ESC_DR_AP_STATE_CHANGE event schema 430Sstevel@tonic-gate * Event Class - EC_DR 440Sstevel@tonic-gate * Event Sub-Class - ESC_DR_AP_STATE_CHANGE 450Sstevel@tonic-gate * Event Publisher - SUNW:kern:[dr_subsystem_name] 460Sstevel@tonic-gate * Attribute Name - DR_AP_ID 470Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 480Sstevel@tonic-gate * Attribute Value - [Attachment Point Identifier] 490Sstevel@tonic-gate * Attribute Name - DR_HINT 500Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 510Sstevel@tonic-gate * Attribute Value - DR_RESERVED_ATTR | DR_HINT_INSERT | DR_HINT_REMOVE 520Sstevel@tonic-gate */ 530Sstevel@tonic-gate #define DR_AP_ID "dr_ap_id" /* Attachment point id */ 540Sstevel@tonic-gate #define DR_HINT "dr_hint" /* Operation hint */ 550Sstevel@tonic-gate #define DR_HINT_INSERT "dr_insert" /* Insert hint */ 560Sstevel@tonic-gate #define DR_HINT_REMOVE "dr_remove" /* Remove hint */ 570Sstevel@tonic-gate #define DR_RESERVED_ATTR "" 580Sstevel@tonic-gate 590Sstevel@tonic-gate /* 600Sstevel@tonic-gate * Useful macros for insert/remove event. 610Sstevel@tonic-gate */ 620Sstevel@tonic-gate #define SE_NO_HINT 0x0 630Sstevel@tonic-gate #define SE_HINT_INSERT 0x1 640Sstevel@tonic-gate #define SE_HINT_REMOVE 0x2 650Sstevel@tonic-gate #define SE_HINT2STR(h) ((h) == SE_HINT_INSERT ? DR_HINT_INSERT : \ 660Sstevel@tonic-gate (h) == SE_HINT_REMOVE ? DR_HINT_REMOVE : \ 670Sstevel@tonic-gate DR_RESERVED_ATTR) 680Sstevel@tonic-gate /* 690Sstevel@tonic-gate * Event type EC_DR/ESC_DR_REQ event schema 700Sstevel@tonic-gate * Event Class - EC_DR 710Sstevel@tonic-gate * Event Sub-Class - ESC_DR_REQ 720Sstevel@tonic-gate * Event Publisher - SUNW:kern:[dr_subsystem_name] 730Sstevel@tonic-gate * Attribute Name - DR_AP_ID 740Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 750Sstevel@tonic-gate * Attribute Value - [Attachment Point Name] 760Sstevel@tonic-gate * Attribute Name - DR_REQ_TYPE 770Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 780Sstevel@tonic-gate * Attribute Value - DR_RESERVED_ATTR | DR_REQ_INCOMING_RES | 790Sstevel@tonic-gate * DR_REQ_OUTGOING_RES | DR_REQ_INVESTIGATE_RES 800Sstevel@tonic-gate */ 810Sstevel@tonic-gate #define DR_REQ_TYPE "dr_request_type" /* User request type */ 820Sstevel@tonic-gate #define DR_REQ_INCOMING_RES "dr_request_incoming_resource" 830Sstevel@tonic-gate #define DR_REQ_OUTGOING_RES "dr_request_outgoing_resource" 840Sstevel@tonic-gate #define DR_REQ_INVESTIGATE_RES "dr_request_investigate_resource" 850Sstevel@tonic-gate 860Sstevel@tonic-gate #define SE_INVESTIGATE_RES 0x0 870Sstevel@tonic-gate #define SE_INCOMING_RES 0x1 880Sstevel@tonic-gate #define SE_OUTGOING_RES 0x2 890Sstevel@tonic-gate #define SE_REQ2STR(h) ((h) == SE_INCOMING_RES ? \ 900Sstevel@tonic-gate DR_REQ_INCOMING_RES : \ 910Sstevel@tonic-gate (h) == SE_OUTGOING_RES ? \ 920Sstevel@tonic-gate DR_REQ_OUTGOING_RES : \ 930Sstevel@tonic-gate DR_REQ_INVESTIGATE_RES) 94*4724Syd196099 /* 95*4724Syd196099 * Event Class - EC_DR 96*4724Syd196099 * Event Sub-Class - ESC_DR_TARGET_STATE_CHANGE 97*4724Syd196099 * Event Publisher - SUNW:kern:<driver-name> 98*4724Syd196099 * Attribute Name - DR_TARGET_ID 99*4724Syd196099 * Attribute Type - [SE_DATA_TYPE_STRING] 100*4724Syd196099 * Attribute Value - </physical_path_to_hba:target> 101*4724Syd196099 * Attribute Name - DR_HINT 102*4724Syd196099 * Attribute Type - [SE_DATA_TYPE_STRING] 103*4724Syd196099 * Attribute Value - DR_RESERVED_ATTR | DR_HINT_INSERT | DR_HINT_REMOVE 104*4724Syd196099 */ 105*4724Syd196099 #define DR_TARGET_ID "dr_target_id" 1060Sstevel@tonic-gate 1070Sstevel@tonic-gate #ifdef __cplusplus 1080Sstevel@tonic-gate } 1090Sstevel@tonic-gate #endif 1100Sstevel@tonic-gate 1110Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_DR_H */ 112