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.

174 lines
7.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997 - 2000
  5. //
  6. // File: H N C S T R S . C P P
  7. //
  8. // Contents: Constant string definitions
  9. //
  10. // Notes:
  11. //
  12. // Author: jonburs 21 June 2000
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #pragma hdrstop
  17. const OLECHAR c_wszNamespace[] = L"\\\\.\\Root\\Microsoft\\HomeNet";
  18. const OLECHAR c_wszWQL[] = L"WQL";
  19. const OLECHAR c_wszStar[] = L"*";
  20. const OLECHAR c_wszHnetConnection[] = L"HNet_Connection";
  21. const OLECHAR c_wszHnetProperties[] = L"HNet_ConnectionProperties";
  22. const OLECHAR c_wszHnetApplicationProtocol[] = L"HNet_ApplicationProtocol";
  23. const OLECHAR c_wszHnetPortMappingProtocol[] = L"HNet_PortMappingProtocol";
  24. const OLECHAR c_wszHnetConnectionPortMapping[] = L"HNet_ConnectionPortMapping2";
  25. const OLECHAR c_wszHnetFWLoggingSettings[] = L"HNet_FirewallLoggingSettings";
  26. const OLECHAR c_wszHnetIcsSettings[] = L"HNet_IcsSettings";
  27. const OLECHAR c_wszHnetResponseRange[] = L"HNet_ResponseRange";
  28. const OLECHAR c_wszPath[] = L"Path";
  29. const OLECHAR c_wszMaxFileSize[] = L"MaxFileSize";
  30. const OLECHAR c_wszLogDroppedPackets[] = L"LogDroppedPackets";
  31. const OLECHAR c_wszLogConnections[] = L"LogConnections";
  32. const OLECHAR c_wszDhcpEnabled[] = L"DhcpEnabled";
  33. const OLECHAR c_wszDnsEnabled[] = L"DnsEnabled";
  34. const OLECHAR c_wszName[] = L"Name";
  35. const OLECHAR c_wszDeviceName[] = L"DeviceName";
  36. const OLECHAR c_wszEnabled[] = L"Enabled";
  37. const OLECHAR c_wszBuiltIn[] = L"BuiltIn";
  38. const OLECHAR c_wszOutgoingIPProtocol[] = L"OutgoingIPProtocol";
  39. const OLECHAR c_wszOutgoingPort[] = L"OutgoingPort";
  40. const OLECHAR c_wszResponseCount[] = L"ResponseCount";
  41. const OLECHAR c_wszResponseArray[] = L"ResponseArray";
  42. const OLECHAR c_wszIPProtocol[] = L"IPProtocol";
  43. const OLECHAR c_wszStartPort[] = L"StartPort";
  44. const OLECHAR c_wszEndPort[] = L"EndPort";
  45. const OLECHAR c_wszPort[] = L"Port";
  46. const OLECHAR c_wszId[] = L"Id";
  47. const OLECHAR c_wszConnection[] = L"Connection";
  48. const OLECHAR c_wszProtocol[] = L"Protocol";
  49. const OLECHAR c_wszTargetName[] = L"TargetName";
  50. const OLECHAR c_wszTargetIPAddress[] = L"TargetIPAddress";
  51. const OLECHAR c_wszTargetPort[] = L"TargetPort";
  52. const OLECHAR c_wszNameActive[] = L"NameActive";
  53. const OLECHAR c_wszIsLanConnection[] = L"IsLanConnection";
  54. const OLECHAR c_wszIsFirewalled[] = L"IsFirewalled";
  55. const OLECHAR c_wszIsIcsPublic[] = L"IsIcsPublic";
  56. const OLECHAR c_wszIsIcsPrivate[] = L"IsIcsPrivate";
  57. const OLECHAR c_wszIsBridgeMember[] = L"IsBridgeMember";
  58. const OLECHAR c_wszIsBridge[] = L"IsBridge";
  59. const OLECHAR c_wszPhonebookPath[] = L"PhonebookPath";
  60. const OLECHAR c_wszGuid[] = L"Guid";
  61. const OLECHAR c_wszHnetFwIcmpSettings[] = L"HNet_FwIcmpSettings";
  62. const OLECHAR c_wszAllowOutboundDestinationUnreachable[] = L"AllowOutboundDestinationUnreachable";
  63. const OLECHAR c_wszAllowOutboundSourceQuench[] = L"AllowOutboundSourceQuench";
  64. const OLECHAR c_wszAllowRedirect[] = L"AllowRedirect";
  65. const OLECHAR c_wszAllowInboundEchoRequest[] = L"AllowInboundEchoRequest";
  66. const OLECHAR c_wszAllowInboundRouterRequest[] = L"AllowInboundRouterRequest";
  67. const OLECHAR c_wszAllowOutboundTimeExceeded[] = L"AllowOutboundTimeExceeded";
  68. const OLECHAR c_wszAllowOutboundParameterProblem[] = L"AllowOutboundParameterProblem";
  69. const OLECHAR c_wszAllowInboundTimestampRequest[] = L"AllowInboundTimestampRequest";
  70. const OLECHAR c_wszAllowInboundMaskRequest[] = L"AllowInboundMaskRequest";
  71. const OLECHAR c_wszDefault[] = L"Default";
  72. const OLECHAR c_wszDefaultIcmpSettingsPath[] = L"HNet_FwIcmpSettings.Name=\"Default\"";
  73. const OLECHAR c_wszHnetConnectionIcmpSetting[] = L"HNet_ConnectionIcmpSetting";
  74. const OLECHAR c_wszIcmpSettings[] = L"IcmpSettings";
  75. const OLECHAR c_wszHnetBridgeMember[] = L"HNet_BridgeMember";
  76. const OLECHAR c_wszBridge[] = L"Bridge";
  77. const OLECHAR c_wszMember[] = L"Member";
  78. const OLECHAR c_wszSelect[] = L"SELECT";
  79. const OLECHAR c_wszFrom[] = L"FROM";
  80. const OLECHAR c_wszWhere[] = L"WHERE";
  81. const OLECHAR c_wsz__Path[] = L"__Relpath";
  82. const OLECHAR c_wszReferencesOf[] = L"REFERENCES OF {";
  83. const OLECHAR c_wszWhereResultClass[] = L"} WHERE ResultClass = ";
  84. const OLECHAR c_wszAssociatorsOf[] = L"ASSOCIATORS OF {";
  85. const OLECHAR c_wszWhereAssocClass[] = L"} WHERE AssocClass = ";
  86. const OLECHAR c_wszPortMappingProtocolQueryFormat[] = L"Port = %u AND IPProtocol = %u";
  87. const OLECHAR c_wszApplicationProtocolQueryFormat[] = L"OutgoingPort = %u AND OutgoingIPProtocol = %u";
  88. const OLECHAR c_wszConnectionPropertiesPathFormat[] = L"HNet_ConnectionProperties.Connection=\"HNet_Connection.Guid=\\\"%s\\\"\"";
  89. const OLECHAR c_wszBackupIpConfiguration[] = L"HNet_BackupIpConfiguration";
  90. const OLECHAR c_wszEnableDHCP[] = L"EnableDHCP";
  91. const OLECHAR c_wszInterfaces[] = L"Interfaces";
  92. const OLECHAR c_wszIPAddress[] = L"IPAddress";
  93. const OLECHAR c_wszSubnetMask[] = L"SubnetMask";
  94. const OLECHAR c_wszDefaultGateway[] = L"DefaultGateway";
  95. const OLECHAR c_wszTcpipParametersKey[] =
  96. L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Tcpip"
  97. L"\\Parameters";
  98. const OLECHAR c_wszZeroIpAddress[] = L"0.0.0.0";
  99. const OLECHAR c_wszSharedAccess[] = L"SharedAccess";
  100. const OLECHAR c_wszDevice[] = L"\\Device\\";
  101. const OLECHAR c_wszServiceCheckQuery[] =
  102. L"SELECT * FROM HNet_ConnectionProperties WHERE IsFirewalled != FALSE"
  103. L" or IsIcsPublic != FALSE or IsIcsPrivate != FALSE";
  104. const OLECHAR c_wszHnetConnectionAutoconfig[] = L"HNet_ConnectionAutoconfig";
  105. // ICS Upgrade named event (has to be the same name in net\config\shell\netsetup\icsupgrd.h)
  106. const OLECHAR c_wszIcsUpgradeEventName[] = L"IcsUpgradeEventName_";
  107. //
  108. // Commonly used string lengths. Generating these at compile time
  109. // saves us a large number of wcslen calls. On debug builds, these
  110. // values are compared with the output of wcslen, and an assertion is
  111. // raised if the values do not match.
  112. //
  113. #define STRING_LENGTH(pwz) \
  114. (sizeof((pwz)) / sizeof((pwz)[0]) - 1)
  115. const ULONG c_cchSelect = STRING_LENGTH(c_wszSelect);
  116. const ULONG c_cchFrom = STRING_LENGTH(c_wszFrom);
  117. const ULONG c_cchWhere = STRING_LENGTH(c_wszWhere);
  118. const ULONG c_cchReferencesOf = STRING_LENGTH(c_wszReferencesOf);
  119. const ULONG c_cchWhereResultClass = STRING_LENGTH(c_wszWhereResultClass);
  120. const ULONG c_cchAssociatorsOf = STRING_LENGTH(c_wszAssociatorsOf);
  121. const ULONG c_cchWhereAssocClass = STRING_LENGTH(c_wszWhereAssocClass);
  122. const ULONG c_cchConnection = STRING_LENGTH(c_wszConnection);
  123. const ULONG c_cchConnectionPropertiesPathFormat = STRING_LENGTH(c_wszConnectionPropertiesPathFormat);
  124. //
  125. // Bindings-related strings
  126. //
  127. const WCHAR c_wszSBridgeMPID[] = L"ms_bridgemp";
  128. const WCHAR c_wszSBridgeSID[] = L"ms_bridge";
  129. const WCHAR *c_pwszBridgeBindExceptions[] = {
  130. L"ms_ndisuio", // Need NDISUIO for wireless adapters; want the wireless UI
  131. // even when the adapter is bridged.
  132. NULL
  133. };
  134. //
  135. // String constants used for IsRoutingProtocolInstalled.
  136. //
  137. const CHAR c_szMprConfigBufferFree[] = "MprConfigBufferFree";
  138. const CHAR c_szMprConfigServerConnect[] = "MprConfigServerConnect";
  139. const CHAR c_szMprConfigServerDisconnect[] = "MprConfigServerDisconnect";
  140. const CHAR c_szMprConfigTransportGetHandle[] = "MprConfigTransportGetHandle";
  141. const CHAR c_szMprConfigTransportGetInfo[] = "MprConfigTransportGetInfo";
  142. const CHAR c_szMprInfoBlockFind[] = "MprInfoBlockFind";
  143. const WCHAR c_wszMprapiDll[] = L"MPRAPI.DLL";
  144. //
  145. // Strings that are used in WinBom homenet install
  146. //
  147. const TCHAR c_szEnableFirewall[] = _T("EnableFirewall");
  148. const TCHAR c_szYes[] = _T("Yes");
  149. const TCHAR c_szNo[] = _T("No");