Class MsftNetIpAddress
java.lang.Object
io.github.eggy03.ferrumx.windows.entity.network.MsftNetIpAddress
Immutable representation of IPv4 and IPv6 address configuration for a Network Adapter on a Windows system.
Fields correspond to properties retrieved from the MSFT_NetIPAddress class in the
root/StandardCimv2 namespace.
Together, with MsftDnsClientServerAddress, this class aims to be a
replacement for Win32NetworkAdapterConfiguration
Usage example
MsftNetIpAddress address = MsftNetIpAddress.builder()
.interfaceIndex(1)
.addressFamily(0)
.ipv4Address("192.168.0.210")
.ipv6Address("fe80::abed:1234:5678:9abc")
.build();
// Create a modified copy
MsftNetIpAddress updated = address.toBuilder()
.ipv4Address("192.168.0.255")
.build();
See MsftNetAdapter, for network adapter information.
See MsftDnsClientServerAddress, for information regarding the connected DNS servers of a network adapter.
See MsftNetConnectionProfile, for information regarding the current profile of a network adapter.
- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLifetime over which the address is preferred. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) @Nullable LongAddress family of the IP address.(package private) @Nullable StringUser-friendly name of the network interface.(package private) @Nullable LongIndex of the network interface associated with this IP configuration.(package private) @Nullable StringThe IP address assigned to the interface (can be IPv4 or IPv6 or both).(package private) @Nullable StringThe IPv4 address assigned to the interface, if applicable.(package private) @Nullable StringThe IPv6 address assigned to the interface, if applicable.(package private) @Nullable MsftNetIpAddress.DatetimeLifetime during which the address is preferred for use.(package private) @Nullable LongLength of the network prefix, in bits.(package private) @Nullable LongSource of the prefix for this IP Address.(package private) @Nullable LongSource of the suffix for the IP address.(package private) @Nullable IntegerType of IP address.(package private) @Nullable MsftNetIpAddress.DatetimeTotal lifetime during which the address is valid. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
interfaceIndex
Index of the network interface associated with this IP configuration. -
interfaceAlias
User-friendly name of the network interface. -
addressFamily
Address family of the IP address.- 2 - IPv4
- 23 - IPv6
-
ipAddress
The IP address assigned to the interface (can be IPv4 or IPv6 or both). -
ipv4Address
The IPv4 address assigned to the interface, if applicable. -
ipv6Address
The IPv6 address assigned to the interface, if applicable. -
type
Type of IP address.- 1 - Unicast
- 2 - Anycast
-
prefixOrigin
Source of the prefix for this IP Address.- 0 - Other
- 1 - Manual
- 2 - WellKnown
- 3 - DHCP
- 4 - RouterAdvertisement
-
suffixOrigin
Source of the suffix for the IP address.- 0 - Other
- 1 - Manual
- 2 - WellKnown
- 3 - DHCP
- 4 - Link
- 5 - Random
-
prefixLength
Length of the network prefix, in bits. -
preferredLifetime
@SerializedName("PreferredLifetime") @Nullable @Nullable MsftNetIpAddress.Datetime preferredLifetimeLifetime during which the address is preferred for use. The default value is infinite. -
validLifeTime
Total lifetime during which the address is valid. The default value is infinite.
-
-
Constructor Details
-
MsftNetIpAddress
public MsftNetIpAddress()
-
-
Method Details
-
toString
-