How to use PcapDotNet with windows 8.1 operating system

Aug 29, 2014 at 8:46 AM
hello every body here. I used visual studio ultimate 2010. i followed the documentation about "How to use PcapDotNet on your project" in c# step by step. but I meet many problems when i execute it. firtly, all my unit test don't pass like that: Result: 424/434 passed; (itsem) checked 10.
Is that correct?
secondly when i try to make a sample with the site's tutorial i meet the load's problem. some body can help me by explaining that i must do exactly?
Coordinator
Aug 30, 2014 at 7:57 AM
Hi Barack1234,

I haven't tried running Pcap.Net on Windows 8.1 so it could create problems.
However, in order to understand the issues you're experiencing, please provide more details.
What tests are failing and how?
What is the load's problem you're meeting?

Boaz.
Aug 30, 2014 at 12:57 PM
thank you. here are some errors that Resharper shows me:

Solution PcapDotNet.sln
Project PcapDotNet.Core.Extensions

PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:28 Cannot resolve symbol 'LivePacketDevice'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:33 Cannot resolve symbol 'Name'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:38 Cannot resolve symbol 'Name'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:41 Cannot resolve symbol 'Name'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:51 Cannot resolve symbol 'LivePacketDevice'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:53 Cannot resolve symbol 'GetGuid'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:72 Cannot resolve symbol 'LivePacketDevice'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:88 Cannot resolve symbol 'LivePacketDevice'
PcapDotNet.Core.Extensions\LivePacketDeviceExtensions.cs:91 Cannot resolve symbol 'GetNetworkInterface'
............
Project PcapDotNet.Core.Test

PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:46 Cannot resolve symbol 'PacketCommunicator'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:48 Cannot resolve symbol 'SetFilter'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:62 Cannot resolve symbol 'BerkeleyPacketFilter'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:62 Cannot resolve symbol 'BerkeleyPacketFilter'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:64 Cannot resolve symbol 'PacketCommunicator'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:81 Cannot resolve symbol 'PacketCommunicator'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:83 Cannot resolve symbol 'BerkeleyPacketFilter'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:83 Cannot resolve symbol 'BerkeleyPacketFilter'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:83 Cannot resolve symbol 'IpV4Netmask'
PcapDotNet.Core.Test\BerkeleyPacketFilterTests.cs:99 Cannot resolve symbol 'BerkeleyPacketFilter'
..............

and after the test of all test i found many kinde of these error messages:
Error Message
Failed comparing packets in file C:\Users\User\AppData\Local\Temp\temp.38.pcap. Message: Failed comparing 1 packets:
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Failed comparing packet 1. Input string was not in a correct format. ---> System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Double.Parse(String s)
at PcapDotNet.Core.Test.WiresharkCompareTests.CompareFrame(XElement frame, Packet packet) in C:\Users\User\Projets\PcapDotNet.DevelopersPack.0.10.0.67076\PcapDotNet.DevelopersPack.0.10.0.67076.x86\PcapDotNet\src\PcapDotNet.Core.Test\WiresharkCompareTests.cs:line 523
at PcapDotNet.Core.Test.WiresharkCompareTests.CompareProtocols(Object currentDatagram, XElement layersContainer) in C:\Users\User\Projets\PcapDotNet.DevelopersPack.0.10.0.67076\PcapDotNet.DevelopersPack.0.10.0.67076.x86\PcapDotNet\src\PcapDotNet.Core.Test\WiresharkCompareTests.cs:line 490
at PcapDotNet.Core.Test.WiresharkCompareTests.ComparePacket(Packet packet, XElement documentPacket) in C:\Users\User\Projets\PcapDotNet.DevelopersPack.0.10.0.67076\PcapDotNet.DevelopersPack.0.10.0.67076.x86\PcapDotNet\src\PcapDotNet.Core.Test\WiresharkCompareTests.cs:line 476
at PcapDotNet.Core.Test.WiresharkCompareTests.Compare(XDocument document, IEnumerable1 packets) in C:\Users\User\Projets\PcapDotNet.DevelopersPack.0.10.0.67076\PcapDotNet.DevelopersPack.0.10.0.67076.x86\PcapDotNet\src\PcapDotNet.Core.Test\WiresharkCompareTests.cs:line 456
--- End of inner exception stack trace ---

