Network params
Represents the network configuration parameters of a device, providing details about the host name, domain name, DNS servers, and default gateways for both IPv4 and IPv6
Original source
The operating system process information are retrieved from OperatingSystem.NetworkParams interface
KInfo's source
Properties
hostName
The name of the device on the network
domainName
The domain name of the network or the device
dnsServers
A list of DNS server addresses used by the device for domain name resolution
val dnsServers: Array<String> = currentProcess.dnsServers
println(dnsServers) // e.g. ["8.8.8.8", "8.8.4.4"]
ipv4DefaultGateway
The default gateway for IPv4 traffic, typically the router's IP address
val ipv4DefaultGateway: String = currentProcess.ipv4DefaultGateway
println(ipv4DefaultGateway) // e.g. 192.168.1.1
ipv6DefaultGateway
The default gateway for IPv6 traffic, typically the router's IPv6 address