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.

102 lines
3.2 KiB

  1. /***************************************************************************
  2. *
  3. * Copyright (C) 2001-2002 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dpnhupnplocals.h
  6. *
  7. * Content: Header for DPNHUPNP global variables and functions found in
  8. * dpnhupnpdllmain.cpp.
  9. *
  10. * History:
  11. * Date By Reason
  12. * ======== ======== =========
  13. * 04/16/01 VanceO Split DPNATHLP into DPNHUPNP and DPNHPAST.
  14. *
  15. ***************************************************************************/
  16. //=============================================================================
  17. // Registry locations
  18. //=============================================================================
  19. #define REGKEY_COMPONENTSUBKEY L"DPNHUPnP"
  20. #ifndef DPNBUILD_NOHNETFWAPI
  21. #define REGKEY_ACTIVEFIREWALLMAPPINGS L"ActiveFirewallMappings"
  22. #endif // ! DPNBUILD_NOHNETFWAPI
  23. #define REGKEY_ACTIVENATMAPPINGS L"ActiveNATMappings"
  24. ///=============================================================================
  25. // External defines
  26. //=============================================================================
  27. #define OVERRIDEMODE_DEFAULT 0 // leave settings alone
  28. #define OVERRIDEMODE_FORCEON 1 // force it to be on, regardless of Initialize flags
  29. #define OVERRIDEMODE_FORCEOFF 2 // force it to be off, regardless of Initialize flags
  30. ///=============================================================================
  31. // External variable references
  32. //=============================================================================
  33. extern volatile LONG g_lOutstandingInterfaceCount;
  34. extern DNCRITICAL_SECTION g_csGlobalsLock;
  35. extern CBilink g_blNATHelpUPnPObjs;
  36. extern DWORD g_dwHoldRand;
  37. extern DWORD g_dwUPnPMode;
  38. #ifndef DPNBUILD_NOHNETFWAPI
  39. extern DWORD g_dwHNetFWAPIMode;
  40. #endif // ! DPNBUILD_NOHNETFWAPI
  41. extern DWORD g_dwSubnetMaskV4;
  42. extern DWORD g_dwNoActiveNotifyPollInterval;
  43. extern DWORD g_dwMinUpdateServerStatusInterval;
  44. extern BOOL g_fNoAsymmetricMappings;
  45. extern BOOL g_fUseLeaseDurations;
  46. extern INT g_iUnicastTTL;
  47. extern INT g_iMulticastTTL;
  48. extern DWORD g_dwUPnPAnnounceResponseWaitTime;
  49. extern DWORD g_dwUPnPConnectTimeout;
  50. extern DWORD g_dwUPnPResponseTimeout;
  51. #ifndef DPNBUILD_NOHNETFWAPI
  52. extern BOOL g_fMapUPnPDiscoverySocket;
  53. #endif // ! DPNBUILD_NOHNETFWAPI
  54. extern BOOL g_fUseMulticastUPnPDiscovery;
  55. extern DWORD g_dwDefaultGatewayV4;
  56. extern DWORD g_dwPollIntervalBackoff;
  57. extern DWORD g_dwMaxPollInterval;
  58. extern BOOL g_fKeepPollingForRemoteGateway;
  59. extern DWORD g_dwReusePortTime;
  60. extern DWORD g_dwCacheLifeFound;
  61. extern DWORD g_dwCacheLifeNotFound;
  62. #ifdef DBG
  63. extern WCHAR g_wszUPnPTransactionLog[256];
  64. #endif // DBG
  65. //=============================================================================
  66. // External function references
  67. //=============================================================================
  68. void ReadRegistrySettings(void);
  69. DWORD GetGlobalRand(void);
  70. #ifndef WINCE
  71. #ifdef DBG
  72. void SetDefaultProxyBlanket(IUnknown * pUnk, const char * const szObjectName);
  73. #define SETDEFAULTPROXYBLANKET(p) SetDefaultProxyBlanket(p, #p)
  74. #else // ! DBG
  75. void SetDefaultProxyBlanket(IUnknown * pUnk);
  76. #define SETDEFAULTPROXYBLANKET(p) SetDefaultProxyBlanket(p)
  77. #endif // ! DBG
  78. #endif // ! WINCE