22.214.171.124 R_DhcpSetServerBindingInfo (Opnum 41)
The R_DhcpSetServerBindingInfo method sets/modifies the IPv4 interface bindings for the DHCPv4 server.
DWORD R_DhcpSetServerBindingInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] ULONG Flags, [in, ref] LPDHCP_BIND_ELEMENT_ARRAY BindElementsInfo );
ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.
Flags: This flag is not used, and it MUST be set to 0.
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
The call was successful.
The network has changed. Retry this operation after checking for the network changes. Network changes may be caused by interfaces that are new or no longer valid, or by IPv4 addresses that are new or no longer valid.
The bindings to internal IPv4 addresses cannot be modified.
The opnum field value for this method is 41.
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 Flags is not 0, or BindElementsInfo is NULL, or there are no entries in the server ADM element DHCPv4ServerBindingInfoList, return ERROR_INVALID_PARAMETER.
If the IPv4 interface binding specified in BindElementsInfo on the DHCPv4 server has the Flags field in the Elements set to DHCP_ENDPOINT_FLAG_CANT_MODIFY and the fBoundToDHCPServer field is set to FALSE, then return ERROR_DHCP_CANNOT_MODIFY_BINDINGS.
If the IPv4 interface binding specified in BindElementsInfo on the DHCPv4 server has the Flags field in the Elements set to DHCP_ENDPOINT_FLAG_CANT_MODIFY and the fBoundToDHCPServer field is set to TRUE, then skip all further checks on the binding and do not attempt to modify it. If all bindings are skipped, return ERROR_SUCCESS.
If no DHCPv4ServerBindingInfo object corresponding to the interface id specified in BindElementInfo is found in DHCPv4ServerBindingInfoList, return ERROR_DHCP_NETWORK_CHANGED.
Modify the matching DHCPv4ServerBindingInfo object with the value of fBoundToDHCPServer specified in BindElementsInfo.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].