libipmi_struct.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * @file libipmi_struct.h
  3. * @author Rajasekhar (rajasekharj@amiindia.co.in)
  4. * @date 02-Sep-2004
  5. *
  6. * @brief Contains data structures required for establishing a session
  7. *
  8. */
  9. #ifndef __LIBIPMI_STRUCT_H__
  10. #define __LIBIPMI_STRUCT_H__
  11. #include <stdint.h>
  12. #include "com_IPMIDefs.h"
  13. #include "com_IPMI_SDRRecord.h"
  14. #define PACK __attribute__ ((packed))
  15. /**
  16. @def UDS_CHANNEL_T
  17. @brief holds data required for network medium
  18. */
  19. typedef struct UDS_CHANNEL_T_tag {
  20. uint16_t hSocketPath;
  21. int hSocket;
  22. uint8_t byIsConnected;
  23. } PACK UDS_CHANNEL_T;
  24. /**
  25. @def IPMI20_UDS_SESSION_T
  26. @brief holds data required for maintaining session with unix domain socket medium
  27. */
  28. typedef struct IPMI20_UDS_SESSION_T_tag {
  29. UDS_CHANNEL_T hUDSInfo;
  30. char szUserName[MAX_USERNAME_LEN];
  31. char szPwd[MAX_PASSWORD_LEN];
  32. char szUName[MAX_USERNAME_LEN];
  33. char abyIPAddr[IP6_ADDR_LEN];
  34. uint32_t dwSessionID;
  35. uint8_t byPreSession;
  36. uint8_t byAuthType;
  37. uint8_t byRole;
  38. uint8_t byChannelNum;
  39. uint8_t byDefTimeout;
  40. uint8_t byMaxRetries;
  41. }PACK IPMI20_UDS_SESSION_T;
  42. // /**
  43. // @def IPMI20_SESSION_T
  44. // @brief holds info for maintaining a session
  45. // */
  46. // typedef struct IPMI20_SESSION_T_tag {
  47. // /* Medium type (Network, Serial, KCS, IPMB, USB) */
  48. // uint8_t byMediumType;
  49. // #define UDS_MEDIUM 0x07
  50. // /* tells whether session has started or not. */
  51. // uint8_t bySessionStarted;
  52. // #define SESSION_NOT_STARTED 0x00
  53. // #define SESSION_STARTED 0x01
  54. // /* if this value is > 0, session reestablishment will be tried for byMaxRetries times. */
  55. // uint8_t byMaxRetries;
  56. // /* LAN Eth Index for hold Eth number if multi NIc supported */
  57. // uint8_t EthIndex;
  58. // IPMI20_UDS_SESSION_T *hUDSSession;
  59. // } PACK IPMI20_SESSION_T;
  60. typedef enum
  61. {
  62. AUTH_FLAG = 1,
  63. AUTH_BYPASS_FLAG,
  64. }USER_Auth;
  65. /* Undefine PACK so that it can be redefined in other header files */
  66. #if defined (PACK)
  67. #undef PACK
  68. #endif
  69. #endif /* __LIBIPMI_STRUCT_H__ */