From f03fa158116cfd65659d14698c91446dc9bdb4c4 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 27 Jun 2016 17:15:05 +0300 Subject: draft #3 of client config --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 62eee880..90e48549 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,6 +22,7 @@ limitations under the License. #include "bp_sim.h" #include "os_time.h" +#include "trex_client_config.h" #include #include @@ -160,7 +161,7 @@ static int parse_options(int argc, break; case OPT_MAC_FILE: - po->mac_file = args.OptionArg(); + po->client_cfg_file = args.OptionArg(); break; case OPT_FILE_OUT: -- cgit From 1dfd42ceb79677e171d5dedcac34900776574000 Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 29 Jun 2016 10:35:54 +0300 Subject: added enhanced parsing for the YAML wrapper module --- src/main.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 90e48549..de6cef45 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,7 +36,7 @@ using namespace std; // An enum for all the option types enum { OPT_HELP, OPT_CFG, OPT_NODE_DUMP, OP_STATS, - OPT_FILE_OUT, OPT_UT, OPT_PCAP, OPT_IPV6, OPT_MAC_FILE, + OPT_FILE_OUT, OPT_UT, OPT_PCAP, OPT_IPV6, OPT_CLIENT_CFG_FILE, OPT_SL, OPT_DP_CORE_COUNT, OPT_DP_CORE_INDEX, OPT_LIMIT, OPT_DRY_RUN}; @@ -62,22 +62,22 @@ typedef enum { */ static CSimpleOpt::SOption parser_options[] = { - { OPT_HELP, "-?", SO_NONE }, - { OPT_HELP, "-h", SO_NONE }, - { OPT_HELP, "--help", SO_NONE }, - { OPT_UT, "--ut", SO_NONE }, - { OP_STATS, "-s", SO_NONE }, - { OPT_CFG, "-f", SO_REQ_SEP }, - { OPT_MAC_FILE, "--mac", SO_REQ_SEP }, - { OPT_FILE_OUT , "-o", SO_REQ_SEP }, - { OPT_NODE_DUMP , "-v", SO_REQ_SEP }, - { OPT_PCAP, "--pcap", SO_NONE }, - { OPT_IPV6, "--ipv6", SO_NONE }, - { OPT_SL, "--sl", SO_NONE }, - { OPT_DP_CORE_COUNT, "--cores", SO_REQ_SEP }, - { OPT_DP_CORE_INDEX, "--core_index", SO_REQ_SEP }, - { OPT_LIMIT, "--limit", SO_REQ_SEP }, - { OPT_DRY_RUN, "--dry", SO_NONE }, + { OPT_HELP, "-?", SO_NONE }, + { OPT_HELP, "-h", SO_NONE }, + { OPT_HELP, "--help", SO_NONE }, + { OPT_UT, "--ut", SO_NONE }, + { OP_STATS, "-s", SO_NONE }, + { OPT_CFG, "-f", SO_REQ_SEP }, + { OPT_CLIENT_CFG_FILE, "--client_cfg", SO_REQ_SEP }, + { OPT_FILE_OUT , "-o", SO_REQ_SEP }, + { OPT_NODE_DUMP , "-v", SO_REQ_SEP }, + { OPT_PCAP, "--pcap", SO_NONE }, + { OPT_IPV6, "--ipv6", SO_NONE }, + { OPT_SL, "--sl", SO_NONE }, + { OPT_DP_CORE_COUNT, "--cores", SO_REQ_SEP }, + { OPT_DP_CORE_INDEX, "--core_index", SO_REQ_SEP }, + { OPT_LIMIT, "--limit", SO_REQ_SEP }, + { OPT_DRY_RUN, "--dry", SO_NONE }, SO_END_OF_OPTIONS @@ -160,7 +160,7 @@ static int parse_options(int argc, po->cfg_file = args.OptionArg(); break; - case OPT_MAC_FILE: + case OPT_CLIENT_CFG_FILE: po->client_cfg_file = args.OptionArg(); break; -- cgit