Commit Graph

1067 Commits

Author SHA1 Message Date
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
likewise
734400cafa Only free the queued packets if there are any. 2003-06-09 20:28:10 +00:00
likewise
08703f46f8 Several additional documentation fixes. 2003-06-04 08:58:51 +00:00
jani
26d9b28f77 sio and PPP updates from Marc 2003-06-02 11:12:56 +00:00
jani
ff63557d39 Cleanups in PPP: C++ comments removed, make it compile for unixsim too. Does not work yet only compiles 2003-05-30 08:49:34 +00:00
jani
31776e23fe add PPP stack from Marc. Work in progress 2003-05-27 14:37:56 +00:00
jani
8bfe344923 fix format warning 2003-05-06 12:13:34 +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
042b2a39d9 Either first or last packet can be queued. Fixed (err_t)NULL return value in etharp_query(). 2003-04-22 15:08:47 +00:00
likewise
9ef5a61b1e Prevent compiler warning on unused function arguments. 2003-04-15 12:41:52 +00:00
likewise
1a72feb128 etharp_query() has error return type now. Matched dhcp.c with this change.
Added debug messages in other places.
2003-04-01 14:02: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
002998cf49 Fixed bugs #2968 (ref count) and #2670 (total length).
Name of pbuf_unref() falsely suggests to undo pbuf_ref(), renamed to pbuf_take().
2003-03-28 08:49:05 +00:00
likewise
fa34d51b7e Added documentation and comments. 2003-03-25 12:59:42 +00:00
jani
c60d0de919 Add sio.h containing interface to platform specific serial layer.Make slipif use it instead of defining extern functions.This is in preparation for PPP 2003-03-24 10:54:03 +00:00
jani
9cafc7a764 avoid compiler warning 2003-03-21 10:34:47 +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
84697ce713 Add priority argument to thread sys_thread_new.Patch from floriZ but slightly modfied 2003-03-19 15:27:56 +00:00
davidhaas
f9f21934ab Fix to last fix for bug 2826: find_arp_entry() was now not finding any
entries unless there was an attached buffer. Fixed so that it finds entries
without attached buffer.

Also: Now attaching buffer to arp queue before sending arp request. For
Coldfire, where ethernet receive is done under interrupts arp response was
received before buffer was attached, thus causing attached frame to never get
transmitted.
2003-03-18 14:48:40 +00:00
likewise
45c13ad08f Fixed bug #2826 (re-use of oldest ARP entry with queued packet leaks pbuf). Only if ARP_QUEUEING == 1. 2003-03-16 23:46:29 +00:00
likewise
76d395c8de Fixed bug #2841 (etharp.c packet queueing always picks table entry 6). 2003-03-16 22:44:05 +00:00
jani
d390ca7056 cleaned up opt.h a bit, added more option defaults ad changed SYS_LIGHTWEIGHT_PROT to be a 0/1 define.The same for COMPAT_SOCKET 2003-02-24 10:49:05 +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
likewise
37629fc1b6 Fixed some issues open after merging 'leon-dhcp'. Added new debugging. 2003-02-20 13:13:51 +00:00
jani
cc31bb9358 make netif->init return err_t instead of void.Patch from David Le Corfec 2003-02-20 11:51:53 +00:00
likewise
d8d787545e Merged with leon-dhcp branch. Tagged as POST_leon-dhcp afterwards. 2003-02-20 08:41:59 +00:00
davidhaas
7f1becc682 Allow minimal unix target to build in cygwin (but not necessarily run).
Applied a patch from Marc Boucher which has the following changes:

1) Fixed sys_arch.txt documentation to have new return type from
   sys_thread_new.

2) Removed unnecessary casts on calling sys_timeout() in certain files.

3) Removed some unnecessary break statements after return statements.

4) Changed sys_timeout_remove() to sys_untimeout().

5) Added some forgotten #ifndef SYS_LIGHTWEIGHT_PROT to memp.c

