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*c2ed7380Syd196099 * Common Development and Distribution License (the "License"). 6*c2ed7380Syd196099 * 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*c2ed7380Syd196099 * Copyright 2007 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_DR_H 277c478bd9Sstevel@tonic-gate #define _SYS_SYSEVENT_DR_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #ifdef __cplusplus 307c478bd9Sstevel@tonic-gate extern "C" { 317c478bd9Sstevel@tonic-gate #endif 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate /* 347c478bd9Sstevel@tonic-gate * dr.h contains the publicly defined sysevent attribute names and values 357c478bd9Sstevel@tonic-gate * for all DR type sysevents. Additions/removals/changes are subject to 367c478bd9Sstevel@tonic-gate * PSARC approval. 377c478bd9Sstevel@tonic-gate */ 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate /* 407c478bd9Sstevel@tonic-gate * Event type EC_DR/ESC_DR_AP_STATE_CHANGE event schema 417c478bd9Sstevel@tonic-gate * Event Class - EC_DR 427c478bd9Sstevel@tonic-gate * Event Sub-Class - ESC_DR_AP_STATE_CHANGE 437c478bd9Sstevel@tonic-gate * Event Publisher - SUNW:kern:[dr_subsystem_name] 447c478bd9Sstevel@tonic-gate * Attribute Name - DR_AP_ID 457c478bd9Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 467c478bd9Sstevel@tonic-gate * Attribute Value - [Attachment Point Identifier] 477c478bd9Sstevel@tonic-gate * Attribute Name - DR_HINT 487c478bd9Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 497c478bd9Sstevel@tonic-gate * Attribute Value - DR_RESERVED_ATTR | DR_HINT_INSERT | DR_HINT_REMOVE 507c478bd9Sstevel@tonic-gate */ 517c478bd9Sstevel@tonic-gate #define DR_AP_ID "dr_ap_id" /* Attachment point id */ 527c478bd9Sstevel@tonic-gate #define DR_HINT "dr_hint" /* Operation hint */ 537c478bd9Sstevel@tonic-gate #define DR_HINT_INSERT "dr_insert" /* Insert hint */ 547c478bd9Sstevel@tonic-gate #define DR_HINT_REMOVE "dr_remove" /* Remove hint */ 557c478bd9Sstevel@tonic-gate #define DR_RESERVED_ATTR "" 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate /* 587c478bd9Sstevel@tonic-gate * Useful macros for insert/remove event. 597c478bd9Sstevel@tonic-gate */ 607c478bd9Sstevel@tonic-gate #define SE_NO_HINT 0x0 617c478bd9Sstevel@tonic-gate #define SE_HINT_INSERT 0x1 627c478bd9Sstevel@tonic-gate #define SE_HINT_REMOVE 0x2 637c478bd9Sstevel@tonic-gate #define SE_HINT2STR(h) ((h) == SE_HINT_INSERT ? DR_HINT_INSERT : \ 647c478bd9Sstevel@tonic-gate (h) == SE_HINT_REMOVE ? DR_HINT_REMOVE : \ 657c478bd9Sstevel@tonic-gate DR_RESERVED_ATTR) 667c478bd9Sstevel@tonic-gate /* 677c478bd9Sstevel@tonic-gate * Event type EC_DR/ESC_DR_REQ event schema 687c478bd9Sstevel@tonic-gate * Event Class - EC_DR 697c478bd9Sstevel@tonic-gate * Event Sub-Class - ESC_DR_REQ 707c478bd9Sstevel@tonic-gate * Event Publisher - SUNW:kern:[dr_subsystem_name] 717c478bd9Sstevel@tonic-gate * Attribute Name - DR_AP_ID 727c478bd9Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 737c478bd9Sstevel@tonic-gate * Attribute Value - [Attachment Point Name] 747c478bd9Sstevel@tonic-gate * Attribute Name - DR_REQ_TYPE 757c478bd9Sstevel@tonic-gate * Attribute Type - SE_DATA_TYPE_STRING 767c478bd9Sstevel@tonic-gate * Attribute Value - DR_RESERVED_ATTR | DR_REQ_INCOMING_RES | 777c478bd9Sstevel@tonic-gate * DR_REQ_OUTGOING_RES | DR_REQ_INVESTIGATE_RES 787c478bd9Sstevel@tonic-gate */ 797c478bd9Sstevel@tonic-gate #define DR_REQ_TYPE "dr_request_type" /* User request type */ 807c478bd9Sstevel@tonic-gate #define DR_REQ_INCOMING_RES "dr_request_incoming_resource" 817c478bd9Sstevel@tonic-gate #define DR_REQ_OUTGOING_RES "dr_request_outgoing_resource" 827c478bd9Sstevel@tonic-gate #define DR_REQ_INVESTIGATE_RES "dr_request_investigate_resource" 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate #define SE_INVESTIGATE_RES 0x0 857c478bd9Sstevel@tonic-gate #define SE_INCOMING_RES 0x1 867c478bd9Sstevel@tonic-gate #define SE_OUTGOING_RES 0x2 877c478bd9Sstevel@tonic-gate #define SE_REQ2STR(h) ((h) == SE_INCOMING_RES ? \ 887c478bd9Sstevel@tonic-gate DR_REQ_INCOMING_RES : \ 897c478bd9Sstevel@tonic-gate (h) == SE_OUTGOING_RES ? \ 907c478bd9Sstevel@tonic-gate DR_REQ_OUTGOING_RES : \ 917c478bd9Sstevel@tonic-gate DR_REQ_INVESTIGATE_RES) 92*c2ed7380Syd196099 /* 93*c2ed7380Syd196099 * Event Class - EC_DR 94*c2ed7380Syd196099 * Event Sub-Class - ESC_DR_TARGET_STATE_CHANGE 95*c2ed7380Syd196099 * Event Publisher - SUNW:kern:<driver-name> 96*c2ed7380Syd196099 * Attribute Name - DR_TARGET_ID 97*c2ed7380Syd196099 * Attribute Type - [SE_DATA_TYPE_STRING] 98*c2ed7380Syd196099 * Attribute Value - </physical_path_to_hba:target> 99*c2ed7380Syd196099 * Attribute Name - DR_HINT 100*c2ed7380Syd196099 * Attribute Type - [SE_DATA_TYPE_STRING] 101*c2ed7380Syd196099 * Attribute Value - DR_RESERVED_ATTR | DR_HINT_INSERT | DR_HINT_REMOVE 102*c2ed7380Syd196099 */ 103*c2ed7380Syd196099 #define DR_TARGET_ID "dr_target_id" 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1067c478bd9Sstevel@tonic-gate } 1077c478bd9Sstevel@tonic-gate #endif 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_DR_H */ 110