/*
LUFA Library
- Copyright (C) Dean Camera, 2011.
+ Copyright (C) Dean Camera, 2019.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2019 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
- The author disclaim all warranties with regard to this
+ The author disclaims all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
this software.
*/
-#if defined(ENABLE_DHCP_SERVER) || defined(__DOXYGEN__)
-
/** \file
*
* DHCP Server Application. When connected to the uIP stack, this will send IP configuration settings to a
#define INCLUDE_FROM_DHCPSERVERAPP_C
#include "DHCPServerApp.h"
+#if defined(ENABLE_DHCP_SERVER) || defined(__DOXYGEN__)
+
struct uip_conn* BroadcastConnection;
uint8_t LeasedIPs[255 / 8];
uip_listen(HTONS(DHCP_SERVER_PORT));
/* Create a new UDP connection to the DHCP server port for the DHCP solicitation */
- struct uip_udp_conn* BroadcastConnection = uip_udp_new(&uip_broadcast_addr, HTONS(DHCP_CLIENT_PORT));
+ BroadcastConnection = uip_udp_new(&uip_broadcast_addr, HTONS(DHCP_CLIENT_PORT));
/* If the connection was successfully created, bind it to the local DHCP client port */
if (BroadcastConnection != NULL)
*
* \pre The IP address must be within the same /24 subnet as the virtual webserver.
*
- * \return Boolean true if the IP has already been leased to a client, false otherwise.
+ * \return Boolean \c true if the IP has already been leased to a client, \c false otherwise.
*/
static bool DHCPServerApp_CheckIfIPLeased(const uip_ipaddr_t* const IPAddress)
{