dhcp_server.c File Reference

DHCP server (Dynamic Host Configuration Protocol) More...

#include "core/net.h"
#include "dhcp/dhcp_server.h"
#include "dhcp/dhcp_server_misc.h"
#include "date_time.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   DHCP_TRACE_LEVEL
 

Functions

void dhcpServerGetDefaultSettings (DhcpServerSettings *settings)
 Initialize settings with default values. More...
 
error_t dhcpServerInit (DhcpServerContext *context, const DhcpServerSettings *settings)
 DHCP server initialization. More...
 
error_t dhcpServerStart (DhcpServerContext *context)
 Start DHCP server. More...
 
error_t dhcpServerStop (DhcpServerContext *context)
 Stop DHCP server. More...
 
void dhcpServerDeinit (DhcpServerContext *context)
 Release DHCP server context. More...
 

Detailed Description

DHCP server (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
Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.0

Definition in file dhcp_server.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   DHCP_TRACE_LEVEL

Definition at line 40 of file dhcp_server.c.

Function Documentation

◆ dhcpServerDeinit()

void dhcpServerDeinit ( DhcpServerContext context)

Release DHCP server context.

Parameters
[in]contextPointer to the DHCP server context

Definition at line 244 of file dhcp_server.c.

◆ dhcpServerGetDefaultSettings()

void dhcpServerGetDefaultSettings ( DhcpServerSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains DHCP server settings

Definition at line 58 of file dhcp_server.c.

◆ dhcpServerInit()

error_t dhcpServerInit ( DhcpServerContext context,
const DhcpServerSettings settings 
)

DHCP server initialization.

Parameters
[in]contextPointer to the DHCP server context
[in]settingsDHCP server specific settings
Returns
Error code

Definition at line 102 of file dhcp_server.c.

◆ dhcpServerStart()

error_t dhcpServerStart ( DhcpServerContext context)

Start DHCP server.

Parameters
[in]contextPointer to the DHCP server context
Returns
Error code

Definition at line 151 of file dhcp_server.c.

◆ dhcpServerStop()

error_t dhcpServerStop ( DhcpServerContext context)

Stop DHCP server.

Parameters
[in]contextPointer to the DHCP server context
Returns
Error code

Definition at line 204 of file dhcp_server.c.