6) Changed LWIP_DIAG and LWIP_PLATFORM_ASSERT to have do while().
2003-02-18 19:27:48 +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
d2e008d4b4 Update src/FILES and src/netif/FILES 2003-02-05 13:39:35 +00:00
jani
39edc69514 When all entries are 0 due to the whole table changing since the last arp tick (past 10 seconds) there's no oldest entry and the new entry does not get a spot.Fix this (from Ed Sutter) 2003-01-18 16:05:24 +00:00
likewise
1ad5537c9b Fixed some typo's in the comments. 2003-01-13 13:22:09 +00:00
jani
8d7f09fa92 remove global ctime.Each entry's ctime is now absolute.This avoids wrapping and also solves naming clash reported on the list 2003-01-13 09:38:21 +00:00
likewise
ced453a72b Moved ETHARP_ALWAYS_INSERT switch to lwipopts.h 2003-01-08 11:03:54 +00:00
likewise
0f3e8c19e8 Added check if ARP_QUEUEING is 1 for a queueing related debug statement. 2003-01-08 10:49:16 +00:00
likewise
cc4df7100d Updated lwIP module copyright years to include 2003. Committers must check theirs. 2003-01-08 10:09:39 +00:00
likewise
0bd02a5f7a Removed etharp_output_sent() as etharp.c no longer returns ARP packets to the driver. 2003-01-08 09:24:06 +00:00
likewise
b311ab0d53 Allocate PBUF_RAW instead of PBUF_LINK type pbufs. Fixes bug #1890 for this driver. 2003-01-08 09:09:35 +00:00
jani
b6b905412e Patch #928 from Marc 2003-01-07 12:50:34 +00:00
jani
ef68392388 renamed (hopefully everywhere) stats to lwip_stats.closes bug #1901 2002-12-18 12:49:01 +00:00
jani
95c1bca3f1 Moved tcpdump to unix arch since it's specific to that. 2002-12-18 10:48:51 +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
jani
a071cbf86c Allocate PBUF_POOL_BUFSIZE at once not harcoded 128.Init MTU for slip - 1500 for
now needs a SLIP_MTU in opts (later).Add prototypes for low level sio callbacks.
2002-12-17 09:39:10 +00:00
kieranm
cac01f7a89 Fixed compiler warnings when ARP_QUEUEING is not defined. 2002-12-05 09:41:52 +00:00
likewise
ac46dbacfa Fixed wrong assertion condition. 2002-12-02 16:08:09 +00:00
likewise
dfa0369678 More complete ARP protocol implementation. 2002-11-29 16:02:11 +00:00
likewise
bda378bb9f All ARP queueing code is now conditionally compiled-in. 2002-11-28 09:26:18 +00:00
likewise
29f5968c23 Conditionally have ARP queue outgoing pbufs. 2002-11-18 10:30:02 +00:00
jani
dbac2ff0b3 Move etharp packed structures to the header file. 2002-11-18 08:41:31 +00:00
likewise
4beff6c2cf ETHARP_SNOOP_UPDATES made externally configurable. 2002-11-15 12:41:59 +00:00
jani
ecf0f56d33 Fix bug which eats pbufs if SLIP_END comes at a pbuf boundary.Also cleaned up and commented the code. 2002-11-14 08:03:25 +00:00
likewise
d31ef42acf ARP entries can now be updated (but not added) on any ARP traffic. Set #define ETHARP_SNOOP_UPDATES 1 to enable. 2002-11-13 09:10:19 +00:00
likewise
f9129c4dcd Implemented conditional insertion of ARP entries to update_arp_entry using ARP_INSERT_FLAG. 2002-11-13 08:56:11 +00:00
likewise
e41134bbbe Note about ethernetif.c not up-to-date with etharp.c API. Fixed typo. 2002-11-11 14:37:30 +00:00
likewise
b9353eaf12 Changed static etharp_query() to support queueing packets. This fix missed in last commit. 2002-11-11 14:34:12 +00:00
likewise
2b53babf99 Fixed numerous bugs. Re-used etharp_query() in etharp_output(). Added comments and JavaDoc documentation. 2002-11-08 22:14:24 +00:00
proff_fs
f1c0bbc62b Added includeds for bpstruct and epstruct.
Ports should update from using PACK_STRUCT_BEGIN and PACK_STRUCT_END to use these includes.
Maybe there should be an PACK_STRUCT_USE_INCLUDES ifdef around these, for ports for which PACK_STRUCT_BEGIN and PACK_STRUCT_END works nicely.
2002-11-08 12:54:43 +00:00
likewise
e988d2ee0b find_arp_entry() returned 0 instead of ARP_TABLE_SIZE if full pending cache (bug #1625). 2002-11-06 11:43:21 +00:00
likewise
bb06293b30 Fixed NULL pointer bug (#1493). Fix for memory leak bug (#1601), etharp_output_sent(). Added etharp_query for DHCP. 2002-11-04 14:56:24 +00:00
adamdunkels
01cccf4aee Reformatted the code to make it consistent with the rest of lwIP. 2002-11-02 20:40:06 +00:00
adamdunkels
4e4da8e019 Added short descriptions of the generic network interface code. 2002-11-02 20:38:49 +00:00
likewise
bcb2600107 New file structure towards SLIP/PPP. Renamed tcp_*.c for 8.3 sake.
See lwip@sics.se Mon, 21 Oct 2002 magnus.ivarsson
2002-10-22 12:32:58 +00:00
likewise
f06e955072 Initial revision 2002-10-19 12:59:30 +00:00