Tell me, please, where can I get the list and description of classes and functions that are part of the SharpPCAP assembly?

What functions should be used to intercept and parse packets sent through the port?

Thank!

  • At me at compilation the exception falls out. I can not find anything on this topic ... Can not load the DLL "wpcap": The specified module was not found. (Exception from HRESULT: 0x8007007E) - Alex_PS

1 answer 1

All SharpPCAP documentation is at SourceForge:

Examples of the use of the package are in the same place. Example 4 :

// Извлечь устройство из списка ICaptureDevice device = devices[i]; // Открыть устройство для захвата int readTimeoutMilliseconds = 1000; device.Open(DeviceMode.Promiscuous, readTimeoutMilliseconds); Packet packet = null; // Хранить пакеты, используя GetNextPacket() while((packet=device.GetNextPacket()) != null ) { // Печать времени и длины каждого полученного пакета DateTime time = packet.PcapHeader.Date; int len = packet.PcapHeader.PacketLength; Console.WriteLine( "{0}:{1}:{2},{3} Len={4}", time.Hour, time.Minute, time.Second, time.Millisecond, len ); } // Закрыть устройство PCAP device.Close();