3.2.4.119 R_DhcpV6GetStatelessStatistics (Opnum 118)

The R_DhcpV6GetStatelessStatistics method is used to retrieve the statistics of the DHCPv6 stateless server. The caller of this function can free the memory pointed to by the StatelessStats parameter and its ScopeStats member array by calling the function midl_user_free (section 3).

 DWORD R_DhcpV6GetStatelessStatistics(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [out] LPDHCPV6_STATELESS_STATS *StatelessStats
 );

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

StatelessStats: A pointer of type LPDHCPV6_STATELESS_STATS in which this method will place the DHCPv6 stateless server statistics.

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.

The opnum field value for this method is 118.

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

  • If the StatelessStats parameter is a null pointer, return ERROR_INVALID_PARAMETER.

  • 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.

  • Allocate memory equal to the size of a DHCPV6_STATELESS_STATS structure, and store the address of that memory in the location pointed to by the StatelessStats parameter.

  • Retrieve all the statistics stored in the DHCPv6ServerStatelessStatistics ADM element.

  • Allocate memory for the ScopeStats member of the DHCPV6_STATELESS_STATS structure. Allocate an amount of memory sufficient to hold the number of entries in the DHCPv6ServerStatelessStatistics ADM element.

  • Copy the contents of the DHCPv6ServerStatelessStatistics ADM element to the corresponding fields of the DHCPV6_STATELESS_STATS structure.

  • Return ERROR_SUCCESS.

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