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.

181 lines
5.5 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module:
  4. msdp\msdprm.h
  5. Abstract:
  6. Contains type definitions and declarations for MSDP,
  7. used by the IP Router Manager.
  8. Revistion History:
  9. Dave Thaler May-21-1999 Created.
  10. --*/
  11. #ifndef _MSDPRM_H_
  12. #define _MSDPRM_H_
  13. //---------------------------------------------------------------------------
  14. // CONSTANT DECLARATIONS
  15. //---------------------------------------------------------------------------
  16. #define MSDP_CONFIG_VERSION_500 500
  17. //---------------------------------------------------------------------------
  18. // constants identifying MSDP's MIB tables
  19. //---------------------------------------------------------------------------
  20. //---------------------------------------------------------------------------
  21. // constants used for the field MSDP_GLOBAL_CONFIG::LoggingLevel
  22. //---------------------------------------------------------------------------
  23. #define MSDP_LOGGING_NONE 0
  24. #define MSDP_LOGGING_ERROR 1
  25. #define MSDP_LOGGING_WARN 2
  26. #define MSDP_LOGGING_INFO 3
  27. //---------------------------------------------------------------------------
  28. // STRUCTURE DEFINITIONS
  29. //---------------------------------------------------------------------------
  30. //---------------------------------------------------------------------------
  31. // struct: MSDP_IPV4_PEER_CONFIG
  32. //
  33. // This MIB entry describes per-peer configuration.
  34. // All IP address fields must be in network order.
  35. //---------------------------------------------------------------------------
  36. #define MSDP_PEER_CONFIG_KEEPALIVE 0x01
  37. // unused 0x02
  38. #define MSDP_PEER_CONFIG_CONNECTRETRY 0x04
  39. #define MSDP_PEER_CONFIG_CACHING 0x08
  40. #define MSDP_PEER_CONFIG_DEFAULTPEER 0x10
  41. #define MSDP_PEER_CONFIG_PASSIVE 0x20 // derived flag
  42. #define MSDP_ENCAPS_NONE 0
  43. #define MSDP_ENCAPS_TCP 1
  44. #define MSDP_ENCAPS_UDP 2
  45. #define MSDP_ENCAPS_GRE 3
  46. #define MSDP_ENCAPS_DEFAULT MSDP_ENCAPS_NONE
  47. typedef struct _MSDP_IPV4_PEER_CONFIG {
  48. IPV4_ADDRESS ipRemoteAddress;
  49. IPV4_ADDRESS ipLocalAddress;
  50. // Or'ing of the flags listed above
  51. DWORD dwConfigFlags;
  52. ULONG ulKeepAlive;
  53. ULONG ulConnectRetry;
  54. DWORD dwEncapsMethod;
  55. } MSDP_IPV4_PEER_CONFIG, *PMSDP_IPV4_PEER_CONFIG;
  56. #define MSDP_STATE_IDLE 0
  57. #define MSDP_STATE_CONNECT 1
  58. #define MSDP_STATE_ACTIVE 2
  59. #define MSDP_STATE_OPENSENT 3
  60. #define MSDP_STATE_OPENCONFIRM 4
  61. #define MSDP_STATE_ESTABLISHED 5
  62. typedef struct _MSDP_IPV4_PEER_ENTRY {
  63. MSDP_IPV4_PEER_CONFIG;
  64. DWORD dwState;
  65. ULONG ulRPFFailures;
  66. ULONG ulInSAs;
  67. ULONG ulOutSAs;
  68. ULONG ulInSARequests;
  69. ULONG ulOutSARequests;
  70. ULONG ulInSAResponses;
  71. ULONG ulOutSAResponses;
  72. ULONG ulInControlMessages;
  73. ULONG ulOutControlMessages;
  74. ULONG ulInDataPackets;
  75. ULONG ulOutDataPackets;
  76. ULONG ulFsmEstablishedTransitions;
  77. ULONG ulFsmEstablishedTime;
  78. ULONG ulInMessageElapsedTime;
  79. } MSDP_IPV4_PEER_ENTRY, *PMSDP_IPV4_PEER_ENTRY;
  80. //----------------------------------------------------------------------------
  81. // struct: MSDP_GLOBAL_CONFIG
  82. //
  83. // This MIB entry stores global configuration for MSDP
  84. // There is only one instance, so this entry has no index.
  85. //
  86. //---------------------------------------------------------------------------
  87. #define MSDP_GLOBAL_FLAG_ACCEPT_ALL 0x01
  88. #define MSDP_MIN_CACHE_LIFETIME 90
  89. typedef struct _MSDP_GLOBAL_CONFIG {
  90. // Fields duplicated in the CONFIGURATION_ENTRY struct
  91. DWORD dwLoggingLevel; // pce->dwLogLevel
  92. DWORD dwFlags;
  93. ULONG ulDefKeepAlive;
  94. ULONG ulDefConnectRetry; // pTpi->usDefaultConnectRetryInterval
  95. // Protocol-specific fields
  96. ULONG ulCacheLifetime;
  97. ULONG ulSAHolddown;
  98. } MSDP_GLOBAL_CONFIG, *PMSDP_GLOBAL_CONFIG;
  99. typedef struct _MSDP_GLOBAL_ENTRY {
  100. MSDP_GLOBAL_CONFIG;
  101. DWORD dwEnabled; // XXX not yet implemented
  102. ULONG ulNumSACacheEntries;
  103. HANDLE hSAAdvTimer;
  104. DWORD dwRouterId;
  105. } MSDP_GLOBAL_ENTRY, *PMSDP_GLOBAL_ENTRY;
  106. typedef struct _MSDP_REQUESTS_ENTRY {
  107. IPV4_ADDRESS ipGroup;
  108. IPV4_ADDRESS ipMask;
  109. IPV4_ADDRESS ipPeer;
  110. } MSDP_REQUESTS_ENTRY, *PMSDP_REQUESTS_ENTRY;
  111. typedef struct _MSDP_REQUESTS_TABLE
  112. {
  113. DWORD dwNumEntries;
  114. MSDP_REQUESTS_ENTRY table[ANY_SIZE];
  115. }MSDP_REQUESTS_TABLE, *PMSDP_REQUESTS_TABLE;
  116. typedef struct _MSDP_SA_CACHE_ENTRY {
  117. IPV4_ADDRESS ipGroupAddr;
  118. IPV4_ADDRESS ipSourceAddr;
  119. IPV4_ADDRESS ipOriginRP;
  120. IPV4_ADDRESS ipPeerLearnedFrom;
  121. IPV4_ADDRESS ipRPFPeer;
  122. ULONG ulInSAs;
  123. ULONG ulInDataPackets;
  124. ULONG ulUpTime;
  125. ULONG ulExpiryTime;
  126. } MSDP_SA_CACHE_ENTRY, *PMSDP_SA_CACHE_ENTRY;
  127. typedef struct _MSDP_SA_CACHE_TABLE
  128. {
  129. DWORD dwNumEntries;
  130. MSDP_SA_CACHE_ENTRY table[ANY_SIZE];
  131. }MSDP_SA_CACHE_TABLE, *PMSDP_SA_CACHE_TABLE;
  132. //---------------------------------------------------------------------------
  133. // MACRO DECLARATIONS
  134. //---------------------------------------------------------------------------
  135. //----------------------------------------
  136. // constants identifying MSDP's MIB tables
  137. #define MIBID_MSDP_GLOBAL 0
  138. #define MIBID_MSDP_REQUESTS_ENTRY 1
  139. #define MIBID_MSDP_IPV4_PEER_ENTRY 2
  140. #define MIBID_MSDP_SA_CACHE_ENTRY 3
  141. #endif // _MSDPRM_H_