Blame src/plugins/open/open.h

Packit Service ed0f68
/*
Packit Service ed0f68
 * Copyright (c) 2003 Sun Microsystems, Inc.  All Rights Reserved.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Redistribution and use in source and binary forms, with or without
Packit Service ed0f68
 * modification, are permitted provided that the following conditions
Packit Service ed0f68
 * are met:
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Redistribution of source code must retain the above copyright
Packit Service ed0f68
 * notice, this list of conditions and the following disclaimer.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Redistribution in binary form must reproduce the above copyright
Packit Service ed0f68
 * notice, this list of conditions and the following disclaimer in the
Packit Service ed0f68
 * documentation and/or other materials provided with the distribution.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Neither the name of Sun Microsystems, Inc. or the names of
Packit Service ed0f68
 * contributors may be used to endorse or promote products derived
Packit Service ed0f68
 * from this software without specific prior written permission.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * This software is provided "AS IS," without a warranty of any kind.
Packit Service ed0f68
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
Packit Service ed0f68
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
Packit Service ed0f68
 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
Packit Service ed0f68
 * SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
Packit Service ed0f68
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
Packit Service ed0f68
 * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.  IN NO EVENT WILL
Packit Service ed0f68
 * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
Packit Service ed0f68
 * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
Packit Service ed0f68
 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
Packit Service ed0f68
 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
Packit Service ed0f68
 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Packit Service ed0f68
 */
Packit Service ed0f68
Packit Service ed0f68
#ifndef IPMI_OPENIPMI_H
Packit Service ed0f68
#define IPMI_OPENIPMI_H
Packit Service ed0f68
Packit Service ed0f68
#define IPMI_MAX_ADDR_SIZE		0x20
Packit Service ed0f68
#define IPMI_BMC_CHANNEL		0xf
Packit Service ed0f68
#define IPMI_NUM_CHANNELS		0x10
Packit Service ed0f68
Packit Service ed0f68
#define IPMI_SYSTEM_INTERFACE_ADDR_TYPE	0x0c
Packit Service ed0f68
#define IPMI_IPMB_ADDR_TYPE		0x01
Packit Service ed0f68
#define IPMI_IPMB_BROADCAST_ADDR_TYPE	0x41
Packit Service ed0f68
Packit Service ed0f68
#define IPMI_RESPONSE_RECV_TYPE		1
Packit Service ed0f68
#define IPMI_ASYNC_EVENT_RECV_TYPE	2
Packit Service ed0f68
#define IPMI_CMD_RECV_TYPE		3
Packit Service ed0f68
Packit Service ed0f68
struct ipmi_addr {
Packit Service ed0f68
	int addr_type;
Packit Service ed0f68
	short channel;
Packit Service ed0f68
	char data[IPMI_MAX_ADDR_SIZE];
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
struct ipmi_msg {
Packit Service ed0f68
	unsigned char netfn;
Packit Service ed0f68
        unsigned char cmd;
Packit Service ed0f68
        unsigned short data_len;
Packit Service ed0f68
        unsigned char *data;
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
struct ipmi_req {
Packit Service ed0f68
	unsigned char *addr;
Packit Service ed0f68
	unsigned int addr_len;
Packit Service ed0f68
	long msgid;
Packit Service ed0f68
	struct ipmi_msg msg;
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
struct ipmi_recv {
Packit Service ed0f68
	int recv_type;
Packit Service ed0f68
	unsigned char *addr;
Packit Service ed0f68
	unsigned int addr_len;
Packit Service ed0f68
	long msgid;
Packit Service ed0f68
	struct ipmi_msg msg;
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
struct ipmi_cmdspec {
Packit Service ed0f68
	unsigned char netfn;
Packit Service ed0f68
	unsigned char cmd;
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
struct ipmi_system_interface_addr {
Packit Service ed0f68
	int addr_type;
Packit Service ed0f68
	short channel;
Packit Service ed0f68
	unsigned char lun;
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
struct ipmi_ipmb_addr {
Packit Service ed0f68
	int addr_type;
Packit Service ed0f68
	short channel;
Packit Service ed0f68
	unsigned char slave_addr;
Packit Service ed0f68
	unsigned char lun;
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
#define IPMI_IOC_MAGIC			'i'
Packit Service ed0f68
#define IPMICTL_RECEIVE_MSG_TRUNC	_IOWR(IPMI_IOC_MAGIC, 11, struct ipmi_recv)
Packit Service ed0f68
#define IPMICTL_RECEIVE_MSG		_IOWR(IPMI_IOC_MAGIC, 12, struct ipmi_recv)
Packit Service ed0f68
#define IPMICTL_SEND_COMMAND		_IOR(IPMI_IOC_MAGIC, 13, struct ipmi_req)
Packit Service ed0f68
#define IPMICTL_REGISTER_FOR_CMD	_IOR(IPMI_IOC_MAGIC, 14, struct ipmi_cmdspec)
Packit Service ed0f68
#define IPMICTL_UNREGISTER_FOR_CMD	_IOR(IPMI_IOC_MAGIC, 15, struct ipmi_cmdspec)
Packit Service ed0f68
#define IPMICTL_SET_GETS_EVENTS_CMD	_IOR(IPMI_IOC_MAGIC, 16, int)
Packit Service ed0f68
#define IPMICTL_SET_MY_ADDRESS_CMD	_IOR(IPMI_IOC_MAGIC, 17, unsigned int)
Packit Service ed0f68
#define IPMICTL_GET_MY_ADDRESS_CMD	_IOR(IPMI_IOC_MAGIC, 18, unsigned int)
Packit Service ed0f68
#define IPMICTL_SET_MY_LUN_CMD		_IOR(IPMI_IOC_MAGIC, 19, unsigned int)
Packit Service ed0f68
#define IPMICTL_GET_MY_LUN_CMD		_IOR(IPMI_IOC_MAGIC, 20, unsigned int)
Packit Service ed0f68
Packit Service ed0f68
#endif /*IPMI_OPENIPMI_H*/