How I can grant permission for Pcap library in Win

2019-06-14 16:06发布

问题:

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