2.2.15.2.5 DNS_RPC_POLICY

The DNS_RPC_POLICY structure contains all details associated with a DNS policy.

 typedef struct _DnssrvRpcPolicy {
   LPWSTR pwszPolicyName;
   DNS_RPC_POLICY_LEVEL level;
   DNS_RPC_POLICY_TYPE appliesOn;
   DNS_RPC_POLICY_ACTION_TYPE action;
   DNS_RPC_POLICY_CONDITION condition;
   BOOL isEnabled;
   DWORD dwProcessingOrder;
   LPSTR pszZoneName;
   PDNS_RPC_POLICY_CONTENT_LIST pContentList;
   DWORDLONG flags;
   [range (0,50000)] DWORD dwCriteriaCount;
   [size_is (dwCriteriaCount)] PDNS_RPC_CRITERIA pCriteriaList[];
 } DNS_RPC_POLICY,
  *PDNS_RPC_POLICY;

pwszPolicyName: A NULL-terminated Unicode string containing the name of the DNS policy. The name is unique across a level as specified in DNS_RPC_POLICY_LEVEL (section 2.2.15.1.1.3).

level: This specifies whether the policy is configured for a zone (including a cache zone) or is at server level. The value is of type DNS_RPC_POLICY_LEVEL.

appliesOn: This specifies the DNS operation for which the DNS policy is applicable. The value is of type DNS_RPC_POLICY_TYPE (section 2.2.15.1.1.5).

action: This specifies the action to be applied on a DNS operation when there is a DNS policy match. The value is of type DNS_RPC_POLICY_ACTION_TYPE (section 2.2.15.1.1.4).

condition: This specifies the logical operation across the DNS policy criteria of a DNS policy, which determines whether the DNS policy match has succeeded or failed. The value is of type DNS_RPC_POLICY_CONDITION (section 2.2.15.1.1.2).

isEnabled: A BOOL variable that specifies whether a DNS policy is enabled. TRUE indicates that the DNS policy MUST be applied to the DNS operation; FALSE indicates that the DNS policy is disabled and MUST NOT be applied to the DNS operation.

dwProcessingOrder: An unsigned integer that specifies the order in which this DNS policy is processed, along with 0 or more other DNS policies for a given level 2.2.15.1.1.3 and DNS_RPC_POLICY_TYPE (section 2.2.15.1.1.5) during a DNS operation.

pszZoneName: A NULL-terminated string containing the name of the zone for which this DNS policy is configured.

pContentList: An object of type DNS_RPC_POLICY_CONTENT_LIST (section 2.2.15.2.3) that has a list of zone scope, cache scope, or server scope with weight as defined in DNS_RPC_POLICY_CONTENT (section 2.2.15.2.2). If the DNS policy matches the criteria in pCriteriaList and its action is DnsPolicyAllow, then the zone scopes, cache scopes, or server scopes contained in pContentList are used in the DNS operation as per their dwWeight.

flags: This is used during update of a DNS policy. The various bits of flags show which members of the DNS Policy are to be updated. For possible values of the bits of flags. see section 2.2.15.1.1. For details on how this is used during a policy update, see the operation UpdatePolicy in section 3.1.4.1.

dwCriteriaCount: An unsigned integer containing the number of DNS policy criteria that are configured for this DNS policy.

pCriteriaList: An array of DNS_RPC_CRITERIA (section 2.2.15.2.4) that are compared with each other using condition DNS_RPC_POLICY_CONDITION (section 2.2.15.1.1.2) to match a DNS policy.