Interface NetworkParams

All Known Implementing Classes:
AbstractNetworkParams, OpenBsdNetworkParams

@ThreadSafe public interface NetworkParams
NetworkParams presents network parameters of running OS, such as DNS, host name etc.
  • Method Details

    • getHostName

      String getHostName()
      Gets the HostName of the machine executing OSHI.
      Returns:
      the hostname
    • getDomainName

      String getDomainName()
      Gets the Domain Name of the machine executing OSHI.
      Returns:
      the domain name
    • getDnsServers

      String[] getDnsServers()
      Gets the DNS Servers configured for this machine.
      Returns:
      the DNS servers
    • getIpv4DefaultGateway

      String getIpv4DefaultGateway()
      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

      String getIpv6DefaultGateway()
      Gets default gateway(routing destination for ::/0) for IPv6 connections.
      Returns:
      default gateway for IPv6, or empty string if not defined.