Blame include/ipmitool/hpm2.h

Packit Service ed0f68
/*
Packit Service ed0f68
 * Copyright (c) 2012 Pigeon Point Systems.  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 Pigeon Point Systems nor 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
 * PIGEON POINT SYSTEMS ("PPS") 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
 * PPS 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 PPS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Packit Service ed0f68
 */
Packit Service ed0f68
Packit Service ed0f68
#include <stdint.h>
Packit Service ed0f68
#include <ipmitool/ipmi_intf.h>
Packit Service ed0f68
Packit Service ed0f68
/* Global HPM.2 defines */
Packit Service ed0f68
#define HPM2_REVISION		0x01
Packit Service ed0f68
#define HPM3_REVISION		0x01
Packit Service ed0f68
#define HPM2_LAN_PARAMS_REV	0x01
Packit Service ed0f68
#define HPM2_SOL_PARAMS_REV	0x01
Packit Service ed0f68
#define HPM3_LAN_PARAMS_REV	0x01
Packit Service ed0f68
/* IPMI defines parameter revision as
Packit Service ed0f68
 * MSN = present revision,
Packit Service ed0f68
 * LSN = oldest revision parameter is
Packit Service ed0f68
 * backward compatible with. */
Packit Service ed0f68
#define LAN_PARAM_REV(x, y)	(((x) << 4) | ((y) & 0xF))
Packit Service ed0f68
Packit Service ed0f68
/* HPM.2 capabilities */
Packit Service ed0f68
#define HPM2_CAPS_SOL_EXTENSION		0x01
Packit Service ed0f68
#define HPM2_CAPS_PACKET_TRACE		0x02
Packit Service ed0f68
#define HPM2_CAPS_EXT_MANAGEMENT	0x04
Packit Service ed0f68
#define HPM2_CAPS_VERSION_SENSOR	0x08
Packit Service ed0f68
#define HPM2_CAPS_DYNAMIC_SESSIONS	0x10
Packit Service ed0f68
Packit Service ed0f68
#if HAVE_PRAGMA_PACK
Packit Service ed0f68
# pragma pack(push, 1)
Packit Service ed0f68
#endif
Packit Service ed0f68
Packit Service ed0f68
/* HPM.2 LAN attach capabilities */
Packit Service ed0f68
struct hpm2_lan_attach_capabilities {
Packit Service ed0f68
	uint8_t hpm2_revision_id;
Packit Service ed0f68
	uint16_t lan_channel_mask;
Packit Service ed0f68
	uint8_t hpm2_caps;
Packit Service ed0f68
	uint8_t hpm2_lan_params_start;
Packit Service ed0f68
	uint8_t hpm2_lan_params_rev;
Packit Service ed0f68
	uint8_t hpm2_sol_params_start;
Packit Service ed0f68
	uint8_t hpm2_sol_params_rev;
Packit Service ed0f68
} ATTRIBUTE_PACKING;
Packit Service ed0f68
Packit Service ed0f68
/* HPM.2 LAN channel capabilities */
Packit Service ed0f68
struct hpm2_lan_channel_capabilities {
Packit Service ed0f68
	uint8_t capabilities;
Packit Service ed0f68
	uint8_t attach_type;
Packit Service ed0f68
	uint8_t bandwidth_class;
Packit Service ed0f68
	uint16_t max_inbound_pld_size;
Packit Service ed0f68
	uint16_t max_outbound_pld_size;
Packit Service ed0f68
} ATTRIBUTE_PACKING;
Packit Service ed0f68
Packit Service ed0f68
#if HAVE_PRAGMA_PACK
Packit Service ed0f68
# pragma pack(pop)
Packit Service ed0f68
#endif
Packit Service ed0f68
Packit Service ed0f68
/* HPM.2 command assignments */
Packit Service ed0f68
#define HPM2_GET_LAN_ATTACH_CAPABILITIES	0x3E
Packit Service ed0f68
Packit Service ed0f68
extern int hpm2_get_capabilities(struct ipmi_intf * intf,
Packit Service ed0f68
		struct hpm2_lan_attach_capabilities * caps);
Packit Service ed0f68
extern int hpm2_get_lan_channel_capabilities(struct ipmi_intf * intf,
Packit Service ed0f68
		uint8_t hpm2_lan_params_start,
Packit Service ed0f68
		struct hpm2_lan_channel_capabilities * caps);
Packit Service ed0f68
extern int hpm2_detect_max_payload_size(struct ipmi_intf * intf);