gpt4 book ai didi

无法打开设备 eth0 : eth0: socket: Invalid argument

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:17:05 26 4
gpt4 key购买 nike

我正在尝试使用一个简单的 DHCP client来自 GitHub。当我尝试运行此客户端时,它失败了

eth0 MAC : C8:6B:00:E5:52:5E
Couldn't open device eth0: eth0: socket: Invalid argument

有什么建议吗?谢谢!

最佳答案

显然 pcap_open_live() 返回 NULL

pcap_open_live() returns a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf may also be set to warning text when pcap_open_live() succeds; to detect this case the caller should store a zero-length string in errbuf before calling pcap_open_live() and display the warning to the user if errbufis no longer a zero-length string. errbufis assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

您可能想要调查您的卡。

以root身份检查:

su -c "lspci | grep -i ether"

检查这个设备实际上是 eth0

/usr/sbin/ethtool -i eth0

dmesg | grep eth0

关于无法打开设备 eth0 : eth0: socket: Invalid argument,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49579581/

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