mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
lwip2: 3 sntp servers, autoip (169.254), esp-ping, espconn (#5444)
* lwip2: better handling of ipv4_addr/t type + 3 sntp servers * bump lwip2 version * Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails) * Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails) * local CI runner: select build type * new ipv4_addr/t definition makes things easier for IPAddress * update local CI runner * lwip2 changes * lwip2: port esp-ping and espconn
This commit is contained in:
@ -90,15 +90,7 @@ typedef uint32_t sys_prot_t; // not really used
|
||||
ip4_addr3_16(ipaddr), \
|
||||
ip4_addr4_16(ipaddr)
|
||||
|
||||
// ipv4_addr / ip_info: do not exist in lwip2 (only in lwip1.4)
|
||||
struct ipv4_addr {
|
||||
uint32_t addr;
|
||||
};
|
||||
struct ip_info {
|
||||
struct ipv4_addr ip;
|
||||
struct ipv4_addr netmask;
|
||||
struct ipv4_addr gw;
|
||||
};
|
||||
#include <ipv4_addr.h>
|
||||
|
||||
///////////////////////////////
|
||||
//// PROVIDED TO USER
|
||||
|
@ -39,6 +39,7 @@ extern "C"
|
||||
void (*phy_capture) (int netif_idx, const char* data, size_t len, int out, int success);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include <sys/pgmspace.h>
|
||||
|
||||
#if UDEBUG && UDEBUGSTORE
|
||||
#warning use 'doprint_allow=1' right after Serial is enabled
|
||||
|
@ -1,5 +1,5 @@
|
||||
// generated by makefiles/make-lwip2-hash
|
||||
#ifndef LWIP_HASH_H
|
||||
#define LWIP_HASH_H
|
||||
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0"
|
||||
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0-4-gc434c6f"
|
||||
#endif // LWIP_HASH_H
|
||||
|
@ -987,12 +987,12 @@
|
||||
* LWIP_AUTOIP==1: Enable AUTOIP module.
|
||||
*/
|
||||
#if !defined LWIP_AUTOIP || defined __DOXYGEN__
|
||||
#define LWIP_AUTOIP 0
|
||||
#define LWIP_AUTOIP LWIP_FEATURES // 0
|
||||
#endif
|
||||
#if !LWIP_IPV4
|
||||
/* disable AUTOIP when IPv4 is disabled */
|
||||
#undef LWIP_AUTOIP
|
||||
#define LWIP_AUTOIP 0
|
||||
#define LWIP_AUTOIP 0
|
||||
#endif /* !LWIP_IPV4 */
|
||||
|
||||
/**
|
||||
@ -1000,7 +1000,7 @@
|
||||
* the same interface at the same time.
|
||||
*/
|
||||
#if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__
|
||||
#define LWIP_DHCP_AUTOIP_COOP 0
|
||||
#define LWIP_DHCP_AUTOIP_COOP LWIP_FEATURES // 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -3539,14 +3539,22 @@
|
||||
------------------ SNTP options ------------------
|
||||
--------------------------------------------------
|
||||
*/
|
||||
#define SNTP_SERVER_DNS 1 // SNTP support DNS names through sntp_setservername / sntp_getservername
|
||||
|
||||
// if SNTP_SERVER_ADDRESS is defined, it always overrides user's config
|
||||
// so we do not define it. sntp server can come from dhcp server, or by
|
||||
// user.
|
||||
//#define SNTP_SERVER_ADDRESS "pool.ntp.org" // default
|
||||
#define SNTP_GET_SERVERS_FROM_DHCP 3
|
||||
//#define SNTP_SERVER_ADDRESS "pool.ntp.org" // default
|
||||
//#define SNTP_GET_SERVERS_FROM_DHCP // implicitely enabled by LWIP_DHCP_GET_NTP_SRV
|
||||
|
||||
#define SNTP_SERVER_DNS 1 // enable SNTP support DNS names through sntp_setservername / sntp_getservername
|
||||
|
||||
#define SNTP_SET_SYSTEM_TIME_US(t,us) do { struct timeval tv = { t, us }; settimeofday(&tv, NULL); } while (0)
|
||||
|
||||
#if LWIP_FEATURES
|
||||
// lwip-1.4 had 3 possible SNTP servers (constant was harcoded)
|
||||
#define SNTP_MAX_SERVERS 3
|
||||
#endif
|
||||
|
||||
/*
|
||||
--------------------------------------------------
|
||||
------------------- LOCAL FIXES ------------------
|
||||
|
Reference in New Issue
Block a user