adds ipv6 index to config and a cli command to view network interface

This commit is contained in:
2021-06-25 22:06:07 +04:00
parent 680f703326
commit f4bd08b6bf
6 changed files with 53 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ var (
"DefaultDockerFile": "/home/akilan/Documents/p2prendering/p2p-redering-computation/server/docker/containers/docker-ubuntu-sshd/",
"SpeedTestFile":"/etc/p2p-rendering/50.bin",
"NetworkInterface": "wlp0s20f3",
"NetworkInterfaceIPV6Index": "1",
}
configName = "config"
configType = "json"
@@ -26,6 +27,7 @@ type Config struct {
DefaultDockerFile string
SpeedTestFile string
NetworkInterface string
NetworkInterfaceIPV6Index int
}
// Exists reports whether the named file or directory exists.
@@ -53,6 +55,7 @@ func SetDefaults() error {
defaults["DockerContainers"] = defaultPath + "server/docker/containers/"
defaults["SpeedTestFile"] = defaultPath + "p2p/50.bin"
defaults["NetworkInterface"] = "wlp0s20f3"
defaults["NetworkInterfaceIPV6Index"] = "2"
//Paths to search for config file
configPaths = append(configPaths, defaultPath)