|
1557 | 1557 | * TCP_MSS, IP header, and link header.
|
1558 | 1558 | */
|
1559 | 1559 | #if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__
|
1560 |
| -#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) |
| 1560 | +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) |
1561 | 1561 | #endif
|
1562 | 1562 |
|
1563 | 1563 | /**
|
|
1567 | 1567 | #ifndef LWIP_PBUF_REF_T
|
1568 | 1568 | #define LWIP_PBUF_REF_T u8_t
|
1569 | 1569 | #endif
|
| 1570 | + |
| 1571 | +/** |
| 1572 | + * LWIP_PBUF_CUSTOM_DATA: Store private data on pbufs (e.g. timestamps) |
| 1573 | + * This extends struct pbuf so user can store custom data on every pbuf. |
| 1574 | + */ |
| 1575 | +#if !defined LWIP_PBUF_CUSTOM_DATA || defined __DOXYGEN__ |
| 1576 | +#define LWIP_PBUF_CUSTOM_DATA |
| 1577 | +#endif |
1570 | 1578 | /**
|
1571 | 1579 | * @}
|
1572 | 1580 | */
|
|
1924 | 1932 |
|
1925 | 1933 | /** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread,
|
1926 | 1934 | * writing from a 2nd thread and closing from a 3rd thread at the same time.
|
1927 |
| - * ATTENTION: This is currently really alpha! Some requirements: |
1928 |
| - * - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from |
1929 |
| - * multiple threads at once |
1930 |
| - * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox |
1931 |
| - * and prevent a task pending on this during/after deletion |
| 1935 | + * LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from |
| 1936 | + * multiple threads at once! |
1932 | 1937 | */
|
1933 | 1938 | #if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__
|
1934 | 1939 | #define LWIP_NETCONN_FULLDUPLEX 0
|
|
2464 | 2469 | * network startup.
|
2465 | 2470 | */
|
2466 | 2471 | #if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__
|
2467 |
| -#define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 |
| 2472 | +#define LWIP_IPV6_SEND_ROUTER_SOLICIT LWIP_IPV6 |
2468 | 2473 | #endif
|
2469 | 2474 |
|
2470 | 2475 | /**
|
|
2509 | 2514 |
|
2510 | 2515 | /**
|
2511 | 2516 | * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in
|
2512 |
| - * ICMPv6 error messages. |
| 2517 | + * ICMPv6 error messages (0 = default of IP6_MIN_MTU_LENGTH) |
| 2518 | + * ATTENTION: RFC4443 section 2.4 says IP6_MIN_MTU_LENGTH is a MUST, |
| 2519 | + * so override this only if you absolutely have to! |
2513 | 2520 | */
|
2514 | 2521 | #if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__
|
2515 |
| -#define LWIP_ICMP6_DATASIZE 8 |
| 2522 | +#define LWIP_ICMP6_DATASIZE 0 |
2516 | 2523 | #endif
|
2517 | 2524 |
|
2518 | 2525 | /**
|
|
3547 | 3554 | --------------------------------------------------
|
3548 | 3555 | */
|
3549 | 3556 |
|
| 3557 | +#include "lwip/debug.h" |
| 3558 | +#include "arch/cc.h" |
| 3559 | +#include "lwip-git-hash.h" |
| 3560 | +#include <sys/time.h> // settimeofday() + struct timeval |
| 3561 | + |
3550 | 3562 | #ifndef LWIP_FEATURES
|
3551 | 3563 | #error LWIP_FEATURES must be defined
|
3552 | 3564 | #endif
|
@@ -3584,6 +3596,19 @@ extern void lwip_hook_dhcp_parse_option(struct netif *netif, struct dhcp *dhcp,
|
3584 | 3596 | int msg_type, int option, int option_len, struct pbuf *pbuf,
|
3585 | 3597 | int option_value_offset);
|
3586 | 3598 |
|
| 3599 | +#if LWIP_FEATURES |
| 3600 | +#define LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, state, msg, msg_type, option_len_ptr) { \ |
| 3601 | + /* https://github.com/esp8266/Arduino/issues/8223 */ \ |
| 3602 | + lwip_hook_dhcp_amend_options(netif, dhcp, state, msg, msg_type, option_len_ptr); \ |
| 3603 | + /* https://github.com/esp8266/Arduino/issues/8247 */ \ |
| 3604 | + if ((msg_type) == DHCP_DISCOVER) \ |
| 3605 | + *(option_len_ptr) = dhcp_option_hostname(*(option_len_ptr), (msg)->options, netif); \ |
| 3606 | +} |
| 3607 | + |
| 3608 | +extern void lwip_hook_dhcp_amend_options(struct netif *netif, struct dhcp *dhcp, int state, struct dhcp_msg *msg, |
| 3609 | + int msg_type, u16 *option_len_ptr); |
| 3610 | +#endif |
| 3611 | + |
3587 | 3612 | /*
|
3588 | 3613 | --------------------------------------------------
|
3589 | 3614 | ------------------ SNTP options ------------------
|
@@ -3629,11 +3654,6 @@ uint32_t SNTP_STARTUP_DELAY_FUNC;
|
3629 | 3654 | --------------------------------------------------
|
3630 | 3655 | */
|
3631 | 3656 |
|
3632 |
| -#include "lwip/debug.h" |
3633 |
| -#include "arch/cc.h" |
3634 |
| -#include "lwip-git-hash.h" |
3635 |
| -#include <sys/time.h> // settimeofday() + struct timeval |
3636 |
| - |
3637 | 3657 | // allow to handle special packets (user redefinable)
|
3638 | 3658 | struct pbuf;
|
3639 | 3659 | struct netif;
|
|
0 commit comments