New options in /etc/config/wireless


I'm trying to include a new option to /etc/config/wireless so it is finally present in /var/run/hostapd-phy0.conf. I have been travelling through the code and this is what I have seen:

  • Netifd is is charge of listening network events and manage network interfaces upon these events.
  • When netifd starts, it registers some scripts as handlers. The handler that is called when an event related to a wifi network interface rises is /lib/netifd/
  • /lib/netifd/ uses functions from /lib/netifd/ and /lib/netifd/ to generate the hostapd config file.
  • When netifd calls to /lib/netifd/, it passes a json config as an argument. I think that hostapd config is derived from this json config, however I can't see the new options I add to /etc/config/wireless in this json config.

Please, could anyone explain how all these scripts interact among them and with netfid? Who is in charge of parsing the /etc/config/wireless file? How the json config that is passed to /lib/netifd/ as an argument is derived?

Thanks in advance for your help.


I have to understand the same interworking