com_IPMIDefs.h 22 KB

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