mirror of https://github.com/UMSKT/xpmgr.git
125 lines
3.6 KiB
Plaintext
125 lines
3.6 KiB
Plaintext
/*
|
|
Copyright (c) Microsoft Corporation
|
|
|
|
SYNOPSIS
|
|
|
|
Defines public datatypes used by the ICF API.
|
|
*/
|
|
|
|
import "wtypes.idl";
|
|
|
|
// Represents the different policy types understood by the firewall.
|
|
typedef enum NET_FW_POLICY_TYPE_
|
|
{
|
|
NET_FW_POLICY_GROUP,
|
|
NET_FW_POLICY_LOCAL,
|
|
NET_FW_POLICY_EFFECTIVE,
|
|
NET_FW_POLICY_TYPE_MAX
|
|
} NET_FW_POLICY_TYPE;
|
|
|
|
// Represents the different profile types that make up a firewall policy.
|
|
// Maintained for compatibility with INetFwMgr interface
|
|
typedef enum NET_FW_PROFILE_TYPE_
|
|
{
|
|
NET_FW_PROFILE_DOMAIN,
|
|
NET_FW_PROFILE_STANDARD,
|
|
NET_FW_PROFILE_CURRENT,
|
|
NET_FW_PROFILE_TYPE_MAX
|
|
} NET_FW_PROFILE_TYPE;
|
|
|
|
// Represents the different profile types that make up a firewall policy.
|
|
typedef enum NET_FW_PROFILE_TYPE2_
|
|
{
|
|
NET_FW_PROFILE2_DOMAIN = 0x0001,
|
|
NET_FW_PROFILE2_PRIVATE = 0x0002,
|
|
NET_FW_PROFILE2_PUBLIC = 0x0004,
|
|
NET_FW_PROFILE2_ALL = 0x7FFFFFFF
|
|
} NET_FW_PROFILE_TYPE2;
|
|
|
|
// Used to specify the IP version for a port.
|
|
typedef enum NET_FW_IP_VERSION_
|
|
{
|
|
NET_FW_IP_VERSION_V4,
|
|
NET_FW_IP_VERSION_V6,
|
|
NET_FW_IP_VERSION_ANY,
|
|
NET_FW_IP_VERSION_MAX
|
|
} NET_FW_IP_VERSION;
|
|
|
|
// Used to specify the scope of addresses from which a port can listen.
|
|
typedef enum NET_FW_SCOPE_
|
|
{
|
|
NET_FW_SCOPE_ALL,
|
|
NET_FW_SCOPE_LOCAL_SUBNET,
|
|
NET_FW_SCOPE_CUSTOM,
|
|
NET_FW_SCOPE_MAX
|
|
} NET_FW_SCOPE;
|
|
|
|
// Used to specify the IP protocol when opening/closing firewall ports.
|
|
typedef enum NET_FW_IP_PROTOCOL_
|
|
{
|
|
NET_FW_IP_PROTOCOL_TCP = 6,
|
|
NET_FW_IP_PROTOCOL_UDP = 17,
|
|
NET_FW_IP_PROTOCOL_ANY = 256
|
|
} NET_FW_IP_PROTOCOL;
|
|
|
|
// Well-known services that can be authorized to listen through the firewall.
|
|
// (WinXP and Win2k3 compatability)
|
|
typedef enum NET_FW_SERVICE_TYPE_
|
|
{
|
|
NET_FW_SERVICE_FILE_AND_PRINT,
|
|
NET_FW_SERVICE_UPNP,
|
|
NET_FW_SERVICE_REMOTE_DESKTOP,
|
|
NET_FW_SERVICE_NONE,
|
|
NET_FW_SERVICE_TYPE_MAX
|
|
} NET_FW_SERVICE_TYPE;
|
|
|
|
// Used to specify the direction for the rule
|
|
typedef enum NET_FW_RULE_DIRECTION_
|
|
{
|
|
NET_FW_RULE_DIR_IN = 1,
|
|
NET_FW_RULE_DIR_OUT,
|
|
NET_FW_RULE_DIR_MAX
|
|
} NET_FW_RULE_DIRECTION;
|
|
|
|
// Used to specify the action for a rule or a default setting
|
|
typedef enum NET_FW_ACTION_
|
|
{
|
|
NET_FW_ACTION_BLOCK,
|
|
NET_FW_ACTION_ALLOW,
|
|
NET_FW_ACTION_MAX
|
|
} NET_FW_ACTION;
|
|
|
|
// Used to specify the modifiable state of current policy
|
|
typedef enum NET_FW_MODIFY_STATE_
|
|
{
|
|
NET_FW_MODIFY_STATE_OK, // Changing or adding a firewall rule (or group) to
|
|
// the current profile will take effect.
|
|
NET_FW_MODIFY_STATE_GP_OVERRIDE, // Changing or adding a firewall rule (or group) to
|
|
// the current profile will not take effect because group
|
|
// policy overrides it.
|
|
NET_FW_MODIFY_STATE_INBOUND_BLOCKED // Changing or adding an inbound firewall rule (or group) to
|
|
// the current profile will not take effect because unsolicited
|
|
// inbound traffic is not allowed.
|
|
} NET_FW_MODIFY_STATE;
|
|
|
|
// Represents the different types of rules that the firewall supports.
|
|
typedef enum NET_FW_RULE_CATEGORY_
|
|
{
|
|
NET_FW_RULE_CATEGORY_BOOT,
|
|
NET_FW_RULE_CATEGORY_STEALTH,
|
|
NET_FW_RULE_CATEGORY_FIREWALL,
|
|
NET_FW_RULE_CATEGORY_CONSEC,
|
|
NET_FW_RULE_CATEGORY_MAX
|
|
} NET_FW_RULE_CATEGORY;
|
|
|
|
typedef enum NET_FW_EDGE_TRAVERSAL_TYPE_
|
|
{
|
|
NET_FW_EDGE_TRAVERSAL_TYPE_DENY = 0,
|
|
NET_FW_EDGE_TRAVERSAL_TYPE_ALLOW,
|
|
NET_FW_EDGE_TRAVERSAL_TYPE_DEFER_TO_APP,
|
|
NET_FW_EDGE_TRAVERSAL_TYPE_DEFER_TO_USER
|
|
} NET_FW_EDGE_TRAVERSAL_TYPE;
|
|
|
|
|
|
|