1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

56 Commits

Author SHA1 Message Date
Erik Ekman
d2b134a0be pkg/lwip: Force loglevel when using log module
lwIP has already used its own log level when deciding what to print.
If we reach the LWIP_PLATFORM_DIAG message no further filtering should
happen, so set the log level to match the macro used.

This fixes the missing IP addresses from ifconfig. Before:

> ifconfig
Iface ET0 HWaddr: 24:0a:c4:e6:0e:9f Link: up State: up
        Link type: wired
        inet addr:  mask:  gw:
        inet6 addr:  scope: link state: valid preferred
        inet6 addr:  scope: global state: valid preferred
Iface ET1 HWaddr: 24:0a:c4:e6:0e:9c Link: up State: up
        Link type: wireless
        inet addr:  mask:  gw:
        inet6 addr:  scope: link state: valid preferred
        inet6 addr:  scope: global state: valid preferred
>

With this change:

> ifconfig
Iface ET0 HWaddr: 24:0a:c4:e6:0e:9f Link: up State: up
        Link type: wired
        inet addr: 10.4.4.81 mask: 255.255.254.0 gw: 10.4.4.1
        inet6 addr: fe80:0:0:0:260a:c4ff:fee6:e9f scope: link state: valid preferred
        inet6 addr: 2001:db8:0:0:260a:c4ff:fee6:e9f scope: global state: valid preferred
Iface ET1 HWaddr: 24:0a:c4:e6:0e:9c Link: up State: up
        Link type: wireless
        inet addr: 10.4.4.86 mask: 255.255.254.0 gw: 10.4.4.1
        inet6 addr: fe80:0:0:0:260a:c4ff:fee6:e9c scope: link state: valid preferred
        inet6 addr: 2001:db8:0:0:260a:c4ff:fee6:e9c scope: global state: valid preferred
>
2022-11-23 23:04:14 +01:00
Marian Buschsieweke
3b2df89b4c
treewide: fix conditionals on deprecated module
As a leftovers from https://github.com/RIOT-OS/RIOT/pull/18355 are still
present that check for `MODULE_SHELL_COMMANDS` rather than
`MODULE_SHELL_CMDS`. This updates the conditionals as needed.
2022-09-21 09:42:37 +02:00
Karl Fessel
05f114d0af doc: fix unbalaced grouping
- most were trivial
    - missing group close or open
    - extra space
    - no doxygen comment
- name commad might open an implicit group
    this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
2022-09-14 15:05:25 +02:00
Jose Alamos
4daaaccb0f
pkg/lwip_netdev: add support for IPC based Bottom Half Processor 2022-08-25 15:44:34 +02:00
Jose Alamos
705fd8d691
pkg/lwip: add device acquire/release 2022-08-19 19:42:45 +02:00
Martine Lenders
aa5a18f833
Merge pull request #16974 from yarrick/lwip_netif
pkg/lwip: Add netif_t struct, register all netifs
2022-04-26 23:49:49 +02:00
Benjamin Valentin
b822e8a5a9 pkg/lwip: implement sock_udp_sendv_aux() 2022-02-22 10:05:41 +01:00
Erik Ekman
efeaac51ca pkg/lwip: Add lwip_netif_t struct
Extending netif_t struct from sys/net/netif to support the
stack-independent API.
2021-11-16 22:04:44 +01:00
Erik Ekman
3aee2dde9d pkg/lwip: Only enable ARP if Ethernet is supported 2021-11-09 23:09:35 +01:00
Erik Ekman
adccbc9f2a pkg/lwip: Fix compilation without IPv6
RIOT/pkg/lwip/init_devs/init.c:65:61: error: 'tcpip_6lowpan_input' undeclared (first use in this function)
     return netif_add_noaddr(netif, state, lwip_netdev_init, tcpip_6lowpan_input);
                                                             ^
2021-08-20 17:52:37 +02:00
Erik Ekman
9459dfaf68 pkg/lwip: Use XFA to initialize network interfaces 2021-08-20 14:58:29 +02:00
Erik Ekman
fff95fc882 pkg/lwip: Add 6lowpan helper, do auto init for mrf24j40 2021-08-20 14:57:37 +02:00
Erik Ekman
9a089d412b pkg/lwip: Set first netif as default
Set at create time, as all netifs will no longer be in one array.
2021-08-20 14:56:48 +02:00
Erik Ekman
2816ade5f8 pkg/lwip: Start rework of netif initialisation
Use separate files with auto_init
Proof of concept with only moving netdev_tap
2021-08-20 14:56:46 +02:00
Benjamin Valentin
5117da1cb0 lwip_tcp: fix build with DEVELHELP=0
If DEVELHELP is not set `LOCK_TCPIP_CORE()`/`UNLOCK_TCPIP_CORE()`
are not defined, leading to a build failure.

