Exemple #1
0
        /// <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);
                }
            }
        }
Exemple #2
0
        /// <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);
                }
            }
        }