com_IPMIDefs.h 22 KB

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