Permalink
Browse files

fixed Pcap library MinToCopy not working (windows issue)

  • Loading branch information...
1 parent ebfdd90 commit 7bfc006c6fa0133b92ccc36e142a874773e69b87 @seuffert committed Mar 11, 2011
Showing with 16 additions and 2 deletions.
  1. +14 −0 XBSlink/Form1.cs
  2. +2 −2 XBSlink/Properties/AssemblyInfo.cs
View
14 XBSlink/Form1.cs
@@ -307,6 +307,8 @@ private void resume_start_engine()
return;
LibPcapLiveDeviceList devices;
LibPcapLiveDevice pdev;
+ SharpPcap.WinPcap.WinPcapDeviceList devices_win;
+ SharpPcap.WinPcap.WinPcapDevice pdev_win;
try
{
devices = LibPcapLiveDeviceList.Instance;
@@ -330,6 +332,18 @@ private void resume_start_engine()
try {
pdev = devices[comboBox_captureDevice.SelectedIndex];
+ if (System.Environment.OSVersion.Platform == PlatformID.Win32NT)
+ {
+ devices_win = SharpPcap.WinPcap.WinPcapDeviceList.Instance;
+ for (int i = 0; i < devices_win.Count; i++)
+ {
+ pdev_win = devices_win[i];
+ if (pdev_win.Name.Contains(pdev.Name))
+ pdev = pdev_win;
+ }
+
+ }
+
}
catch (Exception)
{
View
4 XBSlink/Properties/AssemblyInfo.cs
@@ -43,5 +43,5 @@
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("cf940b99-b2ae-499e-a618-99810a5a994f")]
-[assembly: AssemblyVersion("0.9.0.0")]
-[assembly: AssemblyFileVersion("0.9.0.0")]
+[assembly: AssemblyVersion("0.9.0.1")]
+[assembly: AssemblyFileVersion("0.9.0.1")]

0 comments on commit 7bfc006

Please sign in to comment.