in ethr.go [309:341]
func validateClientTest(testID EthrTestID, clientParam EthrClientParam) {
testType := testID.Type
protocol := testID.Protocol
switch protocol {
case TCP:
if testType != Bandwidth && testType != Cps && testType != Latency && testType != Ping && testType != TraceRoute && testType != MyTraceRoute {
emitUnsupportedTest(testID)
}
if clientParam.Reverse && testType != Bandwidth {
printReverseModeError()
}
if clientParam.BufferSize > 2*GIGA {
printUsageError("Maximum allowed value for \"-l\" for TCP is 2GB.")
}
case UDP:
if testType != Bandwidth && testType != Pps {
emitUnsupportedTest(testID)
}
if testType == Bandwidth {
if clientParam.BufferSize > (64 * 1024) {
printUsageError("Maximum supported buffer size for UDP is 64K\n")
}
}
if clientParam.Reverse {
printReverseModeError()
}
if clientParam.BufferSize > 64*KILO {
printUsageError("Maximum allowed value for \"-l\" for TCP is 64KB.")
}
default:
emitUnsupportedTest(testID)
}
}