diff options
author | imarom <imarom@cisco.com> | 2016-02-28 14:32:57 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-02-28 14:33:26 +0200 |
commit | 21fe2befe8806ac2a70cfb1d1c45737bee7e2702 (patch) | |
tree | 4a774d3a156f3418ea22a2ad88602056eb77fab6 /src/rpc-server | |
parent | b83eb43c25f0452c152d31966da4b1af5c304a6b (diff) |
more info for ports (API and TUI)
Diffstat (limited to 'src/rpc-server')
-rw-r--r-- | src/rpc-server/commands/trex_rpc_cmd_general.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp index 47569bde..88ead3c2 100644 --- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp +++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp @@ -168,16 +168,29 @@ TrexRpcCmdGetSysInfo::_run(const Json::Value ¶ms, Json::Value &result) { section["ports"] = Json::arrayValue; for (int i = 0; i < main->get_port_count(); i++) { - string driver; TrexPlatformApi::driver_speed_e speed; - + string driver; + string hw_macaddr; + string src_macaddr; + string dst_macaddr; + string pci_addr; + int numa; + TrexStatelessPort *port = main->get_port_by_id(i); port->get_properties(driver, speed); + port->get_macaddr(hw_macaddr, src_macaddr, dst_macaddr); + + port->get_pci_info(pci_addr, numa); section["ports"][i]["index"] = i; - section["ports"][i]["driver"] = driver; - section["ports"][i]["macaddr"] = port->get_macaddr(); + section["ports"][i]["driver"] = driver; + section["ports"][i]["hw_macaddr"] = hw_macaddr; + section["ports"][i]["src_macaddr"] = src_macaddr; + section["ports"][i]["dst_macaddr"] = dst_macaddr; + + section["ports"][i]["pci_addr"] = pci_addr; + section["ports"][i]["numa"] = numa; section["ports"][i]["rx"]["caps"] = port->get_rx_caps(); section["ports"][i]["rx"]["counters"] = port->get_rx_count_num(); |