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.

259 lines
4.6 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. rmALG.h
  5. Abstract:
  6. This module declares routines for the ALG transparent proxy module's
  7. interface to the IP router-manager. (See ROUTPROT.H for details).
  8. Author:
  9. JPDup 10-Nov-2000
  10. Revision History:
  11. Savasg 22-Aug-2001 Added RRAS Support
  12. --*/
  13. #ifndef _NATHLP_RMALG_H_
  14. #define _NATHLP_RMALG_H_
  15. //
  16. // GLOBAL DATA DECLARATIONS
  17. //
  18. extern COMPONENT_REFERENCE AlgComponentReference;
  19. extern PIP_ALG_GLOBAL_INFO AlgGlobalInfo;
  20. extern CRITICAL_SECTION AlgGlobalInfoLock;
  21. extern HANDLE AlgNotificationEvent;
  22. extern HANDLE AlgTimerQueueHandle;
  23. extern HANDLE AlgPortReservationHandle;
  24. extern ULONG AlgProtocolStopped;
  25. extern const MPR_ROUTING_CHARACTERISTICS AlgRoutingCharacteristics;
  26. extern IP_ALG_STATISTICS AlgStatistics;
  27. extern SUPPORT_FUNCTIONS AlgSupportFunctions;
  28. extern HANDLE AlgTranslatorHandle;
  29. //
  30. // MACRO DECLARATIONS
  31. //
  32. #define REFERENCE_ALG() \
  33. REFERENCE_COMPONENT(&AlgComponentReference)
  34. #define REFERENCE_ALG_OR_RETURN(retcode) \
  35. REFERENCE_COMPONENT_OR_RETURN(&AlgComponentReference,retcode)
  36. #define DEREFERENCE_ALG() \
  37. DEREFERENCE_COMPONENT(&AlgComponentReference)
  38. #define DEREFERENCE_ALG_AND_RETURN(retcode) \
  39. DEREFERENCE_COMPONENT_AND_RETURN(&AlgComponentReference, retcode)
  40. #define ALG_PORT_RESERVATION_BLOCK_SIZE 32
  41. //
  42. // FUNCTION DECLARATIONS
  43. //
  44. VOID
  45. AlgCleanupModule(
  46. VOID
  47. );
  48. BOOLEAN
  49. AlgInitializeModule(
  50. VOID
  51. );
  52. ULONG
  53. APIENTRY
  54. AlgRmStartProtocol(
  55. HANDLE NotificationEvent,
  56. PSUPPORT_FUNCTIONS SupportFunctions,
  57. PVOID GlobalInfo,
  58. ULONG StructureVersion,
  59. ULONG StructureSize,
  60. ULONG StructureCount
  61. );
  62. ULONG
  63. APIENTRY
  64. AlgRmStartComplete(
  65. VOID
  66. );
  67. ULONG
  68. APIENTRY
  69. AlgRmStopProtocol(
  70. VOID
  71. );
  72. ULONG
  73. APIENTRY
  74. AlgRmAddInterface(
  75. PWCHAR Name,
  76. ULONG Index,
  77. NET_INTERFACE_TYPE Type,
  78. ULONG MediaType,
  79. USHORT AccessType,
  80. USHORT ConnectionType,
  81. PVOID InterfaceInfo,
  82. ULONG StructureVersion,
  83. ULONG StructureSize,
  84. ULONG StructureCount
  85. );
  86. ULONG
  87. APIENTRY
  88. AlgRmDeleteInterface(
  89. ULONG Index
  90. );
  91. ULONG
  92. APIENTRY
  93. AlgRmInterfaceStatus(
  94. ULONG Index,
  95. BOOL InterfaceActive,
  96. ULONG StatusType,
  97. PVOID StatusInfo
  98. );
  99. ULONG
  100. APIENTRY
  101. AlgRmBindInterface(
  102. ULONG Index,
  103. PVOID BindingInfo
  104. );
  105. ULONG
  106. APIENTRY
  107. AlgRmUnbindInterface(
  108. ULONG Index
  109. );
  110. ULONG
  111. APIENTRY
  112. AlgRmEnableInterface(
  113. ULONG Index
  114. );
  115. ULONG
  116. APIENTRY
  117. AlgRmDisableInterface(
  118. ULONG Index
  119. );
  120. ULONG
  121. APIENTRY
  122. AlgRmGetGlobalInfo(
  123. PVOID GlobalInfo,
  124. IN OUT PULONG GlobalInfoSize,
  125. IN OUT PULONG StructureVersion,
  126. IN OUT PULONG StructureSize,
  127. IN OUT PULONG StructureCount
  128. );
  129. ULONG
  130. APIENTRY
  131. AlgRmSetGlobalInfo(
  132. PVOID GlobalInfo,
  133. ULONG StructureVersion,
  134. ULONG StructureSize,
  135. ULONG StructureCount
  136. );
  137. ULONG
  138. AlgRmPortMappingChanged(
  139. ULONG Index,
  140. UCHAR Protocol,
  141. USHORT Port
  142. );
  143. // Added for RRAS compatibility
  144. ULONG
  145. APIENTRY
  146. AlgRmGetEventMessage(
  147. OUT ROUTING_PROTOCOL_EVENTS* Event,
  148. OUT MESSAGE* Result
  149. );
  150. ULONG
  151. APIENTRY
  152. AlgRmGetInterfaceInfo(
  153. ULONG Index,
  154. PVOID InterfaceInfo,
  155. IN OUT PULONG InterfaceInfoSize,
  156. IN OUT PULONG StructureVersion,
  157. IN OUT PULONG StructureSize,
  158. IN OUT PULONG StructureCount
  159. );
  160. ULONG
  161. APIENTRY
  162. AlgRmSetInterfaceInfo(
  163. ULONG Index,
  164. PVOID InterfaceInfo,
  165. ULONG StructureVersion,
  166. ULONG StructureSize,
  167. ULONG StructureCount
  168. );
  169. ULONG
  170. APIENTRY
  171. AlgRmMibCreate(
  172. ULONG InputDataSize,
  173. PVOID InputData
  174. );
  175. ULONG
  176. APIENTRY
  177. AlgRmMibDelete(
  178. ULONG InputDataSize,
  179. PVOID InputData
  180. );
  181. ULONG
  182. APIENTRY
  183. AlgRmMibGet(
  184. ULONG InputDataSize,
  185. PVOID InputData,
  186. OUT PULONG OutputDataSize,
  187. OUT PVOID OutputData
  188. );
  189. ULONG
  190. APIENTRY
  191. AlgRmMibSet(
  192. ULONG InputDataSize,
  193. PVOID InputData
  194. );
  195. ULONG
  196. APIENTRY
  197. AlgRmMibGetFirst(
  198. ULONG InputDataSize,
  199. PVOID InputData,
  200. OUT PULONG OutputDataSize,
  201. OUT PVOID OutputData
  202. );
  203. ULONG
  204. APIENTRY
  205. AlgRmMibGetNext(
  206. ULONG InputDataSize,
  207. PVOID InputData,
  208. OUT PULONG OutputDataSize,
  209. OUT PVOID OutputData
  210. );
  211. #endif // _NATHLP_RMALG_H_