goldsimon
537c258efa
httpd/altcp: add forgotten functions
2017-03-28 14:04:40 +02:00
goldsimon
1dfe916808
altcp_tcp: use 'void* state' to store tcp_pcb, not 'altcp_pcb* inner_conn'
2017-03-28 09:09:13 +02:00
goldsimon
425b2dda61
altcp_get_ip: added altcp_get_ip(), added default functions that only defer a call to the inner_conn (moved from tls_mbedtls to generic altcp)
2017-03-26 22:26:40 +02:00
goldsimon
540b527cf4
remove LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS config option (this is implicitly done via #ifdef LWIP_RAND)
2017-03-24 14:29:06 +01:00
Dirk Ziegelmeier
ab736a4764
Add altcp to doxygen docs
2017-03-22 23:32:32 +01:00
Dirk Ziegelmeier
7e12240af3
Improve TCP documentation a bit
2017-03-22 23:32:17 +01:00
Dirk Ziegelmeier
060a47f88a
Add altcp to Filelists.mk
...
Some compile fixes in altcp_tcp.c and httpd.c
2017-03-22 22:57:50 +01:00
goldsimon
c18393b52b
altcp: added 'addrinfo' and 'tcp_state' functions
2017-03-22 22:29:11 +01:00
goldsimon
e8e247f22e
Add "application layered TCP connection API (altcp)"
...
altcp is an abstraction layer that prevents applications linking against the
tcp.h functions but provides the same functionality. It is used to e.g. add
SSL/TLS or proxy-connect support to an application written for the tcp callback
API without that application knowing the protocol details.
Applications written against the altcp API are directly linked against the
tcp callback API for LWIP_ALTCP==0, but then cannot use layered protocols.
2017-03-22 21:31:14 +01:00
goldsimon
ec24a2a4e8
Revert "httpd: regenerate example fs (fsdata.c) with current makefsdata"
...
This reverts commit 66fb52ff5cdfafecef9c0cc7b32bccee8b0f3e7f.
2017-03-21 12:57:56 +01:00
goldsimon
66fb52ff5c
httpd: regenerate example fs (fsdata.c) with current makefsdata
2017-03-20 22:19:54 +01:00
Dirk Ziegelmeier
2d9ef2215b
Fix bug #50576 : LWIP_NSC_IPV4_GATEWAY/NETMASK/SETTINGS_CHANGED should check if the setting is actually being changed
2017-03-18 15:30:20 +01:00
goldsimon
aef2accfa3
try to satisfy clang's '-Wempty-body'
2017-03-17 11:22:30 +01:00
goldsimon
946b231516
lwip_init(): at least IAR warns about "LWIP_UNUSED_ARG(a)" accessing an uninitialized variable... Try to fix this by initializing it (it will be optimized away anyway)
2017-03-15 16:47:59 +01:00
goldsimon
7ffe5bfb3c
tcp: watch out for pcb->nrtx overflows and tcp_backoff indexing overflow
2017-03-09 13:29:41 +01:00
David van Moolenbroek
5827c168c2
tcp: do not keep sending SYNs when getting ACKs
...
If a locally generated TCP SYN packet is replied to with an ACK
packet, lwIP immediately sends a RST packet followed by resending the
SYN packet. This is expected, but on loopback interfaces the resent
SYN packet may immediately get another ACK reply, typically when the
other endpoint is in TIME_WAIT state (which ignores the RSTs). The
result is an endless loop of SYN, ACK, RST packets.
This patch applies the normal SYN retransmission limit in this
scenario, such that the endless loop is limited to a brief storm.
2017-03-09 13:22:49 +01:00
Joel Cunningham
b90a54f989
bug #50476 : initialize ssthresh to TCP_SND_BUF
...
This commit changes ssthresh to be the largest effective congestion
window (amount of in-flight data). This follows the guidance of RFC
5681 which recommends setting ssthresh arbitrarily high.
LwIP was previously using the receive window value at the end of the
3-way handshake and in the case of an active open where the receiver
used window scaling and/or window auto-tuning, this resulted in a very
small ssthresh value even though the window ramped up once the connection
was established
2017-03-08 16:36:35 -06:00
goldsimon
49414826af
pbuf: added new function pbuf_free_header() to gradually hide bytes and free pbufs from the front of a pbuf chain
2017-03-06 21:53:48 +01:00
goldsimon
5f0fbdcde9
fixed warning about potentially unused variable 'netif' after changing ip4/6_input_accept to return in, not netif*
2017-03-01 21:46:36 +01:00
goldsimon
0d585d55d3
Added LWIP_SINGLE_NETIF for small targets with only one netif (see task #13515 , there might be more optimizations to come with this option)
2017-03-01 16:10:50 +01:00
goldsimon
f978a7ed31
let ip4/6_input_accept return int instead of netif*
2017-03-01 14:16:27 +01:00
goldsimon
18c7c5d81c
fixed my last commit (NETIF_FOREACH does not yet exist :)
2017-03-01 14:12:50 +01:00
goldsimon
7c9a6317b9
refactor ip4/ip6 packet-to-netif matching to remove the ugly 'first' flag
2017-03-01 14:09:18 +01:00
Dirk Ziegelmeier
ec4f00179d
Fix bug #50242 : dhcp_release does not stop autoip (in coop mode)
...
Create new function dhcp_release_and_stop() that stops DHCP statemachine and sends release message if needed. Also stops AUTOIP if in coop mode.
Old dhcp_release() and dhcp_stop() function internally call dhcp_release_and_stop() now.
2017-03-01 13:18:37 +01:00
goldsimon
f85eed0ab3
tcp: fixed bug #50418 : LWIP_EVENT_API: fix invalid calbacks for SYN_RCVD pcb
2017-02-28 12:13:26 +01:00
David van Moolenbroek
d3fc398580
arp/ndp: allow overriding the decision to copy pbufs
...
lwIP aims to support zero-copy TX, and thus, must internally handle
all cases that pbufs are referenced rather than copied upon low-level
output. However, in the current situation, the arp/ndp packet queuing
routines conservatively copy entire packets, even when unnecessary in
cases where lwIP is used in a zero-copy compliant manner. This patch
moves the decision whether to copy into a centralized macro, allowing
zero-copy compliant applications to override the macro to avoid the
unnecessary copies. The macro defaults to the safe behavior, though.
2017-02-28 09:37:21 +01:00
Dirk Ziegelmeier
27c835aa56
Remove netif_invoke_ext_callback() from doxygen docs, it is intended for internal use only
2017-02-27 09:36:33 +01:00
Dirk Ziegelmeier
01f9a04e4a
Add pbuf_get_contiguous() to doxygen docs
2017-02-26 09:44:16 +01:00
Dirk Ziegelmeier
08931b33c1
Fix documentation on pbuf_get_contiguous()
2017-02-25 17:03:14 +01:00
goldsimon
0da9cf70ea
Added pbuf_get_contiguous() to get data in one piece (either zero copy from pbuf or memcpied into a supplied buffer)
2017-02-24 21:36:49 +01:00
goldsimon
01cc06bcb8
netif_add: ensure netif->num is unique even if more than 255 netifs have been added/removed since system startup (e.g. by ppp)
2017-02-23 20:41:54 +01:00
goldsimon
76763c9bcd
pbuf_ref: assert-check for 'ref' overflow
2017-02-23 20:16:51 +01:00
Dirk Ziegelmeier
2cf3bbddd4
pbuf_free: Use correct type LWIP_PBUF_REF_T for local variable
2017-02-23 18:08:26 +01:00
Dirk Ziegelmeier
0f6d8ccd90
Revert "Improve pbuf refcount underflow check by checking the local variable on the stack that was assigned in a protected region"
...
This reverts commit 62c44138da19a8cd9b100b3050c9697a80d8866f.
Didn't notice due to local changes the ASSERTION was already inside the locks...
2017-02-23 18:04:30 +01:00
Dirk Ziegelmeier
62c44138da
Improve pbuf refcount underflow check by checking the local variable on the stack that was assigned in a protected region
...
The old code was vulnerable to race conditions since it checked ref to be >0 without locks
2017-02-23 16:55:14 +01:00
Dirk Ziegelmeier
0eeb10d4bb
Preparation for task #14369 : Define ways to work with a netif having multiple ports
...
Add if_idx member to struct pbuf
2017-02-23 16:34:28 +01:00
sg
ff3fe1f489
Fixed bug #50231 (nd6: several option size related issues in Router Advertisement message processing)
2017-02-17 21:59:08 +01:00
goldsimon
deaa6e9406
Improved DNS_LOCAL_HOSTLIST interface (bug #50325 )
2017-02-17 10:08:49 +01:00
Dirk Ziegelmeier
498913b982
Third draft of task #14283 : Add more detailed status callback
...
Implement Joel's idea of a union
2017-02-15 10:14:06 +01:00
Dirk Ziegelmeier
454927151d
Continue working on ext netif callback
...
Docs, better callback points (e.g. before netif is set down)
2017-02-14 21:02:38 +01:00
Dirk Ziegelmeier
d46d8bcda2
Add some asserts to netif callback functions
2017-02-14 20:35:48 +01:00
Dirk Ziegelmeier
4434762a08
Some minor documentation fixes
2017-02-14 20:28:43 +01:00
Dirk Ziegelmeier
bbedb35bf3
Fix name clash between typedef and struct definition.
...
Interesting, all three compilers in Erik Ekman's travis-ci don't complain. But my gcc at home does...
2017-02-14 20:17:27 +01:00
Dirk Ziegelmeier
f4f204b850
Implement a better way to initialize all fields in ip address than using memset() (better fix than my last commit)
2017-02-14 14:20:39 +01:00
Dirk Ziegelmeier
feba38a1f4
Fix unportable struct initializer I introcduced while working on task #14283 : Add more detailed status callback
2017-02-14 13:54:14 +01:00
Dirk Ziegelmeier
8025b85694
Second draft of task #14283 : Add more detailed status callback
2017-02-14 10:59:28 +01:00
Dirk Ziegelmeier
7dd21e93c4
Fix my last commits (unused variable warning)
...
my gcc at home did not show this warning...
2017-02-13 22:27:59 +01:00
Dirk Ziegelmeier
3c1713406e
Work on task #14283 : Add more detailed status callback
...
Cleanups and IPv6 address status
2017-02-13 21:52:55 +01:00
Dirk Ziegelmeier
58c48af58f
Start working on task #14283 : Add more detailed status callback
...
IPv6 stuff is not implemented
2017-02-13 21:40:08 +01:00
Joel Cunningham
0b257f71e7
Fix comment typo from bug #47485
...
tcp_close_shutdown_impl() should be tcp_close_shutdown_fin()
2017-02-13 11:25:05 -06:00