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.

130 lines
5.6 KiB

  1. /********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1990-2000 **/
  4. /********************************************************************/
  5. /* :ts=4 */
  6. //** IPINIT.H - IP initialization definitions.
  7. //
  8. // This file contains all of the definitions for IP that are
  9. // init. time specific.
  10. #ifndef _IPINIT_H_
  11. #define _IPINIT_H_ 1
  12. #define IP_INIT_FAILURE 0 // If we fail.
  13. #define IP_INIT_SUCCESS 1
  14. #define CFG_REQUIRED 1
  15. #define CFG_OPTIONAL 0
  16. #define NET_TYPE_LAN 0 // The local net interface is a LAN.
  17. #define NET_TYPE_WAN 1 // Point to point or other non-LAN network.
  18. #define DEFAULT_TTL 128
  19. #define DEFAULT_TOS 0
  20. #define MINIMUM_MAX_NORM_LOOKUP_MEM 100000 // Bytes => A small value
  21. #define MINIMUM_MAX_FAST_LOOKUP_MEM 100000 // Bytes => A small value
  22. // Small System [ 19 MB- Srv ]
  23. #define DEFAULT_MAX_NORM_LOOKUP_MEM_SMALL 150000 // Bytes => ~1000 Routes
  24. #define DEFAULT_MAX_FAST_LOOKUP_MEM_SMALL 0 // FTrie Disabled
  25. #define DEFAULT_EXPN_LEVELS_SMALL 0 // FTrie Disabled
  26. // Medium System [ 19 to 64 MB Srv ]
  27. #define DEFAULT_MAX_NORM_LOOKUP_MEM_MEDIUM 1500000 // Bytes => ~10000 Routes
  28. #define DEFAULT_MAX_FAST_LOOKUP_MEM_MEDIUM 2500000 // Bytes => A 2.5 MB limit
  29. #define DEFAULT_EXPN_LEVELS_MEDIUM 0x80808080 // Levels =>{8, 16, 24, 32}
  30. // Large System [ 64 MB+ Srv ]
  31. #define DEFAULT_MAX_NORM_LOOKUP_MEM_LARGE 5000000 // Bytes => ~40000 Routes
  32. #define DEFAULT_MAX_FAST_LOOKUP_MEM_LARGE 5000000 // Bytes => A 5.0 MB limit
  33. #define DEFAULT_EXPN_LEVELS_LARGE 0x80808080 // Levels =>{8, 16, 24, 32}
  34. #define MAX_DEFAULT_GWS 5 // Maximum number of default gateways per net.
  35. #define MAX_NAME_SIZE 32 // Maximum length of an adapter name.
  36. #define DEFAULT_FW_PACKETS 50 // Default number of packets for forwarding.
  37. #define DEFAULT_FW_BUFSIZE 74240 // Enough for 50 1480-byte Ethernet packets,
  38. // rounded up to a multiple of 256.
  39. #define DEFAULT_MAX_FW_PACKETS 0xffffffff
  40. //#define DEFAULT_MAX_FW_BUFSIZE 0xffffffff
  41. #define DEFAULT_MAX_FW_BUFSIZE 2097152 // put the limit as 2 Mb
  42. #define DEFAULT_MAX_PENDING 5000
  43. #define TR_RII_ALL 0x80
  44. #define TR_RII_SINGLE 0xC0
  45. #define DEFAULT_ARP_CACHE_LIFE (2L*60L) // 2 minutes
  46. #define DEFAULT_ARP_MIN_VALID_CACHE_LIFE (10L*60L) // 10 miniutes
  47. #define DEFAULT_ARP_RETRY_COUNT 1
  48. /*NOINC*/
  49. // Per-net config structures
  50. typedef struct IFGeneralConfig {
  51. uint igc_zerobcast; // Type of broadcast to be used on this net.
  52. uint igc_mtu; // Max MSS for this net.
  53. uint igc_maxpending; // Max FW pending on this IF.
  54. uint igc_numgws; // Number of default gateways for this
  55. // interface.
  56. IPAddr igc_gw[MAX_DEFAULT_GWS]; // Array of IPaddresses for gateways
  57. uint igc_gwmetric[MAX_DEFAULT_GWS];
  58. uint igc_metric; // metric for NTE routes
  59. uint igc_rtrdiscovery; // Router discovery enabled
  60. IPAddr igc_rtrdiscaddr; // Multicast or BCast?
  61. uint igc_TcpWindowSize; //IF specific window size
  62. uint igc_TcpInitialRTT; // initial rtt in msecs
  63. uchar igc_TcpDelAckTicks; // delayed ack timer in ticks
  64. uchar igc_TcpAckFrequency;// sends before an ack is sent
  65. uchar igc_iftype; // type of interface: allow unicast/mcast/both
  66. uchar igc_disablemediasense; // allow mediasense on interface?
  67. } IFGeneralConfig;
  68. typedef struct IFAddrList {
  69. IPAddr ial_addr; // Address for this interface.
  70. IPMask ial_mask; // Mask to go with this.
  71. } IFAddrList;
  72. /*INC*/
  73. //* Structure of configuration information. A pointer to this information
  74. // is returned from a system-specific config. information routine.
  75. typedef struct IPConfigInfo {
  76. uint ici_gateway; // 1 if we are a gateway, 0 otherwise
  77. uint ici_fwbcast; // 1 if bcasts should be forwarded. Else 0.
  78. uint ici_fwbufsize; // Total size of FW buf size.
  79. uint ici_fwpackets; // Total number of FW packets to have.
  80. uint ici_maxfwbufsize; // Maximum size of FW buffer.
  81. uint ici_maxfwpackets; // Maximum number of FW packets.
  82. uint ici_deadgwdetect; // True if we're doing dead GW detection.
  83. uint ici_pmtudiscovery; // True if we're doing Path MTU discovery.
  84. uint ici_igmplevel; // Level of IGMP we're doing.
  85. uint ici_ttl; // Default TTL.
  86. uint ici_tos; // Default TOS;
  87. uint ici_addrmaskreply; // 0 by default
  88. uint ici_fastroutelookup; // True if we have 'fast route lookup' enabled
  89. uint ici_fastlookuplevels; // Bitmap of levels in the fast lookup scheme
  90. uint ici_maxnormlookupmemory;// Max memory used for the norm lookup scheme
  91. uint ici_maxfastlookupmemory;// Max memory used for the fast lookup scheme
  92. uint ici_TrFunctionalMcst; //Defaults to true, RFC 1469
  93. } IPConfigInfo;
  94. extern uchar TrRii;
  95. typedef struct SetAddrControl {
  96. void *sac_rtn; // Pointer to routine to call when completing request.
  97. void *interface;
  98. ushort nte_context;
  99. BOOLEAN bugcheck_on_duplicate;
  100. BOOLEAN StaticAddr;
  101. } SetAddrControl;
  102. /*NOINC*/
  103. typedef void (*SetAddrRtn)(void *, IP_STATUS);
  104. /*INC*/
  105. #endif // _IPINIT_H_