1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/sys/include/net/gnrc
Marian Buschsieweke 276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.

To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.

This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
..
dhcpv6/client gnrc_dhcpv6_client_simple_pd: fix old doc and names 2021-07-20 14:42:07 +02:00
gomach Merge branch 'master' into gnrc_gomach/adapt_duty_recode_para_name 2021-10-13 17:36:21 +02:00
icmpv6 sys/include: fix typos 2019-11-23 22:39:37 +01:00
ipv6 gnrc_ipv6_nib: use correct DHCPv6 client module name 2022-08-05 12:52:22 +02:00
lorawan gnrc/lorawan : Add IN_865 channel frequencies 2020-10-13 13:38:19 +05:30
lwmac sys/net/gnrc/lwmac: add missing const qualifier 2021-03-02 17:12:01 +01:00
mac all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
netif gnrc_netif_conf: fix auto-6ctx switch 2022-07-26 16:06:51 +02:00
rpl net/gnrc/rpl: add hooks for nimble_rpble 2021-08-24 11:33:13 +02:00
sixlowpan sys/gnrc/sixlowpan/frag/fb: guard sfr_types.h header include 2022-03-02 08:42:36 +01:00
tcp Merge pull request #16764 from brummer-simon/gnrc_tcp-experimental_dynamic_MSL 2021-09-13 10:36:54 +02:00
icmpv6.h gnrc_ipv6: gnrc_icmpv6: simplify access to network interfaces 2018-01-17 16:48:58 +01:00
ipv6.h net/gnrc: avoid *timer creeping though header 2022-02-28 14:53:07 +01:00
lorawan.h net/gnrc_lorawan: implement uplink redundancy 2021-07-21 03:51:47 +02:00
ndp.h gnrc_ndp: add route information option 2021-06-18 00:13:08 +02:00
netapi.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
neterr.h all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
netif.h sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
netreg.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
nettype.h sys/net/gnrc/tx_sync: new module 2021-02-03 15:16:42 +01:00
pkt.h net/gnrc/pkt: Fix ISO C++ compatibility 2022-02-10 18:26:38 +01:00
pktbuf.h sys/net/gnrc_pktbuf: deduplicate code 2021-01-26 10:50:19 +01:00
pktdump.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
pktqueue.h doc: Fix 'must not'/'may not' wording 2017-12-19 09:00:12 +01:00
priority_pktqueue.h doc: Fix 'must not'/'may not' wording 2017-12-19 09:00:12 +01:00
rpl.h sys/net/gnrc/rpl: sync access to netstats 2022-06-30 09:48:46 +02:00
sixlowpan.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
tcp.h gnrc_sock_tcp: integrate gnrc_tcp 2021-08-14 21:27:34 +02:00
tx_sync.h gnrc tx-sync: add cast for c++ compatibility 2021-05-04 16:59:56 +02:00
udp.h gnrc/udp: Configure queue size with exponent 2020-06-15 07:30:51 +02:00