Class FreeBsdNetworkParams

java.lang.Object
oshi.software.common.AbstractNetworkParams
oshi.software.common.os.unix.freebsd.FreeBsdNetworkParams
All Implemented Interfaces:
NetworkParams

public abstract class FreeBsdNetworkParams extends AbstractNetworkParams
  • Constructor Details

    • FreeBsdNetworkParams

      public FreeBsdNetworkParams()
  • Method Details

    • getDomainName

      public String getDomainName()
      Description copied from interface: NetworkParams
      Gets the Domain Name of the machine executing OSHI.
      Specified by:
      getDomainName in interface NetworkParams
      Overrides:
      getDomainName in class AbstractNetworkParams
      Returns:
      the domain name
    • getHostName

      public String getHostName()
      Description copied from interface: NetworkParams
      Gets the HostName of the machine executing OSHI.
      Specified by:
      getHostName in interface NetworkParams
      Overrides:
      getHostName in class AbstractNetworkParams
      Returns:
      the hostname
    • getIpv4DefaultGateway

      public String 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

      public String 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.
    • queryDomainName

      protected abstract String 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

      protected abstract String queryHostName()
      Returns the hostname via the subclass's gethostname binding, or null to fall back to the InetAddress lookup inherited from AbstractNetworkParams.getHostName().
      Returns:
      the native hostname, or null to fall back to the InetAddress lookup