Daniele Lacamera / PicoTCP Featured

Dependents:   lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pico_dhcp_server.h Source File

pico_dhcp_server.h

00001 /*********************************************************************
00002    PicoTCP. Copyright (c) 2012-2015 Altran Intelligent Systems. Some rights reserved.
00003    See LICENSE and COPYING for usage.
00004 
00005  *********************************************************************/
00006 #ifndef INCLUDE_PICO_DHCP_SERVER
00007 #define INCLUDE_PICO_DHCP_SERVER
00008 #include "pico_defines.h"
00009 #ifdef PICO_SUPPORT_UDP
00010 
00011 #include "pico_dhcp_common.h"
00012 #include "pico_addressing.h"
00013 
00014 struct pico_dhcp_server_setting
00015 {
00016     uint32_t pool_start;
00017     uint32_t pool_next;
00018     uint32_t pool_end;
00019     uint32_t lease_time;
00020     struct pico_device *dev;
00021     struct pico_socket *s;
00022     struct pico_ip4 server_ip;
00023     struct pico_ip4 netmask;
00024     uint8_t flags; /* unused atm */
00025 };
00026 
00027 /* required field: IP address of the interface to serve, only IPs of this network will be served. */
00028 int pico_dhcp_server_initiate(struct pico_dhcp_server_setting *dhcps);
00029 
00030 /* To destroy an existing DHCP server configuration, running on a given interface */
00031 int pico_dhcp_server_destroy(struct pico_device *dev);
00032 
00033 #endif /* _INCLUDE_PICO_DHCP_SERVER */
00034 #endif