Does any one know how netmanager works?
What goes on under the hood?
Ok silly question perhaps, but here is why.
I have a device that has three network interfaces, 2 ethernet and one wireless.
The GUI is browser based so I can’t use phlip for the settings.
So I have a GUI that calls some scripts to get the information, it’s quite inneficient and slow but it works.
I use net manager to gather the data and then parse the file to extract the fields required.
To speed this up a bit I am in the process of implementing this in C.
This raised a few questions!
It was fairly easy to get the ip address and interface specific stuff via the sockets lib
Thanks to Mezec’s article openqnx.com/PNphpBB2-viewtopic-t5002-.html
Hostname is easy, gethostname()
But how can I get/set the other info, specifically:
domain name
name server
gateway (default route)
Interface setting mode (manual / DHCP)
I can parse net.cfg to get the info but it struck me that there must be a series of devctls to get this info,
how does natmanager do it?
Thanks
Brendan