@haukepetersen and I today talked a little bit about the problems with netdev_t and how to dynamically add features independent from a specific device. Examples for this are
This is what we came up with:

In addition to actual device drivers there are additional netdev_driver_ts available who also have another netdev_driver_t associated to themselves (I called this construction netdev_layered_t here but I'm not stuck on the name). This allows a network stack to use those features as though they were a normal network device and the whole thing would be very transparent to the network stack (so I wouldn't count this as a major API change ;-)). The benefit of this should be clear:
- no code duplication for link-layer specific operations (like packet counting, link-layer address filtering, option setting/getting)
- simplification of the
netdev_ieee802154_set()/netdev_ieee802154_get() situation that seem to confuse people
The questions that are still open are:
- Where to store
netdev_layered_t instances?
- How initialize such a "
netdev_layered_t" stack while also having it configurable?
@haukepetersen and I today talked a little bit about the problems with
netdev_tand how to dynamically add features independent from a specific device. Examples for this arenetdev_ieee802154_tor deduplication of received packets (currently implemented in gnrc_netif_ieee802154: drop duplicate broadcast packets (optionally) #7577))This is what we came up with:
In addition to actual device drivers there are additional
netdev_driver_ts available who also have anothernetdev_driver_tassociated to themselves (I called this constructionnetdev_layered_there but I'm not stuck on the name). This allows a network stack to use those features as though they were a normal network device and the whole thing would be very transparent to the network stack (so I wouldn't count this as a major API change ;-)). The benefit of this should be clear:netdev_ieee802154_set()/netdev_ieee802154_get()situation that seem to confuse peopleThe questions that are still open are:
netdev_layered_tinstances?netdev_layered_t" stack while also having it configurable?