2.2.15.2.2 DNS_RPC_POLICY_CONTENT

The DNS_RPC_POLICY_CONTENT structure contains the zone scope, cache scope, or server scope details that are used to service the DNS operation if a DNS policy's DNS_RPC_POLICY_ACTION_TYPE (section 2.2.15.1.1.4) is DnsPolicyAllow.

 typedef struct _DnssrvRpcPolicyActionContent {
   LPWSTR pwszScopeName;
   DWORD dwWeight;
 } DNS_RPC_POLICY_CONTENT,
  *PDNS_RPC_POLICY_CONTENT;

pwszScopeName: A NULL-terminated Unicode string containing the name of the zone scope, cache scope or server scope.

dwWeight: A 32-bit unsigned integer that specifies the weight associated with the scope name. The weight of a scope determines the number of responses that are sent from that scope. For example, if a DNS_RPC_POLICY has pContentList with two DNS_RPC_POLICY_CONTENT items having scope name and weight as {Scope1,2} and {Scope2,3}, then when the DNS policy is a match, Scope1 is used to respond to the DNS operation for the first two times the DNS policy is a match. Scope2 is used to respond to the DNS operation for the next three times the DNS policy is a match. The sequence is repeated for further matches of the DNS policy. If a dwWeight of a DNS_RPC_POLICY_CONTENT is not given. its default weight is 1. So if two or more DNS_RPC_POLICY_CONTENT structures are given during DNS_RPC_POLICY creation without a value for dwWeight, all of them will get weight of 1 and the DNS operation will be performed from each scope in a round-robin fashion. Allowed values for weight are any positive number from 1 and higher to 0xFFFFFFFF. If 0 is sent as a weight, the DNS server returns the error DNS_ERROR_POLICY_INVALID_WEIGHT (9981).