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.

198 lines
5.9 KiB

  1. //
  2. // ALG_Private.idl : IDL source to be use by ALG.exe an IPNatHlp.dll and will be link with the proxyStub HNETCNG.dll
  3. //
  4. // [email protected]
  5. //
  6. // This file will be processed by the MIDL tool to
  7. //
  8. import "oaidl.idl";
  9. import "ocidl.idl";
  10. //
  11. //
  12. // Must be implemented by the IPNatHlp (ALG part)
  13. // The Only consumer of these interface is the ALG.exe
  14. //
  15. [
  16. object,
  17. uuid(FDD384CC-78C6-4E6D-8694-1DACBEE57F96),
  18. helpstring("INat Interface"),
  19. pointer_default(unique)
  20. ]
  21. interface INat : IUnknown
  22. {
  23. [helpstring("method CreateRedirect")]
  24. HRESULT CreateRedirect(
  25. [in] ULONG Flags,
  26. [in] UCHAR Protocol,
  27. [in] ULONG DestinationAddress,
  28. [in] USHORT DestinationPort,
  29. [in] ULONG SourceAddress,
  30. [in] USHORT SourcePort,
  31. [in] ULONG NewDestinationAddress,
  32. [in] USHORT NewDestinationPort,
  33. [in] ULONG NewSourceAddress,
  34. [in] USHORT NewSourcePort,
  35. [in] ULONG RestrictAdapterIndex,
  36. [in] DWORD_PTR dwAlgProcessId,
  37. [in] HANDLE_PTR hCreateEvent,
  38. [in] HANDLE_PTR hDeleteEvent
  39. );
  40. [helpstring("method CancelRedirect")]
  41. HRESULT CancelRedirect(
  42. [in] UCHAR Protocol,
  43. [in] ULONG DestinationAddress,
  44. [in] USHORT DestinationPort,
  45. [in] ULONG SourceAddress,
  46. [in] USHORT SourcePort,
  47. [in] ULONG NewDestinationAddress,
  48. [in] USHORT NewDestinationPort,
  49. [in] ULONG NewSourceAddress,
  50. [in] USHORT NewSourcePort
  51. );
  52. [helpstring("method CreateDynamicRedirect")]
  53. HRESULT CreateDynamicRedirect(
  54. [in] ULONG Flags,
  55. [in] ULONG AdapterIndex,
  56. [in] UCHAR Protocol,
  57. [in] ULONG DestinationAddress,
  58. [in] USHORT DestinationPort,
  59. [in] ULONG SourceAddress,
  60. [in] USHORT SourcePort,
  61. [in] ULONG NewDestinationAddress,
  62. [in] USHORT NewDestinationPort,
  63. [in] ULONG NewSourceAddress,
  64. [in] USHORT NewSourcePort,
  65. [out] HANDLE_PTR* DynamicRedirectHandle
  66. );
  67. [helpstring("method CancelDynamicRedirect")]
  68. HRESULT CancelDynamicRedirect(
  69. [in] HANDLE_PTR DynamicRedirectHandle
  70. );
  71. [helpstring("method GetBestSourceAddressForDestinationAddress")]
  72. HRESULT GetBestSourceAddressForDestinationAddress(
  73. [in] ULONG ulDestinationAddress,
  74. [in] BOOL fDemandDial,
  75. [out] ULONG* pulBestSrcAddress
  76. );
  77. [helpstring("method LookupAdapterPortMapping")]
  78. HRESULT LookupAdapterPortMapping(
  79. [in] ULONG ulAdapterIndex,
  80. [in] UCHAR Protocol,
  81. [in] ULONG ulDestinationAddress,
  82. [in] USHORT usDestinationPort,
  83. [out] ULONG* pulRemapAddress,
  84. [out] USHORT* pusRemapPort
  85. );
  86. [helpstring("method GetOriginalDestinationInformation")]
  87. HRESULT GetOriginalDestinationInformation(
  88. [in] UCHAR Protocol,
  89. [in] ULONG ulDestinationAddress,
  90. [in] USHORT usDestinationPort,
  91. [in] ULONG ulSourceAddress,
  92. [in] USHORT usSourcePort,
  93. [out] ULONG* pulOriginalDestinationAddress,
  94. [out] USHORT* pusOriginalDestinationPort,
  95. [out] ULONG* pulAdapterIndex
  96. );
  97. [helpstring("method ReservePort")]
  98. HRESULT ReservePort(
  99. [in] USHORT PortCount,
  100. [out] USHORT* ReservedPortBase
  101. );
  102. [helpstring("method ReleasePort")]
  103. HRESULT ReleasePort(
  104. [in] USHORT ReservedPortBase,
  105. [in] USHORT PortCount
  106. );
  107. };
  108. //
  109. //
  110. // Implemented in the ALG.exe the only consumer of these interface
  111. // is IPNatHlp.dll
  112. //
  113. [
  114. object,
  115. uuid(B71BFBF1-2AF2-4820-810C-4F8EFF838E60),
  116. pointer_default(unique)
  117. ]
  118. interface IAlgController : IUnknown
  119. {
  120. HRESULT Start(
  121. INat* pINat
  122. );
  123. HRESULT Stop();
  124. HRESULT Adapter_Add(
  125. [in] ULONG Index,
  126. [in] short Type
  127. );
  128. HRESULT Adapter_Remove(
  129. [in] ULONG Index
  130. );
  131. HRESULT Adapter_Modify(
  132. [in] ULONG Index
  133. );
  134. HRESULT Adapter_Bind(
  135. [in] ULONG Index,
  136. [in] ULONG RealAdapterIndex,
  137. [in] ULONG nAddressCount,
  138. [in, size_is(nAddressCount)] LPDWORD anAddress
  139. );
  140. HRESULT Adapter_PortMappingChanged(
  141. [in] ULONG Index,
  142. [in] UCHAR Protocol,
  143. [in] USHORT Port
  144. );
  145. };
  146. [
  147. uuid(B6D1D099-E235-4B99-BA98-7C624FD875DB),
  148. version(1.0),
  149. helpstring("MyICS Private 1.0 Type Library")
  150. ]
  151. library ALGLibPrivate
  152. {
  153. importlib("stdole32.tlb");
  154. importlib("stdole2.tlb");
  155. [
  156. uuid(D6015EC3-FA16-4813-9CA1-DA204574F5DA),
  157. helpstring("AlgController Class")
  158. ]
  159. coclass AlgController
  160. {
  161. [default] interface IAlgController;
  162. };
  163. }