문제

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++?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top