No need to have additional if statement for PBUF_REF/PBUF_ROM.
It can be merged to the existing swtich(type) cases.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Adds partial support for selective acknowledgements (RFC 2018).
This change makes lwIP negotiate SACK support, and include SACK
data in outgoing empty ACK packets. It does not include it
in outgoing packets with data payload.
It also does not add support for handling incoming SACKs.
Signed-off-by: goldsimon <goldsimon@gmx.de>
Use vj_uncompress_err() instead of duplicating the same code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
Current code does not correctly update ifoutoctets counter because nb->tot_len
is always 0. Fix it by setting nb->tot_len to actual payload length so we can
update ifoutoctets correctly.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
This changes tcpflags_t to be a u16_t for all cases. The TCP Appropriate
Byte Count support added a new flag that used a bit past 8 and since this
flag is now required, tcpflags_t can no longer be a u8_t
This does not increase the size of struct tcp_pcb due to padding that
already existed (see bug #51326 for details)
Signed-off-by: goldsimon <goldsimon@gmx.de>
The function previously returned after posting a message, which is a short operation. Now it actually waits until the operation has completed - which may take a long time. This may break user programs. So all that remains is the cleanup separation in tcpip_callback() and tcpip_try_callback() :-(
Created two new functions for API cleanup:
tcpip_callback() that blocks until message is posted, cannot be called from IRQs.
tcpip_try_callback() that does not block and just tries to post a message. Can be called from IRQs.
Add compatibility #define tcpip_callback_with_block() that maps to these two functions according to "block" parameter.