Package oshi.software.os.linux
Class LinuxNetworkParams
java.lang.Object
oshi.software.common.AbstractNetworkParams
oshi.software.os.linux.LinuxNetworkParams
- All Implemented Interfaces:
NetworkParams
LinuxNetworkParams class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the Domain Name of the machine executing OSHI.Gets the HostName of the machine executing OSHI.Gets the default gateway(routing destination for 0.0.0.0/0) for IPv4 connections.Gets default gateway(routing destination for ::/0) for IPv6 connections.Methods inherited from class oshi.software.common.AbstractNetworkParams
getDnsServers, searchGateway, toString
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
LIBC
-
IPV4_DEFAULT_DEST
- See Also:
-
IPV6_DEFAULT_DEST
- See Also:
-
-
Constructor Details
-
LinuxNetworkParams
LinuxNetworkParams()
-
-
Method Details
-
getDomainName
Description copied from interface:NetworkParams
Gets the Domain Name of the machine executing OSHI.- Specified by:
getDomainName
in interfaceNetworkParams
- Overrides:
getDomainName
in classAbstractNetworkParams
- Returns:
- the domain name
-
getHostName
Description copied from interface:NetworkParams
Gets the HostName of the machine executing OSHI.- Specified by:
getHostName
in interfaceNetworkParams
- Overrides:
getHostName
in classAbstractNetworkParams
- Returns:
- the hostname
-
getIpv4DefaultGateway
Description copied from interface:NetworkParams
Gets the default gateway(routing destination for 0.0.0.0/0) for IPv4 connections.- Returns:
- default gateway for IPv4, or empty string if not defined.
-
getIpv6DefaultGateway
Description copied from interface:NetworkParams
Gets default gateway(routing destination for ::/0) for IPv6 connections.- Returns:
- default gateway for IPv6, or empty string if not defined.
-