How I can grant permission for Pcap library in Windows 10 from C#?

雨燕双飞 提交于 2019-12-08 14:07:07

问题


I use SharpPcap library for realise GOOSE protocol listener (EtherType = 0x88B8). It works well, but only if I run Wireshark in parallel, otherwise my program does not catch GOOSE packets.

SharpPcap examples also don't capture GOOSE packets while Wireshark is not running. But SharpPcap library captures my broadcast UDP packets.


回答1:


I had to open my SharpPCap device in promiscuous mode:

winPcap.Open(SharpPcap.WinPcap.OpenFlags.Promiscuous | 
    SharpPcap.WinPcap.OpenFlags.NoCaptureLocal, readTimeoutMilliseconds);

My ethernet card did not accept other MAC addresses



来源:https://stackoverflow.com/questions/50849828/how-i-can-grant-permission-for-pcap-library-in-windows-10-from-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!