main
cs 42 lines 1.93 KB
Raw
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 namespace WixToolset.Firewall
4 {
5 using System.Xml.Linq;
6
7 static class FirewallConstants
8 {
9 internal static readonly XNamespace Namespace = "http://wixtoolset.org/schemas/v4/wxs/firewall";
10 internal static readonly XName FirewallExceptionName = Namespace + "FirewallException";
11 internal static readonly XName RemoteAddressName = Namespace + "RemoteAddress";
12 internal static readonly XName InterfaceName = Namespace + "Interface";
13 internal static readonly XName InterfaceTypeName = Namespace + "InterfaceType";
14 internal static readonly XName LocalAddressName = Namespace + "LocalAddress";
15
16 internal const string IntegerNotSetString = "-2147483648";
17
18 // from icftypes.h
19 public const int NET_FW_RULE_DIR_IN = 1;
20 public const int NET_FW_RULE_DIR_OUT = 2;
21 public const int NET_FW_IP_PROTOCOL_TCP = 6;
22 public const int NET_FW_IP_PROTOCOL_UDP = 17;
23
24 // from icftypes.h
25 public const int NET_FW_PROFILE2_DOMAIN = 0x0001;
26 public const int NET_FW_PROFILE2_PRIVATE = 0x0002;
27 public const int NET_FW_PROFILE2_PUBLIC = 0x0004;
28 public const int NET_FW_PROFILE2_ALL = 0x7FFFFFFF;
29
30 // from icftypes.h
31 public const int NET_FW_EDGE_TRAVERSAL_TYPE_DENY = 0;
32 public const int NET_FW_EDGE_TRAVERSAL_TYPE_ALLOW = 1;
33 public const int NET_FW_EDGE_TRAVERSAL_TYPE_DEFER_TO_APP = 2;
34 public const int NET_FW_EDGE_TRAVERSAL_TYPE_DEFER_TO_USER = 3;
35
36 /// <summary>
37 /// Firewall rules are stored in the registry.<br/>
38 /// The pipe character is used to split firewall rule attributes, so is not permitted in any of them.
39 /// </summary>
40 public const char FORBIDDEN_FIREWALL_CHAR = '|';
41 }
42 }