summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_cmd_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/trex_rpc_cmd_api.h')
-rw-r--r--src/rpc-server/trex_rpc_cmd_api.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rpc-server/trex_rpc_cmd_api.h b/src/rpc-server/trex_rpc_cmd_api.h
index cab50cfd..3c718eaa 100644
--- a/src/rpc-server/trex_rpc_cmd_api.h
+++ b/src/rpc-server/trex_rpc_cmd_api.h
@@ -125,6 +125,12 @@ protected:
void verify_ownership(const Json::Value &params, Json::Value &result);
/**
+ * validate port id
+ *
+ */
+ void validate_port_id(uint8_t port_id, Json::Value &result);
+
+ /**
* parse functions
*
*/
@@ -146,6 +152,9 @@ protected:
const Json::Value & parse_object(const Json::Value &parent, int index, Json::Value &result);
const Json::Value & parse_array(const Json::Value &parent, int index, Json::Value &result);
+ /* shortcut for parsing port id */
+ uint8_t parse_port(const Json::Value &params, Json::Value &result);
+
/**
* parse a field from choices
*