goldsimon
68f92050e9
Make tcp_debug_state_str() always available, not only in DEBUG mode
2009-10-07 17:44:59 +00:00
goldsimon
ae7a7a0abf
Added function tcp_debug_state_str() to convert a tcp state to a human-readable string.
2009-08-23 10:57:37 +00:00
kieranm
0b75917121
BUG27209: handle trimming of segments when out of window or out of
...
order properly
2009-08-12 08:34:48 +00:00
goldsimon
3553efb75e
Added newline to TCP header flags debug print
2009-07-28 17:02:48 +00:00
kieranm
c232edb83a
BUG26301 and BUG26267: correct simultaneous close behaviour, and make
...
snd_nxt have the same meaning as in the RFCs.
2009-06-25 09:57:36 +00:00
kieranm
f1a9f7ea70
BUG20515: rework way TCP window updates are calculated and sent
2009-03-31 14:23:40 +00:00
kieranm
4b14621208
TASK9218: add support for TCP timestamp options
2009-03-31 14:13:32 +00:00
kieranm
efac109803
BUG25622: handle return code of tcp_enqueue in tcp_listen_input()
2009-03-26 14:31:02 +00:00
goldsimon
d976c8e85f
fixed bug #24440 : TCP connection close problem on 64-bit host by moving accept callback function pointer to TCP_PCB_COMMON
2009-02-16 16:50:58 +00:00
goldsimon
10c3ce08af
fixed bug #25467 : Listen backlog is not reset on timeout in SYN_RCVD: Accepts_pending is decrease on a corresponding listen pcb when a connection in state SYN_RCVD is close.
2009-02-10 20:29:38 +00:00
jifl
c231e95cce
* tcp.c: Fix bug #24227 , wrong error message in tcp_bind.
2008-09-30 13:50:39 +00:00
goldsimon
aee9c4c8e6
fixed bug #22249 : division by zero could occur if a remote host sent a zero mss as TCP option.
2008-03-26 11:57:12 +00:00
fbernon
f02c39a402
tcp.c, tcp_in.c, tcp.h, opt.h: Rename LWIP_CALCULATE_EFF_SEND_MSS in TCP_CALCULATE_EFF_SEND_MSS to have coherent TCP options names.
2008-01-22 21:15:14 +00:00
fbernon
7518acf634
rawapi.txt, api_msg.c, tcp.c, tcp_in.c, tcp.h: changes for task #7675 "Enable to refuse data on a TCP_EVENT_RECV call". Important, behavior changes for the tcp_recv callback (see rawapi.txt).
2008-01-14 21:07:08 +00:00
fbernon
82ddf82866
Minor change: add comment
2008-01-12 16:46:40 +00:00
fbernon
9c4daa312d
Minor changes in lwip folder: fix some warnings, coding style, and rename "internal" netconn_alloc function.
2008-01-04 23:07:44 +00:00
fbernon
32005617b9
rawapi.txt, api.h, api_lib.c, api_msg.h, api_msg.c, sockets.c, tcp.h, tcp.c, tcp_in.c, init.c, opt.h: rename backlog options with TCP_ prefix, limit the "backlog" parameter in an u8_t, 0 is interpreted as "smallest queue", add documentation in the rawapi.txt file.
2008-01-04 22:18:27 +00:00
kieranm
99afb15ced
Add persist timer
2007-12-31 13:34:47 +00:00
goldsimon
1ed34774c8
tcp.h, opt.h, api.h, api_msg.h, tcp.c, tcp_in.c, api_lib.c, api_msg.c, sockets.c, init.c: task #7252 : Implement TCP listen backlog: Warning: raw API applications have to call 'tcp_accepted(pcb)' in their accept callback to keep accepting new connections.
2007-12-21 16:47:56 +00:00
kieranm
1cb470662b
Whitespace fix.
2007-12-20 15:05:09 +00:00
kieranm
8cc32bc29c
2007-12-20 Kieran Mansley (based on patch from Per-Henrik Lundbolm)
...
* tcp.c, tcp_in.c, tcp_out.c, tcp.h: fix bug #20199 (better handling
of silly window avoidance and prevent lwIP from shrinking the window)
2007-12-20 14:51:35 +00:00
goldsimon
8d3d08e814
fix bug #21699 (segment leak in ooseq): add assert that all segment lists are empty in tcp_pcb_remove before setting pcb to CLOSED state; don't directly set CLOSED state from LAST_ACK in tcp_process
2007-12-04 20:41:12 +00:00
goldsimon
5743b11925
Check state == CLOSED in tcp_bind and tcp_connect to prevent binding/connecting twice (using LWIP_ERROR: can be disabled)
2007-11-25 18:37:34 +00:00
goldsimon
95425552d7
Implemented calculating the effective send-mss based on the MTU of the netif used to send. Enabled by default. Disable by setting LWIP_CALCULATE_EFF_SEND_MSS to 0. This fixes bug #21535 .
2007-11-21 18:37:23 +00:00
goldsimon
2d5908f4de
Fixed bug #21494 : The send mss (pcb->mss) is set to 536 (or TCP_MSS if that is smaller) as long as no MSS option is received from the remote host.
2007-11-01 16:53:43 +00:00
goldsimon
298d5cf042
Fixed bug #21491 : The MSS option sent (with SYN) is now based on TCP_MSS instead of pcb->mss (on passive open now effectively sending our configured TCP_MSS instead of the one received).
2007-11-01 16:23:32 +00:00
goldsimon
7a99d73092
Added some explaining comments.
2007-10-28 17:43:21 +00:00
goldsimon
199648ff37
Changed initialization: many init functions are not needed any more since we now rely on the compiler initializing global and static variables to zero!
2007-10-09 19:59:56 +00:00
goldsimon
0aa3d89134
Fixed bug #21080 (tcp_bind without check pcbs in TIME_WAIT state) by checking tcp_tw_pcbs also
2007-09-20 18:27:50 +00:00
fbernon
e3cd1ac1f9
Minor changes (but in lot of files): add #if/#endif for options where they could miss. #if LWIP_xxx if always put after #include "lwip/opt.h" (note this one indirectly include cc.h). Move others includes inside #if/#endif block.
2007-09-07 23:01:59 +00:00
fbernon
9152d6671c
Comments Fix for Doxygen documentation
2007-08-09 22:21:44 +00:00
goldsimon
33054a18db
Added a better comment to explain why tcp_close doesn't care for the return value of tcp_output
2007-07-26 09:31:09 +00:00
goldsimon
f4036e8352
Another fix for bug #20021 : by not returning an error if tcp_output fails in tcp_close, the code in do_close_internal gets simpler (tcp_output is called again later from tcp timers).
2007-07-25 19:24:27 +00:00
goldsimon
62c3de30b9
Fix bug #20480 : Check the pcb passed to tcp_listen() for the correct state (must be CLOSED).
2007-07-24 07:41:55 +00:00
goldsimon
fa4b711495
Added some ASSERTS and casts to prevent warnings when assigning to smaller types.
2007-07-02 20:13:45 +00:00
goldsimon
d228ff0f43
Removed warning when assigning from u32_t to u16_t by casting to u16_t.
2007-07-01 16:04:35 +00:00
goldsimon
6784fd64f3
Done some work on task #6933 : converted some LWIP_ASSERTs to LWIP_ERROR to give back an error return value for LWIP_NOASSERT=1
2007-06-17 15:20:21 +00:00
goldsimon
10f4604939
Corrected some copy & paste errors
2007-06-16 14:09:27 +00:00
goldsimon
d258bc263a
Done some work on task #1549 (function documentation)
2007-06-08 11:35:54 +00:00
goldsimon
c43ab76bbe
Use TCP_RMV instead of tcp_pcb_remove when removing pcbs from tcp_bound_pcbs list (bug introduced while fixing bug #1895 )
2007-05-29 11:02:53 +00:00
goldsimon
0aaf69769f
Fixed bug #1895 (tcp_bind not correct) by introducing a list of bound but unconnected (and non-listening) tcp_pcbs.
2007-05-22 20:48:36 +00:00
goldsimon
255d5a748f
Included patch #5920 : Create define to override C-library memcpy. 2 Defines are created: MEMCPY() for normal memcpy, SMEMCPY() for situations where some compilers might inline the copy and save a function call. Also replaced all calls to memcpy() with calls to (S)MEMCPY().
2007-05-10 05:20:05 +00:00
kieranm
79be888b6f
* tcp.c, tcp_in.c, tcp_out.c, tcp.h: Modify way the retransmission
...
timer is reset to fix bug#19434, with help from Oleg Tyshev.
2007-04-12 14:56:07 +00:00
goldsimon
7932bf483b
Ongoing fix to patch #5822 : converted more statements like (void)arg; into LWIP_UNUSED_ARG(arg);
2007-04-11 19:39:24 +00:00
fbernon
5c65d4733b
Keepalive values can be configured at run time with LWIP_TCP_KEEPALIVE, but don't change this unless you know what you're doing (default are RFC1122 compliant). Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set in seconds.
...
Old TCP_KEEPALIVE can always be used, and its only difference with TCP_KEEPIDLE is this last use seconds and not milliseconds with setsockopt.
Some documentation (not perfect, but...):
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.commtechref/doc/commtrf2/setsockopt.htm
2007-03-11 15:53:43 +00:00
christiaans
cdb7557d88
Added SNMP counters.
2006-08-18 10:18:42 +00:00
curtmcd
1dae102359
Fix debug print, remove reference to TCP_COARSE_TIMEOUT
2006-05-31 21:23:26 +00:00
likewise
f8663a7129
Remove PCBs which stay in LAST_ACK state too long.
2005-12-20 11:03:18 +00:00
christiaans
e1b215aa73
Introduced cc.h formatters and removed SO_REUSE from transport layers.
2005-11-25 12:03:38 +00:00
christiaans
089378ef87
christiaans: cosmetic change debug formatters as requested by Tom.
2004-12-07 08:16:27 +00:00
kieranm
751557bcbf
16th October 2004 - Kieran Mansley - kjm25@cam.ac.uk
...
- Add code to tcp_recved() to send an ACK (window update)
immediately, even if one is already pending, if the rcv_wnd is above a
threshold (currently TCP_WND/2)
- This avoids waiting for a timer to expire to send a delayed ACK in
order to open the window if the stack is only receiving data.
2004-10-16 12:57:52 +00:00
kieranm
2ed5bc5195
Kieran Mansley - kjm25@cam.ac.uk - 12th September 2004
...
Applied patch from Sam Jansen as detailed in
http://lists.gnu.org/archive/html/lwip-users/2004-07/msg00106.html
to correctly handle retransmission after a retransmission timeout
2004-09-12 16:34:06 +00:00
softins
1fa0d66f15
Stop compiler complaining of empty if statement when LWIP_DEBUGF() empty.
2004-07-27 16:08:26 +00:00
kieranm
eb69032773
Kieran Mansley - kjm25@cam.ac.uk - 23rd July 2004
...
Now handle CLOSED state in tcp_close() explicitely, and free the pcb.
This is for the case that a pcb has been allocated but never used (so
is in the default "CLOSED" state) and needs to be freed.
2004-07-23 13:07:00 +00:00
likewise
7524893802
Dependencies on C library memset() etc., so include <string.h>.
2004-07-04 23:43:38 +00:00
likewise
8f309a3fec
Clean-up source comment documentation for Doxygen.
2004-04-29 21:50:39 +00:00
likewise
fe1696cef7
Clean-up source comment documentation for Doxygen.
2004-04-29 21:48:31 +00:00
jani
d36b723056
fix SO_REUSE ifdef fixes
2004-03-26 12:40:58 +00:00
kieranm
2c8aa6f6f4
Kieran Mansley - kjm25@cam.ac.uk - 23rd March 2003
...
- Changed all #ifdef SO_REUSE into #if SO_REUSE
2004-03-23 19:33:53 +00:00
likewise
6f7c8fb355
Made #ifdef's into #if's for SO_REUSE.
2004-03-23 00:19:38 +00:00
kieranm
caf3c16826
Kieran Mansley, kjm25@cam.ac.uk, 08th Mar 2004
...
- added a comment to tcp_recved() to clarify reasons for call to tcp_ack()
2004-03-08 14:41:25 +00:00
likewise
7bfea6edb7
Applied Ian Wienand's patches (4-2-2004). Was partly applied earlier.
2004-02-16 21:33:42 +00:00
likewise
e1c4bfad05
Merged from DEVEL, except for the API change in etharp.c.
2004-02-07 00:30:03 +00:00
likewise
1ed40e7983
Applied alias.diff by Ian Wienand on lwip-devel on February 4th 2004.
...
Using union to make explicit either tcp_listen_pcb or tcp_pcb.
2004-02-06 23:48:40 +00:00
likewise
1b96391cdf
Merged from DEVEL to main. Two TCP fixes and two NULL reference fixes.
2004-01-20 13:23:52 +00:00
likewise
e4a6d199fe
Merged from DEVEL into main tree.
2003-11-14 13:17:23 +00:00
likewise
ba786dc49b
Applied patch #1596 fixing wrongly cast LWIP_DEBUGF arguments.
...
(printf expects integers on the var args stack)
2003-06-11 22:11:42 +00:00
kieranm
8014551908
Changed DEBUGF to LWIP_DEBUGF
2003-06-10 10:45:29 +00:00
likewise
df99ce9d98
Replaced all tabs with two spaces (regardless of indentation is correct).
2003-06-09 21:14:47 +00:00
jani
6719f10034
put LWIP_MAX and LWIP_MIN macros in def.h and use these instead of locally declaring them in .c files
2003-05-27 13:44:08 +00:00
jani
cd65d36822
patches 1492, 1493 and 1494 from Marc
2003-05-19 14:41:54 +00:00
likewise
03bc7c868b
Major stylo search/replace for "One space between keyword and opening bracket."
2003-05-01 13:24:01 +00:00
likewise
9bc16878ea
Fixed tabs into spaces. Fixed other stylos.
2003-04-16 07:39:48 +00:00
likewise
9ef5a61b1e
Prevent compiler warning on unused function arguments.
2003-04-15 12:41:52 +00:00
likewise
12fc0239c2
Fixed bug #3112 (faulty behaviour calling tcp_listen() when already listening)
2003-04-06 20:35:50 +00:00
davidhaas
09ca7a181b
In keeping with pbuf->ref always having the count of the number of pointers
...
to the particular buffer (and the last rewrite of pbuf_free), changed most
pbuf_ref_chain() calls back to pbuf_ref(). I think this was causing some pbuf
leaks.
2003-03-31 22:09:39 +00:00
likewise
6c147709b6
Documentation changes. Added missing trailing newlines to debug messages.
2003-03-31 10:32:35 +00:00
likewise
fa34d51b7e
Added documentation and comments.
2003-03-25 12:59:42 +00:00
jani
859f06a91e
if LWIP_TCP is 0 do not link in TCP code.putting ugly ifdefs in api and core :(.Also only udp_init if LWIP_UDP is on
2003-03-21 10:48:21 +00:00
davidhaas
32d9f25a6f
Fixed up and made work a PBUF_REF type. Most of the code uses this now
...
instead of PBUF_ROM. This addition allows support of copy-on-demand where the
lower layers can call pbuf_unref() which tests for any PBUF_REF buffers and
replaces them with PBUF_POOL buffers. This is now used
everywhere. pbuf_unref() is called in ARP queueing and in the coldfire
driver, which puts frames on a DMA queue and frees them later.
Along with this change pbuf_free() now goes through the entire chain of
buffers and tests all the ref counters, not just the first one. Generally now
pbuf_ref_chain() should be called and not pbuf_ref(). This change was made
because it is possible for the head of the pbuf chain to have a different
count than the payload pbuf which might have been passed by the application.
2003-03-19 22:14:49 +00:00
jani
18df3961e9
byte-order handling functions are in inet.c now and the uperrcase counterparts are gone. opt.h has all the
...
configurable items debug does not need to be directly included.
2003-02-21 16:43:46 +00:00
jani
8e9aa84070
do not directly include lwipopts.h but lwip/opt.h instead
2003-02-20 16:32:22 +00:00
davidhaas
dd2fa15e8a
Add the following features and bugfixes:
...
Added select() functionality to sockets library.
Support for errno in sockets library.
Byte ordering fixes.
basic lwip_ioctl(), FIONREAD, get/setsockopt() etc. support
- added additional argument to netif_add to pass state pointer so that the
if_init function has access to context information before
the interface is added, without accessing globals.
- added netif_remove()
- to conserve cpu load the tcpip_tcp_timer should only be active
when tcbs that need it exist.
- pass length of available data to callbacks for NETCONN_EVT_RCV events
- added tcpip_link_input(), a hack to allow processing of PPP
packets in tcpip_thread() context. This saves threads and context
switches.
- renamed incompatible ASSERT() macro to LWIP_ASSERT() to avoid name
collision.
- changed a bunch of %d's to %u's in format strings for unsigned values.
- added ip_frag to lwip_stats.
- changed IP_REASS_MAXAGE and IP_REASS_TMO defaults to more realistic
values.
- added sys_timeout_remove() function to cancel timeouts (needed by PPP
amongst other things).
- tolerate NULL returns from sys_arch_timeouts() since some threads might
not need to use or have timeouts.
- added sys_sem_wait_timeout()
- moved mem_malloc() function to end of mem.c to work around tasking
compiler bug.
- automatically bind to local tcp port if 0.
- allow customization of port ranges for automatic local bindings.
- corrected various typos, spelling errors, etc..
Thanks to Marc Boucher for many of these changes.
2003-02-06 22:18:56 +00:00
jani
42309b5d6f
put a state field in listen PCBs to since they are often treated as normal pcbs. patch #922 , bug #2114
2003-01-17 14:18:55 +00:00
jani
4eebbdea0d
print correct pcb->rtime value in debug statament.it does not directly depend on tcp_ticks
2003-01-10 15:41:02 +00:00
jani
e196108931
fix debug messages in tcp_slowtmr to reflect the correct name of this function
2003-01-10 09:41:24 +00:00
likewise
5e13d495f0
Merged patch #927 which fixes "needs modifiable lvalue" compile error in TCP_REG.
2003-01-08 15:37:20 +00:00
likewise
cc4df7100d
Updated lwIP module copyright years to include 2003. Committers must check theirs.
2003-01-08 10:09:39 +00:00
jani
4c1069c38b
use memset and memcpy instead of bzero and bcopy throughout lwIP core code.Archs need to update.Bug #1899
2002-12-18 10:40:01 +00:00
jani
c0a8ef6f6f
Use C style comments.In debug stataments cast various struct pointers to void* to
...
avoid printf warnings.misc warnings in etharp.
2002-12-17 09:41:16 +00:00
likewise
c73606309f
Fixed argument type compiler warnings of the bcopy() call using type casting.
2002-11-24 22:27:10 +00:00
likewise
dfe1ab7438
Added debug messages for corner cases of TCP states.
2002-11-21 10:29:51 +00:00
adamdunkels
43a06e8e37
The code that increased the retransmission time was commented out for some reason. This has been fixed. Also removed some old, out-commented, code.
2002-11-15 09:40:05 +00:00
jani
131eed412a
Fix function names in DEBUGF stataments.Remove reference to "reclaimed" field in stat.
2002-11-14 12:20:37 +00:00
kieranm
4b9e035a9f
Initialize err in tcp_slowtmr to prevent compiler warning.
2002-11-13 21:54:22 +00:00
likewise
bca526b634
Workaround for compile error on TCP_REG. This workaround is disabled by default.
2002-11-11 14:47:26 +00:00
likewise
f06e955072
Initial revision
2002-10-19 12:59:30 +00:00