Class FreeBsdNetworkParams
java.lang.Object
oshi.software.common.AbstractNetworkParams
oshi.software.common.os.unix.freebsd.FreeBsdNetworkParams
- All Implemented Interfaces:
NetworkParams
-
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.protected abstract StringResolves the domain name via the subclass's getaddrinfo binding.protected abstract StringReturns the hostname via the subclass's gethostname binding, ornullto fall back to the InetAddress lookup inherited fromAbstractNetworkParams.getHostName().Methods inherited from class AbstractNetworkParams
getDnsServers, searchGateway, toString
-
Constructor Details
-
FreeBsdNetworkParams
public FreeBsdNetworkParams()
-
-
Method Details
-
getDomainName
Description copied from interface:NetworkParamsGets the Domain Name of the machine executing OSHI.- Specified by:
getDomainNamein interfaceNetworkParams- Overrides:
getDomainNamein classAbstractNetworkParams- Returns:
- the domain name
-
getHostName
Description copied from interface:NetworkParamsGets the HostName of the machine executing OSHI.- Specified by:
getHostNamein interfaceNetworkParams- Overrides:
getHostNamein classAbstractNetworkParams- Returns:
- the hostname
-
getIpv4DefaultGateway
Description copied from interface:NetworkParamsGets 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:NetworkParamsGets default gateway(routing destination for ::/0) for IPv6 connections.- Returns:
- default gateway for IPv6, or empty string if not defined.
-
queryDomainName
Resolves the domain name via the subclass's getaddrinfo binding. Subclasses return an empty string on failure (matching the prior JNA behavior).- Returns:
- the resolved canonical domain name, or
""on failure
-
queryHostName
Returns the hostname via the subclass's gethostname binding, ornullto fall back to the InetAddress lookup inherited fromAbstractNetworkParams.getHostName().- Returns:
- the native hostname, or
nullto fall back to the InetAddress lookup
-