PendTask.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /****************************************************************
  2. ****************************************************************
  3. ** **
  4. ** (C)Copyright 2006-2007, 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. * PendTask.h
  16. * Any IPMI command operation which requires more
  17. * response time can be posted to this task.
  18. *
  19. * Author: Vinothkumar S <vinothkumars@ami.com>
  20. *
  21. *****************************************************************/
  22. #ifndef PEND_TASK_H
  23. #define PEND_TASK_H
  24. #include "Types.h"
  25. //#include "OSPort.h"
  26. #include "Message.h"
  27. #include "IPMIDefs.h"
  28. #define PEND_STATUS_COMPLETED 0x00
  29. #define PEND_STATUS_PENDING 0x0F
  30. #define IPMI 0x01
  31. #define WEBSERVER 0x02
  32. #define REBOOT 0x03
  33. #define ADVISER_CONF 0x04
  34. /*----------------------------------------------------
  35. * Pending Task Operation
  36. *----------------------------------------------------*/
  37. typedef enum
  38. {
  39. PEND_OP_SET_IP = 0, /* Set IP Address */
  40. PEND_OP_SET_SUBNET, /* Set SubNet Mask */
  41. PEND_OP_SET_GATEWAY, /* Set Gateway */
  42. PEND_OP_SET_SOURCE, /*SET Address source*/
  43. PEND_OP_SET_DNS, /*SET DNS Information */
  44. PEND_OP_DELAYED_COLD_RESET, /* Delayed Cold Reset */
  45. PEND_OP_DELAYED_CR_CONFIG,
  46. PEND_OP_SEND_EMAIL_ALERT,
  47. PEND_OP_PEND_VM_CONFIG,
  48. PEND_OP_PEND_OOB_CONFIG,
  49. PEND_OP_IFUPDOWN,
  50. PEND_OP_NIC_ENABLE_DISABLE,
  51. PEND_OP_SET_VLAN_ID,
  52. PEND_OP_DECONFIG_VLAN_IFC,
  53. PEND_OP_SET_IPV4_HEADERS,
  54. PEND_RMCP_PORT_CHANGE,
  55. PEND_OP_SET_ALL_DNS_CFG,
  56. PEND_OP_SET_IPV6_CFG,
  57. PEND_OP_SET_DNSV6_CFG,
  58. PEND_OP_SET_ETH_IFACE_STATE,
  59. PEND_OP_SET_MAC_ADDRESS,
  60. PEND_OP_SET_IPV6_ENABLE=102,
  61. PEND_OP_SET_IPV6_IP_ADDR_SOURCE,
  62. PEND_OP_SET_IPV6_IP_ADDR,
  63. PEND_OP_SET_IPV6_PREFIX_LENGTH,
  64. PEND_OP_SET_IPV6_GATEWAY,
  65. PEND_OP_SET_BOND_IFACE_STATE,
  66. PEND_OP_SET_ACTIVE_SLAVE,
  67. PEND_OP_RESTART_SERVICES,
  68. PEND_OP_START_FW_UPDATE_TFTP,
  69. PEND_OP_SET_NCSI_CHANNEL_ID,
  70. PEND_OP_SET_NCSI_MODE_CHANGE,
  71. PEND_OP_SET_NCSI_VETOBIT,
  72. PEND_OP_SET_SPEED,
  73. PEND_OP_SET_MTU_SIZE,
  74. PEND_OP_SET_NW_PHY_REGISTER,
  75. PEND_OP_RUN_INIT_AGENT,
  76. PEND_OP_SET_BLOCK_ALL
  77. } PendTaskOperation_E;
  78. /* Function pointer for Pending command handler */
  79. typedef int (*pPendCmdHndlr_T) (INT8U* pData, INT32U ReqLen,INT8U Channel,int BMCInst);
  80. /* Pending command handler type definition */
  81. typedef struct
  82. {
  83. PendTaskOperation_E Operation; /* Pending Operation */
  84. pPendCmdHndlr_T PendHndlr; /* Pending handler */
  85. } PendCmdHndlrTbl_T;
  86. /* Pending command status type definition */
  87. typedef struct
  88. {
  89. PendTaskOperation_E Action; /* Pending Operation */
  90. int PendStatus; /* Pending Status */
  91. } PendCmdStatus_T;
  92. /*----------------------------------------------------
  93. * Pend Task Handler Queue
  94. *----------------------------------------------------*/
  95. extern void* PendCmdTask (void *pArg);
  96. extern int PostPendTask (PendTaskOperation_E Operation, INT8U *pData, INT32U DataLen,INT8U Channel,int BMCInst);
  97. extern int SetPendStatus (PendTaskOperation_E Action, int Status);
  98. extern int GetPendStatus (PendTaskOperation_E Action);
  99. #endif /* PEND_TASK_H */