libipmi_session.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * @file libipmi_session.h
  3. * @author Rajasekhar (rajasekharj@amiindia.co.in)
  4. * @date 02-Sep-2004
  5. *
  6. * @brief Contains function definitions & data structures
  7. * required for establishing a session
  8. *
  9. */
  10. #ifndef __LIBIPMI_SESSION_H__
  11. #define __LIBIPMI_SESSION_H__
  12. #include <stdio.h>
  13. #include "libipmi_struct.h"
  14. #include "libipmi_errorcodes.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /**
  19. \breif Create UDS session to comunitation with BMC
  20. @param pSession [in]Session Info handle
  21. @param timeout [in]timeout value in seconds.
  22. @retval Returns LIBIPMI_E_SUCCESS on success and error codes on failure
  23. */
  24. uint16_t LIBIPMI_CreateSession(IPMI20_UDS_SESSION_T *pUDSSession, int timeout);
  25. /**
  26. \breif Sends RAW IPMI Command to the BMC
  27. @param pSession [in]Session Info handle
  28. @param byPayLoadType [in]Pay Load Type in NETWORK_MEDIUM.
  29. shd be 0 in case of serial and kcs mediums.
  30. @param byNetFnLUN [in] Net Function and LUN for the given byCommand
  31. @param byCommand [in] Command number.
  32. @param pszReqData [in] Command Request Data
  33. @param dwReqDataLen [in] size of Command Request data.
  34. @param pszResData [in] Command Response Data
  35. @param pdwResDataLen [in] size of Command Response data.
  36. @param timeout [in]timeout value in seconds.
  37. @retval Returns LIBIPMI_E_SUCCESS on success and error codes on failure
  38. */
  39. uint16_t LIBIPMI_Send_RAW_IPMI2_0_Command(IPMI20_UDS_SESSION_T *pUDSSession,
  40. uint8_t byNetFnLUN, uint8_t byCommand,
  41. uint8_t *pszReqData, uint32_t dwReqDataLen,
  42. uint8_t *pszResData, uint32_t *pdwResDataLen,
  43. int timeout);
  44. /**
  45. \breif Closes the IPMI 2.0 Session
  46. @param pSession [in]Session Info handle
  47. @retval Returns LIBIPMI_E_SUCCESS on success and error codes on failure
  48. */
  49. extern uint16_t LIBIPMI_CloseSession( IPMI20_UDS_SESSION_T *pUDSSession );
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* __LIBIPMI_SESSION_H__ */