Error Stack Trace
PcapDotNet.Core.Test.WiresharkCompareTests.ComparePacketsToWireshark(IEnumerable
1 packets) in C:\Users\User\Projets\PcapDotNet.DevelopersPack.0.10.0.67076\PcapDotNet.DevelopersPack.0.10.0.67076.x86\PcapDotNet\src\PcapDotNet.Core.Test\WiresharkCompareTests.cs: line 436
PcapDotNet.Core.Test.WiresharkCompareTests.ComparePacketsToWireshark(Packet[] packets) in C:\Users\User\Projets\PcapDotNet.DevelopersPack.0.10.0.67076\PcapDotNet.DevelopersPack.0.10.0.67076.x86\PcapDotNet\src\PcapDotNet.Core.Test\WiresharkCompareTests.cs: line 368
PcapDotNet.Core.Test.WiresharkCompareTests.CompareEthernetFcsToWiresharkTest() in C:\Users\User\Projets\PcapDotNet.DevelopersPack.0.10.0.67076\PcapDotNet.DevelopersPack.0.10.0.67076.x86\PcapDotNet\src\PcapDotNet.Core.Test\WiresharkCompareTests.cs: line 137


Standard Console Output
Starting process C:\Program Files\Wireshark\tshark.exe -o udp.check_checksum:TRUE -o tcp.relative_sequence_numbers:FALSE -o tcp.analyze_sequence_numbers:FALSE -o tcp.track_bytes_in_flight:FALSE -o tcp.desegment_tcp_streams:FALSE -o tcp.check_checksum:TRUE -o http.dechunk_body:FALSE -t r -n -r "C:\Users\User\AppData\Local\Temp\temp.38.pcap" -T pdml

Test method PcapDotNet.Core.Test.LivePacketDeviceTests.ReceiveStatisticsGcCollectTest threw exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: networkInterface
PcapDotNet.Core.Extensions.NetworkInterfaceExtensions.GetLivePacketDevice(NetworkInterface networkInterface) in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Extensions\NetworkInterfaceExtensions.cs: line 24
PcapDotNet.Core.Test.LivePacketDeviceTests.OpenLiveDevice() in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Test\LivePacketDeviceTests.cs: line 851
PcapDotNet.Core.Test.LivePacketDeviceTests.ReceiveStatisticsGcCollectTest() in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Test\LivePacketDeviceTests.cs: line 257

Test method PcapDotNet.Core.Test.OfflinePacketDeviceTests.ReadUnicodeFilenameTest threw exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: networkInterface
PcapDotNet.Core.Extensions.NetworkInterfaceExtensions.GetLivePacketDevice(NetworkInterface networkInterface) in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Extensions\NetworkInterfaceExtensions.cs: line 24
PcapDotNet.Core.Test.LivePacketDeviceTests.OpenLiveDevice() in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Test\LivePacketDeviceTests.cs: line 851
PcapDotNet.Core.Test.OfflinePacketDeviceTests.GetOfflineDevice(Int32 numPackets, Packet packet, TimeSpan intervalBetweenPackets, String dumpFilename, String readFilename) in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Test\OfflinePacketDeviceTests.cs: line 442
PcapDotNet.Core.Test.OfflinePacketDeviceTests.OpenOfflineDevice(Int32 numPackets, Packet packet, TimeSpan intervalBetweenPackets, String dumpFilename, String readFilename) in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Test\OfflinePacketDeviceTests.cs: line 496
PcapDotNet.Core.Test.OfflinePacketDeviceTests.ReadUnicodeFilenameTest() in D:\CodePlex Project\Pcap.Net\PcapDotNet\src\PcapDotNet.Core.Test\OfflinePacketDeviceTests.cs: line 348

Aug 30, 2014 at 3:53 PM
i fixed my problem of load and i arrived to use PcapDotNet in my project with windows 8.1
thanks to every body