patch #8361 "Add support for NTP option in DHCP" (slighly modified)

This commit is contained in:
sg
2015-02-16 21:23:06 +01:00
parent 99d1fdd270
commit 90db821036
4 changed files with 75 additions and 14 deletions

View File

@@ -202,6 +202,7 @@ void dhcp_fine_tmr(void);
#define DHCP_OPTION_MTU 26
#define DHCP_OPTION_BROADCAST 28
#define DHCP_OPTION_TCP_TTL 37
#define DHCP_OPTION_NTP 42
#define DHCP_OPTION_END 255
/** DHCP options */

View File

@@ -768,6 +768,22 @@
#define LWIP_DHCP_BOOTP_FILE 0
#endif
/**
* LWIP_DHCP_GETS_NTP==1: Request NTP servers with discover/select. For each
* response packet, an callback is called, which has to be provided by the port:
* void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs);
*/
#ifndef LWIP_DHCP_GET_NTP_SRV
#define LWIP_DHCP_GET_NTP_SRV 0
#endif
/**
* The maximum of NTP servers requested
*/
#ifndef LWIP_DHCP_MAX_NTP_SERVERS
#define LWIP_DHCP_MAX_NTP_SERVERS 1
#endif
/*
------------------------------------
---------- AUTOIP options ----------