Simon Goldschmidt
fc5b6f7b0e
lwiperf: fix double-free of pcb on error
...
See bug #59841 (PCB double-free happened at lwiperf TCP error)
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-01-28 20:00:11 +01:00
Erik Ekman
264a5a3e97
Rename IP and Ethernet equality checkers from _cmp to _eq
...
Functions ending in cmp are expected to return 0 on equality but these
return non-zero.
eth_addr_cmp -> eth_addr_eq
ip_addr_cmp -> ip_addr_eq
ip4_addr_cmp -> ip4_addr_eq
ip6_addr_cmp -> ip6_addr_eq
ip_addr_netcmp -> ip_addr_net_eq
ip4_addr_netcmp -> ip4_addr_net_eq
ip6_addr_netcmp -> ip6_addr_net_eq
ip_addr_cmp_zoneless -> ip_addr_zoneless_eq
ip6_addr_cmp_zoneless -> ip6_addr_zoneless_eq
ip6_addr_cmp_zone -> ip6_addr_zone_eq
ip6_addr_netcmp_zoneless -> ip6_addr_net_zoneless_eq
ip6_addr_nethostcmp -> ip6_addr_nethost_eq
ip6_addr_cmp_packed -> ip6_addr_packed_eq
ip6_addr_cmp_solicitednode -> ip6_addr_solicitednode_eq
All call sites have been changed, and fallback macros have been added to not
break external users.
2020-07-07 18:51:45 +02:00
jona
d6a6b661d9
Fix typos using codespell
...
Conservative strategy was used, maybe other typos remain.
Rebased: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-15 21:45:41 +01:00
Joan Lledó
785b7aba3c
Sockets: Unit tests and apps corrections
...
* Include lwip/inet.h in some unit tests and apps
* Since they use htons() and pals.
* test/unit/api/test_sockets.c:
* write() could be declared by external socket headers
* Call lwip_write() instead.
* Code expects fcntl() to return 6
* But O_RDWR could have another value if external
socket headers are present
* Replace 6 by O_RDWR.
* apps/tftp/tftp.c:
* recv() could be declared by external socket headers
* Rename it to tftp_recv()
2019-08-11 20:12:47 +02:00
Simon Goldschmidt
58f928a181
lwiperf: remove the comments that this is IPv4 only
...
IPv6 works (tested against iperf version 2.0.9 on linux)
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-22 06:39:04 +02:00
Simon Goldschmidt
b9b74b2d92
lwiperf: make tradeoff client mode work
2018-06-21 22:06:36 +02:00
Simon Goldschmidt
9992b48e90
fix compiling with LWIP_NOASSERT defined
...
See bug #54157
2018-06-20 20:56:20 +02:00
Simon Goldschmidt
871f27628b
lwiperf: fix unused function warning/error
2018-06-18 07:24:42 +02:00
Simon Goldschmidt
58b5a5fc5a
lwiperf: implemented "dual" client mode
2018-06-17 21:04:57 +02:00
Simon Goldschmidt
a057caee45
lwiperf: start implementing iperf client
...
Only the transmission side works for now (todo: dual and tradeoff mode).
Also, only a 10 second timeout mode is implemented for now.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-15 22:26:32 +02:00
goldsimon
9dbfa9ca0a
lwiperf: enable TCP over IPv6 connections
...
tested against iperf 2.0.10
redefine LWIPERF_SERVER_IP_TYPE if you don't want both IP versions
2018-01-19 21:08:51 +01:00
goldsimon
a696b2b515
lwiperf: fix testing against iperf 2.0.10 (bug #52901 )
2018-01-17 20:54:16 +01:00
goldsimon
2fd83c9d2e
lwiperf: fix double-free of pbufs on recv error
2018-01-16 06:54:28 +01:00
Dirk Ziegelmeier
653313cb37
Work on task #14780 : Add debug helper asserts to ensure threading/locking requirements are met
...
Add LWIP_ASSERT_CORE_LOCKED() to several more places
2018-01-12 13:15:36 +01:00
Dirk Ziegelmeier
856b0c3260
Fix bug #52189 : list add and remove bug in <lwiperf.c>
...
Apply patch from xuyao hong
2017-10-09 12:30:12 +02:00
Dirk Ziegelmeier
014420bfa0
Reformat lwiperf.c using astylerc
2017-09-17 18:00:23 +02:00
goldsimon
991f751305
Even more pbuf_header -> pbuf_add/remove_header replacements (also in strings)
2017-08-08 20:51:57 +02:00
goldsimon
a1c7924cb6
task #14597 : cleanup pbuf_header usages (use pbuf_add_header/pbuf_remove_header instead)
2017-08-04 22:38:11 +02:00
goldsimon
1741edf159
make tcp apps depend on LWIP_CALLBACK_API, too
2017-02-28 12:19:16 +01:00
Dirk Ziegelmeier
f2a5aa2866
Fix bug #49827 : wrong cast to size_t on 16-bit x86 architecture
...
I hope I caught all of them.
TODO: Same for casts to get rid of alignment warnings, these are also casts via size_t
2016-12-12 10:07:00 +01:00
Axel Lin
795acf020e
lwiperf: Simplify #if LWIPERF_CHECK_RX_DATA guard
...
The variable i is equal to q->len after exit the for loop.
Check the received data should not change the logic of update packet_idx.
So let's simplify the code a bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-12-06 11:36:25 +01:00
Dirk Ziegelmeier
1687721600
Fix compile when IPv4 is disabled
2016-12-05 22:01:58 +01:00
Dirk Ziegelmeier
13fb616bb2
Cleanup hton*/ntoh* function handling and platform abstraction
...
Let lwip use functions/macros prefixed by lwip_ internally to avoid naming clashes with external #includes.
Remove over-complicated #define handling in def.h
Make functions easier to override in cc.h. The following is sufficient now (no more LWIP_PLATFORM_BYTESWAP):
#define lwip_htons(x) <your_htons>
#define lwip_htonl(x) <your_htonl>
2016-10-06 12:55:57 +02:00
Dirk Ziegelmeier
633696c153
Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6
...
- rename IP4_ADDR_ANY to IP4_ADDR_ANY4
- IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
2016-09-28 12:56:57 +02:00
Dirk Ziegelmeier
9078f31544
Minor: memcpy -> MEMCPY / SMEMCPY
2016-08-30 21:56:09 +02:00
Dirk Ziegelmeier
85ab39985a
Fix a few incorrect uses of err_t. Found by converting lwip error codes to an enum, but I'm not sure wether I want to commit the actual enum conversion.
2016-08-08 22:15:01 +02:00
goldsimon
5bcaefddd4
lwiperf: improved documentation, removed unused enum members
2016-07-28 08:07:02 +02:00
Dirk Ziegelmeier
6b524367a3
Documentation review with Simon, minor changes
2016-07-27 08:05:38 +02:00
goldsimon
14ca418ac0
minor: coding style fixes
2016-07-05 07:36:51 +02:00
Dirk Ziegelmeier
8dc77ef558
doxygen updates - include IPv6 in documentation. Exclude include/netif/ppp/polarssl.
...
Convert TODO -> @todo
2016-06-22 20:18:23 +02:00
goldsimon
0b4bc5ea31
minor whitespace change only
2016-03-24 07:15:27 +01:00
Dirk Ziegelmeier
eead3a7038
Simon says: dual-stack does not work on iperf because there IPs encoded in the payloads and IPv6 is not supported there in the current lwIP implementation -> revert
2016-03-03 13:06:55 +01:00
Dirk Ziegelmeier
ce370ec48f
Compile fix lwiperf.c after my last change
2016-03-03 12:23:34 +01:00
Dirk Ziegelmeier
24ebf6bd6f
Implement dual-stack in lwiperf, netbiosns and sntp
2016-03-03 12:15:57 +01:00
Dirk Ziegelmeier
bbb5e99f25
Fix netconn access after it was freed in lwiperf - found by Coverity
2016-02-19 23:26:06 +01:00
Dirk Ziegelmeier
b8e94ec066
lwiperf: TX buffer can be static
2015-11-18 07:52:04 +01:00
Dirk Ziegelmeier
e15872982e
Add iperf to apps;
...
Fix compile of lwiperf.c
2015-11-18 07:46:39 +01:00
sg
bef5ccda0b
removed spaces at line ending, fixed include guard
2015-10-08 21:46:43 +02:00
sg
a2cd2ae5a8
lwiperf: fixed const-cast warning
2015-10-08 21:22:35 +02:00
sg
698e20a990
Added lwiperf, a simple ipv4/tcp iperf peer
2015-10-08 21:14:14 +02:00