mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-29 16:03:14 +03:00
lwIP: v2.1.3 + dhcp fixes (#8319)
* lwIP: v2.1.3 * interface set as default when gw is valid
This commit is contained in:
@ -1557,7 +1557,7 @@
|
||||
* TCP_MSS, IP header, and link header.
|
||||
*/
|
||||
#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__
|
||||
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
|
||||
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1567,6 +1567,14 @@
|
||||
#ifndef LWIP_PBUF_REF_T
|
||||
#define LWIP_PBUF_REF_T u8_t
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LWIP_PBUF_CUSTOM_DATA: Store private data on pbufs (e.g. timestamps)
|
||||
* This extends struct pbuf so user can store custom data on every pbuf.
|
||||
*/
|
||||
#if !defined LWIP_PBUF_CUSTOM_DATA || defined __DOXYGEN__
|
||||
#define LWIP_PBUF_CUSTOM_DATA
|
||||
#endif
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -1924,11 +1932,8 @@
|
||||
|
||||
/** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread,
|
||||
* writing from a 2nd thread and closing from a 3rd thread at the same time.
|
||||
* ATTENTION: This is currently really alpha! Some requirements:
|
||||
* - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from
|
||||
* multiple threads at once
|
||||
* - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox
|
||||
* and prevent a task pending on this during/after deletion
|
||||
* LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from
|
||||
* multiple threads at once!
|
||||
*/
|
||||
#if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__
|
||||
#define LWIP_NETCONN_FULLDUPLEX 0
|
||||
@ -2464,7 +2469,7 @@
|
||||
* network startup.
|
||||
*/
|
||||
#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__
|
||||
#define LWIP_IPV6_SEND_ROUTER_SOLICIT 1
|
||||
#define LWIP_IPV6_SEND_ROUTER_SOLICIT LWIP_IPV6
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -2509,10 +2514,12 @@
|
||||
|
||||
/**
|
||||
* LWIP_ICMP6_DATASIZE: bytes from original packet to send back in
|
||||
* ICMPv6 error messages.
|
||||
* ICMPv6 error messages (0 = default of IP6_MIN_MTU_LENGTH)
|
||||
* ATTENTION: RFC4443 section 2.4 says IP6_MIN_MTU_LENGTH is a MUST,
|
||||
* so override this only if you absolutely have to!
|
||||
*/
|
||||
#if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__
|
||||
#define LWIP_ICMP6_DATASIZE 8
|
||||
#define LWIP_ICMP6_DATASIZE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -3547,6 +3554,11 @@
|
||||
--------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "lwip/debug.h"
|
||||
#include "arch/cc.h"
|
||||
#include "lwip-git-hash.h"
|
||||
#include <sys/time.h> // settimeofday() + struct timeval
|
||||
|
||||
#ifndef LWIP_FEATURES
|
||||
#error LWIP_FEATURES must be defined
|
||||
#endif
|
||||
@ -3584,6 +3596,19 @@ extern void lwip_hook_dhcp_parse_option(struct netif *netif, struct dhcp *dhcp,
|
||||
int msg_type, int option, int option_len, struct pbuf *pbuf,
|
||||
int option_value_offset);
|
||||
|
||||
#if LWIP_FEATURES
|
||||
#define LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, state, msg, msg_type, option_len_ptr) { \
|
||||
/* https://github.com/esp8266/Arduino/issues/8223 */ \
|
||||
lwip_hook_dhcp_amend_options(netif, dhcp, state, msg, msg_type, option_len_ptr); \
|
||||
/* https://github.com/esp8266/Arduino/issues/8247 */ \
|
||||
if ((msg_type) == DHCP_DISCOVER) \
|
||||
*(option_len_ptr) = dhcp_option_hostname(*(option_len_ptr), (msg)->options, netif); \
|
||||
}
|
||||
|
||||
extern void lwip_hook_dhcp_amend_options(struct netif *netif, struct dhcp *dhcp, int state, struct dhcp_msg *msg,
|
||||
int msg_type, u16 *option_len_ptr);
|
||||
#endif
|
||||
|
||||
/*
|
||||
--------------------------------------------------
|
||||
------------------ SNTP options ------------------
|
||||
@ -3629,11 +3654,6 @@ uint32_t SNTP_STARTUP_DELAY_FUNC;
|
||||
--------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "lwip/debug.h"
|
||||
#include "arch/cc.h"
|
||||
#include "lwip-git-hash.h"
|
||||
#include <sys/time.h> // settimeofday() + struct timeval
|
||||
|
||||
// allow to handle special packets (user redefinable)
|
||||
struct pbuf;
|
||||
struct netif;
|
||||
|
Reference in New Issue
Block a user