DHCP client finite state machine. More...
Go to the source code of this file.
Functions | |
void | dhcpClientStateInit (DhcpClientContext *context) |
INIT state. More... | |
void | dhcpClientStateSelecting (DhcpClientContext *context) |
SELECTING state. More... | |
void | dhcpClientStateRequesting (DhcpClientContext *context) |
REQUESTING state. More... | |
void | dhcpClientStateInitReboot (DhcpClientContext *context) |
INIT-REBOOT state. More... | |
void | dhcpClientStateRebooting (DhcpClientContext *context) |
REBOOTING state. More... | |
void | dhcpClientStateProbing (DhcpClientContext *context) |
PROBING state. More... | |
void | dhcpClientStateAnnouncing (DhcpClientContext *context) |
ANNOUNCING state. More... | |
void | dhcpClientStateBound (DhcpClientContext *context) |
BOUND state. More... | |
void | dhcpClientStateRenewing (DhcpClientContext *context) |
RENEWING state. More... | |
void | dhcpClientStateRebinding (DhcpClientContext *context) |
REBINDING state. More... | |
Detailed Description
DHCP client finite state machine.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file dhcp_client_fsm.h.
Function Documentation
◆ dhcpClientStateAnnouncing()
void dhcpClientStateAnnouncing | ( | DhcpClientContext * | context | ) |
ANNOUNCING state.
The client announces its new IP address
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 430 of file dhcp_client_fsm.c.
◆ dhcpClientStateBound()
void dhcpClientStateBound | ( | DhcpClientContext * | context | ) |
BOUND state.
Client has a valid lease and is in its normal operating state
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 489 of file dhcp_client_fsm.c.
◆ dhcpClientStateInit()
void dhcpClientStateInit | ( | DhcpClientContext * | context | ) |
INIT state.
This is the initialization state, where a client begins the process of acquiring a lease. It also returns here when a lease ends, or when a lease negotiation fails
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 56 of file dhcp_client_fsm.c.
◆ dhcpClientStateInitReboot()
void dhcpClientStateInitReboot | ( | DhcpClientContext * | context | ) |
INIT-REBOOT state.
When a client that already has a valid lease starts up after a power-down or reboot, it starts here instead of the INIT state
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 241 of file dhcp_client_fsm.c.
◆ dhcpClientStateProbing()
void dhcpClientStateProbing | ( | DhcpClientContext * | context | ) |
PROBING state.
The client probes the newly received address
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 363 of file dhcp_client_fsm.c.
◆ dhcpClientStateRebinding()
void dhcpClientStateRebinding | ( | DhcpClientContext * | context | ) |
REBINDING state.
The client has failed to renew its lease with the server that originally granted it, and now seeks a lease extension with any server that can hear it. It periodically sends DHCPREQUEST messages with no server specified until it gets a reply or the lease ends
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 606 of file dhcp_client_fsm.c.
◆ dhcpClientStateRebooting()
void dhcpClientStateRebooting | ( | DhcpClientContext * | context | ) |
REBOOTING state.
A client that has rebooted with an assigned address is waiting for a confirming reply from a server
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 281 of file dhcp_client_fsm.c.
◆ dhcpClientStateRenewing()
void dhcpClientStateRenewing | ( | DhcpClientContext * | context | ) |
RENEWING state.
Client is trying to renew its lease. It regularly sends DHCPREQUEST messages with the server that gave it its current lease specified, and waits for a reply
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 535 of file dhcp_client_fsm.c.
◆ dhcpClientStateRequesting()
void dhcpClientStateRequesting | ( | DhcpClientContext * | context | ) |
REQUESTING state.
The client is waiting to hear back from the server to which it sent its request
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 161 of file dhcp_client_fsm.c.
◆ dhcpClientStateSelecting()
void dhcpClientStateSelecting | ( | DhcpClientContext * | context | ) |
SELECTING state.
The client is waiting to receive DHCPOFFER messages from one or more DHCP servers, so it can choose one
- Parameters
-
[in] context Pointer to the DHCP client context
Definition at line 96 of file dhcp_client_fsm.c.