Defining them to no-op leads to a run-time segmentation fault, so
better always use those functions.
2021-08-15 12:50:33 +02:00
Erik Ekman
c50604b63c pkg/lwip: Add assert on incorrect thread usage 2021-07-15 15:46:10 +02:00
Erik Ekman
60d5d1aa74 pkg/lwip: Set link state properly when supported
Set link state correctly in lwIP for interfaces that support
the NETOPT_LINK option. Interfaces that do not support it
(like tap for native arch) remain up all the time.

Netdevs that support NETOPT_LINK but do not send NETDEV_EVENT_LINK_UP/DOWN
events will end up with a mismatched link state - but DHCP would
already not start for them either.

Use netifapi to signal lwIP to do the work in its own thread.
2021-03-01 23:55:08 +01:00
Erik Ekman
eab317749f sys/shell: Add lwIP ifconfig shell command
Lists state, link type, v4/v6 addresses.
Currently read-only.

Using lwIP debug system to print addresses, to limit dependencies
and work with dual stack setup. Most other code seems to only
allow either v4 or v6 networking. For that to compile I
had to change the `SZT_F` format string due to this error:
```
error: format '%lu' expects argument of type 'long unsigned int',
but argument 2 has type 'size_t {aka unsigned int}'
```
Switching to the lwIP default format string here.

