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.

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