Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Windows环境中,使用ifconfig函数获取网卡参数,启停网卡会导致段错误 #595

Open
liutt1312 opened this issue Jul 26, 2024 · 2 comments

Comments

@liutt1312
Copy link

image

@liutt1312 liutt1312 changed the title Windows环境中,使用ifonfig函数获取网卡参数,启停网卡会导致段错误 Windows环境中,使用ifconfig函数获取网卡参数,启停网卡会导致段错误 Jul 26, 2024
@ithewei
Copy link
Owner

ithewei commented Jul 26, 2024

出错时pAddr->AdapterName的值显示什么?

@liutt1312
Copy link
Author

出错时pAddr->AdapterName的值显示什么?

显示的是这个:error: Cannot access memory at address 0xbaadf00dbaadf00d
我分析原因是网卡被禁用,导致系统提供的显示网卡信息的地址被内核收回,程序就会显示内存无法访问。使用一下图片方法好像可以解决这个问题。

image

下边这段代码好像也会出现这个问题,但是不太容易复现
image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants