1
2
3
4
5 package oshi.software.os.unix.openbsd;
6
7 import oshi.annotation.concurrent.ThreadSafe;
8 import oshi.software.common.AbstractNetworkParams;
9 import oshi.util.ExecutingCommand;
10
11
12
13
14 @ThreadSafe
15 public class OpenBsdNetworkParams extends AbstractNetworkParams {
16 @Override
17 public String getIpv4DefaultGateway() {
18 return searchGateway(ExecutingCommand.runNative("route -n get default"));
19 }
20
21 @Override
22 public String getIpv6DefaultGateway() {
23 return searchGateway(ExecutingCommand.runNative("route -n get default"));
24 }
25 }