1 /* 2 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * Redistribution of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 11 * Redistribution in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * Neither the name of Sun Microsystems, Inc. or the names of 16 * contributors may be used to endorse or promote products derived 17 * from this software without specific prior written permission. 18 * 19 * This software is provided "AS IS," without a warranty of any kind. 20 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, 21 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A 22 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. 23 * SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE 24 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING 25 * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL 26 * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, 27 * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR 28 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF 29 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, 30 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 31 */ 32 33 #ifndef IPMI_EVENT_H 34 #define IPMI_EVENT_H 35 36 #if HAVE_CONFIG_H 37 # include <config.h> 38 #endif 39 #include <ipmitool/ipmi.h> 40 41 #define EVENT_DIR_ASSERT 0 42 #define EVENT_DIR_DEASSERT 1 43 44 #ifdef HAVE_PRAGMA_PACK 45 #pragma pack(1) 46 #endif 47 struct platform_event_msg { 48 uint8_t evm_rev; 49 uint8_t sensor_type; 50 uint8_t sensor_num; 51 #if WORDS_BIGENDIAN 52 uint8_t event_dir : 1; 53 uint8_t event_type : 7; 54 #else 55 uint8_t event_type : 7; 56 uint8_t event_dir : 1; 57 #endif 58 uint8_t event_data[3]; 59 } ATTRIBUTE_PACKING; 60 #ifdef HAVE_PRAGMA_PACK 61 #pragma pack(0) 62 #endif 63 64 int ipmi_event_main(struct ipmi_intf *, int, char **); 65 66 #endif /*IPMI_EVENT_H*/ 67