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.

235 lines
5.4 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. fwif.h
  5. Abstract:
  6. This module contains the definitions of the internal Forwarder APIs
  7. used by the router manager
  8. Author:
  9. Stefan Solomon 03/16/1995
  10. Revision History:
  11. --*/
  12. #ifndef _FWIF_
  13. #define _FWIF_
  14. //*********************************************************
  15. // *
  16. // Forwarder Module APIs *
  17. // *
  18. //*********************************************************
  19. //
  20. // Forwarder Interface Management
  21. //
  22. // Forwarder if config info
  23. typedef struct _FW_IF_INFO {
  24. ULONG NetbiosAccept;
  25. ULONG NetbiosDeliver;
  26. } FW_IF_INFO, *PFW_IF_INFO;
  27. // Forwarder if statistics
  28. typedef IPX_IF_STATS FW_IF_STATS, *PFW_IF_STATS;
  29. typedef struct _FW_DIAL_REQUEST {
  30. ULONG IfIndex; // Interface from which packet came
  31. UCHAR Packet[30]; // Packet that caused the
  32. // the connection (at least size of the
  33. // IPX header)
  34. } FW_DIAL_REQUEST, *PFW_DIAL_REQUEST;
  35. DWORD
  36. FwStart (
  37. ULONG RouteHashTableSize,
  38. BOOL ThisMachineOnly // allow access to this machine only
  39. ); // for dialin clients
  40. DWORD
  41. FwStop (
  42. void
  43. );
  44. DWORD
  45. FwUpdateConfig(
  46. BOOL ThisMachineOnly
  47. );
  48. DWORD
  49. FwCreateInterface (
  50. IN ULONG InterfaceIndex,
  51. IN NET_INTERFACE_TYPE InterfaceType,
  52. IN PFW_IF_INFO FwIfInfo
  53. );
  54. DWORD
  55. FwDeleteInterface (
  56. IN ULONG InterfaceIndex);
  57. DWORD
  58. FwSetInterface (
  59. IN ULONG InterfaceIndex,
  60. IN PFW_IF_INFO FwIfInfo
  61. );
  62. DWORD
  63. FwGetInterface (
  64. IN ULONG InterfaceIndex,
  65. OUT PFW_IF_INFO FwIfInfo,
  66. OUT PFW_IF_STATS FwIfStats
  67. );
  68. //
  69. // This call tells the forwarder that the respective interface is connected
  70. // via the specified adapter
  71. //
  72. DWORD
  73. FwBindFwInterfaceToAdapter (
  74. IN ULONG InterfaceIndex,
  75. IN PIPX_ADAPTER_BINDING_INFO AdptBindingInfo
  76. );
  77. //
  78. // This call tells the forwarder that the connected interface has been
  79. // disconnected.
  80. //
  81. DWORD
  82. FwUnbindFwInterfaceFromAdapter (
  83. IN ULONG InterfaceIndex
  84. );
  85. //
  86. // This call tells the forwarder that the respective interface is disabled
  87. // and should be ignored by the forwarder
  88. //
  89. DWORD
  90. FwDisableFwInterface (
  91. IN ULONG InterfaceIndex
  92. );
  93. //
  94. // This call tells the forwarder that the respective interface is reenabled
  95. // and should be operated on as ususal
  96. //
  97. DWORD
  98. FwEnableFwInterface (
  99. IN ULONG InterfaceIndex
  100. );
  101. // Ioctl is sent to forwarder which completes when an interface
  102. // requires dial out connection.
  103. // When Ioctl completes, lpOverlapped->hEvent will be signalled:
  104. // GetNotificationResult should be called to get final result of the
  105. // operation and the number bytes placed into the request buffer
  106. DWORD
  107. FwNotifyConnectionRequest (
  108. OUT PFW_DIAL_REQUEST Request, // Buffer to be filled with interface index
  109. //that requires connection plus packet
  110. // that forced it
  111. IN ULONG RequestSize, // Size of the buffer (must at least
  112. // be sizeof (FW_DIAL_REQUEST)
  113. IN LPOVERLAPPED lpOverlapped // structure for asyncrhronous
  114. // operation, hEvent must be set
  115. );
  116. // Returns result of notification request. Should be called when
  117. // the event set in the lpOverlapped structure is signalled.
  118. //
  119. DWORD
  120. FwGetNotificationResult (
  121. IN LPOVERLAPPED lpOverlapped,
  122. OUT PULONG nBytes // Number of bytes placed into
  123. // the request buffer
  124. );
  125. //
  126. // Call to tell the forwarder that its connection request on a certain interface
  127. // cannot be completed.
  128. // The reason this cannot get completed is one of:
  129. //
  130. // 1. The physical connection failed. This is made known to the router manager
  131. // by DDM calling InterfaceNotReachable.
  132. // 2. The physical connection succeded ok but the IPXCP negotiation failed.
  133. // 3. IPXCP negotiation completed ok but IPXWAN negotiation failed.
  134. //
  135. DWORD
  136. FwConnectionRequestFailed (
  137. IN ULONG InterfaceIndex
  138. );
  139. //
  140. // Informs forwarder that route to the destination network has changed
  141. //
  142. VOID
  143. FwUpdateRouteTable (
  144. DWORD ChangeFlags,
  145. PVOID CurRoute,
  146. PVOID PrevRoute
  147. );
  148. //
  149. // Sets the netbios static routing information on this interface
  150. //
  151. DWORD
  152. FwSetStaticNetbiosNames(ULONG InterfaceIndex,
  153. ULONG NetbiosNamesCount,
  154. PIPX_STATIC_NETBIOS_NAME_INFO NetbiosName);
  155. //
  156. // Gets the netbios static routing information on this interface
  157. //
  158. // If NetbiosNamesCount < nr of names or NetbiosName == NULL then set the
  159. // correct value in NetbiosNamesCount and return ERROR_INSUFFICIENT_BUFFER
  160. DWORD
  161. FwGetStaticNetbiosNames(ULONG InterfaceIndex,
  162. PULONG NetbiosNamesCount,
  163. PIPX_STATIC_NETBIOS_NAME_INFO NetbiosName);
  164. //
  165. // *** Traffic Filters ***
  166. //
  167. #define IPX_TRAFFIC_FILTER_INBOUND 1
  168. #define IPX_TRAFFIC_FILTER_OUTBOUND 2
  169. DWORD
  170. SetFilters(ULONG InterfaceIndex,
  171. ULONG FilterMode, // inbound, outbound
  172. ULONG FilterAction,
  173. ULONG FilterSize,
  174. LPVOID FilterInfo,
  175. ULONG FilterInfoSize);
  176. DWORD
  177. GetFilters(IN ULONG InterfaceIndex,
  178. IN ULONG FilterMode, // inbound, outbound
  179. OUT PULONG FilterAction,
  180. OUT PULONG FilterSize,
  181. OUT LPVOID FilterInfo,
  182. IN OUT PULONG FilterInfoSize);
  183. #endif // _FWIF_