I have got an logical bug from winpcap library in reading file from offline dump file. In that they are not closing the file after reading. So i am getting an exception that "failed to open the file" when file count reaches 509.

I am using pcap.net library with c#. Here is my code

OfflinePacketDevice selectedDevice = new OfflinePacketDevice(filename);
PacketCommunicator communicator = selectedDevice.Open(65536,PacketDeviceOpenAttributes.Promiscuous,1000);    
communicator.ReceivePackets(0, DispatcherHandler);
communicator.Dispose();

Now i need to execute the above statements as a child process ,so i think i can avoid that exception by calling the child processs for each pcap file. But i don't know how to execute a metho as child process in c#. Can any one give me a solution for this ?

有帮助吗?

解决方案

As for the alleged WinPcap library bug, the program reading the dump file is calling pcap_close() after it reads the last packet of the file, right? If not, the bug is in the program, not in WinPcap. Even if so, the bug might be in pcap.net, not WinPcap.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top