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.

145 lines
3.2 KiB

  1. #pragma once
  2. //
  3. // init.c will #include this file with GLOBAL_DATA_ALLOCATE defined.
  4. // That will cause each of these variables to be allocated.
  5. //
  6. #ifdef GLOBAL_DATA_ALLOCATE
  7. #define GLOBAL
  8. #else
  9. #define GLOBAL extern
  10. #endif
  11. //
  12. // DHCP Global data.
  13. //
  14. extern BOOL DhcpGlobalServiceRunning; // initialized global.
  15. GLOBAL LONG DhcpGlobalNdisWanAdaptersCount; // global count of Wan adaptersx
  16. GLOBAL LPSTR DhcpGlobalHostName;
  17. GLOBAL LPWSTR DhcpGlobalHostNameW;
  18. //
  19. // NIC List.
  20. //
  21. GLOBAL LIST_ENTRY DhcpGlobalNICList;
  22. GLOBAL LIST_ENTRY DhcpGlobalRenewList;
  23. //
  24. // Synchronization variables.
  25. //
  26. GLOBAL CRITICAL_SECTION DhcpGlobalRenewListCritSect;
  27. GLOBAL CRITICAL_SECTION DhcpGlobalSetInterfaceCritSect;
  28. GLOBAL CRITICAL_SECTION DhcpGlobalOptionsListCritSect;
  29. GLOBAL HANDLE DhcpGlobalRecomputeTimerEvent;
  30. // waitable timer
  31. GLOBAL HANDLE DhcpGlobalWaitableTimerHandle;
  32. //
  33. // to display success message.
  34. //
  35. GLOBAL BOOL DhcpGlobalProtocolFailed;
  36. //
  37. // This varible tells if we are going to provide the DynDns api support to external clients
  38. // and if we are going to use the corresponding DnsApi. The define below gives the default
  39. // value.
  40. //
  41. GLOBAL DWORD UseMHAsyncDns;
  42. #define DEFAULT_USEMHASYNCDNS 1
  43. //
  44. // This flag tells if we need to use inform or request packets
  45. //
  46. GLOBAL DWORD DhcpGlobalUseInformFlag;
  47. #ifdef BOOTPERF
  48. //
  49. // This flag controls if pinging is disabled on the whole or not.
  50. //
  51. GLOBAL DWORD DhcpGlobalQuickBootEnabledFlag;
  52. #endif
  53. //
  54. // This flag tells if pinging the g/w is disabled. (in this case the g/w is always NOT present)
  55. //
  56. GLOBAL DWORD DhcpGlobalDontPingGatewayFlag;
  57. //
  58. // The # of seconds before retrying according to AUTONET... default is EASYNET_ALLOCATION_RETRY
  59. //
  60. GLOBAL DWORD AutonetRetriesSeconds;
  61. #define RAND_RETRY_DELAY_INTERVAL 30 // randomize +/- 30 SECONDS
  62. #define RAND_RETRY_DELAY ((DWORD)(RAND_RETRY_DELAY_INTERVAL - ((rand()*2*RAND_RETRY_DELAY_INTERVAL)/RAND_MAX)))
  63. //
  64. // Not used on NT. Just here for memphis.
  65. //
  66. GLOBAL DWORD DhcpGlobalMachineType;
  67. //
  68. // Do we need to do a global refresh?
  69. //
  70. GLOBAL ULONG DhcpGlobalDoRefresh;
  71. //
  72. // (global check) autonet is enabled ?
  73. //
  74. GLOBAL ULONG DhcpGlobalAutonetEnabled;
  75. //
  76. // options related lists
  77. //
  78. GLOBAL LIST_ENTRY DhcpGlobalClassesList;
  79. GLOBAL LIST_ENTRY DhcpGlobalOptionDefList;
  80. //
  81. // dhcpmsg.c.. list for doing parallel recv on..
  82. //
  83. GLOBAL LIST_ENTRY DhcpGlobalRecvFromList;
  84. GLOBAL CRITICAL_SECTION DhcpGlobalRecvFromCritSect;
  85. //
  86. // need to for entering exiting external APIs..
  87. //
  88. GLOBAL CRITICAL_SECTION DhcpGlobalApiCritSect;
  89. //
  90. // the client vendor name ( "MSFT 5.0" or something like that )
  91. //
  92. GLOBAL LPSTR DhcpGlobalClientClassInfo;
  93. //
  94. // The following global keys are used to avoid re-opening each time
  95. //
  96. GLOBAL DHCPKEY DhcpGlobalParametersKey;
  97. GLOBAL DHCPKEY DhcpGlobalTcpipParametersKey;
  98. GLOBAL DHCPKEY DhcpGlobalClientOptionKey;
  99. //
  100. // debug variables.
  101. //
  102. #if DBG
  103. GLOBAL DWORD DhcpGlobalDebugFlag;
  104. GLOBAL HANDLE DhcpGlobalDebugFile;
  105. GLOBAL CRITICAL_SECTION DhcpGlobalDebugFileCritSect;
  106. #endif
  107. GLOBAL DWORD DhcpGlobalClientPort, DhcpGlobalServerPort;