private void ListDevices() { Log("Generating Devices List"); devices = SharpPcap.LibPcap.LibPcapLiveDeviceList.Instance; foreach (SharpPcap.LibPcap.LibPcapLiveDevice dev in devices) { lstDevices.Items.Add(dev.Description.ToString()); } }
/// <summary> /// Represents a strongly typed, read-only list of PcapDevices. /// </summary> private CaptureDeviceList() : base(new List <ICaptureDevice>()) { // windows if ((Environment.OSVersion.Platform == PlatformID.Win32NT) || (Environment.OSVersion.Platform == PlatformID.Win32Windows)) { nPcapDeviceList = Npcap.NpcapDeviceList.Instance; } else // not windows { libPcapDeviceList = LibPcap.LibPcapLiveDeviceList.Instance; } Refresh(); }
/// <summary> /// Represents a strongly typed, read-only list of PcapDevices. /// </summary> private CaptureDeviceList() : base(new List <ILiveDevice>()) { libPcapDeviceList = LibPcap.LibPcapLiveDeviceList.Instance; Refresh(); }