Skip to content

101.Network Interface Card Information

› cmd⁠‿⁠⁠er edited this page Jun 19, 2026 · 5 revisions

101.1 Overview

The NicScan class provides access to detailed information about network interfaces installed on the current system.

It can be used to retrieve hardware information, network configuration details, IP addressing data, traffic statistics, and adapter capabilities through a single API.


101.2 Supported Platforms

  • Windows
  • Linux
  • macOS (OSX)

Platform support depends on the availability of network interface information provided by the underlying operating system.


101.3 Creating a Scanner

Create an instance of NicScan before retrieving network interface information.

var scanner = new NicScan(); 

101.4 Retrieving Network Interfaces

Use the NicExtract() method to retrieve all available network interfaces.

var scanner = new NicScan();

foreach (NicResult nic in scanner.NicExtract())
{
    Console.WriteLine(nic.Name);
}

101.5 Returned Properties

General Information

Property Description
Name Interface name
Description Interface description
Id Unique interface identifier
InterfaceType Network interface type
OperationalStatus Current operational status

Address Information

Property Description
UnicastAddresses Assigned unicast addresses (List<string>)
MulticastAddresses Assigned multicast addresses (List<string>)
GatewayAddresses Configured gateway addresses (List<string>)
DnsServers Configured DNS servers (List<string>)
DnsSuffix DNS suffix
Family Address family
NetMask IPv4 subnet mask
PrefixLength Network prefix length
IPv4Index IPv4 interface index

Hardware Information

Property Description
MacAddress Physical MAC address
Mtu Maximum Transmission Unit
SpeedBitsPerSecond Interface speed in bps

Statistics

Property Description
BytesReceived Total bytes received
BytesSent Total bytes sent
UnicastPacketsReceived Received unicast packets
UnicastPacketsSent Sent unicast packets
NonUnicastPacketsReceived Received non-unicast packets
IncomingPacketsDiscarded Discarded incoming packets
IncomingPacketsWithErrors Incoming packets with errors
OutgoingPacketsWithErrors Outgoing packets with errors

Capabilities

Property Description
SupportsIPv4 Indicates IPv4 support
SupportsIPv6 Indicates IPv6 support
SupportsMulticast Indicates multicast support

101.6 Exceptions

  • NicException

Thrown when required network interface information is invalid or cannot be retrieved.

try
{
    var result = scanner.NicExtract();
}
catch (NicException ex) {
    Console.WriteLine(ex.Message);
}
  • NicScanFailedException

Thrown when could not detect any network interface.

try
{
    var result = scanner.NicExtract();
}
catch (NicScanFailedException ex) {
    Console.WriteLine(ex.Message);
}

101.7 Notes

  • Some properties may vary depending on the operating system.
  • Virtual adapters may expose different information than physical adapters.
  • Interface statistics are provided by the operating system and may not be available on all platforms.
  • Network interface information can change during application execution.

Firmware

NIC Information

Page Title
101.1 Overview
101.2 Supported Platforms
101.3 Creating a Scanner
101.4 Retrieving Network Interfaces
101.5 Returned Properties
101.6 Exceptions
101.7 Notes

OS Information

Page Title
102.1 Overview
102.2 Supported Platforms
102.3 Creating a Scanner
102.4 Retrieving OS Information
102.5 Returned Properties
102.6 Exceptions
102.7 Notes

Network

Connection String Generator

Page Title
201.1 Overview
201.2 SQL Server Connection String Builder
201.3 SQLite Connection String Builder
201.4 FTP Connection String Builder
201.5 Validation & Exceptions
201.6 Notes

Clone this wiki locally