Intents and internal api between netifd/hostapd

Hi,

I am looking for (design) documentation for the interaction between components like netifd and hostapd (and possibly others that come into play when interfaces are brought up and down and vlans are created). I stared long and hard at the code, but this does only provide answers to "what is done" and not "why", and that is assuming I understand it in the first place (as there seem to be hardly any in-line comments).

Let me give one example of a question I like the answer to (not here, but from said documentation): if hostapd brings up a network (wireless vlan) interface on its own (dynamic_vlan), how would netifd get to know about it and about the connection of the new interface and specific wlan devices/radios? At the moment, it does not seem to, or at least it does not report it back when queried. Should netifd get notified and report about those interfaces? Should it get to know about the new interface through kernel notifications or directly through hostapd? If: how?
(again: I am not necessarily looking for that answer here in this thread: this is an example of the kind of questions I hope to find documentation for).

thanks.

I attempted discusing this a few times in the forum; but you stated it more eloquently.