1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-29 16:03:14 +03:00

more lwIP physical interfaces (#6680)

This commit adds W5500 W5100 and ENC28j60 drivers from @njh with credits
They are available in libraries/
An example is added in W5500 examples directory

plus:
* Extract dhcp server from lwip2 and add it to the core as a class.
  It must always be present, it is linked and can be called by fw on boot.
  So it cannot be stored in a library.
* ethernet: static or dhcp works
* PPPServer: example
* bring WiFi.config() to the lwIP generic interface (argument reorder common function)
* move hostname() from WiFI-STA to generic interface
* remove non readable characters from dhcp-server comments
* dhcp-server: magic_cookie is part of bootp rfc
* fixes from https://github.com/d-a-v/W5500lwIP/issues/17
* enable lwip_hook_dhcp_parse_option()
* +ethernet tcp client example in w5500 library examples
This commit is contained in:
david gauchard
2020-12-22 22:36:21 +01:00
committed by GitHub
parent 35d22edeec
commit 51c2a1437b
57 changed files with 8113 additions and 156 deletions

View File

@ -3139,7 +3139,7 @@
* u8_t *ptr = (u8_t*)pbuf_get_contiguous(p, buf, sizeof(buf), LWIP_MIN(option_len, sizeof(buf)), offset);
*/
#ifdef __DOXYGEN__
#define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset)
//#define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset)
#endif
/**
@ -3551,6 +3551,12 @@
#error LWIP_FEATURES must be defined
#endif
#define PPPOS_SUPPORT IP_NAPT // because we don't have proxyarp yet
#define PPP_SUPPORT PPPOS_SUPPORT
#define PPP_SERVER 1
#define PPP_DEBUG ULWIPDEBUG
#define PRINTPKT_SUPPORT ULWIPDEBUG
#ifdef __cplusplus
extern "C" {
#endif
@ -3560,6 +3566,24 @@ extern "C" {
*/
#define TCP_RANDOM_PORT 1
/*
--------------------------------------------------
------------------ DHCP options ------------------
--------------------------------------------------
*/
#define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, option_value_offset) \
lwip_hook_dhcp_parse_option(netif, dhcp, state, msg, msg_type, option, len, pbuf, option_value_offset)
// search for LWIP_HOOK_DHCP_PARSE_OPTION above for an arguments explanation
struct netif;
struct dhcp;
struct dhcp_msg;
struct pbuf;
extern void lwip_hook_dhcp_parse_option(struct netif *netif, struct dhcp *dhcp, int state, struct dhcp_msg *msg,
int msg_type, int option, int option_len, struct pbuf *pbuf,
int option_value_offset);
/*
--------------------------------------------------
------------------ SNTP options ------------------