This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-libzt/ext/picotcp/modules/pico_dhcp_server.h
2017-04-06 19:16:01 -07:00

35 lines
1.1 KiB
C

/*********************************************************************
PicoTCP. Copyright (c) 2012-2015 Altran Intelligent Systems. Some rights reserved.
See LICENSE and COPYING for usage.
*********************************************************************/
#ifndef INCLUDE_PICO_DHCP_SERVER
#define INCLUDE_PICO_DHCP_SERVER
#include "pico_defines.h"
#ifdef PICO_SUPPORT_UDP
#include "pico_dhcp_common.h"
#include "pico_addressing.h"
struct pico_dhcp_server_setting
{
uint32_t pool_start;
uint32_t pool_next;
uint32_t pool_end;
uint32_t lease_time;
struct pico_device *dev;
struct pico_socket *s;
struct pico_ip4 server_ip;
struct pico_ip4 netmask;
uint8_t flags; /* unused atm */
};
/* required field: IP address of the interface to serve, only IPs of this network will be served. */
int pico_dhcp_server_initiate(struct pico_dhcp_server_setting *dhcps);
/* To destroy an existing DHCP server configuration, running on a given interface */
int pico_dhcp_server_destroy(struct pico_device *dev);
#endif /* _INCLUDE_PICO_DHCP_SERVER */
#endif