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.

158 lines
5.0 KiB

  1. //=============================================================================
  2. // Copyright (c) 1997 Microsoft Corporation
  3. //
  4. // File: dvmrp.h
  5. //
  6. // Abstract:
  7. // Contains type definitions and declarations for Dvmrp
  8. //
  9. // Author: K.S.Lokesh (lokeshs@) 1-1-98
  10. //
  11. // Revision History:
  12. //=============================================================================
  13. #ifndef _DVMRP_H_
  14. #define _DVMRP_H_
  15. //----------------------------------------------------------------------------
  16. // constants identifying DVMRPs MIB tables. The "TypeId" is set to this value
  17. //
  18. // DVMRP_GLOBAL_CONFIG_ID : returns the global config
  19. // DVMRP_GLOBAL_STATS_ID : returns the global statistics
  20. // DVMRP_IF_BINDING_ID : returns list of bindings for each interface
  21. // DVMRP_IF_CONFIG_ID : returns the config info for an interface
  22. // DVMRP_IF_STATS_ID : returns the stats for an interface
  23. //----------------------------------------------------------------------------
  24. #define DVMRP_GLOBAL_CONFIG_ID 0
  25. #define DVMRP_GLOBAL_STATS_ID 1
  26. #define DVMRP_IF_BINDING_ID 2
  27. #define DVMRP_IF_CONFIG_ID 3
  28. #define DVMRP_IF_STATS_ID 4
  29. #define DVMRP_LAST_TABLE_ID 7
  30. //----------------------------------------------------------------------------
  31. // constants used for the field DVMRP_GLOBAL_CONFIG::LoggingLevel
  32. //----------------------------------------------------------------------------
  33. #define DVMRP_LOGGING_NONE 0
  34. #define DVMRP_LOGGING_ERROR 1
  35. #define DVMRP_LOGGING_WARN 2
  36. #define DVMRP_LOGGING_INFO 3
  37. //----------------------------------------------------------------------------
  38. // DVMRP_GLOBAL_CONFIG
  39. //----------------------------------------------------------------------------
  40. typedef struct _DVMRP_GLOBAL_CONFIG {
  41. USHORT MajorVersion;
  42. USHORT MinorVersion;
  43. DWORD LoggingLevel;
  44. DWORD RouteReportInterval;
  45. DWORD RouteExpirationInterval;
  46. DWORD RouteHolddownInterval;
  47. DWORD PruneLifetimeInterval;
  48. } DVMRP_GLOBAL_CONFIG, *PDVMRP_GLOBAL_CONFIG;
  49. // defaults
  50. #define DVMRP_ROUTE_REPORT_INTERVAL 60000
  51. #define DVMRP_ROUTE_EXPIRATION_INTERVAL 140000
  52. #define DVMRP_ROUTE_HOLDDOWN_INTERVAL (2*DVMRP_ROUTE_REPORT_INTERVAL)
  53. #define DVMRP_PRUNE_LIFETIME_INTERVAL 7200000
  54. //----------------------------------------------------------------------------
  55. // DVMRP_ADDR_MASK, DVMRP_PEER_FILTER
  56. //----------------------------------------------------------------------------
  57. typedef struct _DVMRP_ADDR_MASK {
  58. DWORD IpAddr;
  59. DWORD Mask;
  60. } DVMRP_ADDR_MASK, *PDVMRP_ADDR_MASK;
  61. typedef DVMRP_ADDR_MASK DVMRP_PEER_FILTER;
  62. typedef PDVMRP_ADDR_MASK PDVMRP_PEER_FILTER;
  63. //----------------------------------------------------------------------------
  64. // DVMRP_IF_CONFIG
  65. //----------------------------------------------------------------------------
  66. typedef struct _DVMRP_IF_CONFIG {
  67. DWORD ConfigIpAddr; // effective addr can be assigned in config
  68. DWORD Status; // Read only
  69. DWORD Flags;
  70. DWORD Metric;
  71. DWORD ProbeInterval;
  72. DWORD PeerTimeoutInterval;
  73. DWORD MinTriggeredUpdateInterval;
  74. DWORD PeerFilterMode;
  75. DWORD NumPeerFilters;
  76. } DVMRP_IF_CONFIG, *PDVMRP_IF_CONFIG;
  77. #define GET_FIRST_DVMRP_PEER_FILTER(pIfConfig) \
  78. (PDVMRP_PEER_FILTER) (((PDVMRP_IF_CONFIG) pIfConfig) + 1)
  79. #define DVMRP_IF_CONFIG_SIZE(pIfConfig) \
  80. (sizeof(DVMRP_IF_CONFIG) \
  81. + (pIfConfig->NumPeerFilters*sizeof(DVMRP_PEER_FILTER)))
  82. #define DVMRP_PROBE_INTERVAL 10000
  83. #define PEER_TIMEOUT_INTERVAL 35000
  84. #define MIN_TRIGGERED_UPDATE_INTERVAL 5000
  85. //
  86. // values for Flags
  87. //
  88. #define DVMRP_IF_ENABLED_IN_CONFIG 0x0001
  89. #define IS_DVMRP_IF_ENABLED_FLAG_SET(Flags) \
  90. ((Flags) & DVMRP_IF_ENABLED_IN_CONFIG)
  91. //----------------------------------------------------------------------------
  92. // Constants used for DVMRP_IF_CONFIG.PeerFilterMode
  93. //----------------------------------------------------------------------------
  94. #define DVMRP_FILTER_DISABLED 0
  95. #define DVMRP_FILTER_INCLUDE 1
  96. #define DVMRP_FILTER_EXCLUDE 2
  97. /*
  98. * DVMRP message types and flag values shamelessly stolen from
  99. * mrouted/dvmrp.h.
  100. */
  101. #define DVMRP_PROBE 1 /* for finding neighbors */
  102. #define DVMRP_REPORT 2 /* for reporting some or all routes */
  103. #define DVMRP_ASK_NEIGHBORS 3 /* sent by mapper, asking for a list */
  104. /*
  105. * of this router's neighbors
  106. */
  107. #define DVMRP_NEIGHBORS 4 /* response to such a request */
  108. #define DVMRP_ASK_NEIGHBORS2 5 /* as above, want new format reply */
  109. #define DVMRP_NEIGHBORS2 6
  110. #define DVMRP_PRUNE 7 /* prune message */
  111. #define DVMRP_GRAFT 8 /* graft message */
  112. #define DVMRP_GRAFT_ACK 9 /* graft acknowledgement */
  113. #endif // _DVMRP_H_