1*8339SEric.Schrock@Sun.COM /* 2*8339SEric.Schrock@Sun.COM * CDDL HEADER START 3*8339SEric.Schrock@Sun.COM * 4*8339SEric.Schrock@Sun.COM * The contents of this file are subject to the terms of the 5*8339SEric.Schrock@Sun.COM * Common Development and Distribution License (the "License"). 6*8339SEric.Schrock@Sun.COM * You may not use this file except in compliance with the License. 7*8339SEric.Schrock@Sun.COM * 8*8339SEric.Schrock@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*8339SEric.Schrock@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*8339SEric.Schrock@Sun.COM * See the License for the specific language governing permissions 11*8339SEric.Schrock@Sun.COM * and limitations under the License. 12*8339SEric.Schrock@Sun.COM * 13*8339SEric.Schrock@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*8339SEric.Schrock@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*8339SEric.Schrock@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*8339SEric.Schrock@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*8339SEric.Schrock@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*8339SEric.Schrock@Sun.COM * 19*8339SEric.Schrock@Sun.COM * CDDL HEADER END 20*8339SEric.Schrock@Sun.COM */ 21*8339SEric.Schrock@Sun.COM /* 22*8339SEric.Schrock@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*8339SEric.Schrock@Sun.COM * Use is subject to license terms. 24*8339SEric.Schrock@Sun.COM */ 25*8339SEric.Schrock@Sun.COM 26*8339SEric.Schrock@Sun.COM #include <libipmi.h> 27*8339SEric.Schrock@Sun.COM 28*8339SEric.Schrock@Sun.COM int ipmi_event_platform_message(ipmi_handle_t * ihp,ipmi_platform_event_message_t * pem)29*8339SEric.Schrock@Sun.COMipmi_event_platform_message(ipmi_handle_t *ihp, 30*8339SEric.Schrock@Sun.COM ipmi_platform_event_message_t *pem) 31*8339SEric.Schrock@Sun.COM { 32*8339SEric.Schrock@Sun.COM ipmi_cmd_t cmd = { 0 }; 33*8339SEric.Schrock@Sun.COM 34*8339SEric.Schrock@Sun.COM cmd.ic_netfn = IPMI_NETFN_SE; 35*8339SEric.Schrock@Sun.COM cmd.ic_cmd = IPMI_CMD_PLATFORM_EVENT_MESSAGE; 36*8339SEric.Schrock@Sun.COM cmd.ic_dlen = sizeof (ipmi_platform_event_message_t); 37*8339SEric.Schrock@Sun.COM cmd.ic_data = pem; 38*8339SEric.Schrock@Sun.COM 39*8339SEric.Schrock@Sun.COM if (ipmi_send(ihp, &cmd) == NULL) 40*8339SEric.Schrock@Sun.COM return (-1); 41*8339SEric.Schrock@Sun.COM else 42*8339SEric.Schrock@Sun.COM return (0); 43*8339SEric.Schrock@Sun.COM } 44