3.2.4.118 R_DhcpV6GetStatelessStoreParams (Opnum 117)

The R_DhcpV6GetStatelessStoreParams method retrieves the current DHCPv6 stateless client inventory-related configuration setting at the server or scope level. The caller of this function can free the memory pointed to by the Params parameter by calling the function midl_user_free (section 3).

 DWORD R_DhcpV6GetStatelessStoreParams(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] BOOL fServerLevel,
   [in] DHCP_IPV6_ADDRESS SubnetAddress,
   [out] 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 retrieved at the server level or the scope level. A value of TRUE indicates the server level; FALSE indicates the scope level.

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

Params: A pointer of type LPDHCPV6_STATELESS_PARAMS into which this method will place the configuration settings 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 117.

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 fServerLevel parameter is FALSE, and the SubnetAddress parameter is 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, retrieve the DHCPv6ServerStatelessSettings server ADM element. Assign the values in the Status and PurgeInterval members of DHCPv6ServerStatelessSettings to the Status and PurgeInterval members of the Params parameter, respectively. Return ERROR_SUCCESS.

  • If the pServerLevel parameter is FALSE, retrieve the DHCPv6ScopesList server ADM element. Retrieve the DHCPv6Scope ADM element entry of the DHCPv6ScopesList ADM element corresponding to the SubnetAddress parameter. If no such entry is present, return ERROR_DHCP_SUBNET_NOT_PRESENT. Otherwise, retrieve the DHCPv6Scope.DHCPv6StatelessSettings ADM element for the retrieved DHCPv6Scope ADM element. Assign the values in the Status and PurgeInterval members of the DHCPv6StatelessSettings ADM element to the Status and PurgeInterval members of the Params parameter, respectively. Return ERROR_SUCCESS.

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