Class MsftNetAdapter
Fields correspond to properties retrieved from the MSFT_NetAdapter class in the
root/StandardCimv2 namespace. This class is a modern replacement for the now deprecated
Win32_NetworkAdapter WMI class in the root/cimv2 namespace.
However, the Win32NetworkAdapter class which represents Win32_NetworkAdapter,
will remain accessible for backwards compatibility will not be marked as deprecated by the library at this time.
Unlike Win32NetworkAdapter which stores it's configuration in Win32NetworkAdapterConfiguration and
requires Win32NetworkAdapterSetting to establish an association between them, MsftNetAdapter stores configuration
inside MsftNetIpAddress, MsftDnsClientServerAddress and MsftNetConnectionProfile
and all of them are directly linked via the interfaceIndex field.
Usage example
MsftNetAdapter adapter = MsftNetAdapter.builder()
.interfaceName("Ethernet1")
.linkLayerAddress("00:1A:2B:3C:4D:5E")
.linkSpeed("1Gbps)
.build();
// Create a modified copy
MsftNetAdapter updated = adapter.toBuilder()
.linkSpeed("2.5Gbps")
.build();
See Win32NetworkAdapter, the now deprecated equivalent WMI class.
See MsftNetIpAddress, for IP address configuration information of a network adapter.
See MsftNetConnectionProfile, for information regarding the current profile of a network adapter.
See MsftDnsClientServerAddress, for configuration information regarding the DNS servers of a network adapter.
- Since:
- 3.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) @Nullable StringUniquely identifies the network adapter on the system.(package private) @Nullable StringDate of the currently installed driver.(package private) @Nullable StringName of the network adapter driver.(package private) @Nullable StringVersion number of the network adapter driver.(package private) @Nullable BooleanIndicates whether the adapter supports full-duplex mode.(package private) @Nullable BooleanIndicates whether the adapter is hidden from the user interface.(package private) @Nullable StringFriendly alias name assigned to the network interface by the operating system or user.(package private) @Nullable StringInterface Description, also known as "ifDesc" or display name is a unique name assigned to the network adapter during installation.(package private) @Nullable LongThe unique interface index number used by the network stack.(package private) @Nullable StringName of the network adapter interface.(package private) @Nullable LongCurrent operational status of the network adapter interface.(package private) @Nullable LongType of interface as defined by the IANA Interface Type registry.(package private) @Nullable StringThe physical (MAC) address of the network adapter.(package private) @Nullable StringThe current link speed as a formatted string, if available.(package private) @Nullable LongThe current media connection state of the adapter.(package private) @Nullable StringType of network media currently in use (for example, Ethernet or Wi-Fi).(package private) @Nullable LongMaximum Transmission Unit (MTU) size of the adapter, in bytes.(package private) @Nullable LongNetwork adapter media type.(package private) @Nullable LongThe types of physical media that the network adapter supports.(package private) @Nullable StringPhysical type of network media String equivalent ofndisPhysicalMedium(package private) @Nullable StringPlug and Play (PnP) device identifier assigned to the adapter by Windows.(package private) @Nullable LongRaw value of the current receive link speed in bits per second.(package private) @Nullable StringCurrent operational status of the net adapter device.(package private) @Nullable LongRaw value of the current transmit link speed in bits per second.(package private) @Nullable BooleanIndicates whether this adapter represents a virtual interface. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
deviceId
Uniquely identifies the network adapter on the system. -
pnpDeviceId
Plug and Play (PnP) device identifier assigned to the adapter by Windows. -
interfaceIndex
The unique interface index number used by the network stack.Used to associate related objects such as
MsftNetIpAddress,MsftDnsClientServerAddress,MsftNetConnectionProfile.Example: 12
-
interfaceName
Name of the network adapter interface.Example: "Realtek PCIe GbE Family Controller"
-
interfaceType
Type of interface as defined by the IANA Interface Type registry. -
interfaceDescription
Interface Description, also known as "ifDesc" or display name is a unique name assigned to the network adapter during installation. This name cannot be changed and is persisted as long as the network adapter is not uninstalled. -
interfaceAlias
Friendly alias name assigned to the network interface by the operating system or user.Example: "Ethernet"
-
interfaceOperationalStatus
Current operational status of the network adapter interface.Possible values:
- 1-Up
- 2-Down
- 3-Testing
- 4-Unknown
- 5-Dormant
- 6-NotPresent
- 7-LowerLayerDown
-
virtual
Indicates whether this adapter represents a virtual interface.Example: true for Hyper-V virtual adapters
-
fullDuplex
Indicates whether the adapter supports full-duplex mode. -
status
Current operational status of the net adapter device.Possible OPERATIONAL values:
- "OK"
- "Degraded"
- "Pred Fail"
Possible NON-OPERATIONAL values:
- "Unknown"
- "Error"
- "Starting"
- "Stopping"
- "Service"
Possible OTHER values:
- "Stressed"
- "NonRecover"
- "No Contact"
- "Lost Comm"
-
linkLayerAddress
The physical (MAC) address of the network adapter.Example: "00:1A:2B:3C:4D:5E"
-
linkSpeed
The current link speed as a formatted string, if available.Example: "1 Gbps"
-
receiveLinkSpeedRaw
Raw value of the current receive link speed in bits per second. -
transmitLinkSpeedRaw
Raw value of the current transmit link speed in bits per second. -
driverName
Name of the network adapter driver.Example: "rt640x64.sys"
-
driverVersion
Version number of the network adapter driver.Example: "12.18.9.10"
-
driverDate
Date of the currently installed driver. -
mtuSize
Maximum Transmission Unit (MTU) size of the adapter, in bytes.Example: 1500
-
mediaConnectState
The current media connection state of the adapter.Possible values:
- 0-Unknown
- 1-Connected
- 2-Disconnected
-
ndisMedium
Network adapter media type. Numeric equivalent ofmediaTypePossible values:
- 0 – 802.3
- 1 – 802.5
- 2 – FDDI
- 3 – WAN
- 4 – LocalTalk
- 5 – DIX
- 6 – Raw Arcnet
- 7 – 878.2
- 8 – ATM
- 9 – Wireless WAN
- 10 – IrDA
- 11 – BPC
- 12 – Connection Oriented WAN
- 13 – IP 1394
- 14 – InfiniBand (IB)
- 15 – Tunnel
- 16 – Native 802.11
- 17 – Loopback
- 18 – WiMAX
- 19 – IP
-
ndisPhysicalMedium
The types of physical media that the network adapter supports. Numeric equivalent ofphysicalMediaTypePossible values:
- 0 – Unspecified
- 1 – Wireless LAN
- 2 – Cable Modem
- 3 – Phone Line
- 4 – Power Line
- 5 – DSL
- 6 – Fibre Channel (FC)
- 7 – IEEE 1394
- 8 – Wireless WAN
- 9 – Native 802.11
- 10 – Bluetooth
- 11 – InfiniBand
- 12 – WiMAX
- 13 – Ultra-Wideband (UWB)
- 14 – 802.3
- 15 – 802.5
- 16 – IrDA
- 17 – Wired WAN
- 18 – Wired Connection Oriented WAN
- 19 – Other
-
mediaType
Type of network media currently in use (for example, Ethernet or Wi-Fi). String equivalent ofndisMedium -
physicalMediaType
Physical type of network media String equivalent ofndisPhysicalMediumExample: "802.3"
-
-
Constructor Details
-
MsftNetAdapter
public MsftNetAdapter()
-
-
Method Details
-
isVirtual
-
isFullDuplex
-
isHidden
-
toString
-