DHCP client (Dynamic Host Configuration Protocol) More...
#include "core/net.h"
#include "dhcp/dhcp_client.h"
#include "dhcp/dhcp_client_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL DHCP_TRACE_LEVEL |
Functions | |
void | dhcpClientGetDefaultSettings (DhcpClientSettings *settings) |
Initialize settings with default values. More... | |
error_t | dhcpClientInit (DhcpClientContext *context, const DhcpClientSettings *settings) |
DHCP client initialization. More... | |
error_t | dhcpClientStart (DhcpClientContext *context) |
Start DHCP client. More... | |
error_t | dhcpClientStop (DhcpClientContext *context) |
Stop DHCP client. More... | |
error_t | dhcpClientRelease (DhcpClientContext *context) |
Release DHCP lease. More... | |
DhcpState | dhcpClientGetState (DhcpClientContext *context) |
Retrieve current state. More... | |
Detailed Description
DHCP client (Dynamic Host Configuration Protocol)
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.
Description
The Dynamic Host Configuration Protocol is used to provide configuration parameters to hosts. Refer to the following RFCs for complete details:
- RFC 2131: Dynamic Host Configuration Protocol
- RFC 2132: DHCP Options and BOOTP Vendor Extensions
- RFC 4039: Rapid Commit Option for the DHCP version 4
- Version
- 2.4.4
Definition in file dhcp_client.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL DHCP_TRACE_LEVEL |
Definition at line 40 of file dhcp_client.c.
Function Documentation
◆ dhcpClientGetDefaultSettings()
void dhcpClientGetDefaultSettings | ( | DhcpClientSettings * | settings | ) |
Initialize settings with default values.
- Parameters
-
[out] settings Structure that contains DHCP client settings
Definition at line 57 of file dhcp_client.c.
◆ dhcpClientGetState()
DhcpState dhcpClientGetState | ( | DhcpClientContext * | context | ) |
Retrieve current state.
- Parameters
-
[in] context Pointer to the DHCP client context
- Returns
- Current DHCP client state
Definition at line 296 of file dhcp_client.c.
◆ dhcpClientInit()
error_t dhcpClientInit | ( | DhcpClientContext * | context, |
const DhcpClientSettings * | settings | ||
) |
DHCP client initialization.
- Parameters
-
[in] context Pointer to the DHCP client context [in] settings DHCP client specific settings
- Returns
- Error code
Definition at line 92 of file dhcp_client.c.
◆ dhcpClientRelease()
error_t dhcpClientRelease | ( | DhcpClientContext * | context | ) |
Release DHCP lease.
- Parameters
-
[in] context Pointer to the DHCP client context
- Returns
- Error code
Definition at line 237 of file dhcp_client.c.
◆ dhcpClientStart()
error_t dhcpClientStart | ( | DhcpClientContext * | context | ) |
Start DHCP client.
- Parameters
-
[in] context Pointer to the DHCP client context
- Returns
- Error code
Definition at line 135 of file dhcp_client.c.
◆ dhcpClientStop()
error_t dhcpClientStop | ( | DhcpClientContext * | context | ) |
Stop DHCP client.
- Parameters
-
[in] context Pointer to the DHCP client context
- Returns
- Error code
Definition at line 194 of file dhcp_client.c.