AppDevice.h 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. * AppDevice.h
  16. * AppDevice Commands Handler
  17. *
  18. * Author: Govind Kothandapani <govindk@ami.com>
  19. * : Rama Bisa <ramab@ami.com>
  20. * : Basavaraj Astekar <basavaraja@ami.com>
  21. * : Bakka Ravinder Reddy <bakkar@ami.com>
  22. *
  23. *****************************************************************/
  24. #ifndef APPDEVICE_H
  25. #define APPDEVICE_H
  26. #include "Types.h"
  27. //#include "OSPort.h"
  28. #define EVT_MSG_BUF_SIZE 1 /**<Event Message maximum Buffer size */
  29. #define USER_ID (((INT32U)'U'<< 24) | ((INT32U)'S'<< 16) | ('E'<<8) | 'R')
  30. #define IPMI_ROOT_USER ( 2 )
  31. #define TWENTY_BYTE_PWD 0x80
  32. #define CURRENT_CHANNEL_NUM 0x0E
  33. #define MASTER_RW_ERRCODE 0xFF
  34. #define IGNORE_ADD_OR_REMOVE 0
  35. #define IGNORE_ADD_OR_REMOVE_SHELL -1
  36. #define IPMI_15_PASSWORD_LEN (16 + 2)
  37. #define IPMI_20_PASSWORD_LEN (20 + 2)
  38. #define SYS_SEND_MSG_LUN 0x02
  39. /*** Extern Declaration ***/
  40. /*** Function Prototypes ***/
  41. /**
  42. * @defgroup apcf2 BMC Watchdog Timer Commands
  43. * @ingroup apcf
  44. * IPMI BMC Watchdog Timer Command Handlers. Invoked by the message handler
  45. * @{
  46. **/
  47. extern int ResetWDT (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  48. extern int SetWDT (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  49. extern int GetWDT (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  50. /** @} */
  51. /**
  52. * @defgroup apcf3 BMC Device and Messaging Commands
  53. * @ingroup apcf
  54. * IPMI BMC Device and Messaging Command Handlers. Invoked by the message handler
  55. * @{
  56. **/
  57. extern int SetBMCGlobalEnables (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  58. extern int GetBMCGlobalEnables (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  59. extern int ClrMsgFlags (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  60. extern int GetMsgFlags (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  61. extern int EnblMsgChannelRcv (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  62. extern int GetMessage (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  63. extern int SendMessage (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  64. extern int ReadEvtMsgBuffer (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  65. extern int GetBTIfcCap (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  66. extern int GetSystemGUID (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  67. extern int GetChAuthCap (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  68. extern int GetSessionChallenge (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  69. extern int ActivateSession (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  70. extern int SetSessionPrivLevel (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  71. extern int CloseSession (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  72. extern int GetSessionInfo (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  73. extern int GetAuthCode (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  74. extern int SetChAccess (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  75. extern int GetChAccess (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  76. extern int GetChInfo (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  77. extern int SetUserAccess (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  78. extern int GetUserAccess (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  79. extern int SetUserName (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  80. extern int GetUserName (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  81. extern int SetUserPassword (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  82. extern int MasterWriteRead (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  83. extern int SetSystemInfoParam (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  84. extern int GetSystemInfoParam (_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes,_NEAR_ int BMCInst);
  85. extern INT8U IsChannelSuppGroups(INT8U ChannelNum, int BMCInst);
  86. extern int ModifyUsrGrp(char * UserName,INT8U ChannelNum,INT8U OldAccessLimit, INT8U NewAccessLimit );
  87. /** @} */
  88. #endif /* APPDEVICE_H */