3.2.4.117 R_DhcpV6SetStatelessStoreParams (Opnum 116)

The R_DhcpV6SetStatelessStoreParams method modifies the configuration settings for DHCPv6 stateless client inventory at the server or scope level.

 DWORD R_DhcpV6SetStatelessStoreParams(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] BOOL fServerLevel,
   [in] DHCP_IPV6_ADDRESS SubnetAddress,
   [in] DWORD FieldModified,
   [in] LPDHCPV6_STATELESS_PARAMS Params
 );

ServerIpAddress: The IP Address of the DHCP server. This parameter is unused.

fServerLevel: A flag representing whether the configuration settings for DHCPv6 stateless client inventory are to be modified at the server level or the scope level. A value of TRUE indicates that the modifications are for the server level; FALSE indicates that the modifications are for the scope level.

SubnetAddress: The IPv6 subnet address for which the configuration settings are to be modified. If the fServerLevel parameter is set to TRUE, this parameter MUST be set to zero.

FieldModified: A DWORD of binary flags that indicates which fields in the DHCPv6_STATELESS_PARAMS structure pointed to by the Params parameter are to be set.

Field to set

Flag

DhcpStatelessPurgeInterval

0x00000001

DhcpStatelessStatus

0x00000002

Params: A pointer to the configuration settings for the DHCPv6 stateless client inventory for a DHCPv6 server.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully. Otherwise, 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 to any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call completed successfully.

0x00020005

ERROR_DHCP_SUBNET_NOT_PRESENT

The IPv6 subnet does not exist on the DHCPv6 server.

The opnum field value for this method is 116.

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

  • Return ERROR_INVALID_PARAMETER if any of the following conditions are true:

    • The Params parameter is a null pointer.

    • The FieldModified parameter contains any bit flags other than the ones listed in this section.

    • The FieldModified parameter is set to DhcpStatelessPurgeInterval, and the PurgeInterval field in the Params parameter is 0.

    • The fServerLevel parameter is FALSE, and the SubnetAddress parameter is 0.

    • The fServerLevel parameter is TRUE, and the SubnetAddress parameter is not 0.

  • Validate that this method is authorized for read/write access as specified in section 3.5.5. If it is not authorized, return ERROR_ACCESS_DENIED.

  • If the pServerLevel parameter is TRUE and the DhcpStatelessStatus flag is set in the FieldModified parameter, set the Status member of the DHCPv6ServerStatelessSettings server ADM element to the value contained in the Status member of the Params parameter and return ERROR_SUCCESS.

  • If the pServerLevel parameter is TRUE and the DhcpStatelessPurgeInterval flag is set in the FieldModified parameter, set the PurgeInterval member of the DHCPv6ServerStatelessSettings server ADM element to the value contained in the PurgeInterval member of the Params parameter and return ERROR_SUCCESS.

  • If the pServerLevel parameter is FALSE, retrieve the DHCPv6ScopesList ADM element and find the DHCPv6Scope value corresponding to the value of the SubnetAddress parameter. If no such value is present, return ERROR_DHCP_SUBNET_NOT_PRESENT. Otherwise:

    • If the DhcpStatelessStatus flag is set in the FieldModified parameter, set the Status member of the DHCPv6Scope.DHCPv6StatelessSettings ADM element to the value contained in the Status member of the Params parameter and return ERROR_SUCCESS.

    • If the DhcpStatelessPurgeInterval flag is set in the FieldModified parameter, set the PurgeInterval member of the DHCPv6Scope.DHCPv6StatelessSettings server ADM element to the value contained in the PurgeInterval member of the Params parameter and return ERROR_SUCCESS.

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