FFConfig.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. * FFConfig.h
  17. * Firmware firewall configuration.
  18. *
  19. * Author: Basavaraj Astekar<basavarja@ami.com>
  20. * Ravinder Reddy<bakkar@ami.com>
  21. ******************************************************************/
  22. #ifndef FF_CONFIG_H
  23. #define FF_CONFIG_H
  24. #include "Types.h"
  25. #include "PMConfig.h"
  26. #include "MsgHndlr.h"
  27. #include "IPMIConf.h"
  28. /*** External Definitions ***/
  29. #define FF_SUCCESS 0x00
  30. #define FF_NETFN_ERR 0x10
  31. #define FF_CMD_ERR 0x20
  32. #define FF_CHANNEL_ERR 0x30
  33. #pragma pack( 1 )
  34. /**
  35. * @struct FFSubFnTbl_T
  36. * @brief Firmware Firewall sub-function table structure.
  37. **/
  38. typedef struct
  39. {
  40. INT8U NetFn;
  41. INT8U Cmd;
  42. INT32U SubFn [MAX_NUM_CHANNELS];
  43. } PACKED FFSubFnTbl_T;
  44. #pragma pack( )
  45. /**
  46. * @brief Checks for Sub-function configuration.
  47. * @param ChannelNum Channel Number
  48. * @param NetFn Net Function
  49. * @param Cmd Command
  50. * @param SubFn Sub Function
  51. * @return 1 if Sub Fn enabled, 0 if disabled.
  52. **/
  53. extern int CheckSubFn (INT8U ChannelNum, INT8U NetFn, INT8U Cmd, INT8U SubFn);
  54. /**
  55. * @brief Checks for command configurability
  56. * @param pCmdHndlrMap Command handler map
  57. * @param ChannelNum Channel Number
  58. * @param NetFn Net Function
  59. * @param Cmd Command
  60. * @return 1 if command enabled, 0 if disabled.
  61. **/
  62. extern int CheckCmdCfg (_FAR_ CmdHndlrMap_T* pCmdHndlrMap,
  63. INT8U ChannelNum, INT8U NetFn, INT8U Cmd,int BMCInst);
  64. /**
  65. * @brief Get command configuration information address.
  66. * @param NetFn - Net function of the command.
  67. * @param Cmd - Command.
  68. * @return The command configuration.
  69. **/
  70. extern _FAR_ INT8U* GetCmdCfgAddr (INT8U NetFn, INT8U Cmd, int BMCInst);
  71. /**
  72. * @brief Get sub-function mask.
  73. * @param ChannelNum - Channel number.
  74. * @param NetFn - Command net function.
  75. * @param Cmd - Command.
  76. * @param pSubFnMask - Sub-function mask.
  77. **/
  78. extern int GetSubFnMask (INT8U ChannelNum, INT8U NetFn,
  79. INT8U Cmd, _NEAR_ INT32U* pSubFnMask,int BMCInst);
  80. /**
  81. * @brief Get command support configuration mask.
  82. * @param NetFn - Command net function.
  83. * @param Cmd - Command.
  84. * @param pFFConfig - Command support configuration information.
  85. * @return 0 if success, -1 if error.
  86. **/
  87. extern int GetCmdSupCfgMask (INT8U NetFn, INT8U Cmd, _NEAR_ INT16U* pFFConfig,INT8U GroupExtCode,int BMCInst);
  88. #endif /* FF_CONFIG_H */