"No source available" - livepacketdevice.cpp

Mar 27, 2012 at 12:20 PM

Hi all! I have an issue which arose a time ago. I'm currently constructing a basic application which sends a datagram to an network card for interception in Wireshark.

What I'm doing is the following:

using (PacketCommunicator communicator = EDevice.Open(100, PacketDeviceOpenAttributes.Promiscuous, 1000))


// set up addresses and layers



// Send down the packet



EDevice is the selected device from the deviceList

When I enter the using(PacketCommunicator...) my "communicator" is null and when I step into this I
get an error: "No source available", followed by information about the "Call stack location" and the "Source file information".
What this information is saying basically is that I'm missing "livepacketdevice.cpp", here follows the "Source file Information":

"Locating source for 'c:\users\boaz\tfs\tfs06.codeplex.com\pcapdotnet\pcapdotnet\src\pcapdotnet.core\livepacketdevice.cpp'. Checksum: MD5 {7f 61 5b 4c 19 39 19 fd a6 0 b1 2 7e 4b 5c 94}
The file 'c:\users\boaz\tfs\tfs06.codeplex.com\pcapdotnet\pcapdotnet\src\pcapdotnet.core\livepacketdevice.cpp' does not exist.
Looking in script documents for 'c:\users\boaz\tfs\tfs06.codeplex.com\pcapdotnet\pcapdotnet\src\pcapdotnet.core\livepacketdevice.cpp'...
Looking in the projects for 'c:\users\boaz\tfs\tfs06.codeplex.com\pcapdotnet\pcapdotnet\src\pcapdotnet.core\livepacketdevice.cpp'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\users\boaz\tfs\tfs06.codeplex.com\pcapdotnet\pcapdotnet\src\pcapdotnet.core\livepacketdevice.cpp.
The debugger could not locate the source file 'c:\users\boaz\tfs\tfs06.codeplex.com\pcapdotnet\pcapdotnet\src\pcapdotnet.core\livepacketdevice.cpp'."

Previously everything was working correctly and I was able to intercept messages in Wireshark.

It should be added that the EDevice is "correct" and not null.

I'm developing in Visual Studio 2010, C#, Windows 7 Professional 64-bit.

Best regards Erik


Mar 30, 2012 at 5:39 PM

Hi Erik,


Make sure you've followed the full instructions in "Home Go Pcap.Net User Guide Go Using Pcap.Net in your programs".

If you use a LivePacketDevice, you should never get a null PacketCommunicator when calling Open().

You might get an exception though.


You can download the source to try and step into it, though I can't say that debugging C++/CLI works so well in Visual Studio (and I don't know a better tool).



Mar 30, 2012 at 10:19 PM

Hi Boaz!

I'm still not sure what casued this problem but for now I have found a way of handling this. This seems to only appear whenever I'm debugging the program, and not in run mode. I also had an issue with som crossing threads. Hopefully I will not see this problem in the future again...