Definition in file dhcpc.c.
Go to the source code of this file.
Functions | |
INT32 | dhcpc_eventlistener (INT8 cbhandle, UINT8 event, UINT32 ipaddr, UINT16 port, UINT16 buffindex, UINT16 datalen) |
DHCP event listener, parses all DHCP replies. | |
INT8 | dhcpc_send_message (UINT8 msg_type) |
Sends DHCP messages. | |
INT8 | dhcpc_init (void) |
Initializes DHCP client. | |
void | dhcpc_run (void) |
DHCP client main state machine. | |
UINT32 | dhcpc_read_n_bytes (UINT8 n) |
Processes received parameter from DHCP server. | |
Variables | |
UINT8 | dhcpc_state |
Holds DHCP clients' state information. | |
UINT8 | dhcpc_timer_handle |
DHCP client's timer handle. | |
INT8 | dhcpc_soc_handle |
DHCP client's UDP socket handle. | |
UINT8 | dhcpc_initialized = 0 |
Holds information if DHCP client is initialized. | |
UINT32 | dhcpc_t1 |
DHCP renew timer. | |
UINT32 | dhcpc_t2 |
DHCP rebind timer. | |
UINT32 | dhcpc_server_identifier |
DHCP server identifier as received from DHCP server. | |
UINT32 | dhcpc_requested_ip |
Holds offered IP address or IP address that we're requesting. |
|
Definition at line 568 of file dhcpc.c. References dhcpc_read_n_bytes(), dhcpc_requested_ip, dhcpc_send_message(), dhcpc_server_identifier, dhcpc_soc_handle, dhcpc_state, dhcpc_t1, dhcpc_t2, RECEIVE_NETWORK_B, and UDP_EVENT_DATA. Referenced by dhcpc_init(). |
|
Definition at line 389 of file dhcpc.c. References dhcpc_requested_ip, dhcpc_server_identifier, dhcpc_soc_handle, dhcpc_state, NETWORK_TX_BUFFER_SIZE, UDP_APP_OFFSET, and udp_send(). Referenced by dhcpc_eventlistener(), and dhcpc_run(). |
|
Definition at line 158 of file dhcpc.c. References dhcpc_eventlistener(), dhcpc_initialized, dhcpc_soc_handle, dhcpc_state, dhcpc_timer_handle, get_timer(), init_timer(), TIMERTIC, udp_getsocket(), udp_open(), UDP_OPT_CHECK_CS, and UDP_OPT_SEND_CS. |
|
Definition at line 201 of file dhcpc.c. References check_timer(), dhcpc_initialized, dhcpc_requested_ip, dhcpc_send_message(), dhcpc_state, dhcpc_t1, dhcpc_t2, dhcpc_timer_handle, init_timer(), and TIMERTIC. |
|
Definition at line 549 of file dhcpc.c. References RECEIVE_NETWORK_B. Referenced by dhcpc_eventlistener(). |
|
This variable holds DHCP clients' current state information. Possible states are DHCP_STATE_INIT_REBOOT, DHCP_STATE_REBOOTING, DHCP_STATE_INIT, DHCP_STATE_SELECTING, DHCP_STATE_REQUESTING, DHCP_STATE_BOUND, DHCP_STATE_RENEWING, DHCP_STATE_REBINDING. Definition at line 87 of file dhcpc.c. Referenced by dhcpc_eventlistener(), dhcpc_init(), dhcpc_run(), and dhcpc_send_message(). |
|
Hold DHCP clients' timer handle. We'll use only one timer from timer pool and take care of the rest by ourselves manually Definition at line 94 of file dhcpc.c. Referenced by dhcpc_init(), and dhcpc_run(). |
|
DHCP client's UDP socket handle Definition at line 100 of file dhcpc.c. Referenced by dhcpc_eventlistener(), dhcpc_init(), and dhcpc_send_message(). |
|
Holds information if DHCP client is initialized Definition at line 106 of file dhcpc.c. Referenced by dhcpc_init(), and dhcpc_run(). |
|
This variable holds renew time (in seconds) after which we'll start the renewing process. While obtaining the parameters from DHCP server (thus before we know of the renew time) this is used also to time retransmissions. Definition at line 115 of file dhcpc.c. Referenced by dhcpc_eventlistener(), and dhcpc_run(). |
|
This variable holds rebind time (in seconds) after which we'll start the rebinding process. While obtaining the paramters from DHCP server (thus before we know of the renew time) this is also used to time retransmissions as well as timeout detection Definition at line 124 of file dhcpc.c. Referenced by dhcpc_eventlistener(), and dhcpc_run(). |
|
This variable will hold DHCP server identifier (which will actually be server's IP address). Definition at line 131 of file dhcpc.c. Referenced by dhcpc_eventlistener(), and dhcpc_send_message(). |
|
This variable holds the IP address that DHCP server offered to us during address request procedure and this is the address that we will be requesting in all future requests untill DHCP server disallows us to use it any more. Definition at line 140 of file dhcpc.c. Referenced by dhcpc_eventlistener(), dhcpc_run(), and dhcpc_send_message(). |