Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我ioctl()用来设置网关地址(SIOCADDRT在RTF_GATEWAY标志中)。
ioctl()
SIOCADDRT
RTF_GATEWAY
检索它的标准 ioctl 例程是什么?
我的理解是,没有“标准 ioctl 例程”来以跨平台友好的方式获取网关地址。在 Linux 上,您可能会考虑使用 Netlink 套接字,如本文所述。