3.2.4.34 R_DhcpAuditLogGetParams (Opnum 33)

The R_DhcpAuditLogGetParams method retrieves all audit log–related settings from the DHCP server.

 DWORD R_DhcpAuditLogGetParams(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DWORD Flags,
   [out] LPWSTR_RPC_STRING* AuditLogDir,
   [out] DWORD* DiskCheckInterval,
   [out] DWORD* MaxLogFilesSize,
   [out] DWORD* MinSpaceOnDisk
 );

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

Flags: This flag is not used and MUST be set to 0.

AuditLogDir: A pointer to a null-terminated Unicode string in which the path where the audit logs are placed is returned.

DiskCheckInterval: This is of type DWORD and will contain the number of times the DHCP server writes audit log events to the log file before checking for available disk space on the DHCP server. The caller must allocate memory for this parameter equal to the size of data type DWORD.

MaxLogFilesSize: This is of type DWORD and will contain the maximum size restriction (in megabytes) for the total amount of disk space available for all audit log files created and stored by the DHCP server. The caller must allocate memory for this parameter equal to the size of data type DWORD.

MinSpaceOnDisk: This is of type DWORD and will contain the minimum size requirement (in megabytes) for server disk space that is used during disk checking to determine if sufficient space exists for the server to continue audit logging. The caller must allocate memory for this parameter equal to the size of data type DWORD.

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.

0x00004E2D

ERROR_DHCP_JET_ERROR

An error occurred while accessing the DHCP server database.

The opnum field value for this method is 33.

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

  • If Flags is not 0, return ERROR_INVALID_PARAMETER.

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

  • Retrieve the information stored in the server ADM element DHCPv4AuditLogParams and copy them to the corresponding parameter of the API. AuditLogDir is allocated required memory and set from DHCPv4AuditLogParams.AuditLogDir, DiskCheckInterval is set from DHCPv4AuditLogParams.DiskCheckInterval, MaxLogFilesSize is set from DHCPv4AuditLogParams.MaxLogFilesSize, and MinSpaceOnDisk is set from DHCPv4AuditLogParams.MinSpaceOnDisk.

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