public static void FindAll() { Console.WriteLine("Scanning for Realtek 8139 cards..."); for (int i = 0; i < PCIBus.Devices.Length; i++) { var xDevice = PCIBus.Devices[i]; //DebugWriteLine("VendorID: " + device.VendorID + " - DeviceID: " + device.DeviceID); if ((xDevice.VendorID == 0x10EC) && (xDevice.DeviceID == 0x8139) && (xDevice.Claimed == false)) { RTL8139 nic = new RTL8139(xDevice); NetworkDevice.Add(nic); } } }
/// <summary> /// Retrieve all AMD PCNet network cards found on computer. /// </summary> /// <returns>List of all AMD PCNet cards</returns> public static void FindAll() { Console.WriteLine("Scanning for AMD PCNet cards..."); foreach (PCIDevice device in Cosmos.Hardware2.PCIBus.Devices) { if ((device.VendorID == 0x1022) && (device.DeviceID == 0x2000) && (device.Claimed == false)) { AMDPCNet nic = new AMDPCNet(device); Console.WriteLine("Found AMD PCNet NIC on PCI " + device.Bus + ":" + device.Slot + ":" + device.Function); Console.WriteLine("NIC IRQ: " + device.InterruptLine); Console.WriteLine("NIC MAC Address: " + nic.MACAddress.ToString()); NetworkDevice.Add(nic); } } }
/// <summary> /// Retrieve all VIA Rhine-II network cards found on computer. /// </summary> /// <returns>List of all VIA Rhine-II cards</returns> public static void FindAll() { Console.WriteLine("Scanning for VIA Rhine-II cards..."); foreach (PCIDevice device in Cosmos.Hardware2.PCIBus.Devices) { if ((device.VendorID == 0x1106) && (device.DeviceID == 0x3065) && (device.Claimed == false)) { VT6102 nic = new VT6102(device); Console.WriteLine("Found VIA Rhine-II NIC on PCI " + device.Bus + ":" + device.Slot + ":" + device.Function); Console.WriteLine("NIC IRQ: " + device.InterruptLine); Console.WriteLine("NIC MAC Address: " + nic.MACAddress.ToString()); NetworkDevice.Add(nic); } } }