2

I am using the following library: Tamir.IPLib.SharpPcap.dll version 1.0.2.0.

Running the Tamir.IPLib.Test.Example1, that is (in very short):

PcapDeviceList devices = SharpPcap.GetAllDevices();
if(devices.Count<1)
{
    Console.WriteLine("No device found on this machine");
}

foreach(PcapDevice dev in devices)
{
     Console.WriteLine("PcapDescription : " + dev.PcapDescription);
     Console.WriteLine("PcapName : " + dev.PcapName);
     Console.WriteLine("PcapIpAddress : " + dev.PcapIpAddress);
     i++;
}

On a Windows XP version 2002,I am able to obtain the description, name and IP address of my device without any problem.But if using Windows 7 Professional 64 bit SP1, i can obtain only the PcapDescription and PcapName correctly.PcapIpAddress returns instead 0.0.0.0.Why? and What can i do to get the correct IPAddress?

Thanks

R. Barzell
  • 666
  • 5
  • 24
  • the 1.0.2 version of SharpPcap is *very* old, and there could be issues because of IPv6 support being enabled in Windows 7, which is (IIRC) not present in Windows XP – Anya Shenanigans Mar 11 '14 at 15:14

1 Answers1

0

I would recommend using the latest release of SharpPcap instead. It has significant improvements, is a continuation of the project Tamir started (has 3+ years of development improvements) and the examples are updated. I'm the author of SharpPcap btw.

Chris Morgan
  • 1,277
  • 1
  • 13
  • 33