Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.0 KiB

  1. #include <guiddef.h>
  2. #define NLB_EVENT_NO_DIP_STRING L"0.0.0.0"
  3. typedef struct _NLB_WMI_EVENT
  4. {
  5. GUID *pGuid;
  6. BOOL Enable;
  7. }NLB_WMI_EVENT;
  8. extern NLB_WMI_EVENT NlbWmiEvents[];
  9. typedef enum
  10. {
  11. NodeControlEvent = 0, // DO NOT change this value. It is used as an index into the NlbWmiEvents array
  12. PortRuleControlEvent,
  13. ConvergingEvent,
  14. ConvergedEvent,
  15. StartupEvent,
  16. ShutdownEvent
  17. }NlbWmiEventId;
  18. typedef enum
  19. {
  20. NLB_EVENT_NODE_STARTED = 1,
  21. NLB_EVENT_NODE_STOPPED,
  22. NLB_EVENT_NODE_DRAINING,
  23. NLB_EVENT_NODE_SUSPENDED,
  24. NLB_EVENT_NODE_RESUMED,
  25. NLB_EVENT_NODE_RELOADED,
  26. NLB_EVENT_NODE_BOUND_AND_STARTED,
  27. NLB_EVENT_NODE_BOUND_AND_STOPPED,
  28. NLB_EVENT_NODE_BOUND_AND_SUSPENDED,
  29. NLB_EVENT_NODE_UNBOUND
  30. } NodeControlEventId;
  31. typedef enum
  32. {
  33. NLB_EVENT_PORT_ENABLED = 1,
  34. NLB_EVENT_PORT_DISABLED,
  35. NLB_EVENT_PORT_DRAINING
  36. } PortControlEventId;
  37. typedef enum
  38. {
  39. NLB_EVENT_CONVERGING_BAD_CONFIG = 1,
  40. NLB_EVENT_CONVERGING_NEW_MEMBER,
  41. NLB_EVENT_CONVERGING_UNKNOWN,
  42. NLB_EVENT_CONVERGING_DUPLICATE_HOST_ID,
  43. NLB_EVENT_CONVERGING_NUM_RULES,
  44. NLB_EVENT_CONVERGING_MODIFIED_RULES,
  45. NLB_EVENT_CONVERGING_MEMBER_LOST,
  46. NLB_EVENT_CONVERGING_MODIFIED_PARAMS,
  47. NLB_EVENT_CONVERGING_INVALID_VALUE // Add new events above this value
  48. } ConvergingEventId;
  49. NTSTATUS NlbWmi_Initialize();
  50. VOID NlbWmi_Shutdown();
  51. NTSTATUS NlbWmi_System_Control (PVOID DeviceObject, PIRP pIrp);
  52. NTSTATUS NlbWmi_Fire_Event(NlbWmiEventId Event, PVOID pvInEventData, ULONG ulInEventDataSize);
  53. void NlbWmi_Fire_NodeControlEvent(PMAIN_CTXT ctxtp, NodeControlEventId Id);
  54. void NlbWmi_Fire_PortControlEvent(PMAIN_CTXT ctxtp, PortControlEventId Id, WCHAR *pwcVip, ULONG ulPort);
  55. void NlbWmi_Fire_ConvergingEvent( PMAIN_CTXT ctxtp, ConvergingEventId Cause, WCHAR *pwcInitiatorDip, ULONG ulInitiatorHostPriority);
  56. void NlbWmi_Fire_ConvergedEvent(PMAIN_CTXT ctxtp, ULONG ulHostMap);