mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
update to lwIP-2.1.0: partial SACK support by default (de-selectable in menu) (#5126)
* update to lwIP-2.1.0rc1: partial SACK support fix #4176 * hash fix * get some flash back due to mistake in conf (fragmentation & reassembly was incorrectly enabled) (ahah I scared you) * add missing include files * update to lwip-2.1.0(release) + remove unused lwIP's include files * lwIP release 2.1.0, SACK is now default, bigger, no-SACK is selectable * fix ldscript * pio * rename 'sack' option to 'feat'ure option, + IP fragmentation/reassembly * merge, fix pio * change internal/hidden string * pio: more lwip2 configuration: + without sack for no change in flash footprint
This commit is contained in:
@ -91,8 +91,12 @@ struct udp_pcb {
|
||||
u16_t local_port, remote_port;
|
||||
|
||||
#if LWIP_MULTICAST_TX_OPTIONS
|
||||
/** outgoing network interface for multicast packets */
|
||||
ip_addr_t multicast_ip;
|
||||
#if LWIP_IPV4
|
||||
/** outgoing network interface for multicast packets, by IPv4 address (if not 'any') */
|
||||
ip4_addr_t mcast_ip4;
|
||||
#endif /* LWIP_IPV4 */
|
||||
/** outgoing network interface for multicast packets, by interface index (if nonzero) */
|
||||
u8_t mcast_ifindex;
|
||||
/** TTL for outgoing multicast packets */
|
||||
u8_t mcast_ttl;
|
||||
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
||||
@ -117,6 +121,7 @@ struct udp_pcb * udp_new_ip_type(u8_t type);
|
||||
void udp_remove (struct udp_pcb *pcb);
|
||||
err_t udp_bind (struct udp_pcb *pcb, const ip_addr_t *ipaddr,
|
||||
u16_t port);
|
||||
void udp_bind_netif (struct udp_pcb *pcb, const struct netif* netif);
|
||||
err_t udp_connect (struct udp_pcb *pcb, const ip_addr_t *ipaddr,
|
||||
u16_t port);
|
||||
void udp_disconnect (struct udp_pcb *pcb);
|
||||
@ -150,6 +155,10 @@ err_t udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p,
|
||||
#define udp_flags(pcb) ((pcb)->flags)
|
||||
#define udp_setflags(pcb, f) ((pcb)->flags = (f))
|
||||
|
||||
#define udp_set_flags(pcb, set_flags) do { (pcb)->flags = (u8_t)((pcb)->flags | (set_flags)); } while(0)
|
||||
#define udp_clear_flags(pcb, clr_flags) do { (pcb)->flags = (u8_t)((pcb)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0)
|
||||
#define udp_is_flag_set(pcb, flag) (((pcb)->flags & (flag)) != 0)
|
||||
|
||||
/* The following functions are the lower layer interface to UDP. */
|
||||
void udp_input (struct pbuf *p, struct netif *inp);
|
||||
|
||||
@ -159,9 +168,13 @@ void udp_init (void);
|
||||
#define udp_new_ip6() udp_new_ip_type(IPADDR_TYPE_V6)
|
||||
|
||||
#if LWIP_MULTICAST_TX_OPTIONS
|
||||
#define udp_set_multicast_netif_addr(pcb, ip4addr) ip_addr_copy_from_ip4((pcb)->multicast_ip, *(ip4addr))
|
||||
#define udp_get_multicast_netif_addr(pcb) ip_2_ip4(&(pcb)->multicast_ip)
|
||||
#define udp_set_multicast_ttl(pcb, value) do { (pcb)->mcast_ttl = value; } while(0)
|
||||
#if LWIP_IPV4
|
||||
#define udp_set_multicast_netif_addr(pcb, ip4addr) ip4_addr_copy((pcb)->mcast_ip4, *(ip4addr))
|
||||
#define udp_get_multicast_netif_addr(pcb) (&(pcb)->mcast_ip4)
|
||||
#endif /* LWIP_IPV4 */
|
||||
#define udp_set_multicast_netif_index(pcb, idx) ((pcb)->mcast_ifindex = (idx))
|
||||
#define udp_get_multicast_netif_index(pcb) ((pcb)->mcast_ifindex)
|
||||
#define udp_set_multicast_ttl(pcb, value) ((pcb)->mcast_ttl = (value))
|
||||
#define udp_get_multicast_ttl(pcb) ((pcb)->mcast_ttl)
|
||||
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
||||
|
||||
|
Reference in New Issue
Block a user