3

I am making an app that modifies some DNS settings, and to do it I am using the SystemConfiguration framework's SCDynamicStore. This can be used to modify the values of specific keys in the store, but I want to see some documentation for the usage of keys by the system. Is there anywhere I can find this information?

Specifically, I want to modify the DNS servers of specific network interfaces. It seems as though each interface has a key that looks something like the following (my Wi-Fi interface):

State:/Network/Service/5D1F97DD-8AC2-45EE-7552-A69C5C41254F/DNS

But there is also a global key State:/Network/Global/DNS. I want to know the specifics of how the global key is used and when it overrides the NIC-specific key, as I noticed that when changing DNS servers through Mac Network settings, the global key gets updated and not the Wi-Fi-specific key. I know the first one is for Wi-Fi because the key disappears/reappears from scutil output when I disable/enable Wi-Fi.

It would be great to have some sort of reference for the keys in the Dynamic Store and what they are used for. What's the point of having an API to manage them if we don't know the specification of what each entry is used for?

Giacomo1968
  • 58,727

0 Answers0