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*db11e6feSjacobs * Common Development and Distribution License (the "License"). 6*db11e6feSjacobs * 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*db11e6feSjacobs * Copyright 2006 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_DEV_H 277c478bd9Sstevel@tonic-gate #define _SYS_SYSEVENT_DEV_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #include <sys/sysevent/eventdefs.h> 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #ifdef __cplusplus 327c478bd9Sstevel@tonic-gate extern "C" { 337c478bd9Sstevel@tonic-gate #endif 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate /* 367c478bd9Sstevel@tonic-gate * Event schema for EC_DEV_ADD/ESC_DISK 377c478bd9Sstevel@tonic-gate * 387c478bd9Sstevel@tonic-gate * Event Class - EC_DEV_ADD 397c478bd9Sstevel@tonic-gate * Event Sub-Class - ESC_DISK 407c478bd9Sstevel@tonic-gate * 417c478bd9Sstevel@tonic-gate * Attribute Name - EV_VERSION 427c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 437c478bd9Sstevel@tonic-gate * Attribute Value - event version number 447c478bd9Sstevel@tonic-gate * 457c478bd9Sstevel@tonic-gate * Attribute Name - DEV_NAME 467c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 477c478bd9Sstevel@tonic-gate * Attribute Value - /dev name to the raw device. 487c478bd9Sstevel@tonic-gate * The name does not include the slice number component. 497c478bd9Sstevel@tonic-gate * 507c478bd9Sstevel@tonic-gate * Attribute Name - DEV_PHYS_PATH 517c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 527c478bd9Sstevel@tonic-gate * Attribute Value - physical path of the device without the "/devices" 537c478bd9Sstevel@tonic-gate * prefix. 547c478bd9Sstevel@tonic-gate * 557c478bd9Sstevel@tonic-gate * Attribute Name - DEV_DRIVER_NAME 567c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 577c478bd9Sstevel@tonic-gate * Attribute Value - driver name 587c478bd9Sstevel@tonic-gate * 597c478bd9Sstevel@tonic-gate * Attribute Name - DEV_INSTANCE 607c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 617c478bd9Sstevel@tonic-gate * Attribute Value - driver instance number 627c478bd9Sstevel@tonic-gate * 637c478bd9Sstevel@tonic-gate * Attribute Name - DEV_PROP_PREFIX<devinfo_node_property> 647c478bd9Sstevel@tonic-gate * Attribute Type - data type of the devinfo_node_property 657c478bd9Sstevel@tonic-gate * Attribute Value - value of the devinfo_node_property 667c478bd9Sstevel@tonic-gate * 677c478bd9Sstevel@tonic-gate * 687c478bd9Sstevel@tonic-gate * Event schema for EC_DEV_ADD/ESC_NETWORK 697c478bd9Sstevel@tonic-gate * 707c478bd9Sstevel@tonic-gate * Event Class - EC_DEV_ADD 717c478bd9Sstevel@tonic-gate * Event Sub-Class - ESC_NETWORK 727c478bd9Sstevel@tonic-gate * 737c478bd9Sstevel@tonic-gate * Attribute Name - EV_VERSION 747c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 757c478bd9Sstevel@tonic-gate * Attribute Value - event version number 767c478bd9Sstevel@tonic-gate * 777c478bd9Sstevel@tonic-gate * Attribute Name - DEV_NAME 787c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 797c478bd9Sstevel@tonic-gate * Attribute Value - /dev name associated with the device if exists. 807c478bd9Sstevel@tonic-gate * /dev name associated with the driver for DLPI 817c478bd9Sstevel@tonic-gate * Style-2 only drivers. 827c478bd9Sstevel@tonic-gate * 837c478bd9Sstevel@tonic-gate * Attribute Name - DEV_PHYS_PATH 847c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 857c478bd9Sstevel@tonic-gate * Attribute Value - physical path of the device without the "/devices" 867c478bd9Sstevel@tonic-gate * prefix. 877c478bd9Sstevel@tonic-gate * 887c478bd9Sstevel@tonic-gate * Attribute Name - DEV_DRIVER_NAME 897c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 907c478bd9Sstevel@tonic-gate * Attribute Value - driver name 917c478bd9Sstevel@tonic-gate * 927c478bd9Sstevel@tonic-gate * Attribute Name - DEV_INSTANCE 937c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 947c478bd9Sstevel@tonic-gate * Attribute Value - driver instance number 957c478bd9Sstevel@tonic-gate * 967c478bd9Sstevel@tonic-gate * Attribute Name - DEV_PROP_PREFIX<devinfo_node_property> 977c478bd9Sstevel@tonic-gate * Attribute Type - data type of the devinfo_node_property 987c478bd9Sstevel@tonic-gate * Attribute Value - value of the devinfo_node_property 997c478bd9Sstevel@tonic-gate * 1007c478bd9Sstevel@tonic-gate * 101*db11e6feSjacobs * Event schema for EC_DEV_ADD/ESC_PRINTER 102*db11e6feSjacobs * 103*db11e6feSjacobs * Event Class - EC_DEV_ADD 104*db11e6feSjacobs * Event Sub-Class - ESC_PRINTER 105*db11e6feSjacobs * 106*db11e6feSjacobs * Attribute Name - EV_VERSION 107*db11e6feSjacobs * Attribute Type - DATA_TYPE_INT32 108*db11e6feSjacobs * Attribute Value - event version number 109*db11e6feSjacobs * 110*db11e6feSjacobs * Attribute Name - DEV_NAME 111*db11e6feSjacobs * Attribute Type - DATA_TYPE_STRING 112*db11e6feSjacobs * Attribute Value - /dev/printers name associated with the device 113*db11e6feSjacobs * if exists. 114*db11e6feSjacobs * /dev name associated with the device if it exists 115*db11e6feSjacobs * 116*db11e6feSjacobs * Attribute Name - DEV_PHYS_PATH 117*db11e6feSjacobs * Attribute Type - DATA_TYPE_STRING 118*db11e6feSjacobs * Attribute Value - physical path of the device without the "/devices" 119*db11e6feSjacobs * prefix. 120*db11e6feSjacobs * 121*db11e6feSjacobs * Attribute Name - DEV_DRIVER_NAME 122*db11e6feSjacobs * Attribute Type - DATA_TYPE_STRING 123*db11e6feSjacobs * Attribute Value - driver name 124*db11e6feSjacobs * 125*db11e6feSjacobs * Attribute Name - DEV_INSTANCE 126*db11e6feSjacobs * Attribute Type - DATA_TYPE_INT32 127*db11e6feSjacobs * Attribute Value - driver instance number 128*db11e6feSjacobs * 129*db11e6feSjacobs * Attribute Name - DEV_PROP_PREFIX<devinfo_node_property> 130*db11e6feSjacobs * Attribute Type - data type of the devinfo_node_property 131*db11e6feSjacobs * Attribute Value - value of the devinfo_node_property 132*db11e6feSjacobs * 133*db11e6feSjacobs * 1347c478bd9Sstevel@tonic-gate * Event schema for EC_DEV_REMOVE/ESC_DISK 1357c478bd9Sstevel@tonic-gate * 1367c478bd9Sstevel@tonic-gate * Event Class - EC_DEV_REMOVE 1377c478bd9Sstevel@tonic-gate * Event Sub-Class - ESC_DISK 1387c478bd9Sstevel@tonic-gate * 1397c478bd9Sstevel@tonic-gate * Attribute Name - EV_VERSION 1407c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 1417c478bd9Sstevel@tonic-gate * Attribute Value - event version number 1427c478bd9Sstevel@tonic-gate * 1437c478bd9Sstevel@tonic-gate * Attribute Name - DEV_NAME 1447c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 1457c478bd9Sstevel@tonic-gate * Attribute Value - /dev name to the raw device. 1467c478bd9Sstevel@tonic-gate * The name does not include the slice number component. 1477c478bd9Sstevel@tonic-gate * 1487c478bd9Sstevel@tonic-gate * Attribute Name - DEV_PHYS_PATH 1497c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 1507c478bd9Sstevel@tonic-gate * Attribute Value - physical path of the device without the "/devices" 1517c478bd9Sstevel@tonic-gate * prefix. 1527c478bd9Sstevel@tonic-gate * 1537c478bd9Sstevel@tonic-gate * Attribute Name - DEV_DRIVER_NAME 1547c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 1557c478bd9Sstevel@tonic-gate * Attribute Value - driver name 1567c478bd9Sstevel@tonic-gate * 1577c478bd9Sstevel@tonic-gate * Attribute Name - DEV_INSTANCE 1587c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 1597c478bd9Sstevel@tonic-gate * Attribute Value - driver instance number 1607c478bd9Sstevel@tonic-gate * 1617c478bd9Sstevel@tonic-gate * 1627c478bd9Sstevel@tonic-gate * Event schema for EC_DEV_REMOVE/ESC_NETWORK 1637c478bd9Sstevel@tonic-gate * 1647c478bd9Sstevel@tonic-gate * Event Class - EC_DEV_REMOVE 1657c478bd9Sstevel@tonic-gate * Event Sub-Class - ESC_NETWORK 1667c478bd9Sstevel@tonic-gate * 1677c478bd9Sstevel@tonic-gate * Attribute Name - EV_VERSION 1687c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 1697c478bd9Sstevel@tonic-gate * Attribute Value - event version number 1707c478bd9Sstevel@tonic-gate * 1717c478bd9Sstevel@tonic-gate * Attribute Name - DEV_NAME 1727c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 1737c478bd9Sstevel@tonic-gate * Attribute Value - /dev name associated with the device if exists. 1747c478bd9Sstevel@tonic-gate * /dev name associated with the driver for DLPI 1757c478bd9Sstevel@tonic-gate * Style-2 only drivers. 1767c478bd9Sstevel@tonic-gate * 1777c478bd9Sstevel@tonic-gate * Attribute Name - DEV_PHYS_PATH 1787c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 1797c478bd9Sstevel@tonic-gate * Attribute Value - physical path of the device without the "/devices" 1807c478bd9Sstevel@tonic-gate * prefix. 1817c478bd9Sstevel@tonic-gate * 1827c478bd9Sstevel@tonic-gate * Attribute Name - DEV_DRIVER_NAME 1837c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 1847c478bd9Sstevel@tonic-gate * Attribute Value - driver name 1857c478bd9Sstevel@tonic-gate * 1867c478bd9Sstevel@tonic-gate * Attribute Name - DEV_INSTANCE 1877c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 188*db11e6feSjacobs * Attribute Value - driver instance number 189*db11e6feSjacobs * 190*db11e6feSjacobs * 191*db11e6feSjacobs * Event schema for EC_DEV_REMOVE/ESC_PRINTER 192*db11e6feSjacobs * 193*db11e6feSjacobs * Event Class - EC_DEV_REMOVE 194*db11e6feSjacobs * Event Sub-Class - ESC_PRINTER 195*db11e6feSjacobs * 196*db11e6feSjacobs * Attribute Name - EV_VERSION 197*db11e6feSjacobs * Attribute Type - DATA_TYPE_INT32 198*db11e6feSjacobs * Attribute Value - event version number 199*db11e6feSjacobs * 200*db11e6feSjacobs * Attribute Name - DEV_NAME 201*db11e6feSjacobs * Attribute Type - DATA_TYPE_STRING 202*db11e6feSjacobs * Attribute Value - /dev/printers name associated with the device 203*db11e6feSjacobs * if exists. 204*db11e6feSjacobs * /dev name associated with the device if it exists 205*db11e6feSjacobs * 206*db11e6feSjacobs * Attribute Name - DEV_PHYS_PATH 207*db11e6feSjacobs * Attribute Type - DATA_TYPE_STRING 208*db11e6feSjacobs * Attribute Value - physical path of the device without the "/devices" 209*db11e6feSjacobs * prefix. 210*db11e6feSjacobs * 211*db11e6feSjacobs * Attribute Name - DEV_DRIVER_NAME 212*db11e6feSjacobs * Attribute Type - DATA_TYPE_STRING 213*db11e6feSjacobs * Attribute Value - driver name 214*db11e6feSjacobs * 215*db11e6feSjacobs * Attribute Name - DEV_INSTANCE 216*db11e6feSjacobs * Attribute Type - DATA_TYPE_INT32 2177c478bd9Sstevel@tonic-gate * Attribute Value - driver instance number 2187c478bd9Sstevel@tonic-gate * 2197c478bd9Sstevel@tonic-gate * 2207c478bd9Sstevel@tonic-gate * Event schema for EC_DEV_BRANCH/ESC_DEV_BRANCH_ADD or ESC_DEV_BRANCH_REMOVE 2217c478bd9Sstevel@tonic-gate * 2227c478bd9Sstevel@tonic-gate * Event Class - EC_DEV_BRANCH 2237c478bd9Sstevel@tonic-gate * Event Sub-Class - ESC_DEV_BRANCH_ADD or ESC_DEV_BRANCH_REMOVE 2247c478bd9Sstevel@tonic-gate * 2257c478bd9Sstevel@tonic-gate * Attribute Name - EV_VERSION 2267c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_INT32 2277c478bd9Sstevel@tonic-gate * Attribute Value - event version number 2287c478bd9Sstevel@tonic-gate * 2297c478bd9Sstevel@tonic-gate * Attribute Name - DEV_PHYS_PATH 2307c478bd9Sstevel@tonic-gate * Attribute Type - DATA_TYPE_STRING 2317c478bd9Sstevel@tonic-gate * Attribute Value - physical path to the root node of the device subtree 2327c478bd9Sstevel@tonic-gate * without the "/devices" prefix. 2337c478bd9Sstevel@tonic-gate */ 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate #define EV_VERSION "version" 2367c478bd9Sstevel@tonic-gate #define DEV_PHYS_PATH "phys_path" 2377c478bd9Sstevel@tonic-gate #define DEV_NAME "dev_name" 2387c478bd9Sstevel@tonic-gate #define DEV_DRIVER_NAME "driver_name" 2397c478bd9Sstevel@tonic-gate #define DEV_INSTANCE "instance" 2407c478bd9Sstevel@tonic-gate #define DEV_PROP_PREFIX "prop-" 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gate #define EV_V1 1 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gate /* maximum number of devinfo node properties added to the event */ 2457c478bd9Sstevel@tonic-gate #define MAX_PROP_COUNT 100 2467c478bd9Sstevel@tonic-gate 2477c478bd9Sstevel@tonic-gate /* only properties with size less than PROP_LEN_LIMIT are added to the event */ 2487c478bd9Sstevel@tonic-gate #define PROP_LEN_LIMIT 1024 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate #ifdef __cplusplus 2517c478bd9Sstevel@tonic-gate } 2527c478bd9Sstevel@tonic-gate #endif 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_DEV_H */ 255