Outputs the following on my ESP32 board with Ethernet,
when both v4 and v6 are enabled in examples/paho-mqtt:
```
> ifconfig
Iface ET0 HWaddr: 24:0a:c4:e6:0e:9f Link: up State: up
        Link type: wired
        inet addr: 10.4.4.81 mask: 255.255.254.0 gw: 10.4.4.1
        inet6 addr: fe80:0:0:0:260a:c4ff:fee6:e9f scope: link
        inet6 addr: 2001:db8:1000:0:260a:c4ff:fee6:e9f scope: global
Iface ET1 HWaddr: 24:0a:c4:e6:0e:9c Link: up State: up
        Link type: wireless
        inet addr: 10.4.4.82 mask: 255.255.254.0 gw: 10.4.4.1
        inet6 addr: fe80:0:0:0:260a:c4ff:fee6:e9c scope: link
        inet6 addr: 2001:db8:1000:0:260a:c4ff:fee6:e9c scope: global
>
```
2021-02-23 11:47:45 +01:00
Marian Buschsieweke
77b39c5550
pkg/lwip: Implement sock_aux_local
Provide address the IP packet / UDP datagram was received on in the auxiliary
data, if module sock_aux_local is used.
2020-12-04 12:51:48 +01:00
0b801c4de0 all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
Bas Stottelaar
7088db3636 pkg/*: remove unused assert.h include 2020-10-22 11:29:27 +02:00
Marian Buschsieweke
5be2d082b9
pkg/lwip: Compatibility with IS_USED()
The `IS_USED()` macro doesn't work if macros are defined to `(1)` instead of `1`
2020-07-31 10:51:12 +02:00
Martine S. Lenders
29651da8f4
lwip_sock: update implementation for async callback argument 2020-03-11 16:54:12 +01:00
Martine S. Lenders
6e6e435c65
sock_async: add optional callback argument 2020-03-11 16:54:11 +01:00
Martine Lenders
a7ef50636e
lwip: activate TCP_LISTEN_BACKLOG per default with sock_tcp
Prevents unnecessary usage of resources, as the queue of `sock_tcp` is
restricted.
2020-03-06 11:29:46 +01:00
Martine S. Lenders
e98e2f6143
lwip: fix style errors found by Vera++ 2020-03-06 11:29:45 +01:00
Martine S. Lenders
fc67e6143a
lwip: provide sock_async support 2020-03-06 11:28:16 +01:00
Martine S. Lenders
20805548b3 lwip: introduce sock base-type 2020-02-21 19:07:47 +01:00
Martine Lenders
87d00ab294
Merge pull request #12932 from miri64/lwip_sock/fix/sock-cleanup
lwip_sock: clean-up connection handling without a sock.
2020-01-09 15:00:55 +01:00
Gunar Schorcht
aa3f1329bf pkg/lwip: remove TCPIP_THREAD_PRIO for ESP32
This definition is platform dependent and should be therefore done with CFLAGS in ESP332's Makefile.
2019-12-15 23:50:45 +01:00
Gunar Schorcht
117d6d1f2f pkg/lwip: make TCPIP_THREAD_STACKSIZE overridable 2019-12-14 10:39:14 +01:00
Martine S. Lenders
e96bc2a13d lwip_sock: additional indirection of conn is unnecessary
Either the sock is provided with `sock_*_send()` or not. In the first
case the indirection is not necessary, and in the second we need to
delete the created `conn` within `lwip_sock_send()` anyway, so returning
it makes no sense.
2019-12-12 11:19:51 +01:00
04183aa8fd pkg/lwip: fix typos 2019-11-23 22:39:38 +01:00
Martine S. Lenders
0a2945164c lwip: improve and fix documentation 2019-10-09 14:45:30 +02:00
Martine S. Lenders
cb18f8c99b lwip: remove deprecated defines
`SYS_SEM_NULL` and `SYS_MBOX_SIZE` aren't used by lwIP anymore and
`LWIP_CHKSUM_ALGORITHM` has a predefined value now
2019-10-09 14:23:02 +02:00
Gunar Schorcht
f5af8ac2a4 pkg/lwip: override TPCIP_THREAD_PRIO for ESP32
To avoid priority conflicts with the WiFi hardware driver thread which has priority of 1, the default thread priority of lwIP's TCP/IP thread is decreased to 2.
2019-08-06 23:10:11 +02:00
bd816f3fb1
pkg/lwip: cleanup doxygen documentation
- Deduplicate lwip group definition
- Fix reference to sock instead of conn
2019-08-05 16:57:36 +02:00
Gunar Schorcht
cd00449863 pkg/lwip: include log.h if module log is used
If module log is used, log.h should be included. Otherwise, it might lead to compilation problems since LOG_ERROR macro isn't know in expansion of LWIP_PLATFORM_ASSERT macro.
2019-03-10 12:47:31 +01:00
70407a1a3e pkg*: fix doxygen grouping 2018-06-11 19:12:02 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
f5a4124866 Merge pull request #6976 from miri64/conn/cleanup/rm
net: remove conn API
2017-05-12 16:09:00 +02:00
Martine Lenders
48aae4ef2f
lwip: port to v2.0.2 2017-05-11 11:49:38 +02:00
Martine Lenders
13770361bb
net: remove conn API
conn was deprecated in 38217347. 3 Releases later and now that no module
is using it RIOT-internally anymore, I think it is time to say goodbye.
2017-04-28 15:23:54 +02:00
Martine Lenders
29842bb5e4 netdev2: rename to netdev and remove gnrc_netdev
With some minor hand-edits I used the following chain of commands:

```sh
git rm sys/include/net/gnrc/netdev.h
git grep --name-only -i netdev2 | \
        xargs sed -i -e 's/^\(NETDEV\)2\(.*\)\( [("]\)/\1\2 \3/g' \
                     -e 's/\(netdev\)2\(.*\)\( \/\*\*<\)/\1\2 \3/I' \
                     -e 's/\(netdev\)2/\1/gI'
git add -p
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
        grep "netdev2" | xargs -I'{}' dirname '{}' | uniq | \
        grep "netdev2" | while read dir; do
                new_dir="$(echo "$dir" | sed "s/netdev2/netdev/g")"
                git mv -f "$dir" "$new_dir"
        done
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
        grep "netdev2" | while read file; do
                new_file="$(echo "$file" | sed "s/netdev2/netdev/g")"
                git mv -f "$file" "$new_file"
        done
git commit --amend
git grep --name-only "\<drivers_netdev_netdev\>" | \
        xargs sed -i "s/\<drivers_netdev_netdev\>/drivers_netdev_api/g"
git add -p
git commit --amend
```
2017-03-15 09:31:20 +01:00
Martine Lenders
b915d15de1 pkg: provide sock_tcp support for lwip 2017-02-13 20:10:42 +01:00
Peter Kietzmann
e5e79c2834 Merge pull request #5937 from miri64/pkg/feat/lwip-sock-udp
pkg: provide sock_udp support for lwip
2017-02-08 09:43:20 +01:00
Martine Lenders
a45256a2a7 pkg: provide sock_udp support for lwip 2017-02-07 15:48:47 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Martine Lenders
bf60c2fbfa pkg: provide sock_ip support for lwip 2017-01-17 09:00:44 +01:00
Martine Lenders
9b2cff9a7b lwip: port mboxes to core_mbox 2016-09-02 15:04:18 +02:00