goldsimon
2aef8bad55
Moved the nagle algorithm from netconn_write/do_write into a define (tcp_output_nagle) in tcp.h to provide it to raw api users, too.
2007-06-21 18:55:09 +00:00
goldsimon
9f05cabf87
Fixed bug #20021 : Moved sendbuf-processing in netconn_write from api_lib.c to api_msg.c to also prevent multiple context-changes on low memory or empty send-buffer.
2007-06-21 18:40:21 +00:00
goldsimon
261e92c57b
In accept_function, one LWIP_ERROR had a wrong expression (since it is inverted compared to LWIP_ASSERT...)
2007-06-17 14:38:32 +00:00
goldsimon
060cbe15d6
Done some work on task #1549 (function documentation), added some LWIP_ERROR checks, don't call pcb_new() from do_bind() and do_connect() since a netconn without pcb can't exist any more (after the recent changes to netconn_new_*())
2007-06-16 15:07:11 +00:00
goldsimon
15e8208457
pcb_new sets conn->err if protocol is not implemented -> netconn_new_..() does not allocate a new connection for unsupported protocols.
2007-06-13 19:00:21 +00:00
fbernon
d81841f54e
Minor fix (coding style)
2007-06-10 20:02:43 +00:00
goldsimon
95f4c02381
Included switch LWIP_UDPLITE (enabled by default) to switch off UDP-Lite support if not needed (reduces udp.c code size)
2007-06-10 12:02:24 +00:00
fbernon
090aaefb39
Add LWIP_TCPIP_CORE_LOCKING option (0 as default value) to experiment "locking" as feature to communicate with tcpip_thread for sequential API (netconn & socket layers). Add a alternative code for lwip_sendto to how the code can be optimized with such feature....
2007-06-08 19:27:59 +00:00
fbernon
953d783a3e
api.h, api_lib.c, api_msg.c, sockets.c: group the different NETCONN_UDPxxx code in only one part...
2007-05-23 17:46:53 +00:00
fbernon
499f4689be
api.h, api_lib.c, api_msg.h, api_msg.c: change the struct api_msg_msg to see which parameters are used by which do_xxx function, and to avoid "misusing" parameters (patch #5938 ).
2007-05-22 09:54:00 +00:00
fbernon
2106f491d0
Minors fix (spaces, comments, unused variable)
2007-05-22 08:20:18 +00:00
goldsimon
81ac03a28b
Included patch #5938 : changed raw_pcb.protocol from u16_t to u8_t since for IPv4 and IPv6, proto is only 8 bits wide. This affects the api, as there, the protocol was u16_t, too.
2007-05-22 07:31:06 +00:00
goldsimon
613644bfc6
Re-included unneeded cases in do_disconnect() and do_send() to prevent warnings.
2007-05-21 09:52:23 +00:00
fbernon
7f5d6bc964
api_msg.c: Fix some errors forwarding ( https://savannah.nongnu.org/task/?6880 )
2007-05-19 16:27:02 +00:00
fbernon
d5e37309e5
Minor Fix (unsed code, spaces, idents..)
2007-05-19 16:24:40 +00:00
goldsimon
8fa3b6802e
Added #if !NO_SYS to most of the api files since they only work with a sys layer (makes it easier for port projects).
2007-05-18 11:27:46 +00:00
goldsimon
2740a81103
If a udp_pcb has a local_ip set, check if it is the same as the one of the netif used for sending to prevent sending from old addresses after a netif address gets changed (partly fixes bug #3168 ).
2007-05-16 18:55:25 +00:00
fbernon
9cf1390dc6
sockets.c, api_lib.c, api_msg.h, api_msg.c, netifapi.h, netifapi.c, tcpip.c: Include a function pointer instead of a table index in the message to reduce footprint. Disable some part of lwip_send and lwip_sendto if some options are not set (LWIP_TCP, LWIP_UDP, LWIP_RAW).
2007-05-11 08:58:23 +00:00
fbernon
5a12aeb4a1
sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c: Fix bug #19162 "lwip_sento: a possible to corrupt remote addr/port connection state". Reduce problems "not enought memory" with netbuf (if we receive lot of datagrams). Improve lwip_sendto (only one exchange between sockets api and api_msg which run in tcpip_thread context). Add netconn_sento function. WARNING, if you directly access to "fromaddr" & "fromport" field from netbuf struct, these fields are now renamed "addr" & "port".
2007-05-04 15:18:29 +00:00
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
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
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
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
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
fbernon
1ffd049833
api_msg.c: Remove some compiler warnings : parameter "pcb" was never referenced.
2007-03-04 16:25: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
softins
6f066fca82
Changed recv_raw() from int to u8_t, to match prototype of raw_recv() in raw.h
...
and so avoid compiler error.
2004-07-21 08:55:26 +00:00
likewise
e1c4bfad05
Merged from DEVEL, except for the API change in etharp.c.
2004-02-07 00:30:03 +00:00
likewise
e4a6d199fe
Merged from DEVEL into main tree.
2003-11-14 13:17:23 +00:00
marcbou
351e590e01
Merged from DEVEL.
2003-06-27 20:46:11 +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
likewise
03bc7c868b
Major stylo search/replace for "One space between keyword and opening bracket."
2003-05-01 13:24:01 +00:00
kieranm
01a53d955e
Fixed bug in do_delcon (set tcp_arg to NULL)
2003-03-31 09:35:47 +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
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
davidhaas
7b3e158c92
sys_thread_new() now returns the thread (request from Marc Boucher).
...
Removed some unused .h files in coldfire port.
Support LWIP_DIAG and LWIP_ASSERT in coldfire (sort of).
Fix to last api fix to make sure select() is triggered, even when there has
been a FIN.
Allow build of unixsim from cygwin by specifying "make ARCH=cygwin" or from
linux by specifying "make ARCH=linux".
2003-02-11 21:00:14 +00:00
jani
848dea2058
Only access non-NULL pbufs on some paths where they can be NULL in newly introduced callback code
2003-02-11 16:33:02 +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
6d0a8a85c7
Fix locking for disconnect operation (use post and fetch on the connection's mbox in the two threads like other operations).Make netconn_peer take a pointer to addr instead of pointer to pointer to addr.Addr is a 4 byte struct an IP address so use structure assignment not just pointer assignment when saving the peer.This way the address is really saved :fixes bug #1897
2003-01-24 09:24:44 +00:00
jani
46c575c038
Fix udp_bind to allow rebind for same socket (yesterday's commit broke that) and introduce connection info for UDP pcbs.New function netconn_disconnect, do_disconnect for deatching UDP from a remote addres.Fix #2240
2003-01-22 16:18:05 +00:00
jani
16434f0d01
Don't allow multiple binds to the same UDP port/address pair.Closes bug #1896
2003-01-21 14:09:31 +00:00