summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/commands')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_general.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
index ba3c1658..85f77a7f 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
@@ -525,8 +525,18 @@ TrexRpcCmdPushRemote::_run(const Json::Value &params, Json::Value &result) {
if (!slave->get_owner().verify(slave_handler)) {
generate_execute_err(result, "incorrect or missing slave port handler");
}
+
+ std::stringstream ss;
+ CCapReaderBase *reader = CCapReaderFactory::CreateReader((char *)pcap_filename.c_str(), 0, ss);
+ if (!reader) {
+ generate_execute_err(result, ss.str());
+ }
+ if (reader->get_type() != ERF) {
+ generate_execute_err(result, "dual mode is only supported on ERF format");
+ }
}
+
try {
port->push_remote(pcap_filename, ipg_usec, speedup, count, duration, is_dual);
} catch (const TrexException &ex) {