Module: sip-router Branch: master Commit: fb4dc4b7b866239a90a4d6441ed319664697edab URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fb4dc4b7...
Author: Hugh Waite hugh.waite@crocodile-rcs.com Committer: Hugh Waite hugh.waite@crocodile-rcs.com Date: Thu Jul 4 09:33:56 2013 +0100
core: Improve tcp stats output
- Add connection ref count - Add websocket protocols
---
core_cmd.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/core_cmd.c b/core_cmd.c index d46c180..304c49d 100644 --- a/core_cmd.c +++ b/core_cmd.c @@ -773,8 +773,12 @@ static void core_tcp_list(rpc_t* rpc, void* c) /* tcp data */ if (con->rcv.proto == PROTO_TCP) type = "TCP"; - else if (con->rcv.proto == PROTO_TCP) + else if (con->rcv.proto == PROTO_TLS) type = "TLS"; + else if (con->rcv.proto == PROTO_WSS) + type = "WSS"; + else if (con->rcv.proto == PROTO_WS) + type = "WS"; else type = "UNKNOWN";
@@ -812,11 +816,12 @@ static void core_tcp_list(rpc_t* rpc, void* c) default: state = "UNKNOWN"; } - rpc->struct_add(handle, "dssdsdsd", + rpc->struct_add(handle, "dssddsdsd", "id", con->id, "type", type, "state", state, "timeout", timeout, + "ref_count", con->refcnt, "src_ip", src_ip, "src_port", con->rcv.src_port, "dst_ip", dst_ip,