From 9f2b895aa091a24bc33e713c62f8bfe708b9fc3e Mon Sep 17 00:00:00 2001 From: hanchunchao Date: Thu, 28 Mar 2024 11:48:30 +0000 Subject: [PATCH] update source/tools/detect/net/PingTrace/src/common/options.hpp. Pingtrace: Add Parameter limitations Signed-off-by: hanchunchao --- .../net/PingTrace/src/common/options.hpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/source/tools/detect/net/PingTrace/src/common/options.hpp b/source/tools/detect/net/PingTrace/src/common/options.hpp index d59ac148..1deb8a4c 100644 --- a/source/tools/detect/net/PingTrace/src/common/options.hpp +++ b/source/tools/detect/net/PingTrace/src/common/options.hpp @@ -118,6 +118,32 @@ struct options { try { app.parse(argc, argv); + + if (this->max_count == 0) { + std::cout<< "-C, --count Only the integer bigger than 0 is valid." <interval_us == 0) { + std::cout<< "-i Only the integer bigger than 0 is valid." <runtime == 0) { + std::cout<< "-t Only the integer bigger than 0 is valid." <log_max_size == 0) { + std::cout<< "--logsize Only the integer bigger than 0 is valid." <log_max_backup == 0) { + std::cout<< "--logbackup Only the integer bigger than 0 is valid." <ip.empty()) this->run_client = true; if (this->help || (!this->run_client && !this->run_server)) -- Gitee