<div class="content"><p> </p><p>The <b>DNS_RPC_POLICY</b> structure contains all details
associated with a <span><a href="a95b05da-f1fd-4db3-94b4-817fdaa1f642#gt_5076749f-34a6-48a6-b051-8968a55f4d7b" data-linktype="relative-path">DNS policy</a></span>.</p><dl>
<dd>
<div><pre> 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;
</pre></div>
</dd></dl><p><b>pwszPolicyName:</b> A NULL-terminated Unicode
string containing the name of the DNS policy. The name is unique across a level
as specified in <span><a href="1519cc9d-b588-48fb-b3af-e16b319b805e" data-linktype="relative-path">DNS_RPC_POLICY_LEVEL (section 2.2.15.1.1.3)</a></span>.</p><p><b>level:</b> 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.</p><p><b>appliesOn:</b> This specifies the DNS operation
for which the DNS policy is applicable. The value is of type <span><a href="e2e0048d-03a8-45dc-bc27-b7a4ad14d737" data-linktype="relative-path">DNS_RPC_POLICY_TYPE (section 2.2.15.1.1.5)</a></span>.</p><p><b>action:</b> This specifies the action to be
applied on a DNS operation when there is a DNS policy match. The value is of
type <span><a href="11503add-9e7b-455b-8d49-1c9653e04e80" data-linktype="relative-path">DNS_RPC_POLICY_ACTION_TYPE (section 2.2.15.1.1.4)</a></span>.</p><p><b>condition:</b> This specifies the logical
operation across the <span><a href="a95b05da-f1fd-4db3-94b4-817fdaa1f642#gt_71aebfeb-8787-432e-a8c8-5aa8eacd3e0a" data-linktype="relative-path">DNS policy criteria</a></span>
of a DNS policy, which determines whether the DNS policy match has succeeded or
failed. The value is of type <span><a href="6b98c962-d208-4475-ae18-1a068b4b925c" data-linktype="relative-path">DNS_RPC_POLICY_CONDITION (section 2.2.15.1.1.2)</a></span>.</p><p><b>isEnabled:</b> 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.</p><p><b>dwProcessingOrder:</b> 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.</p><p><b>pszZoneName:</b> A NULL-terminated string
containing the name of the zone for which this DNS policy is configured.</p><p><b>pContentList:</b> An object of type <span><a href="5e1af430-60b2-42a6-958e-5e7c661ab99d" data-linktype="relative-path">DNS_RPC_POLICY_CONTENT_LIST (section 2.2.15.2.3)</a></span>
that has a list of zone scope, cache scope, or server scope with weight as
defined in <span><a href="dd2e4ce5-6eea-4dc4-b9f7-058eb9703381" data-linktype="relative-path">DNS_RPC_POLICY_CONTENT (section 2.2.15.2.2)</a></span>.
If the DNS policy matches the criteria in <b>pCriteriaList</b> 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 <b>dwWeight</b>.</p><p><b>flags:</b> 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 <span><a href="a37b8ff7-1a78-4a15-9ce4-cbe38d41cc19" data-linktype="relative-path">2.2.15.1.1</a></span>.
For details on how this is used during a policy update, see the operation
UpdatePolicy in section <span><a href="9500a7e8-165d-4b13-be86-0ddc43100eef" data-linktype="relative-path">3.1.4.1</a></span>.</p><p><b>dwCriteriaCount:</b> An unsigned integer
containing the number of DNS policy criteria that are configured for this DNS
policy.</p><p><b>pCriteriaList:</b> An array of <span><a href="be16f14d-df74-40fe-892c-0718ebd32e84" data-linktype="relative-path">DNS_RPC_CRITERIA (section 2.2.15.2.4)</a></span>
that are compared with each other using condition
DNS_RPC_POLICY_CONDITION (section 2.2.15.1.1.2) to match a DNS
policy.</p></div>