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.

192 lines
5.6 KiB

  1. //============================================================================
  2. // Copyright (c) 1995, Microsoft Corporation
  3. //
  4. // File: RmMgm.h
  5. //
  6. // History:
  7. // V Raman June-24-1997 Created.
  8. //
  9. // Definitions for entry points into IP router manager for MGM
  10. //============================================================================
  11. #ifndef _RMMGM_H_
  12. #define _RMMGM_H_
  13. //----------------------------------------------------------------------------
  14. // constants used for the field IPMGM_GLOBAL_CONFIG::dwLogLevel
  15. //----------------------------------------------------------------------------
  16. #define IPMGM_LOGGING_NONE 0
  17. #define IPMGM_LOGGING_ERROR 1
  18. #define IPMGM_LOGGING_WARN 2
  19. #define IPMGM_LOGGING_INFO 3
  20. //----------------------------------------------------------------------------
  21. //
  22. // Prototypes for callbacks into IP router manager.
  23. // These callbacks are for setting, deleting and querying MFEs in the
  24. // kernel mode forwarder.
  25. //
  26. //----------------------------------------------------------------------------
  27. typedef
  28. DWORD ( * PMGM_ADD_MFE_CALLBACK )(
  29. IN PIPMCAST_MFE pimmEntry
  30. );
  31. typedef
  32. DWORD ( * PMGM_DELETE_MFE_CALLBACK )(
  33. IN PIPMCAST_DELETE_MFE pimdmEntry
  34. );
  35. typedef
  36. DWORD ( * PMGM_GET_MFE_CALLBACK )(
  37. IN OUT PIPMCAST_MFE_STATS pimmsStats
  38. );
  39. typedef
  40. BOOL ( * PMGM_HAS_BOUNDARY_CALLBACK )(
  41. IN DWORD dwIfIndex,
  42. IN DWORD dwGroupAddr
  43. );
  44. //----------------------------------------------------------------------------
  45. // Callbacks supplied by the router manager.
  46. // Hash Table sizes provided by router manager (?)
  47. //----------------------------------------------------------------------------
  48. typedef struct _ROUTER_MANAGER_CONFIG
  49. {
  50. DWORD dwLogLevel;
  51. //------------------------------------------------------------------------
  52. // Hash table constants and callback functions
  53. //------------------------------------------------------------------------
  54. DWORD dwIfTableSize;
  55. DWORD dwGrpTableSize;
  56. DWORD dwSrcTableSize;
  57. //------------------------------------------------------------------------
  58. // Callback functions to update MFE entries in the kernel mode forwarder
  59. //------------------------------------------------------------------------
  60. PMGM_ADD_MFE_CALLBACK pfnAddMfeCallback;
  61. PMGM_DELETE_MFE_CALLBACK pfnDeleteMfeCallback;
  62. PMGM_GET_MFE_CALLBACK pfnGetMfeCallback;
  63. PMGM_HAS_BOUNDARY_CALLBACK pfnHasBoundaryCallback;
  64. } ROUTER_MANAGER_CONFIG, *PROUTER_MANAGER_CONFIG;
  65. //----------------------------------------------------------------------------
  66. // prototype declaration for callback into MGM to indicate
  67. // deletion of MFE from the the kernel mode forwarder.
  68. //
  69. // Used by IP router manager
  70. //----------------------------------------------------------------------------
  71. typedef
  72. DWORD ( * PMGM_INDICATE_MFE_DELETION )(
  73. IN DWORD dwEntryCount,
  74. IN PIPMCAST_DELETE_MFE pimdmDeletedMfes
  75. );
  76. typedef
  77. DWORD ( * PMGM_NEW_PACKET_INDICATION )(
  78. IN DWORD dwSourceAddr,
  79. IN DWORD dwGroupAddr,
  80. IN DWORD dwInIfIndex,
  81. IN DWORD dwInIfNextHopAddr,
  82. IN DWORD dwHdrSize,
  83. IN PBYTE pbPacketHdr
  84. );
  85. typedef
  86. DWORD ( * PMGM_WRONG_IF_INDICATION )(
  87. IN DWORD dwSourceAddr,
  88. IN DWORD dwGroupAddr,
  89. IN DWORD dwInIfIndex,
  90. IN DWORD dwInIfNextHopAddr,
  91. IN DWORD dwHdrSize,
  92. IN PBYTE pbPacketHdr
  93. );
  94. typedef
  95. DWORD ( * PMGM_BLOCK_GROUPS )(
  96. IN DWORD dwFirstGroup,
  97. IN DWORD dwLastGroup,
  98. IN DWORD dwIfIndex,
  99. IN DWORD dwIfNextHopAddr
  100. );
  101. typedef
  102. DWORD ( * PMGM_UNBLOCK_GROUPS )(
  103. IN DWORD dwFirstGroup,
  104. IN DWORD dwLastGroup,
  105. IN DWORD dwIfIndex,
  106. IN DWORD dwIfNextHopAddr
  107. );
  108. //----------------------------------------------------------------------------
  109. // Callbacks supplied to the router manager.
  110. //
  111. //
  112. //----------------------------------------------------------------------------
  113. typedef struct _MGM_CALLBACKS
  114. {
  115. PMGM_INDICATE_MFE_DELETION pfnMfeDeleteIndication;
  116. PMGM_NEW_PACKET_INDICATION pfnNewPacketIndication;
  117. PMGM_WRONG_IF_INDICATION pfnWrongIfIndication;
  118. PMGM_BLOCK_GROUPS pfnBlockGroups;
  119. PMGM_UNBLOCK_GROUPS pfnUnBlockGroups;
  120. } MGM_CALLBACKS, *PMGM_CALLBACKS;
  121. //----------------------------------------------------------------------------
  122. // Initialization routines invoked by router manager
  123. //
  124. //----------------------------------------------------------------------------
  125. DWORD
  126. MgmInitialize(
  127. IN PROUTER_MANAGER_CONFIG prmcRmConfig,
  128. IN OUT PMGM_CALLBACKS pmcCallbacks
  129. );
  130. DWORD
  131. MgmDeInitialize(
  132. );
  133. #endif // _RMMGM_H_