goldsimon
f93b8fe377
pbuf_copy(): removed copy & paste error which did not copy pbuf chains correctly
2007-06-14 17:40:39 +00:00
goldsimon
978c68dcf8
pbuf_copy: chained pbufs were not copied correctly because of wrong packet-queue-check
2007-06-14 07:22:43 +00:00
fbernon
bdbc96f453
opt.h, mem.h, mem.c, memp.c, pbuf.c, ip_frag.c, vj.c: Fix bug #20162 . Rename MEM_ALIGN in LWIP_MEM_ALIGN and MEM_ALIGN_SIZE in LWIP_MEM_ALIGN_SIZE to avoid some macro names collision with some OS macros.
2007-06-13 17:17:26 +00:00
goldsimon
0b9c9f9ede
pbuf_copy(): Corrected a wrong comment & try to behave correctly if LWIP_NOASSERT is defined
2007-06-08 17:27:36 +00:00
goldsimon
75fd6fc4a4
Needed for patch to bug #19937 : pbuf_copy is always compiled, not only if ARP_QUEUEING is enabled
2007-06-03 11:28:25 +00:00
goldsimon
98df3c6e0a
Removed LWIP_DEBUG_ASSERT
2007-05-24 07:19:34 +00:00
goldsimon
4192df97ec
Corrected check of PBUF_POOL overflow
2007-05-18 11:13:34 +00:00
goldsimon
887077b5a4
pbuf_alloc(PBUF_POOL): Added asserts to make sure payload+len is still in bound of the pbuf (also to make sure bug #15659 is fixed).
2007-05-16 10:45:28 +00:00
goldsimon
62d705903e
task #6831 : removed the option PBUF_POOL_USES_MEMP and removed the old pbuf pool code, pbuf pool now always allocates from a memp pool
2007-05-13 18:17:22 +00:00
goldsimon
a5e2e9ea03
(see task #6831 ): Included new option PBUF_POOL_USES_MEMP to use a memp pool for PBUF_POOL pbufs instead of the old pool implementation in pbuf.c to remove redundant code.
2007-05-13 16:16:03 +00:00
goldsimon
055e3d52b6
Modified struct pbuf size determination so that sizeof(struct pbuf) does not necessarily be a multiple of MEM_ALIGNMENT
2007-05-13 16:12:29 +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
goldsimon
79d9b36ece
Further update to ARP queueing: Changed pbuf_copy() implementation so that it can be reused (don't allocate the target pbuf inside pbuf_copy()).
2007-05-04 21:31:25 +00:00
fbernon
eb28133b1f
Remove forgotten printf in pbuf_init().
2007-05-02 09:26:51 +00:00
goldsimon
c66932ab25
Checked in patch #5453 : removed mutex/other locking stuff if SYS_LIGHTWEIGHT_PROT=0, moved some pbuf pool logic to static functions
2007-04-30 13:18:22 +00:00
goldsimon
cde6d0deed
pbuf_alloc() / pbuf_realloc(): added LWIP_DEBUG_ASSERT() and cast operator when assigning s32_t to u16_t to get rid of compiler warnings
2007-04-30 11:56:48 +00:00
goldsimon
82e579a29d
Changed the comment to pbuf_realloc() that it can't grow (only shrink) chains to reflect the fact that we decided not to change this.
2007-04-17 17:48:35 +00:00
jifl
cd19d81411
* pbuf.c: Use s32_t in pbuf_realloc(), as an s16_t can't reliably hold
...
the difference between two u16_t's.
2007-04-17 14:44:41 +00:00
goldsimon
e54f3fdaac
3rd fix for bug #11400 (arp-queuing): More pbufs than previously thought need to be copied (everything but PBUF_ROM!). Cleaned up pbuf.c: removed functions no needed any more (by etharp).
2007-04-11 18:50:45 +00:00
fbernon
5368a760cf
most of files: prefix all debug.h define with "LWIP_" to avoid any conflict with others environment defines (these were too "generic").
2007-03-30 08:47:04 +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
goldsimon
3bb13829fe
checked in patch #5796 : pbuf_alloc: len field claculation caused memory corruption.
2007-03-11 20:07:37 +00:00
goldsimon
91afefa61a
Reverted pbuf_alloc() to REV 1.82
2007-03-07 15:47:54 +00:00
goldsimon
7b54ddd828
Corrected patch to bug #19168
2007-03-04 17:21:43 +00:00
goldsimon
9da7afb345
Fixed buf #19168 based on patch by Dmitry Potapov
2007-03-04 12:45:58 +00:00
kieranm
5ace5976a1
* pbuf.c: Fix BUG#17645 - ensure pbuf payload pointer is not moved
...
outside the region of the pbuf by pbuf_header()
2007-02-28 13:45:35 +00:00
jifl
f4f2bfe379
Ensure the size of each pbuf in the pool meets alignment constraints
2007-02-27 16:50:05 +00:00
christiaans
d9b4ab1658
Pbuf flag test size and speed optimalisation (helping a dumb compiler).
2006-03-28 15:06:33 +00:00
likewise
db76ca248b
2006-02-27 Merged patch by Curt McDowell
...
pbuf.c: Fix alignment; pbuf_init() would not work unless pbuf_pool_memory[] is properly aligned.
2006-02-27 14:11:19 +00:00
christiaans
e1b215aa73
Introduced cc.h formatters and removed SO_REUSE from transport layers.
2005-11-25 12:03:38 +00:00
likewise
6880fa62f8
Added some missing string.h includes.
2005-01-24 21:05:47 +00:00
likewise
86c774443c
Fixed missing semicolon in LWIP_DEBUG statement.
2005-01-04 12:20:25 +00:00
likewise
a549ec0382
Added inline source documentation.
2004-12-27 14:42:02 +00:00
likewise
ae4955f59e
Replaced erronous LWIP_ERRORF with LWIP_DEBUGF
2004-11-25 11:23:37 +00:00
kieranm
64aa4c716d
Kieran Mansley - kjm25@cam.ac.uk - 24th Nov 2004
...
* Increased argument checking at start of pbuf_queue() and made resulting errors more verbose
2004-11-24 17:03:03 +00:00
softins
4680307a34
Stop compiler complaining of empty if statement when LWIP_DEBUGF() empty.
...
Close an unclosed comment.
2004-07-27 16:08:05 +00:00
likewise
7c427a4dce
Made some comments more explicit.
2004-07-25 23:41:01 +00:00
softins
a4f5673ff3
Small corrections to some debugging statements, to pacify compiler.
2004-07-22 08:06:00 +00:00
kieranm
27c6d299cf
Kieran Mansley - kjm25@cam.ac.uk - 30th May 2004
...
* Fixed bug #9160 after discussion on mailing list
- alters use of MEM_ALIGN_SIZE in pbuf_alloc when calling mem_malloc for a PBUF_RAM pbuf
2004-05-30 14:04:30 +00:00
likewise
b217b020a5
Changed PAD_ETH_SIZE into ETH_PAD_SIZE for consistency with de-facto lwIP naming convention.
2004-05-05 15:09:13 +00:00
likewise
e84cc8c0ad
Remember head of queue in pbuf_queue() iff PBUF_DEBUG to generate senseful debug report.
2004-05-05 14:28:41 +00:00
likewise
5e13b9528d
Adpated comments to match Doxygen/JavaDoc style.
2004-05-05 14:12:28 +00:00
likewise
94d3b04d68
Applied cleaner new patch for bug #8708 .
...
Implemented multiple packets on the outgoing queue in etharp.c.
Removed etharp.c specific queueing functions.
Fixed generic pbuf.c queueing functions.
2004-04-30 00:25:03 +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
035fcce9de
Applied mem.diff by Ian Wienand on lwip-devel on February 4th 2004.
...
Stops some warnings.
2004-02-06 23:44:59 +00:00
uid67528
eed8ea5bc1
Merged from DEVEL. etharp prepared for queueing feature. DHCP fix.
2003-12-28 02:38:51 +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
marcbou
ec1c2a714e
merged from DEVEL.
2003-06-19 11:35:26 +00:00
likewise
93dfcdce93
Fixes wrongly cast LWIP_DEBUGF arguments (patch #1596 and more).
2003-06-11 22:34:51 +00:00
kieranm
8014551908
Changed DEBUGF to LWIP_DEBUGF
2003-06-10 10:45:29 +00:00
likewise
b306cab8be
Additional documentation on the subtle difference of a 'pbuf chain' and a 'packet queue'.
2003-06-06 08:34:37 +00:00
likewise
031a4cbdd8
Increased number of debug messages to see pbuf chain actions.
2003-06-05 14:15:46 +00:00
likewise
326b8ff728
Fixed a memory leak when only a part of a PBUF_POOL chain could be allocated.
2003-06-04 19:09:11 +00:00
likewise
9ed2b7e03c
pbuf_alloc() forgot to set tot_len field for PBUF_POOL pbufs.
2003-06-04 09:06:22 +00:00
likewise
cda867d52b
Applied patches posted by Marc Boucher on lwip-users May 18th 2003.
2003-05-18 22:29:10 +00:00
jani
398bf575d9
C++ comments cleanup
2003-05-06 12:15:08 +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
a0eb47d561
Implemented packet (de)queueing. Unused, etharp.c must be adapted next.
2003-05-01 07:48:01 +00:00
anderscarlman
0ef3b9b3c5
Re-added code for checking tail-parameter for NULL in
...
pbuf_chain() to provide for better backward compatibility.
2003-04-26 20:32:23 +00:00
likewise
9bc16878ea
Fixed tabs into spaces. Fixed other stylos.
2003-04-16 07:39:48 +00:00
likewise
b68c91c973
Debug message shows requested pbuf type (of ROM/REF) upon memory allocation failure.
2003-04-15 12:38:48 +00:00
likewise
f9538c9395
Disabled pbuf_dechain() as it not currently in use. Fixed comment position.
2003-04-14 11:37:12 +00:00
davidhaas
3defc437c6
Got rid of pbuf_pool_alloc_cache and pbuf_pool_free_cache. Also got rid of
...
pbuf_refresh(). This has sped up pbuf pool operations.
2003-04-11 14:39:15 +00:00
likewise
4c5117101d
Fixed debug message for PBUF_REF/ROM allocation failure.
2003-04-11 12:56:13 +00:00
likewise
2e233cb35b
Fixed stylo.
2003-04-04 08:14:04 +00:00
likewise
9ea10ce05d
In pbuf_take(): Got rid of variable 'f'. Fixed stylo (typo in style). Renamed 'top' to 'head'.
2003-04-03 08:50:57 +00:00
davidhaas
21d17e41fd
Fixed last change to pbuf_take. There were two calls to pbuf_free in a row.
2003-04-01 15:54:25 +00:00
likewise
a28af1be11
Fixed another assert. Removed another redundant assignment.
2003-04-01 12:28:45 +00:00
likewise
b04ac8f3be
Lots of comments added. Removed redundant assignment. Moved assertion.
2003-04-01 12:17:55 +00:00
likewise
5f35f4bb3b
Reverted back to David Haas' patch of pbuf_chain() from 1.34.
2003-04-01 09:35:20 +00:00
likewise
4c3512c0a2
Replaced pbuf.c 1.34 pbuf_take() change by simpler alternative.
2003-03-31 23:28:54 +00:00
davidhaas
82a32be1d6
Fixed issue in pbuf_take(): old pbuf of type PBUF_REF was being referenced
...
after being freed. Also, it was not being freed if it had been the first
buffer in chain. It still needs to be freed then.
2003-03-31 21:32:30 +00:00
davidhaas
9f3511231a
Fix pbuf_chain() to update tot_len of last buffer in first chain properly.
...
Previous code skipped it.
Made comments in pbuf_header() more general (header can be increased or
decreased).
2003-03-31 20:45:08 +00:00
likewise
6da25968e0
pbuf_header() now only moves payload pointer upwards for PBUF_ROM/REF.
2003-03-31 18:48:52 +00:00
likewise
a70f478ef1
Fixed pbuf_dechain() assertion. Removed old documentation from pbuf.h.
2003-03-31 11:39:48 +00:00
likewise
6c147709b6
Documentation changes. Added missing trailing newlines to debug messages.
2003-03-31 10:32:35 +00:00
likewise
e6cc785fff
Fixed missing variable.
2003-03-31 08:34:02 +00:00
likewise
c50f80da92
Corrected more pbuf.c functions to comply with pbuf->ref and ->tot_len invariant.
2003-03-30 22:24:10 +00:00
davidhaas
c4ff244c4e
Fixed minor compile issues.
2003-03-28 19:45:37 +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
7dea6dc834
pbuf_realloc() did not update ->tot_len in a chain. Fixed dealloc of REF/ROMs.
2003-03-26 13:50:03 +00:00
likewise
fd0d94af44
Fixing bug #1903 with a new pbuf_realloc() that respects mixed-type chains.
2003-03-26 13:30:38 +00:00
likewise
fa34d51b7e
Added documentation and comments.
2003-03-25 12:59:42 +00:00
likewise
80b961df60
Lots of clearing up comments and use of new debugging features.
2003-03-24 15:15:18 +00:00
likewise
e062b70da8
Retry with PBUF_RAM if PBUF_POOL allocation failed.
2003-03-24 13:27:12 +00:00
likewise
07058652c1
Added tracing debug messages.
2003-03-24 12:58:01 +00:00
likewise
20667e5163
Added debug levels for some serious errors (out of memory).
2003-03-24 10:29:03 +00:00
davidhaas
96f2e162ef
Fixed memory leak caused by my last pbuf_ref change.
2003-03-21 23:01:20 +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
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
davidhaas
de29a0818e
By request: moved lightweight protection to macros.
2003-02-12 22:00:18 +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
davidhaas
98fbb855fb
Added lightweight protection. In coldfire this is implemented by disabling
...
interrupts. In unixsim this is implemented by using a mutex. Uses #define
SYS_LIGHTWEIGHT_PROT to enable. It is enabled in coldfire by default, but
disabled in unixsim.
Fixes bug 2005 if you enable SYS_LIGHTWEIGHT_PROT. So the bug is closed.
2003-02-04 22:52:22 +00:00
likewise
faa9191191
Added commented about the signedness of pbuf_header() argument.
2003-01-30 12:38:03 +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
156d2c866f
sizeof(u8_t) is 1 at temperatures > 0 K
2002-12-19 09:04:58 +00:00
jani
ef68392388
renamed (hopefully everywhere) stats to lwip_stats.closes bug #1901
2002-12-18 12:49: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
kieranm
96610c9c20
Fixed compiler warning - DEBUGF statement with too many arguments
2002-12-05 09:38:25 +00:00
jani
8210edfeea
fix pbuf_alloc for layer PBUF_LINK
2002-11-22 08:32:31 +00:00
likewise
1b798ed6d3
Added PBUF_REF (payload external, copied on queueing).
2002-11-18 09:51:48 +00:00
jani
f2fbcdf00a
typo fixes.The unterminated comment already got two bugreports so it was time.
2002-11-18 07:36:29 +00:00
likewise
ad55cb6733
Added pbuf_ref_chain() which increases ref count of all pbufs in a chain.
2002-11-11 11:22:49 +00:00
likewise
f06e955072
Initial revision
2002-10-19 12:59:30 +00:00