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.

137 lines
3.0 KiB

  1. //============================================================================
  2. // Copyright (c) 1995, Microsoft Corporation
  3. //
  4. // File: route.h
  5. //
  6. // History:
  7. // V Raman 2-5-1997 Created.
  8. //
  9. // Declarations for routines that manipulate routes entries
  10. //============================================================================
  11. #ifndef _ROUTE_H_
  12. #define _ROUTE_H_
  13. DWORD
  14. WINAPI
  15. RtmChangeNotificationCallback(
  16. RTM_ENTITY_HANDLE hRtmHandle,
  17. RTM_EVENT_TYPE retEventType,
  18. PVOID pvContext1,
  19. PVOID pvContext2
  20. );
  21. VOID
  22. WorkerFunctionProcessRtmChangeNotification(
  23. PVOID pvContext
  24. );
  25. DWORD
  26. ProcessUnMarkedDestination(
  27. PRTM_DEST_INFO prdi
  28. );
  29. DWORD
  30. ProcessRouteDelete(
  31. PRTM_DEST_INFO prdi
  32. );
  33. DWORD
  34. ProcessRouteUpdate(
  35. PRTM_DEST_INFO prdi
  36. );
  37. VOID
  38. DeleteMfeAndRefs(
  39. PLIST_ENTRY ple
  40. );
  41. HANDLE
  42. SelectNextHop(
  43. PRTM_DEST_INFO prdi
  44. );
  45. //----------------------------------------------------------------------------
  46. //
  47. // Route reference operations
  48. //
  49. //----------------------------------------------------------------------------
  50. //----------------------------------------------------------------------------
  51. // MFE_REFERENCE_ENTRY
  52. //
  53. // Each route maintains a list of MFE entries that use this route for
  54. // their RPF check. Each entry in this reference list stores the
  55. // source, group info.
  56. //
  57. // Fields descriptions are left as an exercise to the reader.
  58. //
  59. //----------------------------------------------------------------------------
  60. typedef struct _ROUTE_REFERENCE_ENTRY
  61. {
  62. LIST_ENTRY leRefList;
  63. DWORD dwGroupAddr;
  64. DWORD dwGroupMask;
  65. DWORD dwSourceAddr;
  66. DWORD dwSourceMask;
  67. HANDLE hNextHop;
  68. } ROUTE_REFERENCE_ENTRY, *PROUTE_REFERENCE_ENTRY;
  69. VOID
  70. AddSourceGroupToRouteRefList(
  71. DWORD dwSourceAddr,
  72. DWORD dwSourceMask,
  73. DWORD dwGroupAddr,
  74. DWORD dwGroupMask,
  75. HANDLE hNextHop,
  76. PBYTE pbBuffer
  77. );
  78. BOOL
  79. FindRouteRefEntry(
  80. PLIST_ENTRY pleRefList,
  81. DWORD dwSourceAddr,
  82. DWORD dwSourceMask,
  83. DWORD dwGroupAddr,
  84. DWORD dwGroupMask,
  85. PROUTE_REFERENCE_ENTRY * pprre
  86. );
  87. VOID
  88. DeleteRouteRef(
  89. PROUTE_REFERENCE_ENTRY prre
  90. );
  91. //
  92. // imported from packet.c
  93. //
  94. BOOL
  95. IsMFEPresent(
  96. DWORD dwSourceAddr,
  97. DWORD dwSourceMask,
  98. DWORD dwGroupAddr,
  99. DWORD dwGroupMask,
  100. BOOL bAddToForwarder
  101. );
  102. #endif // _ROUTE_H_