Question

My GNU/Linux machine is connected to a DHCP. I want to retrieve the value of the option 015 of DHCP (DNS Domain Name), but without using getnameinfo, since it is using DNS in order to retrieve domain name.

How can I do that with C/C++?

Was it helpful?

Solution

My dhclient writes a pile of lease information into /var/lib/dhcp3/dhclient-[uuid]-[iface].lease files. I haven't got a clue what the uuid in those filenames represents, but it does report the different options from the dhcp server.

OTHER TIPS

Fore SUSE: DHCP options are written in /var/lib/dhcpcd/dhcpcd-eth[x].info

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top