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