com_IPMI_RMCP.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. * ipmi_rmcp.h
  17. * RMCP Packet Handler structures
  18. *
  19. * Author: Govind Kothandapani <govindk@ami.com>
  20. * : Bakka Ravinder Reddy <bakkar@ami.com>
  21. *
  22. *****************************************************************/
  23. #ifndef IPMI_RMCP_H
  24. #define IPMI_RMCP_H
  25. #include <stdio.h>
  26. #include "com_IPMIDefs.h"
  27. #pragma pack( 1 )
  28. /*** External Definitions ***/
  29. #define LAN_RMCP_PORT 623
  30. #define AUTH_CODE_LEN 16
  31. #define PAYLOAD_IPMI_MSG 0x00
  32. #define PAYLOAD_SOL 0x01
  33. #define PAYLOAD_OEM 0x02
  34. #define RMCP_PLUS_FORMAT 0x06
  35. #define CONF_AES_CBC_128_HDR_LEN 0x10
  36. #define CONF_BLOCK_SIZE 16
  37. #define MAX_INTEGRITY_LEN 20
  38. #define MAX_HMAC_MD5_INTEGRITY_LEN 16
  39. #define MAX_MD5_INTEGRITY_LEN 16
  40. #define MAX_RANDOM_LEN 10
  41. /**
  42. * @struct RMCPHdr_T
  43. * @brief RMCP Header
  44. **/
  45. typedef struct
  46. {
  47. uint8_t Version;
  48. uint8_t Reserved;
  49. uint8_t SeqNumber;
  50. uint8_t MsgClass;
  51. } RMCPHdr_T;
  52. /**
  53. * @struct SessionHdr_T
  54. * @brief IPMI Session header
  55. **/
  56. typedef struct
  57. {
  58. uint8_t AuthType;
  59. uint32_t SessionSeqNum;
  60. uint32_t SessionID;
  61. } SessionHdr_T;
  62. /**
  63. * @struct SessionHdr2_T
  64. * @brief IPMI Session Header
  65. **/
  66. typedef struct
  67. {
  68. uint8_t AuthType;
  69. uint8_t PayloadType;
  70. uint32_t SessionID;
  71. uint32_t SessionSeqNum;
  72. uint16_t IPMIMsgLen;
  73. } SessionHdr2_T;
  74. /**
  75. * @struct RMCPPingHdr_T
  76. * @brief RMCP Ping Message Header
  77. **/
  78. typedef struct
  79. {
  80. uint8_t IANANum[4];
  81. uint8_t MsgType;
  82. uint8_t MsgTag;
  83. uint8_t Reserved;
  84. uint8_t DataLen;
  85. } RMCPPingHdr_T;
  86. #pragma pack( )
  87. #endif /* IPMI_RMCP_H */