fbernon
787eecbf43
Fix mistakes in netconn's error field checking.
2007-04-05 21:11:16 +00:00
fbernon
5f1aac1450
api_msg.c: Fix bug #16830 : "err_tcp() posts to connection mailbox when no pend on the mailbox is active". Now, the post is only done during a connect, and do_send, do_write and do_join_leave_group don't do anything if a previous error was signaled.
2007-04-05 16:54:20 +00:00
fbernon
7fdd312cca
sockets.c: remplace ENOBUFS errors on alloc_socket by ENFILE to be more BSD compliant.
2007-04-05 16:49:33 +00:00
goldsimon
f6bdd2cae4
Introduced #define LWIP_UNUSED_ARG(x) use this for and architecture-independent form to tell the compiler you intentionally are not using this variable. Can be overriden in cc.h.
2007-04-04 19:54:22 +00:00
fbernon
f1412f5e5a
api_msg.c: add a "pcb_new" helper function to avoid redundant code, and to add missing pcb allocations checking (in do_bind, and for each raw_new). Fix style.
2007-03-30 09:42:16 +00:00
fbernon
9ec08fa76a
Missing recv_timeout initialize in accept_function. Minor style fix (indent, mbox checking...)
2007-03-28 18:21:24 +00:00
fbernon
913a99dd35
api.h, api_lib.c, sockets.c: netbuf_ref doesn't check its internal pbuf_alloc call result and can cause a crash. lwip_send now check netbuf_ref result.
2007-03-28 17:26:06 +00:00
goldsimon
d956a39fec
sockets.c Remove "#include <errno.h>" from sockets.c to avoid multiple
...
definition of macros (in errno.h and lwip/arch.h) if LWIP_PROVIDE_ERRNO is
defined. This is the way it should have been already (looking at
doc/sys_arch.txt)
2007-03-28 14:49:04 +00:00
goldsimon
bef0503545
Removed warning: sizeof() was automatically casted to negative
2007-03-26 18:57:30 +00:00
fbernon
19338d2774
opt.h, tcpip.c: New configuration option LWIP_ARP allow to disable ARP init at build time if you only use PPP or SLIP. The default is enable. Note we don't have to call etharp_init in your port's initilization sequence if you use tcpip.c, because this call is done in tcpip_init function.
2007-03-26 16:13:46 +00:00
fbernon
005e5f2f72
api_lib.c (from Dmitry Potapov) : patch for netconn_write(), fixes a possible race condition which cause to send some garbage. It is not a definitive solution, but the patch does solve the problem for most cases.
2007-03-26 15:37:48 +00:00
fbernon
544e469eeb
api_msg.h, api_msg.c: Remove obsolete API_MSG_ACCEPT and do_accept (never used).
2007-03-22 09:34:18 +00:00
fbernon
db739d16ce
api_lib.c: somes resources couldn't be freed if there was errors during netconn_new_with_proto_and_callback.
2007-03-22 09:27:04 +00:00
goldsimon
776c01e60b
fixed bug #5067 (essentialy a signed/unsigned warning fixed by casting to unsigned).
2007-03-21 21:14:06 +00:00
fbernon
3eb38d7611
api_lib.c, api_msg.c, tcpip.c: integrate sys_mbox_fetch(conn->mbox, NULL) calls from api_lib.c to tcpip.c's tcpip_apimsg(). Now, use a local variable and not a dynamic one from memp to send tcpip_msg to tcpip_thread in a synchrone call. Free tcpip_msg from tcpip_apimsg is not done in tcpip_thread. This give a faster and more reliable communication between api_lib and tcpip.
2007-03-21 16:38:58 +00:00
fbernon
bb34d8cfd1
api_msg.c, igmp.c, igmp.h: Fix C++ style comments
2007-03-21 14:47:52 +00:00
kieranm
7294cb080b
* Fix all uses of pbuf_header to check the return value. In some
...
cases just assert if it fails as I'm not sure how to fix them, but
this is no worse than before when they would carry on regardless
of the failure.
2007-03-21 12:55:00 +00:00
kieranm
b422864d5d
sockets.c, igmp.c, igmp.h, memp.h: Fix C++ style comments and
...
comment out missing header include in icmp.c
2007-03-21 12:50:04 +00:00
fbernon
713e89cdb2
tcpip.c: Initialize tcpip's mbox, and verify if initialized in tcpip_input, tcpip_ethinput, tcpip_callback, tcpip_apimsg, to fix a init problem with network interfaces. Also fix a compiler warning.
2007-03-20 18:01:40 +00:00
fbernon
b035a6196a
Add return types to tcpip_apimsg() and api_msg_post() to check ERR_MEM problems (api_lib.c can be change now).
2007-03-19 20:35:32 +00:00
fbernon
a24a170b84
New configuration option LWIP_IGMP to enable IGMP processing. Based on only one filter per all network interfaces. Declare a new function in netif to enable to control the MAC filter (to reduce lwIP traffic processing).
...
Mace Gael for the upper layers, Steve Reynolds for lower ones...
2007-03-11 19:16:38 +00:00
goldsimon
bc4b3764fc
Fixed bug #19251 (missing `const' qualifier in socket functions), to get more compatible to standard POSIX sockets.
2007-03-11 17:57:13 +00:00
fbernon
9b143dd5dc
Based on patch from Dmitry Potapov, bug#19225.
...
Add asserts inside bind, connect and sendto to check input parameters. Remove excessive set_errno() calls after get_socket(), because errno is set inside of get_socket(). Move last sock_set_errno() inside lwip_close.
2007-03-11 16:53:37 +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
fbernon
fdcb87db19
Implement LWIP_SO_RCVTIMEO configuration option to enable/disable SO_RCVTIMEO on UDP sockets/netconn.
2007-03-08 20:58:46 +00:00
goldsimon
a868832776
Initialize dhcp timers in tcpip_thread (if LWIP_DHCP) to protect the stack from concurrent access.
2007-03-08 10:37:31 +00:00
fbernon
7cda728469
Fix some "little" build problems, and a redundancy call to "lwip_stats.link.recv++;" in low_level_input() & ethernetif_input().
...
If LINK_STATS was defined, tcpip.c couldn't be build.
Even if IP_FRAG or IP_REASSEMBLY were set, ip_frag.c functions are not build.
2007-03-06 19:31:49 +00:00
fbernon
7fd37d4e87
Implement SO_RCVTIMEO on UDP sockets/netconn.
2007-03-06 16:41:02 +00:00
fbernon
ed07d481d6
opt.h, ip_frag.h, tcpip.h, tcpip.c, ethernetif.c: add new configuration option named ETHARP_TCPIP_ETHINPUT, which enable the new tcpip_ethinput. Allow to do ARP processing for incoming packets inside tcpip_thread (protecting ARP layer against concurrent access). You can also disable old code using tcp_input with new define ETHARP_TCPIP_INPUT set to 0. Older ports have to use tcpip_ethinput.
2007-03-06 14:18:02 +00:00
goldsimon
7115975212
fixed compiler warning "initialization dircards qualifiers from pointer target type"
2007-03-06 07:28:22 +00:00
fbernon
1ffd049833
api_msg.c: Remove some compiler warnings : parameter "pcb" was never referenced.
2007-03-04 16:25:04 +00:00
fbernon
12e0a2ef7d
api_lib.c: Fix "[patch #5764 ] api_lib.c cleanup: after patch #5687 " (from Dmitry Potapov).
...
The api_msg struct stay on the stack (not moved to netconn struct).
2007-03-04 14:49:46 +00:00
goldsimon
bb8522b737
tcpip.c: Moved call to ip_init(), udp_init() and tcp_init() from tcpip_thread() to tcpip_init()
2007-03-03 16:22:38 +00:00
kieranm
527d18a526
2007-02-28 Kieran Mansley (based on patch from Simon Goldschmidt)
...
* api_lib.c, tcpip.c, memp.c, memp.h: make API msg structs allocated
on the stack and remove the API msg type from memp
2007-02-28 14:15:43 +00:00
kieranm
c52ac01fbc
sockets.c: Fix BUG#19161 - ensure milliseconds timeout is non-zero
...
when supplied timeout is also non-zero
2007-02-28 12:52:44 +00:00
jifl
75beb3bd35
Fix incorrect comparison in get_socket().
...
Spotted by Frederic Bernon.
2007-02-26 20:16:38 +00:00
jifl
1d22294974
* sockets.h, sockets.c: Move socket initialization to new
...
lwip_socket_init() function.
2007-02-26 20:01:04 +00:00
jifl
de665f7cf9
2007-02-26 Jonathan Larmour (based on patch from Simon Goldschmidt)
...
* api_lib.c: Use memcpy in netbuf_copy_partial.
2007-02-26 19:49:49 +00:00
christiaans
b5f4672155
Partially accepted patch #5449 for ANSI C compatibility / build fixes. Fixed bug #17574 corrected UDP-Lite protocol identifier.
2006-10-11 12:04:04 +00:00
christiaans
729da3c873
Fixed Nagle algorithm as reported by Bob Grice.
2006-10-10 07:48:27 +00:00
christiaans
a82e02ef15
Partial fix for bug #15926 , flushing TCP output in do_close().
2006-08-07 10:00:44 +00:00
christiaans
63140ca7f8
Applied patch for cold case bug #11135 .
2006-06-27 10:33:52 +00:00
christiaans
1f01634029
Applied patch #5146 to handle allocation failures in accept() by Kevin Lawson.
2006-06-14 08:02:35 +00:00
christiaans
7026bbcdd4
Removed conn->sem creation and destruction from netconn_write() and added sys_sem_new to netconn_new_*
2006-05-26 07:39:39 +00:00
christiaans
00f8cf57cd
Added IP reassembly timer.
2006-03-01 14:51:58 +00:00
christiaans
182e1909b2
Patch from Curt McDowell fixes err_to_errno macro.
2006-02-13 08:14:11 +00:00
christiaans
e1b215aa73
Introduced cc.h formatters and removed SO_REUSE from transport layers.
2005-11-25 12:03:38 +00:00
likewise
0e96ece6c6
Surround definition of tcp_timer_needed with #if !NO_SYS #endif. (see lwip-users 15-11-2004).
2004-11-28 18:23:00 +00:00
jani
8afd3e882e
#if directive style fix
2004-11-09 11:44:06 +00:00
kieranm
19d8ffe177
Kieran Mansley - kjm25@cam.ac.uk - 20th September 2004
...
* Check if the pbuf is NULL before freeing it, when draining the mbox as part of netconn_delete.
2004-09-20 16:58:01 +00:00