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.

193 lines
3.4 KiB

  1. //=============================================================================
  2. // Copyright (c) 1997 Microsoft Corporation
  3. //
  4. // File: work.h
  5. //
  6. // Abstract:
  7. // Contains declarations and function prototypes related to work.c.
  8. //
  9. // Author: K.S.Lokesh (lokeshs@) 11-1-97
  10. //
  11. // Revision History:
  12. //=============================================================================
  13. #ifndef _WORK_H_
  14. #define _WORK_H_
  15. //
  16. // WORK_CONTEXT
  17. //
  18. typedef struct _WORK_CONTEXT {
  19. DWORD IfIndex;
  20. DWORD NHAddr;
  21. DWORD Group;
  22. DWORD Source; //v3
  23. // MSG_GEN_QUERY, MSG_GROUP_QUERY_V2(_V3), DELETE_MEMBERSHIP, DELETE_SOURCE
  24. // PROXY_PRUNE, PROXY_JOIN
  25. DWORD WorkType;
  26. } WORK_CONTEXT, *PWORK_CONTEXT;
  27. #define CREATE_WORK_CONTEXT(ptr, Error) {\
  28. ptr = IGMP_ALLOC(sizeof(WORK_CONTEXT), 0x800100,0xaaaa);\
  29. if (ptr==NULL) { \
  30. Error = ERROR_NOT_ENOUGH_MEMORY; \
  31. Trace2(ANY, "Error %d allocating %d bytes for Work context", \
  32. Error, sizeof(WORK_CONTEXT)); \
  33. } \
  34. }
  35. //
  36. // Used by work item to change the querier state
  37. //
  38. typedef struct _QUERIER_CONTEXT {
  39. DWORD IfIndex;
  40. DWORD QuerierIpAddr;
  41. DWORD NewRobustnessVariable;
  42. DWORD NewGenQueryInterval;
  43. } QUERIER_CONTEXT, *PQUERIER_CONTEXT;
  44. VOID
  45. DeleteRasClient (
  46. PRAS_TABLE_ENTRY prte
  47. );
  48. VOID
  49. WF_CompleteIfDeletion (
  50. PIF_TABLE_ENTRY pite
  51. );
  52. VOID
  53. WT_ProcessInputEvent(
  54. PVOID pContext, //NULL
  55. BOOLEAN NotUsed
  56. );
  57. DWORD
  58. ActivateInterface (
  59. PIF_TABLE_ENTRY pite
  60. );
  61. DWORD
  62. T_LastMemQueryTimer (
  63. PVOID pvContext
  64. );
  65. DWORD
  66. T_MembershipTimer (
  67. PVOID pvContext
  68. );
  69. DWORD
  70. T_LastVer1ReportTimer (
  71. PVOID pvContext
  72. );
  73. DWORD
  74. T_RouterV1Timer (
  75. PVOID pvContext
  76. );
  77. //
  78. // LOCAL PROTOTYPES
  79. //
  80. VOID
  81. WF_ProcessInputEvent (
  82. PVOID pContext
  83. );
  84. VOID
  85. ProcessInputOnInterface(
  86. PIF_TABLE_ENTRY pite
  87. );
  88. DWORD
  89. ProcessAddInterface(
  90. IN DWORD IfIndex,
  91. IN NET_INTERFACE_TYPE dwIfType,
  92. IN PVOID pvConfig
  93. );
  94. VOID
  95. WF_TimerProcessing (
  96. PVOID pvContext
  97. );
  98. VOID
  99. CompleteIfDeactivateDelete (
  100. PIF_TABLE_ENTRY pite
  101. );
  102. VOID
  103. DeActivateInterfaceComplete (
  104. PIF_TABLE_ENTRY pite
  105. );
  106. DWORD
  107. T_QueryTimer (
  108. PVOID pvContext
  109. );
  110. DWORD
  111. T_NonQueryTimer (
  112. PVOID pvContext
  113. );
  114. VOID
  115. WF_ProcessPacket (
  116. PVOID pvContext
  117. );
  118. VOID
  119. ProcessPacket (
  120. PIF_TABLE_ENTRY pite,
  121. DWORD InputSrcAddr,
  122. DWORD DstnMcastAddr,
  123. DWORD NumBytes,
  124. PBYTE pPacketData, // igmp packet hdr. data following it ignored
  125. BOOL bRtrAlertSet
  126. );
  127. VOID
  128. WF_BecomeQuerier(
  129. PVOID pvIfIndex
  130. );
  131. VOID
  132. WF_BecomeNonQuerier(
  133. PVOID pvIfIndex
  134. );
  135. DWORD
  136. WF_FinishStopProtocol(
  137. PVOID pContext
  138. );
  139. VOID
  140. ChangeQuerierState(
  141. DWORD IfIndex,
  142. DWORD Flag,
  143. DWORD QuerierIpAddr,
  144. DWORD NewRobustnessVariable, //only for v3:querier->non-querier
  145. DWORD NewGenQueryInterval //only for v3:querier->non-querier
  146. );
  147. #endif //_WORK_H_