3.1.4.50 R_DhcpGetSubnetInfoVQ (Opnum 49)

The R_DhcpGetSubnetInfoVQ method retrieves the information about a specific IPv4 subnet defined on the DHCPv4 server. This method is an extension of R_DhcpGetSubnetInfo method in which the NAP state is not returned. The caller of this function can free the memory pointed to by the SubnetInfoVQ parameter, by calling the function midl_user_free (section 3).

 DWORD R_DhcpGetSubnetInfoVQ(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DHCP_IP_ADDRESS SubnetAddress,
   [out] LPDHCP_SUBNET_INFO_VQ* SubnetInfoVQ
 );

ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.

SubnetAddress: This is of type DHCP_IP_ADDRESS, containing the IPv4 subnet ID for which the information is retrieved.

SubnetInfoVQ: This is a pointer of type LPDHCP_SUBNET_INFO_VQ, in which the information for the subnet matching the ID specified by the SubnetAddress parameter is retrieved.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully, else it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20099, or any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

0x00004E25

ERROR_DHCP_SUBNET_NOT_PRESENT

The specified IPv4 subnet does not exist.

The opnum field value for this method is 49.

When processing this call, the DHCP server MUST do the following:

  • Validate if this method is authorized for read access per section 3.5.4. If not, return the error ERROR_ACCESS_DENIED.

  • If the SubnetInfoVQ parameter is NULL, return ERROR_INVALID_PARAMETER.

  • Retrieve the DHCPv4Scope ADM element entry that has subnet ID equal to the SubnetAddress parameter from the server ADM element DHCPv4ScopesList. For the DHCP_HOST_INFO structure, the IpAddress member is populated as 127.0.0.1 and the other fields are empty.

  • If the DHCPv4Scope ADM element entry corresponding to the SubnetAddress parameter is not found, return ERROR_DHCP_SUBNET_NOT_PRESENT. Copy the DHCPv4Scope.ScopeInfo ADM element with information in the SubnetInfoVQ parameter, and return it to the caller.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].