|
@@ -0,0 +1,565 @@
|
|
|
+/****************************************************************
|
|
|
+ ****************************************************************
|
|
|
+ ** **
|
|
|
+ ** (C)Copyright 2005-2006, American Megatrends Inc. **
|
|
|
+ ** **
|
|
|
+ ** All Rights Reserved. **
|
|
|
+ ** **
|
|
|
+ ** 6145-F, Northbelt Parkway, Norcross, **
|
|
|
+ ** **
|
|
|
+ ** Georgia - 30071, USA. Phone-(770)-246-8600. **
|
|
|
+ ** **
|
|
|
+ ****************************************************************
|
|
|
+ ****************************************************************
|
|
|
+ ****************************************************************
|
|
|
+ ******************************************************************
|
|
|
+ *
|
|
|
+ * ipmi_defs.h
|
|
|
+ * IPMI Definitions
|
|
|
+ *
|
|
|
+ * Author: Govind Kothandapani <govindk@ami.com>
|
|
|
+ *
|
|
|
+ ******************************************************************/
|
|
|
+#ifndef IPMI_DEFS_H
|
|
|
+#define IPMI_DEFS_H
|
|
|
+
|
|
|
+#ifndef uint8_t
|
|
|
+ #define uint8_t unsigned char
|
|
|
+#endif
|
|
|
+#ifndef uint16_t
|
|
|
+ #define uint16_t unsigned short
|
|
|
+#endif
|
|
|
+#ifndef uint32_t
|
|
|
+ #define uint32_t unsigned long
|
|
|
+#endif
|
|
|
+// #ifndef bool
|
|
|
+// #define bool uint8_t
|
|
|
+// #endif
|
|
|
+
|
|
|
+
|
|
|
+#ifndef TRUE
|
|
|
+ #define TRUE 1
|
|
|
+#endif
|
|
|
+
|
|
|
+#ifndef FALSE
|
|
|
+ #define FALSE 0
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+#define MAX_STR_LENGTH 128
|
|
|
+#define SOCKET_PATH_LEN 108
|
|
|
+#define SESSION_TIMEOUT 10
|
|
|
+#define MAX_PYLDS_SUPPORT 2
|
|
|
+#define MAX_SENSOR_NUMBERS 32
|
|
|
+#define DEFAULT_TIMEOUT 10
|
|
|
+#define MAX_USER_NUM (10)
|
|
|
+#define MAX_SEL_RECORD (100)
|
|
|
+#define MAX_ID_STR_LEN 16
|
|
|
+#define MAX_FRU_SDR_STR_SIZE 40
|
|
|
+#define MAX_SENSOR_INFO_SIZE (1024)
|
|
|
+
|
|
|
+#define AUTH_FILE_PATH "/etc/goahead/auth.txt"
|
|
|
+
|
|
|
+// /*------------------------
|
|
|
+// * Privilege Levels
|
|
|
+// *------------------------*/
|
|
|
+// #define PRIV_NONE 0x00
|
|
|
+// #define PRIV_CALLBACK 0x01
|
|
|
+// #define PRIV_USER 0x02
|
|
|
+// #define PRIV_OPERATOR 0x03
|
|
|
+// #define PRIV_ADMIN 0x04
|
|
|
+// #define PRIV_OEM 0x05
|
|
|
+// #define PRIV_LOCAL 0x81
|
|
|
+// #define PRIV_SYS_IFC 0x82
|
|
|
+
|
|
|
+/*----------------------------------------------
|
|
|
+ * UDS
|
|
|
+ *----------------------------------------------*/
|
|
|
+#define UDS_SOCKET_PATH "/var/UDS_SOCKET"
|
|
|
+#define UDS_IFC_Q "/var/UDS_IFC_Q"
|
|
|
+#define UDS_RES_Q "/var/UDS_RES_Q"
|
|
|
+
|
|
|
+#define UDS_SUCCESS 0
|
|
|
+#define UDS_CMD_FAILURE 1
|
|
|
+#define UDS_FAILURE -1
|
|
|
+#define UDS_PARAM_FAILURE -2
|
|
|
+#define UDS_SOCKET_QUE_LEN 1024
|
|
|
+#define MAX_UDS_BUFFER_SIZE 1024
|
|
|
+#define MAX_REQUEST_SIZE 1024
|
|
|
+#define MAX_RESPONSE_SIZE 1024
|
|
|
+
|
|
|
+#define WAIT_NONE 0
|
|
|
+#define WAIT_INFINITE (-1)
|
|
|
+
|
|
|
+/* ---------------------------------------------
|
|
|
+ * Lan
|
|
|
+ * ---------------------------------------------*/
|
|
|
+#define MAC_ADDR_LEN 6
|
|
|
+#define IP_ADDR_LEN 4
|
|
|
+#define MAX_AUTH_PARAM_SIZE 296
|
|
|
+
|
|
|
+#define LAN_IFC_Q "/var/LAN_IFC_Q"
|
|
|
+#define LAN_RES_Q "/var/LAN_RES_Q"
|
|
|
+
|
|
|
+/* ---------------------------------------------
|
|
|
+ * IPMB
|
|
|
+ * ---------------------------------------------*/
|
|
|
+#define PRIMARY_IPMB_IFC_Q "/var/Primary_IPMB_IFC_Q"
|
|
|
+#define PRIMARY_IPMB_RES_Q "/var/Primary_IPMB_RES_Q"
|
|
|
+#define SECONDARY_IPMB_IFC_Q "/var/Secondary_IPMB_IFC_Q"
|
|
|
+#define SECONDARY_IPMB_RES_Q "/var/Secondary_IPMB_RES_Q"
|
|
|
+#define MIN_IPMB_MSG_LENGTH 7
|
|
|
+
|
|
|
+/* ---------------------------------------------
|
|
|
+ * MsgHndlr
|
|
|
+ * ---------------------------------------------*/
|
|
|
+#define MSG_HNDLR_Q "/var/MSG_HNDLR_Q"
|
|
|
+
|
|
|
+/* ---------------------------------------------
|
|
|
+ * ChassisTimer
|
|
|
+ * ---------------------------------------------*/
|
|
|
+#define CHASSIS_PWR_HNDLR_Q "/var/CHASSIS_PWR_HNDLR_Q"
|
|
|
+
|
|
|
+/*----------------------------------------------
|
|
|
+ * Channel
|
|
|
+ *----------------------------------------------*/
|
|
|
+#define PRIMARY_IPMB_CHANNEL (0)
|
|
|
+#define LAN_RMCP_CHANNEL (1)
|
|
|
+#define SECONDARY_IPMB_CHANNEL (6)
|
|
|
+#define USB_CHANNEL (0x0B)
|
|
|
+#define UDS_CHANNEL (0x0D)
|
|
|
+#define SYS_IFC_CHANNEL (0x0F)
|
|
|
+
|
|
|
+/*----------------------------------------------
|
|
|
+ * Parameters
|
|
|
+ *----------------------------------------------*/
|
|
|
+
|
|
|
+#define PARAM_IFC 0x01
|
|
|
+#define LAN_SMB_REQUEST 0x01
|
|
|
+#define UDS_SMB_PARAM 0x01
|
|
|
+
|
|
|
+#define PARAM_REQUEST 0x03
|
|
|
+#define PARAM_CHASSIS 0x07
|
|
|
+#define PARAM_MC 0x09
|
|
|
+
|
|
|
+#define PARAM_NO_RESPONSE 0x10
|
|
|
+#define PARAM_NORMAL_RESPONSE 0x11
|
|
|
+#define PARAM_BRIDGE 0x12
|
|
|
+#define BRIDGING_REQUEST PARAM_BRIDGE
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#define IP4_VERSION 4
|
|
|
+#define IP6_VERSION 6
|
|
|
+#define IP4_ADDR_LEN 4
|
|
|
+#define IP6_ADDR_LEN 16
|
|
|
+
|
|
|
+
|
|
|
+/* Authentication Types */
|
|
|
+#define AUTHTYPE_NONE 0x00
|
|
|
+#define AUTHTYPE_MD2 0x01
|
|
|
+#define AUTHTYPE_MD5 0x02
|
|
|
+#define AUTHTYPE_RESERVED 0x03
|
|
|
+#define AUTHTYPE_STRAIGHT_PASSWORD 0x04
|
|
|
+#define AUTHTYPE_OEM_PROPRIETARY 0x05
|
|
|
+#define AUTHTYPE_RMCP_PLUS_FORMAT 0x06
|
|
|
+
|
|
|
+/* Privilege levels */
|
|
|
+#define PRIV_LEVEL_NO_ACCESS 0x0F
|
|
|
+#define PRIV_LEVEL_PROPRIETARY 0x05
|
|
|
+#define PRIV_LEVEL_ADMIN 0x04
|
|
|
+#define PRIV_LEVEL_OPERATOR 0x03
|
|
|
+#define PRIV_LEVEL_USER 0x02
|
|
|
+#define PRIV_LEVEL_CALLBACK 0x01
|
|
|
+#define PRIV_LEVEL_RESERVED 0x00
|
|
|
+
|
|
|
+
|
|
|
+/* Authentication Algorithms */
|
|
|
+#define AUTH_ALG_RAKP_NONE 0x00
|
|
|
+#define AUTH_ALG_RAKP_HMAC_SHA1 0x01
|
|
|
+#define AUTH_ALG_RAKP_HMAC_MD5 0x02
|
|
|
+
|
|
|
+/* Integrity Algorithms */
|
|
|
+#define INTEGRITY_ALG_NONE 0x00
|
|
|
+#define INTEGRITY_ALG_HMAC_SHA1_96 0x01
|
|
|
+#define INTEGRITY_ALG_HMAC_SHA1_128 0x02
|
|
|
+#define INTEGRITY_ALG_MD5_128 0x03
|
|
|
+
|
|
|
+/* Confidentiality Algorithms */
|
|
|
+#define CONFIDENTIALITY_ALG_NONE 0x00
|
|
|
+#define CONFIDENTIALITY_ALG_AES_CBC_128 0x01
|
|
|
+#define CONFIDENTIALITY_ALG_XRC4_128 0x02
|
|
|
+#define CONFIDENTIALITY_ALG_XRC4_40 0x03
|
|
|
+
|
|
|
+/* Payload Types */
|
|
|
+#define PAYLOAD_TYPE_IPMI 0
|
|
|
+#define PAYLOAD_TYPE_SOL 1
|
|
|
+#define PAYLOAD_TYPE_RSSP_OPEN_SES_REQ 0x10
|
|
|
+#define PAYLOAD_TYPE_RSSP_OPEN_SES_RES 0x11
|
|
|
+#define PAYLOAD_TYPE_RAKP_MSG_1 0x12
|
|
|
+#define PAYLOAD_TYPE_RAKP_MSG_2 0x13
|
|
|
+#define PAYLOAD_TYPE_RAKP_MSG_3 0x14
|
|
|
+#define PAYLOAD_TYPE_RAKP_MSG_4 0x15
|
|
|
+
|
|
|
+#define MAX_KEY1_SIZE 20
|
|
|
+#define MAX_KEY2_SIZE 20
|
|
|
+#define MAX_GUID_SIZE 16
|
|
|
+//#define MAX_USER_NAME_LEN (16+1) //1 for stroing the null character
|
|
|
+//#define MAX_USER_PWD_LEN (20+1) //1 for storing the null character
|
|
|
+#define MAX_RAND_NO_LEN 16
|
|
|
+
|
|
|
+#define THRESHOLD_RESERVED_BIT 0xC0
|
|
|
+#define DISCRETE_RESERVED_BIT 0x80
|
|
|
+
|
|
|
+/* (0x6 << 2) == 0x18 */
|
|
|
+#define DEFAULT_NET_FN_LUN 0x18
|
|
|
+#define NETFNLUN_IPMI_APP 0x18
|
|
|
+#define NETFNLUN_IPMI_SENSOR 0x10
|
|
|
+#define NETFNLUN_IPMI_STORAGE 0x28
|
|
|
+#define NETFNLUN_IPMI_CHASSIS 0x00
|
|
|
+#define NETFNLUN_IPMI_OEM 0xB8
|
|
|
+#define NETFNLUN_IPMI_STORLEAD 0xC8
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*----------------------------------------------
|
|
|
+ * Session type
|
|
|
+ *----------------------------------------------*/
|
|
|
+#define LAN_SESSION_TYPE 1
|
|
|
+#define SERIAL_SESSION_TYPE 2
|
|
|
+#define SERIAL_TERMINAL_SESSION_TYPE 3
|
|
|
+#define KCS_SESSION_TYPE 4
|
|
|
+#define BT_SESSION_TYPE 5
|
|
|
+#define IPMB_SESSION_TYPE 6
|
|
|
+#define UDS_SESSION_TYPE 7
|
|
|
+#define USB_SESSION_TYPE 8
|
|
|
+
|
|
|
+#define BLADE_CHMC 0
|
|
|
+#define BLADE_IPMC 1
|
|
|
+#define CH_NOT_USED 0xFF
|
|
|
+
|
|
|
+/*----------------------------------------------
|
|
|
+ * Bit fields
|
|
|
+ *----------------------------------------------*/
|
|
|
+#define BIT0 0x0001
|
|
|
+#define BIT1 0x0002
|
|
|
+#define BIT2 0x0004
|
|
|
+#define BIT3 0x0008
|
|
|
+#define BIT4 0x0010
|
|
|
+#define BIT5 0x0020
|
|
|
+#define BIT6 0x0040
|
|
|
+#define BIT7 0x0080
|
|
|
+#define BIT8 0x0100
|
|
|
+#define BIT9 0x0200
|
|
|
+#define BIT10 0x0400
|
|
|
+#define BIT11 0x0800
|
|
|
+#define BIT12 0x1000
|
|
|
+#define BIT13 0x2000
|
|
|
+#define BIT14 0x4000
|
|
|
+#define BIT15 0x8000
|
|
|
+
|
|
|
+/*------- Net Functions -------------------*/
|
|
|
+#define NETFN_CHASSIS 0x00
|
|
|
+#define NETFN_BRIDGE 0x02
|
|
|
+#define NETFN_SENSOR 0x04
|
|
|
+#define NETFN_APP 0x06
|
|
|
+#define NETFN_FIRMWARE 0x08
|
|
|
+#define NETFN_STORAGE 0x0A
|
|
|
+#define NETFN_TRANSPORT 0x0C
|
|
|
+#define NETFN_PICMG 0x2C
|
|
|
+#define NETFN_STORLEAD 0x32
|
|
|
+#define NETFN_OEM 0x2E
|
|
|
+#define NETFN_OPMA1 0x30
|
|
|
+#define NETFN_OPMA2 0x3E
|
|
|
+#ifdef CFG_PROJ_SHMC_TEST_SUPPORT_YES
|
|
|
+#define NETFN_TEST_OEM 0x34
|
|
|
+#endif
|
|
|
+
|
|
|
+#define NETFN_UNKNOWN 0xFF
|
|
|
+#define IPMI_CMD_UNKNOWN 0xFF
|
|
|
+
|
|
|
+#define NETFN_GROUP_EXTN 0x2C
|
|
|
+#define IPMI_GROUP_EXTN_CODE_DCMI 0xDC
|
|
|
+
|
|
|
+#define MAX_USERNAME_LEN (16+1)
|
|
|
+#define MAX_PASSWORD_LEN (20+1)
|
|
|
+
|
|
|
+/**** Command Completion Codes ****/
|
|
|
+#define CC_NORMAL 0x00
|
|
|
+#define CC_SUCCESS 0x00
|
|
|
+#define CC_NODE_BUSY 0xC0
|
|
|
+#define CC_INV_CMD 0xC1
|
|
|
+#define CC_INV_CMD_FOR_LUN 0xC2
|
|
|
+#define CC_TIMEOUT 0xC3
|
|
|
+#define CC_OUT_OF_SPACE 0xC4
|
|
|
+#define CC_INV_RESERVATION_ID 0xC5
|
|
|
+#define CC_REQ_TRUNCATED 0xC6
|
|
|
+#define CC_REQ_INV_LEN 0xC7
|
|
|
+#define CC_REQ_FIELD_LEN_EXCEEDED 0xC8
|
|
|
+#define CC_PARAM_OUT_OF_RANGE 0xC9
|
|
|
+#define CC_CANNOT_RETURN_REQ_BYTES 0xCA
|
|
|
+#define CC_SEL_REC_NOT_PRESENT 0xCB
|
|
|
+#define CC_SDR_REC_NOT_PRESENT 0xCB
|
|
|
+#define CC_FRU_REC_NOT_PRESENT 0xCB
|
|
|
+#define CC_INV_DATA_FIELD 0xCC
|
|
|
+#define CC_ILLEGAL_CMD_FOR_SENSOR_REC 0xCD
|
|
|
+#define CC_COULD_NOT_PROVIDE_RESP 0xCE
|
|
|
+#define CC_CANNOT_EXEC_DUPL_REQ 0xCF
|
|
|
+#define CC_SDR_REP_IN_UPDATE_MODE 0xD0
|
|
|
+#define CC_DEV_IN_FIRMWARE_UPDATE_MODE 0xD1
|
|
|
+#define CC_INIT_AGENT_IN_PROGRESS 0xD2
|
|
|
+#define CC_DEST_UNAVAILABLE 0xD3
|
|
|
+#define CC_INSUFFIENT_PRIVILEGE 0xD4
|
|
|
+#define CC_PARAM_NOT_SUP_IN_CUR_STATE 0xD5
|
|
|
+#define CC_ERR_HANDLING_COMMAND_FAILURE 0xD6
|
|
|
+#define CC_UNSPECIFIED_ERR 0xFF
|
|
|
+#define CC_GET_MSG_QUEUE_EMPTY 0x80
|
|
|
+#define CC_EVT_MSG_QUEUE_EMPTY 0x80
|
|
|
+#define CC_GET_SESSION_INVALID_USER 0x81
|
|
|
+#define CC_GET_SESSION_NULL_USER_DISABLED 0x82
|
|
|
+#define CC_ACTIVATE_SESS_NO_SESSION_SLOT_AVAILABLE 0x81
|
|
|
+#define CC_ACTIVATE_SESS_NO_SLOT_AVAILABLE_USER 0x82
|
|
|
+#define CC_ACTIVATE_SESS_REQ_LEVEL_EXCEEDS_LIMIT 0x83
|
|
|
+#define CC_ACTIVATE_SESS_SEQ_OUT_OF_RANGE 0x84
|
|
|
+#define CC_ACTIVATE_SESS_INVALID_SESSION_ID 0x85
|
|
|
+#define CC_ACTIVATE_SESS_MAX_PRIVILEGE_EXCEEDS_LIMIT 0x86
|
|
|
+#define CC_PASSWORD_TEST_FAILED 0x80
|
|
|
+#define CC_PASSWORD_TEST_FAILED_WRONG_SIZE 0x81
|
|
|
+#define CC_SETPASSWORD_INVALID_USERID 0x81
|
|
|
+#define CC_SETPASSWORD_CANNOT_DISABLE_USER 0x82
|
|
|
+#define CC_NO_ACK_FROM_SLAVE 0x83
|
|
|
+#define CC_GET_CH_COMMAND_NOT_SUPPORTED 0x82
|
|
|
+#define CC_SET_CH_COMMAND_NOT_SUPPORTED 0x82
|
|
|
+#define CC_SET_CH_ACCES_MODE_NOT_SUPPORTED 0x83
|
|
|
+#define CC_SET_SESS_PREV_REQ_LEVEL_NOT_AVAILABLE 0x80
|
|
|
+#define CC_SET_SESS_PREV_REQ_PRIVILEGE_EXCEEDS_LIMIT 0x81
|
|
|
+#define CC_SET_SESS_PREV_INVALID_SESSION_ID 0x82
|
|
|
+#define CC_ACTIVATE_SESS_NO_SLOT_AVAILABLE_USER 0x82
|
|
|
+#define CC_CLOSE_INVALID_SESSION_ID 0x87
|
|
|
+#define CC_CLOSE_INVALID_SESSION_ID_HANDLE 0x88
|
|
|
+#define CC_PEF_PARAM_NOT_SUPPORTED 0x80
|
|
|
+#define CC_PEF_SET_IN_PROGRESS 0x81
|
|
|
+#define CC_SESSION_IN_PROGRESS 0x82
|
|
|
+#define CC_PEF_ATTEMPT_TO_SET_READ_ONLY_PARAM 0x82
|
|
|
+#define CC_SET_IN_PROGRESS 0x81
|
|
|
+#define CC_ATTEMPT_TO_SET_RO_PARAM 0x82
|
|
|
+#define CC_PARAM_NOT_SUPPORTED 0x80
|
|
|
+#define CC_BIOS_NOT_READY 0x82
|
|
|
+#define CC_IFC_NOT_SUPPORTED 0x81
|
|
|
+#define CC_DISABLE_SM 0x81
|
|
|
+#define CC_BIOS_IS_BUSY 0x81
|
|
|
+#define CC_CMD_UNSUPPORTED_UNCONFIGURABLE 0x80
|
|
|
+#define CC_NTP_RESTART_ERROR 0x80
|
|
|
+
|
|
|
+#define CC_CALLBACK_REJ_SESSION_ACTIVE 0x82
|
|
|
+#define CC_WRITE_ONLY_PARAM 0x83
|
|
|
+
|
|
|
+#define CC_INST_ALREADY_ACTIVE 0x80
|
|
|
+#define CC_CANNOT_ACTIVATE_WITH_ENCR 0x83
|
|
|
+#define CC_PAYLOAD_NOT_ENABLED 0x81
|
|
|
+#define CC_INST_EXCEEDED 0x82
|
|
|
+#define CC_INST_ALREADY_INACTIVE 0x80
|
|
|
+#define CC_PAYLOAD_NOT_AVAILABLE 0x80
|
|
|
+#define CC_ENCRYPT_NOT_AVAILABLE 0x82
|
|
|
+#define CC_INST_NOT_ACTIVE 0x83
|
|
|
+#define CC_KEYS_LOCKED 0x80
|
|
|
+#define CC_INSUF_KEY_BYTES 0x81
|
|
|
+#define CC_TOO_MANY_KEY_BYTES 0x82
|
|
|
+#define CC_KEY_MISMATCH 0x83
|
|
|
+
|
|
|
+#define CC_INVALID_KEY 0x80
|
|
|
+
|
|
|
+#define CC_OP_NOT_SUPPORTED 0x80
|
|
|
+#define CC_OP_NOT_ALLOWED 0x81
|
|
|
+#define CC_ENC_NOT_AVAILABLE 0x82
|
|
|
+#define CC_CANNOT_ACTIVATE_WITH_ENCR 0x83
|
|
|
+#define CC_CANNOT_ACTIVATE_WITHOUT_ENCR 0x84
|
|
|
+
|
|
|
+#define CC_ATTEMPT_TO_RESET_UNIN_WATCHDOG 0x80
|
|
|
+
|
|
|
+#define CC_ILLEGAL_CONNECTOR_ID 0x81
|
|
|
+#define CC_SEL_ERASE_IN_PROGRESS 0x81
|
|
|
+
|
|
|
+#define CC_SAME_PAM_ORDER 0x90
|
|
|
+#define CC_PAM_ORDER_SEC_DIFERS 0x91
|
|
|
+#define CC_PAM_ORDER_FILE_DIFERS 0x92
|
|
|
+
|
|
|
+#define CC_INSUFFICIENT_SLAVE_COUNT 0x84
|
|
|
+#define CC_IFC_ALREADY_SLAVEDTO_BOND 0x85
|
|
|
+#define CC_BOND_DISABLED_TOCONF_DNS 0x86
|
|
|
+#define CC_DNS_CURRENTLY_NOT_SUPPORTED_FOR_IPV6 0x87
|
|
|
+#define CC_INV_DOMAIN_NAME 0x88
|
|
|
+#define CC_TSIGPRIVATEKEY_VALIDATION_FAILED 0x89
|
|
|
+#define CC_DNS_CURRENTLY_NOT_ENABLED 0x90
|
|
|
+
|
|
|
+#define CC_NULL_USERID_NOT_SUPPORTED 0x80
|
|
|
+
|
|
|
+#define CC_DEVICE_NOT_SUPPORTED 0X80
|
|
|
+#define CC_INCOMPLETE_WRITTEN_BYTES 0x80
|
|
|
+
|
|
|
+/* Completion code for Set system info parameter command */
|
|
|
+#define CC_SYS_INFO_PARAM_NOT_SUPPORTED 0x80
|
|
|
+#define CC_SYS_INFO_SET_IN_PROGRESS 0x81
|
|
|
+#define CC_SYS_INFO_READ_ONLY_PARAM 0x82
|
|
|
+#define IPMI_EVM_REVISION 0x04
|
|
|
+#define IPMI_SENSOR_TEMP_TYPE 0x01
|
|
|
+#define IPMI_SENSOR_VOLT_TYPE 0x02
|
|
|
+#define IPMI_SENSOR_FAN_TYPE 0x04
|
|
|
+#define IPMI_SENSOR_PHYSICAL_SECURITY_TYPE 0x05
|
|
|
+#define IPMI_SENSOR_POWER_SUPPLY_TYPE 0x08
|
|
|
+#define IPMI_SENSOR_MEMORY_TYPE 0x0C
|
|
|
+#define IPMI_SENSOR_DRIVE_TYPE 0x0D
|
|
|
+#define IPMI_SENSOR_BUTTON_TYPE 0x14
|
|
|
+#define IPMI_SENSOR_ENTITY_PRESENCE_TYPE 0x25
|
|
|
+#define IPMI_SENSOR_OEM_TYPE 0xC0
|
|
|
+
|
|
|
+/******************OEM Completion codes*********************/
|
|
|
+#define OEMCC_INVALID_USERNAME 0x01
|
|
|
+#define OEMCC_PASSWD_MISMATCH 0x02
|
|
|
+#define OEMCC_INVALID_PASSWD 0x03
|
|
|
+#define OEMCC_DUPLICATE_USERNAME 0x04
|
|
|
+#define OEMCC_USER_EXISTS_AT_SLOT 0x05
|
|
|
+#define OEMCC_NOMEM 0x06
|
|
|
+#define OEMCC_FILE_ERR 0x07
|
|
|
+#define OEMCC_SSHKEY_UPDATE_FAILURE 0x08
|
|
|
+#define OEMCC_SENSOR_DISABLED 0x09
|
|
|
+#define OEMCC_INVALID_SDR_ENTRY 0x0a
|
|
|
+#define OEMCC_CORRUPT_FLASH_DATA 0x0b
|
|
|
+#define OEMCC_CORRUPT_DATA_CHKSUM 0x0c
|
|
|
+#define OEMCC_FLASH_UPGRADE_FAILURE 0x0d
|
|
|
+#define OEMCC_VERSION_MISMATCH 0x0e
|
|
|
+#define OEMCC_USER_NOT_EXISTS 0x0f
|
|
|
+
|
|
|
+#define OEMCC_SAL_INVALID_TARGET 0x0f //CMM sal completion code
|
|
|
+
|
|
|
+#define OEMCC_EMAIL_NOT_CONFIGURED 0x10
|
|
|
+#define OEMCC_SMTP_DISABLED 0x11
|
|
|
+#define OEMCC_UNSUPPORTED_AUTH_TYPE 0x12
|
|
|
+#define OEMCC_SEND_EMAIL_AUTH_FAILED 0x13
|
|
|
+#define OEMCC_UNABLE_TO_CONNECT_SMTPSERVER 0x14
|
|
|
+#define OEMCC_SEND_EMAIL_FAILED 0x15
|
|
|
+#define OEMCC_USER_DISABLED 0x16
|
|
|
+#define OEMCC_RESERVED_USER_NAME 0x17
|
|
|
+#define OEMCC_INSUFFIENT_LANIFC_COUNT 0x80
|
|
|
+#define OEMCC_UNSUPPORTED_BOND_MODE 0x81
|
|
|
+#define OEMCC_VLAN_ENABLED_ON_SLAVE 0x82
|
|
|
+#define OEMCC_BOND_ALREADY_DISABLED 0x83
|
|
|
+#define OEMCC_INV_PARAM_ONLY_FOR_NON_BONDING 0x81
|
|
|
+#define OEMCC_INV_IP4_NOT_ENABLED 0x82
|
|
|
+#define OEMCC_INV_MIN_IFC_COUNT_DISABLED 0x83
|
|
|
+#define OEMCC_BOND_NOT_ENABLED 0x80
|
|
|
+#define OEMCC_ACTIVE_SLAVE_LINK_DOWN 0x81
|
|
|
+#define OEMCC_ETH_IFACE_DISABLED 0x85
|
|
|
+#define OEMCC_SEL_EMPTY_REPOSITORY 0x86
|
|
|
+#define OEMCC_SEL_CLEARED 0x85
|
|
|
+#define OEMCC_SENSOR_INFO_EMPTY 0x87
|
|
|
+
|
|
|
+#define OEMCC_ATTEMPT_TO_GET_WO_PARAM 0x82
|
|
|
+
|
|
|
+#define CC_POWER_LIMIT_OUT_OF_RANGE 0x84
|
|
|
+#define CC_CORRECTION_TIME_OUT_OF_RANGE 0x85
|
|
|
+#define CC_STAT_REPORTING_OUT_OF_RANGE 0x89
|
|
|
+
|
|
|
+#define CC_THERMAL_LIMIT_OUT_OF_RANGE 0x84
|
|
|
+#define CC_THERMAL_EXCEPTION_TIME_OUT_OF_RANGE 0x85
|
|
|
+
|
|
|
+#define OEMCC_INV_DATE_TIME 0x93
|
|
|
+/* HPM related Completion codes */
|
|
|
+#define CC_UPG_NOT_SUPPORTED_OVER_IFC 0x81
|
|
|
+#define CC_INV_COMPONENT_ID 0x82
|
|
|
+#define CC_INV_COMPONENT_PROP_SELECTOR 0x83
|
|
|
+#define CC_INV_COMPONENT 0x81
|
|
|
+#define CC_IMAGE_LEN_MISMATCH 0x81
|
|
|
+#define CC_INV_FW_CHECKSUM 0x82
|
|
|
+#define CC_IMAGE_NOT_MATCH 0x83
|
|
|
+#define CC_UPG_NOT_ABORTED_AT_THIS_MOMENT 0x80
|
|
|
+#define CC_UPG_ABORTED_FW_NOT_RESUMABLE 0x81
|
|
|
+#define CC_CMD_INPROGRESS 0x80
|
|
|
+/* Remote Images Service completion code*/
|
|
|
+#define CC_SERVICE_NOT_ENABLED 0x90
|
|
|
+#define CC_INVALID_MEDIA_TYPE 0x91
|
|
|
+#define CC_INVALID_SHARE_TYPE 0x92
|
|
|
+#define CC_INVALID_IP_ADDR 0x93
|
|
|
+#define CC_INVALID_COMMAND 0x94
|
|
|
+#define CC_INVALID_IMAGE_FILE_NAME 0x95
|
|
|
+#define CC_INVALID_DOMAIN 0x96
|
|
|
+#define CC_INVALID_CONFIGURATION 0x97
|
|
|
+#define CC_INVALID_IMG_PATH 0x98
|
|
|
+#define CC_INVALID_USR_NAME 0x99
|
|
|
+#define CC_INVALID_PASSWD 0x9A
|
|
|
+#define CC_INVALID_BLOCK_SELECTOR 0x9B
|
|
|
+#define CC_INV_PROGRESS_BIT 0x9C
|
|
|
+#define CC_PROGRESS_BIT_NOT_SET 0x9D
|
|
|
+#define CC_PUBLICKEY_VALIDATION_FAILED 0x80
|
|
|
+
|
|
|
+/*Host Lock Feature*/
|
|
|
+#define CC_FEATURE_NOT_ENABLED 0x80
|
|
|
+#define CC_INV_FEATURE_CMD 0x81
|
|
|
+#define CC_INV_LOCK_CMD 0x82
|
|
|
+/*--------------------------------------------
|
|
|
+ * Macro to extract the net function.
|
|
|
+ *--------------------------------------------*/
|
|
|
+#define NET_FN(NetFnLUN) ((uint8_t)((NetFnLUN & 0xFC) >> 2))
|
|
|
+
|
|
|
+#pragma pack( 1 )
|
|
|
+
|
|
|
+/*-------------------------
|
|
|
+ * Disable Message Filter Table
|
|
|
+ *-------------------------*/
|
|
|
+typedef struct
|
|
|
+{
|
|
|
+ uint8_t NetFn;
|
|
|
+ uint8_t Command;
|
|
|
+} DisableMsgFilterTbl_T;
|
|
|
+
|
|
|
+typedef struct
|
|
|
+{
|
|
|
+ uint8_t NetFn;
|
|
|
+ uint8_t Cmd;
|
|
|
+} FlashModeFilterTbl_T;
|
|
|
+
|
|
|
+
|
|
|
+/*----------------------------------
|
|
|
+ * IPMI Commands Filter List Structure
|
|
|
+ *----------------------------------*/
|
|
|
+typedef struct
|
|
|
+{
|
|
|
+ uint8_t NetFn;
|
|
|
+ uint8_t Cmd;
|
|
|
+} IPMICmdsFilterTbl_T;
|
|
|
+
|
|
|
+
|
|
|
+/* IPMI Message Header */
|
|
|
+typedef struct
|
|
|
+{
|
|
|
+ uint8_t ResAddr;
|
|
|
+ uint8_t NetFnLUN;
|
|
|
+ uint8_t ChkSum;
|
|
|
+ uint8_t ReqAddr;
|
|
|
+ uint8_t RqSeqLUN;
|
|
|
+ uint8_t Cmd;
|
|
|
+} IPMIMsgHdr_T;
|
|
|
+
|
|
|
+typedef struct
|
|
|
+{
|
|
|
+ uint32_t SessionID;
|
|
|
+ uint8_t Privilege;
|
|
|
+ uint16_t IPMIMsgLen;
|
|
|
+ uint8_t NetFnLUN;
|
|
|
+ uint8_t Cmd;
|
|
|
+ uint8_t ChannelNum;
|
|
|
+ uint8_t AuthFlag;
|
|
|
+ uint8_t UserName[MAX_USERNAME_LEN];
|
|
|
+ uint8_t IPAddr[IP6_ADDR_LEN];
|
|
|
+ uint32_t ProcessID;
|
|
|
+ uint32_t ThreadID;
|
|
|
+}IPMIUDSMsg_T;
|
|
|
+
|
|
|
+#pragma pack( )
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#endif /* IPMI_DEFS_H */
|