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

472 Views Asked by At

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

There are 1 best solutions below

0
Papayaved On BEST ANSWER

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