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.

508 lines
9.2 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. rtrprot.h
  5. Abstract:
  6. This module contains the internal prototypes
  7. Author:
  8. Stefan Solomon 03/03/1995
  9. Revision History:
  10. --*/
  11. #ifndef _RTRPROT_
  12. #define _RTRPROT_
  13. //
  14. // *** Internal Prototypes ***
  15. //
  16. DWORD
  17. GetIpxRouterParameters(VOID);
  18. VOID
  19. InitIfDB(VOID);
  20. VOID
  21. InitAdptDB(VOID);
  22. DWORD
  23. FwInitialize(VOID);
  24. DWORD
  25. StartAdapterManager(VOID);
  26. VOID
  27. StopAdapterManager(VOID);
  28. DWORD
  29. SetGlobalInfo(LPVOID);
  30. DWORD
  31. AddInterface(
  32. IN LPWSTR InterfaceNamep,
  33. IN LPVOID InterfaceInfop,
  34. IN INTERFACE_TYPE InterfaceType,
  35. IN HANDLE hDDMInterface,
  36. IN OUT HANDLE *phInterface);
  37. DWORD
  38. DeleteInterface(HANDLE InterfaceIndex);
  39. DWORD
  40. GetInterfaceInfo(
  41. IN HANDLE InterfaceIndex,
  42. OUT LPVOID InterfaceInfo,
  43. IN OUT DWORD *InterfaceInfoSize);
  44. DWORD
  45. SetInterfaceInfo(
  46. IN HANDLE InterfaceIndex,
  47. IN LPVOID InterfaceInfop);
  48. DWORD APIENTRY
  49. InterfaceConnected (
  50. IN HANDLE hInterface,
  51. IN PVOID pFilter,
  52. IN PVOID pPppProjectionResult
  53. );
  54. VOID
  55. InterfaceDisconnected(
  56. IN HANDLE Interface);
  57. DWORD
  58. InterfaceNotReachable(
  59. IN HANDLE Interface,
  60. IN UNREACHABILITY_REASON Reason);
  61. DWORD
  62. InterfaceReachable(
  63. IN HANDLE Interface);
  64. VOID
  65. UpdateCompleted(PUPDATE_COMPLETE_MESSAGE ucmsgp);
  66. DWORD
  67. SetGlobalInfo(
  68. IN LPVOID pGlobalInfo );
  69. VOID
  70. AdapterNotification(VOID);
  71. VOID
  72. ForwarderNotification(VOID);
  73. LPVOID
  74. GetInfoEntry(PIPX_INFO_BLOCK_HEADER InterfaceInfop,
  75. ULONG InfoEntryType);
  76. DWORD
  77. CreateStaticRoute(PICB icbp,
  78. PIPX_STATIC_ROUTE_INFO StaticRouteInfop);
  79. DWORD
  80. DeleteStaticRoute(ULONG IfIndex,
  81. PIPX_STATIC_ROUTE_INFO StaticRouteInfop);
  82. PICB
  83. GetInterfaceByName(LPWSTR InterfaceNamep);
  84. PICB
  85. GetInterfaceByIndex(ULONG InterfaceIndex);
  86. PIPX_TOC_ENTRY
  87. GetTocEntry(PIPX_INFO_BLOCK_HEADER HeaderInfop,
  88. ULONG InfoType);
  89. VOID
  90. AddIfToDB(PICB icbp);
  91. VOID
  92. RemoveIfFromDB(PICB icbp);
  93. PACB
  94. GetAdapterByNameAndPktType (LPWSTR AdapterName, ULONG PacketType);
  95. VOID
  96. BindInterfaceToAdapter(PICB icbp,
  97. PACB acbp);
  98. VOID
  99. UnbindInterfaceFromAdapter(PICB icbp);
  100. VOID
  101. DeleteAllStaticRoutes(ULONG InterfaceIndex);
  102. DWORD
  103. UpdateStaticIfEntries(
  104. PICB icbp,
  105. HANDLE EnumHandle, // handle for the get next enumeration
  106. ULONG StaticEntrySize,
  107. ULONG NewStaticEntriesCount, // number of new static entries
  108. LPVOID NewStaticEntry, // start of the new entries array
  109. ULONG (*GetNextStaticEntry)(HANDLE EnumHandle, LPVOID entry),
  110. ULONG (*DeleteStaticEntry)(ULONG IfIndex, LPVOID entry),
  111. ULONG (*CreateStaticEntry)(PICB icbp, LPVOID entry));
  112. HANDLE
  113. CreateStaticRoutesEnumHandle(ULONG InterfaceIndex);
  114. DWORD
  115. GetNextStaticRoute(HANDLE EnumHandle, PIPX_STATIC_ROUTE_INFO StaticRtInfop);
  116. VOID
  117. CloseStaticRoutesEnumHandle(HANDLE EnumHandle);
  118. HANDLE
  119. CreateStaticServicesEnumHandle(ULONG InterfaceIndex);
  120. DWORD
  121. GetNextStaticService(HANDLE EnumHandle, PIPX_STATIC_SERVICE_INFO StaticSvInfop);
  122. DWORD
  123. CloseStaticServicesEnumHandle(HANDLE EnumHandle);
  124. DWORD
  125. DeleteAllStaticServices(ULONG InterfaceIndex);
  126. PACB
  127. GetAdapterByIndex(ULONG AdapterIndex);
  128. PICB
  129. GetInterfaceByAdapterName(LPWSTR AdapterName);
  130. DWORD
  131. CreateLocalRoute(PICB icbp);
  132. DWORD
  133. DeleteLocalRoute(PICB icbp);
  134. VOID
  135. GetInterfaceAnsiName(PUCHAR AnsiInterfaceNameBuffer,
  136. PWSTR UnicodeInterfaceNameBuffer);
  137. VOID
  138. InitIfDB(VOID);
  139. VOID
  140. AddToAdapterHt(PACB acbp);
  141. VOID
  142. RemoveFromAdapterHt(PACB acbp);
  143. BOOL
  144. RtCreateTimer(IN PHANDLE TimerHandlep);
  145. BOOL
  146. RtDestroyTimer(IN HANDLE TimerHandle);
  147. BOOL
  148. RtSetTimer(
  149. IN HANDLE TimerHandle,
  150. IN ULONG MillisecondsToExpire,
  151. IN PTIMER_APC_ROUTINE TimerRoutine,
  152. IN PVOID Context
  153. );
  154. BOOL
  155. RtCancelTimer(
  156. IN HANDLE TimerHandle
  157. );
  158. DWORD
  159. StartRoutingProtocols(HANDLE RoutesUpdateEvent, HANDLE ServicesUpdateEvent);
  160. VOID
  161. StopRoutingProtocols(VOID);
  162. DWORD
  163. CreateRoutingProtocolsInterfaces(PIPX_INFO_BLOCK_HEADER InterfaceInfop,
  164. PICB icbp);
  165. DWORD
  166. DeleteRoutingProtocolsInterfaces(ULONG InterfaceIndex);
  167. ULONG
  168. SizeOfRoutingProtocolsIfsInfo(ULONG InterfaceIndex);
  169. ULONG
  170. RoutingProtocolsTocCount(VOID);
  171. DWORD
  172. CreateRoutingProtocolsTocAndInfoEntries(PIPX_INFO_BLOCK_HEADER ibhp,
  173. ULONG InterfaceIndex,
  174. PIPX_TOC_ENTRY *current_tocepp,
  175. PULONG current_NextInfoOffsetp);
  176. DWORD
  177. SetRoutingProtocolsInterfaces(PIPX_INFO_BLOCK_HEADER InterfaceInfop,
  178. ULONG InterfaceIndex);
  179. DWORD
  180. BindRoutingProtocolsIfsToAdapter(ULONG InterfaceIndex,
  181. PIPX_ADAPTER_BINDING_INFO abip);
  182. DWORD
  183. UnbindRoutingProtocolsIfsFromAdapter(ULONG InterfaceIndex);
  184. DWORD
  185. CreateStaticService(PICB icbp,
  186. PIPX_STATIC_SERVICE_INFO ServiceEntry);
  187. DWORD
  188. DeleteStaticService(ULONG InterfaceIndex,
  189. PIPX_STATIC_SERVICE_INFO ServiceEntry);
  190. DWORD
  191. GetFirstService(IN DWORD OrderingMethod,
  192. IN DWORD ExclusionFlags,
  193. IN OUT PIPX_SERVICE Service);
  194. DWORD
  195. GetNextService(IN DWORD OrderingMethod,
  196. IN DWORD ExclusionFlags,
  197. IN OUT PIPX_SERVICE Service);
  198. BOOL
  199. IsService(USHORT Type,
  200. PUCHAR Name,
  201. PIPX_SERVICE Service);
  202. DWORD
  203. GetRoute(ULONG RoutingTable,
  204. PIPX_ROUTE IpxRoutep);
  205. DWORD
  206. GetFirstRoute(ULONG RoutingTable,
  207. PIPX_ROUTE IpxRoutep);
  208. DWORD
  209. GetNextRoute(ULONG RoutingTable,
  210. PIPX_ROUTE IpxRoutep);
  211. BOOL
  212. IsRoute(PUCHAR Network);
  213. DWORD
  214. InitWanNetConfigDbase(VOID);
  215. ULONG
  216. GetNextInterfaceIndex(VOID);
  217. DWORD
  218. CreateGlobalRoute(PUCHAR Network);
  219. DWORD
  220. DeleteGlobalRoute(PUCHAR Network);
  221. DWORD
  222. RtProtRequestRoutesUpdate(ULONG InterfaceIndex);
  223. DWORD
  224. RtProtRequestServicesUpdate(ULONG InterfaceIndex);
  225. DWORD
  226. RtProtSendRoutesUpdate(ULONG InterfaceIndex);
  227. DWORD
  228. RtProtSendServicesUpdate(ULONG InterfaceIndex);
  229. VOID
  230. RtProtCancelRoutesUpdate(ULONG InterfaceIndex);
  231. VOID
  232. RtProtCancelServicesUpdate(ULONG InterfaceIndex);
  233. VOID
  234. CancelUpdateRequest(HANDLE hInterface);
  235. DWORD
  236. GetDIMUpdateResult(HANDLE InterfaceIndex,
  237. LPDWORD UpdateResultp);
  238. VOID
  239. InitUpdateCbs(PICB icbp);
  240. VOID
  241. AdminEnable(PICB icbp);
  242. VOID
  243. AdminDisable(PICB icbp);
  244. VOID
  245. DestroyAllAdapters(VOID);
  246. VOID
  247. DestroyAllInterfaces(VOID);
  248. DWORD
  249. GetServiceCount(VOID);
  250. DWORD
  251. MibCreate(ULONG ProtocolId,
  252. ULONG InputDataSize,
  253. PVOID InputData);
  254. DWORD
  255. MibDelete(ULONG ProtocolId,
  256. ULONG InputDataSize,
  257. PVOID InputData);
  258. DWORD
  259. MibSet(ULONG ProtocolId,
  260. ULONG InputDataSize,
  261. PVOID InputData);
  262. DWORD
  263. MibGet(ULONG ProtocolId,
  264. ULONG InputDataSize,
  265. PVOID InputData,
  266. PULONG OutputDataSize,
  267. PVOID OutputData);
  268. DWORD
  269. MibGetFirst(ULONG ProtocolId,
  270. ULONG InputDataSize,
  271. PVOID InputData,
  272. PULONG OutputDataSize,
  273. PVOID OutputData);
  274. DWORD
  275. MibGetNext(ULONG ProtocolId,
  276. ULONG InputDataSize,
  277. PVOID InputData,
  278. PULONG OutputDataSize,
  279. PVOID OutputData);
  280. DWORD
  281. RequestUpdate(IN HANDLE InterfaceIndex,
  282. IN HANDLE hEvent);
  283. DWORD
  284. GetStaticServicesCount(ULONG InterfaceIndex);
  285. DWORD
  286. GetStaticRoutesCount(ULONG InterfaceIndex);
  287. VOID
  288. DestroyRoutingProtocolCB(PRPCB rpcbp);
  289. PRPCB
  290. GetRoutingProtocolCB(DWORD ProtocolId);
  291. VOID
  292. ConvertAllProtocolRoutesToStatic(ULONG InterfaceIndex,
  293. ULONG RoutingProtocolId);
  294. VOID
  295. ConvertAllServicesToStatic(ULONG InterfaceIndex);
  296. DWORD
  297. SetRoutingProtocolsGlobalInfo(PIPX_INFO_BLOCK_HEADER GlobalInfop);
  298. DWORD
  299. CreateRouteTable(VOID);
  300. DWORD
  301. EnumerateFirstInterfaceIndex(PULONG InterfaceIndexp);
  302. DWORD
  303. EnumerateNextInterfaceIndex(PULONG InterfaceIndexp);
  304. DWORD
  305. RoutingProtocolsEnableIpxInterface(ULONG InterfaceIndex);
  306. DWORD
  307. RoutingProtocolsDisableIpxInterface(ULONG InterfaceIndex);
  308. DWORD
  309. FwEnableIpxInterface(ULONG InterfaceIndex);
  310. DWORD
  311. FwDisableIpxInterface(ULONG InterfaceIndex);
  312. DWORD
  313. RoutingProtocolConnectionRequest(ULONG ProtocolId,
  314. ULONG InterfaceIndex);
  315. VOID
  316. DisableStaticRoutes(ULONG InterfaceIndex);
  317. VOID
  318. DisableStaticRoute(ULONG InterfaceIndex, PUCHAR Network);
  319. VOID
  320. EnableStaticRoutes(ULONG InterfaceIndex);
  321. VOID
  322. ExternalEnableInterface(ULONG InterfaceIndex);
  323. VOID
  324. ExternalDisableInterface(ULONG InterfaceIndex);
  325. NET_INTERFACE_TYPE
  326. MapIpxToNetInterfaceType(PICB icbp);
  327. VOID
  328. StartTracing(VOID);
  329. VOID
  330. Trace(ULONG ComponentID,
  331. char *Format,
  332. ...);
  333. VOID
  334. StopTracing(VOID);
  335. DWORD
  336. RmCreateGlobalRoute(PUCHAR Network);
  337. DWORD
  338. RmAddLocalWkstaDialoutInterface(
  339. IN LPWSTR InterfaceNamep,
  340. IN LPVOID InterfaceInfop,
  341. IN OUT PULONG InterfaceIndexp);
  342. DWORD
  343. RmDeleteLocalWkstaDialoutInterface(ULONG InterfaceIndex);
  344. DWORD
  345. RmGetIpxwanInterfaceConfig(ULONG InterfaceIndex,
  346. PULONG IpxwanConfigRequired);
  347. BOOL
  348. RmIsRoute(PUCHAR Network);
  349. DWORD
  350. RmGetInternalNetNumber(PUCHAR Network);
  351. DWORD
  352. RmUpdateIpxcpConfig (PIPXCP_ROUTER_CONFIG_PARAMS pParams);
  353. DWORD
  354. I_SetFilters(ULONG InterfaceIndex,
  355. ULONG FilterMode, // inbound or outbound
  356. LPVOID FilterInfop);
  357. DWORD
  358. I_GetFilters(ULONG InterfaceIndex,
  359. ULONG FilterMode,
  360. LPVOID FilterInfop,
  361. PULONG FilterInfoSize);
  362. DWORD
  363. DeleteRouteTable(VOID);
  364. #endif