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.

184 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. routing\ip\rtrmgr\route.h
  5. Abstract:
  6. Header for route.c
  7. Revision History:
  8. --*/
  9. #ifndef __RTRMGR_ROUTE_H__
  10. #define __RTRMGR_ROUTE_H__
  11. typedef struct _RTM_HANDLE_INFO
  12. {
  13. DWORD dwProtoId;
  14. BOOL bStatic;
  15. HANDLE hRouteHandle;
  16. }RTM_HANDLE_INFO, *PRTM_HANDLE_INFO;
  17. RTM_HANDLE_INFO g_rgRtmHandles[5];
  18. typedef struct _ROUTE_CHANGE_INFO
  19. {
  20. IO_STATUS_BLOCK ioStatus;
  21. IPRouteNotifyOutput ipNotifyOutput;
  22. } ROUTE_CHANGE_INFO, *PROUTE_CHANGE_INFO;
  23. DWORD
  24. InitializeStaticRoutes(
  25. PICB picb,
  26. PRTR_INFO_BLOCK_HEADER pInfoHdr
  27. );
  28. DWORD
  29. CopyOutClientRoutes(
  30. PICB picb,
  31. PRTR_INFO_BLOCK_HEADER pInfoHdr
  32. );
  33. DWORD
  34. AddSingleRoute(
  35. DWORD dwInterfaceIndex,
  36. PINTERFACE_ROUTE_INFO pRoute,
  37. DWORD dwNextHopMask,
  38. WORD wRtmFlags,
  39. BOOL bValid,
  40. BOOL bAddToStack,
  41. BOOL bP2P,
  42. HANDLE *phRtmRoute OPTIONAL
  43. );
  44. DWORD
  45. DeleteSingleRoute(
  46. DWORD dwInterfaceId,
  47. DWORD dwDestAddr,
  48. DWORD dwDestMask,
  49. DWORD dwNexthop,
  50. DWORD dwProtoId,
  51. BOOL bP2P
  52. );
  53. DWORD
  54. DeleteAllRoutes(
  55. IN DWORD dwIfIndex,
  56. IN BOOL bStaticOnly
  57. );
  58. VOID
  59. DeleteAllClientRoutes(
  60. PICB pIcb,
  61. DWORD dwServerIfIndex
  62. );
  63. VOID
  64. AddAllClientRoutes(
  65. PICB pIcb,
  66. DWORD dwServerIfIndex
  67. );
  68. DWORD
  69. GetNumStaticRoutes(
  70. PICB picb
  71. );
  72. DWORD
  73. GetInterfaceRouteInfo(
  74. IN PICB picb,
  75. IN PRTR_TOC_ENTRY pToc,
  76. IN PBYTE pbDataPtr,
  77. IN OUT PRTR_INFO_BLOCK_HEADER pInfoHdr,
  78. IN OUT PDWORD pdwInfoSize
  79. );
  80. DWORD
  81. ReadAllStaticRoutesIntoBuffer(
  82. PICB picb,
  83. PINTERFACE_ROUTE_INFO pRoutes,
  84. DWORD dwMaxRoutes
  85. );
  86. DWORD
  87. SetRouteInfo(
  88. PICB picb,
  89. PRTR_INFO_BLOCK_HEADER pInfoHdr
  90. );
  91. DWORD
  92. ConvertRoutesToAutoStatic(
  93. DWORD dwProtocolId,
  94. DWORD dwIfIndex
  95. );
  96. VOID
  97. ChangeAdapterIndexForDodRoutes (
  98. DWORD dwInterfaceIndex
  99. );
  100. VOID
  101. AddAutomaticRoutes(
  102. PICB picb,
  103. DWORD dwAddress,
  104. DWORD dwMask
  105. );
  106. VOID
  107. DeleteAutomaticRoutes(
  108. PICB picb,
  109. DWORD dwAddress,
  110. DWORD dwMask
  111. );
  112. VOID
  113. ChangeDefaultRouteMetrics(
  114. IN BOOL bIncrement
  115. );
  116. VOID
  117. AddAllStackRoutes(
  118. PICB pIcb
  119. );
  120. VOID
  121. UpdateDefaultRoutes(
  122. VOID
  123. );
  124. NTSTATUS
  125. PostIoctlForRouteChangeNotification(
  126. ULONG
  127. );
  128. DWORD
  129. HandleRouteChangeNotification(
  130. ULONG
  131. );
  132. VOID
  133. AddLoopbackRoute(
  134. DWORD dwIfAddress,
  135. DWORD dwIfMask
  136. );
  137. VOID
  138. UpdateStackRoutesToRestoreList(
  139. IN PMIB_IPFORWARDROW pirf,
  140. IN DWORD dwFlags
  141. );
  142. BOOL
  143. LookupStackRoutesToRestoreList(
  144. IN PMIB_IPFORWARDROW pmibRoute,
  145. OUT PROUTE_LIST_ENTRY *pRoute
  146. );
  147. #endif // __RTRMGR_ROUTE_H__