com_IPMIDefs.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. /****************************************************************
  2. ****************************************************************
  3. ** **
  4. ** (C)Copyright 2005-2006, American Megatrends Inc. **
  5. ** **
  6. ** All Rights Reserved. **
  7. ** **
  8. ** 6145-F, Northbelt Parkway, Norcross, **
  9. ** **
  10. ** Georgia - 30071, USA. Phone-(770)-246-8600. **
  11. ** **
  12. ****************************************************************
  13. ****************************************************************
  14. ****************************************************************
  15. ******************************************************************
  16. *
  17. * ipmi_defs.h
  18. * IPMI Definitions
  19. *
  20. * Author: Govind Kothandapani <govindk@ami.com>
  21. *
  22. ******************************************************************/
  23. #ifndef IPMI_DEFS_H
  24. #define IPMI_DEFS_H
  25. #ifndef uint8_t
  26. #define uint8_t unsigned char
  27. #endif
  28. #ifndef uint16_t
  29. #define uint16_t unsigned short
  30. #endif
  31. #ifndef uint32_t
  32. #define uint32_t unsigned long
  33. #endif
  34. // #ifndef bool
  35. // #define bool uint8_t
  36. // #endif
  37. #ifndef TRUE
  38. #define TRUE 1
  39. #endif
  40. #ifndef FALSE
  41. #define FALSE 0
  42. #endif
  43. #define USERTBL_FLASH_ADDR 0x800000
  44. #define MAX_STR_LENGTH 128
  45. #define SOCKET_PATH_LEN 108
  46. #define SESSION_TIMEOUT 10
  47. #define MAX_PYLDS_SUPPORT 2
  48. #define MAX_SENSOR_NUMBERS 32
  49. #define DEFAULT_TIMEOUT 10
  50. #define MAX_USER_NUM (10)
  51. #define MAX_SEL_RECORD (100)
  52. #define MAX_ID_STR_LEN 16
  53. #define MAX_FRU_SDR_STR_SIZE 40
  54. #define MAX_SENSOR_INFO_SIZE (1024)
  55. #define IP4_VERSION 4
  56. #define IP6_VERSION 6
  57. #define IP4_ADDR_LEN 4
  58. #define IP6_ADDR_LEN 16
  59. #define MAX_USERNAME_LEN (16+1)
  60. #define MAX_PASSWORD_LEN (20+1)
  61. #define SDR_ALLOC_UNIT_SIZE 0x40
  62. #define SDR_MAX_RECORD_SIZE 0x1 //Maximum record size in allocation units
  63. #define HISTORY_DATA_SIZE 480
  64. #define AUTH_FILE_PATH "/etc/goahead/auth.txt"
  65. // /*------------------------
  66. // * Privilege Levels
  67. // *------------------------*/
  68. // #define PRIV_NONE 0x00
  69. // #define PRIV_CALLBACK 0x01
  70. // #define PRIV_USER 0x02
  71. // #define PRIV_OPERATOR 0x03
  72. // #define PRIV_ADMIN 0x04
  73. // #define PRIV_OEM 0x05
  74. // #define PRIV_LOCAL 0x81
  75. // #define PRIV_SYS_IFC 0x82
  76. /*----------------------------------------------
  77. * UDS
  78. *----------------------------------------------*/
  79. #define UDS_SOCKET_PATH "/var/UDS_SOCKET"
  80. #define UDS_IFC_Q "/var/UDS_IFC_Q"
  81. #define UDS_RES_Q "/var/UDS_RES_Q"
  82. #define UDS_SUCCESS 0
  83. #define UDS_CMD_FAILURE 1
  84. #define UDS_FAILURE -1
  85. #define UDS_PARAM_FAILURE -2
  86. #define UDS_SOCKET_QUE_LEN 1024
  87. #define MAX_UDS_BUFFER_SIZE 1024
  88. #define MAX_REQUEST_SIZE 1024
  89. #define MAX_RESPONSE_SIZE 1024
  90. #define WAIT_NONE 0
  91. #define WAIT_INFINITE (-1)
  92. /* ---------------------------------------------
  93. * Lan
  94. * ---------------------------------------------*/
  95. #define MAC_ADDR_LEN 6
  96. #define IP_ADDR_LEN 4
  97. #define MAX_AUTH_PARAM_SIZE 296
  98. #define LAN_IFC_Q "/var/LAN_IFC_Q"
  99. #define LAN_RES_Q "/var/LAN_RES_Q"
  100. /* ---------------------------------------------
  101. * IPMB
  102. * ---------------------------------------------*/
  103. #define PRIMARY_IPMB_IFC_Q "/var/Primary_IPMB_IFC_Q"
  104. #define PRIMARY_IPMB_RES_Q "/var/Primary_IPMB_RES_Q"
  105. #define SECONDARY_IPMB_IFC_Q "/var/Secondary_IPMB_IFC_Q"
  106. #define SECONDARY_IPMB_RES_Q "/var/Secondary_IPMB_RES_Q"
  107. #define MIN_IPMB_MSG_LENGTH 7
  108. /* ---------------------------------------------
  109. * MsgHndlr
  110. * ---------------------------------------------*/
  111. #define MSG_HNDLR_Q "/var/MSG_HNDLR_Q"
  112. /* ---------------------------------------------
  113. * ChassisTimer
  114. * ---------------------------------------------*/
  115. #define CHASSIS_PWR_HNDLR_Q "/var/CHASSIS_PWR_HNDLR_Q"
  116. /*----------------------------------------------
  117. * Channel
  118. *----------------------------------------------*/
  119. #define PRIMARY_IPMB_CHANNEL (0)
  120. #define LAN_RMCP_CHANNEL (1)
  121. #define SECONDARY_IPMB_CHANNEL (6)
  122. #define USB_CHANNEL (0x0B)
  123. #define UDS_CHANNEL (0x0D)
  124. #define SYS_IFC_CHANNEL (0x0F)
  125. /*----------------------------------------------
  126. * Parameters
  127. *----------------------------------------------*/
  128. #define PARAM_IFC 0x01
  129. #define LAN_SMB_REQUEST 0x01
  130. #define UDS_SMB_PARAM 0x01
  131. #define PARAM_REQUEST 0x03
  132. #define PARAM_CHASSIS 0x07
  133. #define PARAM_MC 0x09
  134. #define PARAM_NO_RESPONSE 0x10
  135. #define PARAM_NORMAL_RESPONSE 0x11
  136. #define PARAM_BRIDGE 0x12
  137. #define BRIDGING_REQUEST PARAM_BRIDGE
  138. /* Authentication Types */
  139. #define AUTHTYPE_NONE 0x00
  140. #define AUTHTYPE_MD2 0x01
  141. #define AUTHTYPE_MD5 0x02
  142. #define AUTHTYPE_RESERVED 0x03
  143. #define AUTHTYPE_STRAIGHT_PASSWORD 0x04
  144. #define AUTHTYPE_OEM_PROPRIETARY 0x05
  145. #define AUTHTYPE_RMCP_PLUS_FORMAT 0x06
  146. /* Privilege levels */
  147. #define PRIV_LEVEL_NO_ACCESS 0x0F
  148. #define PRIV_LEVEL_PROPRIETARY 0x05
  149. #define PRIV_LEVEL_ADMIN 0x04
  150. #define PRIV_LEVEL_OPERATOR 0x03
  151. #define PRIV_LEVEL_USER 0x02
  152. #define PRIV_LEVEL_CALLBACK 0x01
  153. #define PRIV_LEVEL_RESERVED 0x00
  154. /* Authentication Algorithms */
  155. #define AUTH_ALG_RAKP_NONE 0x00
  156. #define AUTH_ALG_RAKP_HMAC_SHA1 0x01
  157. #define AUTH_ALG_RAKP_HMAC_MD5 0x02
  158. /* Integrity Algorithms */
  159. #define INTEGRITY_ALG_NONE 0x00
  160. #define INTEGRITY_ALG_HMAC_SHA1_96 0x01
  161. #define INTEGRITY_ALG_HMAC_SHA1_128 0x02
  162. #define INTEGRITY_ALG_MD5_128 0x03
  163. /* Confidentiality Algorithms */
  164. #define CONFIDENTIALITY_ALG_NONE 0x00
  165. #define CONFIDENTIALITY_ALG_AES_CBC_128 0x01
  166. #define CONFIDENTIALITY_ALG_XRC4_128 0x02
  167. #define CONFIDENTIALITY_ALG_XRC4_40 0x03
  168. /* Payload Types */
  169. #define PAYLOAD_TYPE_IPMI 0
  170. #define PAYLOAD_TYPE_SOL 1
  171. #define PAYLOAD_TYPE_RSSP_OPEN_SES_REQ 0x10
  172. #define PAYLOAD_TYPE_RSSP_OPEN_SES_RES 0x11
  173. #define PAYLOAD_TYPE_RAKP_MSG_1 0x12
  174. #define PAYLOAD_TYPE_RAKP_MSG_2 0x13
  175. #define PAYLOAD_TYPE_RAKP_MSG_3 0x14
  176. #define PAYLOAD_TYPE_RAKP_MSG_4 0x15
  177. #define MAX_KEY1_SIZE 20
  178. #define MAX_KEY2_SIZE 20
  179. #define MAX_GUID_SIZE 16
  180. //#define MAX_USER_NAME_LEN (16+1) //1 for stroing the null character
  181. //#define MAX_USER_PWD_LEN (20+1) //1 for storing the null character
  182. #define MAX_RAND_NO_LEN 16
  183. #define THRESHOLD_RESERVED_BIT 0xC0
  184. #define DISCRETE_RESERVED_BIT 0x80
  185. /* (0x6 << 2) == 0x18 */
  186. #define DEFAULT_NET_FN_LUN 0x18
  187. #define NETFNLUN_IPMI_APP 0x18
  188. #define NETFNLUN_IPMI_SENSOR 0x10
  189. #define NETFNLUN_IPMI_STORAGE 0x28
  190. #define NETFNLUN_IPMI_CHASSIS 0x00
  191. #define NETFNLUN_IPMI_OEM 0xB8
  192. #define NETFNLUN_IPMI_STORLEAD 0xC8
  193. /*----------------------------------------------
  194. * Session type
  195. *----------------------------------------------*/
  196. #define LAN_SESSION_TYPE 1
  197. #define SERIAL_SESSION_TYPE 2
  198. #define SERIAL_TERMINAL_SESSION_TYPE 3
  199. #define KCS_SESSION_TYPE 4
  200. #define BT_SESSION_TYPE 5
  201. #define IPMB_SESSION_TYPE 6
  202. #define UDS_SESSION_TYPE 7
  203. #define USB_SESSION_TYPE 8
  204. #define BLADE_CHMC 0
  205. #define BLADE_IPMC 1
  206. #define CH_NOT_USED 0xFF
  207. #define FULL_SEL_ENTRIES 0xFF
  208. #define PARTIAL_SEL_ENTRIES 0x00
  209. #define SEL_EMPTY_REPOSITORY 0x00
  210. /*----------------------------------------------
  211. * Bit fields
  212. *----------------------------------------------*/
  213. #define BIT0 0x0001
  214. #define BIT1 0x0002
  215. #define BIT2 0x0004
  216. #define BIT3 0x0008
  217. #define BIT4 0x0010
  218. #define BIT5 0x0020
  219. #define BIT6 0x0040
  220. #define BIT7 0x0080
  221. #define BIT8 0x0100
  222. #define BIT9 0x0200
  223. #define BIT10 0x0400
  224. #define BIT11 0x0800
  225. #define BIT12 0x1000
  226. #define BIT13 0x2000
  227. #define BIT14 0x4000
  228. #define BIT15 0x8000
  229. /*------- Net Functions -------------------*/
  230. #define NETFN_CHASSIS 0x00
  231. #define NETFN_BRIDGE 0x02
  232. #define NETFN_SENSOR 0x04
  233. #define NETFN_APP 0x06
  234. #define NETFN_FIRMWARE 0x08
  235. #define NETFN_STORAGE 0x0A
  236. #define NETFN_TRANSPORT 0x0C
  237. #define NETFN_PICMG 0x2C
  238. #define NETFN_STORLEAD 0x32
  239. #define NETFN_OEM 0x2E
  240. #define NETFN_OPMA1 0x30
  241. #define NETFN_OPMA2 0x3E
  242. #ifdef CFG_PROJ_SHMC_TEST_SUPPORT_YES
  243. #define NETFN_TEST_OEM 0x34
  244. #endif
  245. #define NETFN_UNKNOWN 0xFF
  246. #define IPMI_CMD_UNKNOWN 0xFF
  247. #define NETFN_GROUP_EXTN 0x2C
  248. #define IPMI_GROUP_EXTN_CODE_DCMI 0xDC
  249. /**** Command Completion Codes ****/
  250. #define CC_NORMAL 0x00
  251. #define CC_SUCCESS 0x00
  252. #define CC_NODE_BUSY 0xC0
  253. #define CC_INV_CMD 0xC1
  254. #define CC_INV_CMD_FOR_LUN 0xC2
  255. #define CC_TIMEOUT 0xC3
  256. #define CC_OUT_OF_SPACE 0xC4
  257. #define CC_INV_RESERVATION_ID 0xC5
  258. #define CC_REQ_TRUNCATED 0xC6
  259. #define CC_REQ_INV_LEN 0xC7
  260. #define CC_REQ_FIELD_LEN_EXCEEDED 0xC8
  261. #define CC_PARAM_OUT_OF_RANGE 0xC9
  262. #define CC_CANNOT_RETURN_REQ_BYTES 0xCA
  263. #define CC_SEL_REC_NOT_PRESENT 0xCB
  264. #define CC_SDR_REC_NOT_PRESENT 0xCB
  265. #define CC_FRU_REC_NOT_PRESENT 0xCB
  266. #define CC_INV_DATA_FIELD 0xCC
  267. #define CC_ILLEGAL_CMD_FOR_SENSOR_REC 0xCD
  268. #define CC_COULD_NOT_PROVIDE_RESP 0xCE
  269. #define CC_CANNOT_EXEC_DUPL_REQ 0xCF
  270. #define CC_SDR_REP_IN_UPDATE_MODE 0xD0
  271. #define CC_DEV_IN_FIRMWARE_UPDATE_MODE 0xD1
  272. #define CC_INIT_AGENT_IN_PROGRESS 0xD2
  273. #define CC_DEST_UNAVAILABLE 0xD3
  274. #define CC_INSUFFIENT_PRIVILEGE 0xD4
  275. #define CC_PARAM_NOT_SUP_IN_CUR_STATE 0xD5
  276. #define CC_ERR_HANDLING_COMMAND_FAILURE 0xD6
  277. #define CC_UNSPECIFIED_ERR 0xFF
  278. #define CC_GET_MSG_QUEUE_EMPTY 0x80
  279. #define CC_EVT_MSG_QUEUE_EMPTY 0x80
  280. #define CC_GET_SESSION_INVALID_USER 0x81
  281. #define CC_GET_SESSION_NULL_USER_DISABLED 0x82
  282. #define CC_ACTIVATE_SESS_NO_SESSION_SLOT_AVAILABLE 0x81
  283. #define CC_ACTIVATE_SESS_NO_SLOT_AVAILABLE_USER 0x82
  284. #define CC_ACTIVATE_SESS_REQ_LEVEL_EXCEEDS_LIMIT 0x83
  285. #define CC_ACTIVATE_SESS_SEQ_OUT_OF_RANGE 0x84
  286. #define CC_ACTIVATE_SESS_INVALID_SESSION_ID 0x85
  287. #define CC_ACTIVATE_SESS_MAX_PRIVILEGE_EXCEEDS_LIMIT 0x86
  288. #define CC_PASSWORD_TEST_FAILED 0x80
  289. #define CC_PASSWORD_TEST_FAILED_WRONG_SIZE 0x81
  290. #define CC_SETPASSWORD_INVALID_USERID 0x81
  291. #define CC_SETPASSWORD_CANNOT_DISABLE_USER 0x82
  292. #define CC_NO_ACK_FROM_SLAVE 0x83
  293. #define CC_GET_CH_COMMAND_NOT_SUPPORTED 0x82
  294. #define CC_SET_CH_COMMAND_NOT_SUPPORTED 0x82
  295. #define CC_SET_CH_ACCES_MODE_NOT_SUPPORTED 0x83
  296. #define CC_SET_SESS_PREV_REQ_LEVEL_NOT_AVAILABLE 0x80
  297. #define CC_SET_SESS_PREV_REQ_PRIVILEGE_EXCEEDS_LIMIT 0x81
  298. #define CC_SET_SESS_PREV_INVALID_SESSION_ID 0x82
  299. #define CC_ACTIVATE_SESS_NO_SLOT_AVAILABLE_USER 0x82
  300. #define CC_CLOSE_INVALID_SESSION_ID 0x87
  301. #define CC_CLOSE_INVALID_SESSION_ID_HANDLE 0x88
  302. #define CC_PEF_PARAM_NOT_SUPPORTED 0x80
  303. #define CC_PEF_SET_IN_PROGRESS 0x81
  304. #define CC_SESSION_IN_PROGRESS 0x82
  305. #define CC_PEF_ATTEMPT_TO_SET_READ_ONLY_PARAM 0x82
  306. #define CC_SET_IN_PROGRESS 0x81
  307. #define CC_ATTEMPT_TO_SET_RO_PARAM 0x82
  308. #define CC_PARAM_NOT_SUPPORTED 0x80
  309. #define CC_BIOS_NOT_READY 0x82
  310. #define CC_IFC_NOT_SUPPORTED 0x81
  311. #define CC_DISABLE_SM 0x81
  312. #define CC_BIOS_IS_BUSY 0x81
  313. #define CC_CMD_UNSUPPORTED_UNCONFIGURABLE 0x80
  314. #define CC_NTP_RESTART_ERROR 0x80
  315. #define CC_CALLBACK_REJ_SESSION_ACTIVE 0x82
  316. #define CC_WRITE_ONLY_PARAM 0x83
  317. #define CC_INST_ALREADY_ACTIVE 0x80
  318. #define CC_CANNOT_ACTIVATE_WITH_ENCR 0x83
  319. #define CC_PAYLOAD_NOT_ENABLED 0x81
  320. #define CC_INST_EXCEEDED 0x82
  321. #define CC_INST_ALREADY_INACTIVE 0x80
  322. #define CC_PAYLOAD_NOT_AVAILABLE 0x80
  323. #define CC_ENCRYPT_NOT_AVAILABLE 0x82
  324. #define CC_INST_NOT_ACTIVE 0x83
  325. #define CC_KEYS_LOCKED 0x80
  326. #define CC_INSUF_KEY_BYTES 0x81
  327. #define CC_TOO_MANY_KEY_BYTES 0x82
  328. #define CC_KEY_MISMATCH 0x83
  329. #define CC_INVALID_KEY 0x80
  330. #define CC_OP_NOT_SUPPORTED 0x80
  331. #define CC_OP_NOT_ALLOWED 0x81
  332. #define CC_ENC_NOT_AVAILABLE 0x82
  333. #define CC_CANNOT_ACTIVATE_WITH_ENCR 0x83
  334. #define CC_CANNOT_ACTIVATE_WITHOUT_ENCR 0x84
  335. #define CC_ATTEMPT_TO_RESET_UNIN_WATCHDOG 0x80
  336. #define CC_ILLEGAL_CONNECTOR_ID 0x81
  337. #define CC_SEL_ERASE_IN_PROGRESS 0x81
  338. #define CC_SAME_PAM_ORDER 0x90
  339. #define CC_PAM_ORDER_SEC_DIFERS 0x91
  340. #define CC_PAM_ORDER_FILE_DIFERS 0x92
  341. #define CC_INSUFFICIENT_SLAVE_COUNT 0x84
  342. #define CC_IFC_ALREADY_SLAVEDTO_BOND 0x85
  343. #define CC_BOND_DISABLED_TOCONF_DNS 0x86
  344. #define CC_DNS_CURRENTLY_NOT_SUPPORTED_FOR_IPV6 0x87
  345. #define CC_INV_DOMAIN_NAME 0x88
  346. #define CC_TSIGPRIVATEKEY_VALIDATION_FAILED 0x89
  347. #define CC_DNS_CURRENTLY_NOT_ENABLED 0x90
  348. #define CC_NULL_USERID_NOT_SUPPORTED 0x80
  349. #define CC_DEVICE_NOT_SUPPORTED 0X80
  350. #define CC_INCOMPLETE_WRITTEN_BYTES 0x80
  351. /* Completion code for Set system info parameter command */
  352. #define CC_SYS_INFO_PARAM_NOT_SUPPORTED 0x80
  353. #define CC_SYS_INFO_SET_IN_PROGRESS 0x81
  354. #define CC_SYS_INFO_READ_ONLY_PARAM 0x82
  355. #define IPMI_EVM_REVISION 0x04
  356. #define IPMI_SENSOR_TEMP_TYPE 0x01
  357. #define IPMI_SENSOR_VOLT_TYPE 0x02
  358. #define IPMI_SENSOR_FAN_TYPE 0x04
  359. #define IPMI_SENSOR_PHYSICAL_SECURITY_TYPE 0x05
  360. #define IPMI_SENSOR_POWER_SUPPLY_TYPE 0x08
  361. #define IPMI_SENSOR_MEMORY_TYPE 0x0C
  362. #define IPMI_SENSOR_DRIVE_TYPE 0x0D
  363. #define IPMI_SENSOR_BUTTON_TYPE 0x14
  364. #define IPMI_SENSOR_ENTITY_PRESENCE_TYPE 0x25
  365. #define IPMI_SENSOR_OEM_TYPE 0xC0
  366. /******************OEM Completion codes*********************/
  367. #define OEMCC_INVALID_USERNAME 0x01
  368. #define OEMCC_PASSWD_MISMATCH 0x02
  369. #define OEMCC_INVALID_PASSWD 0x03
  370. #define OEMCC_DUPLICATE_USERNAME 0x04
  371. #define OEMCC_USER_EXISTS_AT_SLOT 0x05
  372. #define OEMCC_NOMEM 0x06
  373. #define OEMCC_FILE_ERR 0x07
  374. #define OEMCC_SSHKEY_UPDATE_FAILURE 0x08
  375. #define OEMCC_SENSOR_DISABLED 0x09
  376. #define OEMCC_INVALID_SDR_ENTRY 0x0a
  377. #define OEMCC_CORRUPT_FLASH_DATA 0x0b
  378. #define OEMCC_CORRUPT_DATA_CHKSUM 0x0c
  379. #define OEMCC_FLASH_UPGRADE_FAILURE 0x0d
  380. #define OEMCC_VERSION_MISMATCH 0x0e
  381. #define OEMCC_USER_NOT_EXISTS 0x0f
  382. #define OEMCC_SAL_INVALID_TARGET 0x0f //CMM sal completion code
  383. #define OEMCC_EMAIL_NOT_CONFIGURED 0x10
  384. #define OEMCC_SMTP_DISABLED 0x11
  385. #define OEMCC_UNSUPPORTED_AUTH_TYPE 0x12
  386. #define OEMCC_SEND_EMAIL_AUTH_FAILED 0x13
  387. #define OEMCC_UNABLE_TO_CONNECT_SMTPSERVER 0x14
  388. #define OEMCC_SEND_EMAIL_FAILED 0x15
  389. #define OEMCC_USER_DISABLED 0x16
  390. #define OEMCC_RESERVED_USER_NAME 0x17
  391. #define OEMCC_INSUFFIENT_LANIFC_COUNT 0x80
  392. #define OEMCC_UNSUPPORTED_BOND_MODE 0x81
  393. #define OEMCC_VLAN_ENABLED_ON_SLAVE 0x82
  394. #define OEMCC_BOND_ALREADY_DISABLED 0x83
  395. #define OEMCC_INV_PARAM_ONLY_FOR_NON_BONDING 0x81
  396. #define OEMCC_INV_IP4_NOT_ENABLED 0x82
  397. #define OEMCC_INV_MIN_IFC_COUNT_DISABLED 0x83
  398. #define OEMCC_BOND_NOT_ENABLED 0x80
  399. #define OEMCC_ACTIVE_SLAVE_LINK_DOWN 0x81
  400. #define OEMCC_ETH_IFACE_DISABLED 0x85
  401. #define OEMCC_SEL_EMPTY_REPOSITORY 0x86
  402. #define OEMCC_SEL_CLEARED 0x85
  403. #define OEMCC_SENSOR_INFO_EMPTY 0x87
  404. #define OEMCC_ATTEMPT_TO_GET_WO_PARAM 0x82
  405. #define CC_POWER_LIMIT_OUT_OF_RANGE 0x84
  406. #define CC_CORRECTION_TIME_OUT_OF_RANGE 0x85
  407. #define CC_STAT_REPORTING_OUT_OF_RANGE 0x89
  408. #define CC_THERMAL_LIMIT_OUT_OF_RANGE 0x84
  409. #define CC_THERMAL_EXCEPTION_TIME_OUT_OF_RANGE 0x85
  410. #define OEMCC_INV_DATE_TIME 0x93
  411. /* HPM related Completion codes */
  412. #define CC_UPG_NOT_SUPPORTED_OVER_IFC 0x81
  413. #define CC_INV_COMPONENT_ID 0x82
  414. #define CC_INV_COMPONENT_PROP_SELECTOR 0x83
  415. #define CC_INV_COMPONENT 0x81
  416. #define CC_IMAGE_LEN_MISMATCH 0x81
  417. #define CC_INV_FW_CHECKSUM 0x82
  418. #define CC_IMAGE_NOT_MATCH 0x83
  419. #define CC_UPG_NOT_ABORTED_AT_THIS_MOMENT 0x80
  420. #define CC_UPG_ABORTED_FW_NOT_RESUMABLE 0x81
  421. #define CC_CMD_INPROGRESS 0x80
  422. /* Remote Images Service completion code*/
  423. #define CC_SERVICE_NOT_ENABLED 0x90
  424. #define CC_INVALID_MEDIA_TYPE 0x91
  425. #define CC_INVALID_SHARE_TYPE 0x92
  426. #define CC_INVALID_IP_ADDR 0x93
  427. #define CC_INVALID_COMMAND 0x94
  428. #define CC_INVALID_IMAGE_FILE_NAME 0x95
  429. #define CC_INVALID_DOMAIN 0x96
  430. #define CC_INVALID_CONFIGURATION 0x97
  431. #define CC_INVALID_IMG_PATH 0x98
  432. #define CC_INVALID_USR_NAME 0x99
  433. #define CC_INVALID_PASSWD 0x9A
  434. #define CC_INVALID_BLOCK_SELECTOR 0x9B
  435. #define CC_INV_PROGRESS_BIT 0x9C
  436. #define CC_PROGRESS_BIT_NOT_SET 0x9D
  437. #define CC_PUBLICKEY_VALIDATION_FAILED 0x80
  438. /*Host Lock Feature*/
  439. #define CC_FEATURE_NOT_ENABLED 0x80
  440. #define CC_INV_FEATURE_CMD 0x81
  441. #define CC_INV_LOCK_CMD 0x82
  442. /*--------------------------------------------
  443. * Macro to extract the net function.
  444. *--------------------------------------------*/
  445. #define NET_FN(NetFnLUN) ((uint8_t)((NetFnLUN & 0xFC) >> 2))
  446. #pragma pack( 1 )
  447. /*-------------------------
  448. * Disable Message Filter Table
  449. *-------------------------*/
  450. typedef struct
  451. {
  452. uint8_t NetFn;
  453. uint8_t Command;
  454. } DisableMsgFilterTbl_T;
  455. typedef struct
  456. {
  457. uint8_t NetFn;
  458. uint8_t Cmd;
  459. } FlashModeFilterTbl_T;
  460. /*----------------------------------
  461. * IPMI Commands Filter List Structure
  462. *----------------------------------*/
  463. typedef struct
  464. {
  465. uint8_t NetFn;
  466. uint8_t Cmd;
  467. } IPMICmdsFilterTbl_T;
  468. /* IPMI Message Header */
  469. typedef struct
  470. {
  471. uint8_t ResAddr;
  472. uint8_t NetFnLUN;
  473. uint8_t ChkSum;
  474. uint8_t ReqAddr;
  475. uint8_t RqSeqLUN;
  476. uint8_t Cmd;
  477. } IPMIMsgHdr_T;
  478. typedef struct
  479. {
  480. uint32_t SessionID;
  481. // uint8_t Privilege;
  482. uint16_t IPMIMsgLen;
  483. uint8_t NetFnLUN;
  484. uint8_t Cmd;
  485. uint8_t ChannelNum;
  486. // uint8_t AuthFlag;
  487. // uint8_t UserName[MAX_USERNAME_LEN];
  488. // uint8_t IPAddr[IP6_ADDR_LEN];
  489. // uint32_t ProcessID;
  490. // uint32_t ThreadID;
  491. }IPMIUDSMsg_T;
  492. #pragma pack( )
  493. #endif /* IPMI_DEFS_H */