From 96765d2bf2c416f652da904cf7524ff75b678aee Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 17 Sep 2015 16:27:47 +0300 Subject: moved 'owning states' to port granularity instead of machine --- src/rpc-server/trex_rpc_cmd_api.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/rpc-server/trex_rpc_cmd_api.h') 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 @@ -124,6 +124,12 @@ protected: */ void verify_ownership(const Json::Value ¶ms, 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 ¶ms, Json::Value &result); + /** * parse a field from choices * -- cgit 1.2.3-korg