diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-01 17:32:01 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-01 17:32:01 +0200 |
commit | 1ed6441925f424b9b2b280f1fa498f3d22dbb890 (patch) | |
tree | 5305e4c1260c1e1cf89bc48bc7e3575eb8130b94 /src/rpc/core_rpc_server_commands_defs.h | |
parent | Merge pull request #5326 (diff) | |
parent | New interactive daemon command 'print_net_stats': Global traffic stats (diff) | |
download | monero-1ed6441925f424b9b2b280f1fa498f3d22dbb890.tar.xz |
Merge pull request #5327
c23ea796 New interactive daemon command 'print_net_stats': Global traffic stats (rbrunner7)
Diffstat (limited to 'src/rpc/core_rpc_server_commands_defs.h')
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index e65790cae..1f14267f6 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -739,6 +739,39 @@ namespace cryptonote //----------------------------------------------- + struct COMMAND_RPC_GET_NET_STATS + { + struct request_t + { + + BEGIN_KV_SERIALIZE_MAP() + END_KV_SERIALIZE_MAP() + }; + typedef epee::misc_utils::struct_init<request_t> request; + + + struct response_t + { + std::string status; + uint64_t start_time; + uint64_t total_packets_in; + uint64_t total_bytes_in; + uint64_t total_packets_out; + uint64_t total_bytes_out; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(status) + KV_SERIALIZE(start_time) + KV_SERIALIZE(total_packets_in) + KV_SERIALIZE(total_bytes_in) + KV_SERIALIZE(total_packets_out) + KV_SERIALIZE(total_bytes_out) + END_KV_SERIALIZE_MAP() + }; + typedef epee::misc_utils::struct_init<response_t> response; + }; + + //----------------------------------------------- struct COMMAND_RPC_STOP_MINING { struct request_t |