3.1.4.51 R_DhcpSetSubnetInfoVQ (Opnum 50)

The R_DhcpSetSubnetInfoVQ method sets/modifies the information about an IPv4 subnet defined on the DHCPv4 server. This method is an extension of the R_DhcpSetSubnetInfo method in which NAP state is not set.

 DWORD R_DhcpSetSubnetInfoVQ(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DHCP_IP_ADDRESS SubnetAddress,
   [in, ref] 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 subnet information is modified.

SubnetInfoVQ: This is a pointer to a DHCP_SUBNET_INFO_VQ (section 2.2.1.2.45) structure that contains the information about the IPv4 subnet that is modified in the existing IPv4 subnet identified by the SubnetAddress parameter. The structure DHCP_HOST_INFO (section 2.2.1.2.7) (referred by the PrimaryHost member) stored in the SubnetInfoVQ parameter MUST be ignored by both the caller and the server.

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.

0x00004E2D

ERROR_DHCP_JET_ERROR

An error occurred while accessing the DHCP server database.

The opnum field value for this method is 50.

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

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

  • If the SubnetInfoVQ input parameter is NULL, return ERROR_INVALID_PARAMETER.

  • If the SubnetAddress input parameter is not the same as the SubnetAddress member of the SubnetInfoVQ input parameter, return ERROR_INVALID_PARAMETER.

  • If the bitwise AND operation of the SubnetAddress input parameter with the SubnetMask member of the SubnetInfoVQ input parameter is not the same as the SubnetAddress input parameter, 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.

  • If the DHCPv4Scope ADM element entry corresponding to the SubnetAddress parameter is not found, return ERROR_DHCP_SUBNET_NOT_PRESENT.

  • Modify this DHCPv4Scope.ScopeInfo ADM element with information in the SubnetInfoVQ parameter. The structure DHCP_HOST_INFO (referred by the PrimaryHost member) stored in the SubnetInfoVQ parameter is ignored by the server.<43>

  • Return ERROR_SUCCESS.

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