On Fri, Dec 07, 2018 at 02:58:46PM +0100, Sven Eckelmann wrote:
The generic netlink code is expected to trigger notification messages when configuration might have been changed. But the configuration of batman-adv is most of the time still done using sysfs. So the sysfs interface should also trigger the corresponding netlink messages via the "config" multicast group.
Signed-off-by: Sven Eckelmann sven@narfation.org
I'm wondering, before it was quite easy to add new sysfs attributes with just a few lines thanks to macros. Now we need to add code in four more places in netlink.c whenever we introduce a new configuration option.
Would it be possible (and maybe even reduce code size?) if the sysfs and netlink parts were wrapped into some (macro) functions and/or structs, to still be able to add options from a central place and with only a few lines?
Or would that become too ugly? Or not worth the effort for the few options we have right now?