From cca979577ebdd932d26e0319264c4cdc6759195f Mon Sep 17 00:00:00 2001 From: der-onkel Date: Wed, 26 Feb 2020 07:02:10 +0100 Subject: [PATCH] Add output of accepted IP version (#111) --- server.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server.go b/server.go index d2fb604..608a437 100644 --- a/server.go +++ b/server.go @@ -32,6 +32,7 @@ var gCert []byte func runServer(testParam EthrTestParam, serverParam ethrServerParam) { defer stopStatsTimer() initServer(serverParam.showUI) + showAcceptedIPVersion() runTCPBandwidthServer() runTCPCpsServer() runTCPLatencyServer() @@ -157,6 +158,16 @@ func serverWatchControlChannel(test *ethrTest, waitForChannelStop chan bool) { watchControlChannel(test, waitForChannelStop) } +func showAcceptedIPVersion() { + var ipVerString = "ipv4, ipv6" + if ipVer == ethrIPv4 { + ipVerString = "ipv4" + } else if ipVer == ethrIPv6 { + ipVerString = "ipv6" + } + ui.printMsg("Accepting IP version: %s", ipVerString) +} + func runTCPBandwidthServer() { l, err := net.Listen(tcp(ipVer), hostAddr+":"+tcpBandwidthPort) if err != nil {