gln
gln

Reputation: 1031

GNU/Linux: getting value of option 15 of DHCP without using `getnameinfo`

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

Upvotes: 0

Views: 1548

Answers (2)

gln
gln

Reputation: 1031

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

Upvotes: 0

sarnold
sarnold

Reputation: 104050

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.

Upvotes: 1

Related Questions