Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Use virtual functions for implementation diversity #14

Open
arnout opened this issue May 25, 2018 · 0 comments
Open

Use virtual functions for implementation diversity #14

arnout opened this issue May 25, 2018 · 0 comments

Comments

@arnout
Copy link

arnout commented May 25, 2018

Currently, implementation diversity (e.g. how to get statistics from an interface) is governed by a combination of ifdefs and ad-hoc conditions. This makes it more difficult to support multiple implementations in a single system. For example, if a system uses Wifi chips from different vendors that use vendor-specific extensions rather than standard nl80211/cfg80211, we need a different interface implementation for each interface. However a large part of the different implementations can probably be shared.

Therefore, it is more convenient to use virtual functions, i.e. function pointers in the per-interface struct. This way, specific interface implementations only need to override the functions they care about.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant