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