Source code of Windows XP (NT5)
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.

250 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. rmnat.h
  5. Abstract:
  6. This module declares routines for the NAT module's interface
  7. to the IP router-manager. (See ROUTPROT.H for details).
  8. Author:
  9. Abolade Gbadegesin (aboladeg) 4-Mar-1998
  10. Revision History:
  11. --*/
  12. #ifndef _NATHLP_RMNAT_H_
  13. #define _NATHLP_RMNAT_H_
  14. //
  15. // GLOBAL DATA DECLARATIONS
  16. //
  17. extern COMPONENT_REFERENCE NatComponentReference;
  18. extern PIP_NAT_GLOBAL_INFO NatGlobalInfo;
  19. extern CRITICAL_SECTION NatGlobalInfoLock;
  20. extern HANDLE NatNotificationEvent;
  21. extern ULONG NatProtocolStopped;
  22. extern const MPR_ROUTING_CHARACTERISTICS NatRoutingCharacteristics;
  23. extern SUPPORT_FUNCTIONS NatSupportFunctions;
  24. //
  25. // MACRO DECLARATIONS
  26. //
  27. #define REFERENCE_NAT() \
  28. REFERENCE_COMPONENT(&NatComponentReference)
  29. #define REFERENCE_NAT_OR_RETURN(retcode) \
  30. REFERENCE_COMPONENT_OR_RETURN(&NatComponentReference,retcode)
  31. #define DEREFERENCE_NAT() \
  32. DEREFERENCE_COMPONENT(&NatComponentReference)
  33. #define DEREFERENCE_NAT_AND_RETURN(retcode) \
  34. DEREFERENCE_COMPONENT_AND_RETURN(&NatComponentReference, retcode)
  35. //
  36. // FUNCTION DECLARATIONS
  37. //
  38. VOID
  39. NatCleanupModule(
  40. VOID
  41. );
  42. BOOLEAN
  43. NatInitializeModule(
  44. VOID
  45. );
  46. ULONG
  47. APIENTRY
  48. NatRmStartProtocol(
  49. HANDLE NotificationEvent,
  50. PSUPPORT_FUNCTIONS SupportFunctions,
  51. PVOID GlobalInfo,
  52. ULONG StructureVersion,
  53. ULONG StructureSize,
  54. ULONG StructureCount
  55. );
  56. ULONG
  57. APIENTRY
  58. NatRmStartComplete(
  59. VOID
  60. );
  61. ULONG
  62. APIENTRY
  63. NatRmStopProtocol(
  64. VOID
  65. );
  66. ULONG
  67. APIENTRY
  68. NatRmAddInterface(
  69. PWCHAR Name,
  70. ULONG Index,
  71. NET_INTERFACE_TYPE Type,
  72. ULONG MediaType,
  73. USHORT AccessType,
  74. USHORT ConnectionType,
  75. PVOID InterfaceInfo,
  76. ULONG StructureVersion,
  77. ULONG StructureSize,
  78. ULONG StructureCount
  79. );
  80. ULONG
  81. APIENTRY
  82. NatRmDeleteInterface(
  83. ULONG Index
  84. );
  85. ULONG
  86. APIENTRY
  87. NatRmGetEventMessage(
  88. OUT ROUTING_PROTOCOL_EVENTS* Event,
  89. OUT MESSAGE* Result
  90. );
  91. ULONG
  92. APIENTRY
  93. NatRmGetInterfaceInfo(
  94. ULONG Index,
  95. PVOID InterfaceInfo,
  96. IN OUT PULONG InterfaceInfoSize,
  97. IN OUT PULONG StructureVersion,
  98. IN OUT PULONG StructureSize,
  99. IN OUT PULONG StructureCount
  100. );
  101. ULONG
  102. APIENTRY
  103. NatRmSetInterfaceInfo(
  104. ULONG Index,
  105. PVOID InterfaceInfo,
  106. ULONG StructureVersion,
  107. ULONG StructureSize,
  108. ULONG StructureCount
  109. );
  110. ULONG
  111. APIENTRY
  112. NatRmInterfaceStatus(
  113. ULONG Index,
  114. BOOL InterfaceActive,
  115. ULONG StatusType,
  116. PVOID StatusInfo
  117. );
  118. ULONG
  119. NatRmBindInterface(
  120. ULONG Index,
  121. PVOID BindingInfo
  122. );
  123. ULONG
  124. NatRmUnbindInterface(
  125. ULONG Index
  126. );
  127. ULONG
  128. NatRmEnableInterface(
  129. ULONG Index
  130. );
  131. ULONG
  132. NatRmDisableInterface(
  133. ULONG Index
  134. );
  135. ULONG
  136. APIENTRY
  137. NatRmGetGlobalInfo(
  138. PVOID GlobalInfo,
  139. IN OUT PULONG GlobalInfoSize,
  140. IN OUT PULONG StructureVersion,
  141. IN OUT PULONG StructureSize,
  142. IN OUT PULONG StructureCount
  143. );
  144. ULONG
  145. APIENTRY
  146. NatRmSetGlobalInfo(
  147. PVOID GlobalInfo,
  148. ULONG StructureVersion,
  149. ULONG StructureSize,
  150. ULONG StructureCount
  151. );
  152. ULONG
  153. APIENTRY
  154. NatRmMibCreate(
  155. ULONG InputDataSize,
  156. PVOID InputData
  157. );
  158. ULONG
  159. APIENTRY
  160. NatRmMibDelete(
  161. ULONG InputDataSize,
  162. PVOID InputData
  163. );
  164. ULONG
  165. APIENTRY
  166. NatRmMibGet(
  167. ULONG InputDataSize,
  168. PVOID InputData,
  169. OUT PULONG OutputDataSize,
  170. OUT PVOID OutputData
  171. );
  172. ULONG
  173. APIENTRY
  174. NatRmMibSet(
  175. ULONG InputDataSize,
  176. PVOID InputData
  177. );
  178. ULONG
  179. APIENTRY
  180. NatRmMibGetFirst(
  181. ULONG InputDataSize,
  182. PVOID InputData,
  183. OUT PULONG OutputDataSize,
  184. OUT PVOID OutputData
  185. );
  186. ULONG
  187. APIENTRY
  188. NatRmMibGetNext(
  189. ULONG InputDataSize,
  190. PVOID InputData,
  191. OUT PULONG OutputDataSize,
  192. OUT PVOID OutputData
  193. );
  194. ULONG
  195. APIENTRY
  196. NatRmConnectClient(
  197. ULONG Index,
  198. PVOID ClientAddress
  199. );
  200. ULONG
  201. APIENTRY
  202. NatRmDisconnectClient(
  203. ULONG Index,
  204. PVOID ClientAddress
  205. );
  206. #endif // _NATHLP_RMNAT_H_