gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 11:39:30 26 4
gpt4 key购买 nike

我的 GNU/Linux 机器连接到 DHCP。我想检索 DHCP(DNS 域名)的选项 015 的值,但不使用 getnameinfo,因为它使用 DNS 来检索域名。

我如何使用 C/C++ 做到这一点?

最佳答案

我的dhclient 将一堆租赁信息写入/var/lib/dh​​cp3/dhclient-[uuid]-[iface].lease 文件。我不知道这些文件名中的 uuid 代表什么,但它确实报告了来自 dhcp 服务器的不同选项。

关于c++ - GNU/Linux : getting value of option 15 of DHCP without using `getnameinfo` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4841983/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com