Download Precise/RTCS™ User's Guide

Transcript
Function Reference
7.1.134 RTCS_if_rebind_DHCP()
Binds a previously used IP address to the device interface.
Synopsis
uint_32
RTCS_if_rebind_DHCP(
_rtcs_if_handle
_ip_address
_ip_address
uint_32
_ip_address
DHCP_DATA_STRUCT_PTR
uchar_ptr
uint_32
rtcs_if_handle,
address,
netmask,
lease,
server,
params,
optptr,
optlen)
Parameters
handle [in] — RTCS interface handle.
address [in] — IP address for the interface.
netmask [in] — IP address of the network or subnet mask for the interface.
lease [in] — Duration in seconds of the lease.
server [in] — IP address of the DHCP Server.
params — Optional parameters
params->CHOICE_FUNC
params->BIND_FUNC
params->REBIND_FUNC
params->UNBIND_FUNC
params->FAILURE_FUNC
params->FLAGS
optptr [in] — One of the following:
Pointer to the buffer of DHCP options (see RFC 2132).
NULL.
optlen [in] — Number of bytes in the buffer pointed to by optptr.
Description
Function RTCS_if_rebind_DHCP() uses DHCP to get an IP address and bind it to the device interface.
Parameter rtcs_if_handle is returned by RTCS_if_add().
This function blocks until DHCP completes initialization, but not until it binds the interface.
Return Value
• RTCS_OK (success)
• Error code (failure)
See Also
Freescale MQX™ RTCS™ User’s Guide, Rev. 10
Freescale Semiconductor
261