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!
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!
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();
Source: https://ru.stackoverflow.com/questions/8152/
All Articles