diff options
author | James Yonan <james@openvpn.net> | 2011-08-19 03:15:25 +0000 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-08-24 14:05:13 +0200 |
commit | ca18a638aa7cf316611f893127ba44131e57083c (patch) | |
tree | 3cc5ffb833fc154b050d9963ca6ee8252db77190 /multi.c | |
parent | 2627335ac2605d0987a68ce97a0a2c4efbe25159 (diff) | |
download | openvpn-ca18a638aa7cf316611f893127ba44131e57083c.tar.gz openvpn-ca18a638aa7cf316611f893127ba44131e57083c.tar.xz openvpn-ca18a638aa7cf316611f893127ba44131e57083c.zip |
"status" management interface command (version >= 2) will now
include the username for each connected user. This should
generally be backward compatible with existing management
interface clients since the new username field is added
to the CLIENT_LIST header as well.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7539 e7ae566f-a301-0410-adde-c780ea21d3b5
Conflicts:
multi.c - hash_iterator_init() takes only 2 arguments now.
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'multi.c')
-rw-r--r-- | multi.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -782,8 +782,8 @@ multi_print_status (struct multi_context *m, struct status_output *so, const int */ status_printf (so, "TITLE%c%s", sep, title_string); status_printf (so, "TIME%c%s%c%u", sep, time_string (now, 0, false, &gc_top), sep, (unsigned int)now); - status_printf (so, "HEADER%cCLIENT_LIST%cCommon Name%cReal Address%cVirtual Address%cBytes Received%cBytes Sent%cConnected Since%cConnected Since (time_t)", - sep, sep, sep, sep, sep, sep, sep, sep); + status_printf (so, "HEADER%cCLIENT_LIST%cCommon Name%cReal Address%cVirtual Address%cBytes Received%cBytes Sent%cConnected Since%cConnected Since (time_t)%cUsername", + sep, sep, sep, sep, sep, sep, sep, sep, sep); hash_iterator_init (m->hash, &hi); while ((he = hash_iterator_next (&hi))) { @@ -792,14 +792,15 @@ multi_print_status (struct multi_context *m, struct status_output *so, const int if (!mi->halt) { - status_printf (so, "CLIENT_LIST%c%s%c%s%c%s%c" counter_format "%c" counter_format "%c%s%c%u", + status_printf (so, "CLIENT_LIST%c%s%c%s%c%s%c" counter_format "%c" counter_format "%c%s%c%u%c%s", sep, tls_common_name (mi->context.c2.tls_multi, false), sep, mroute_addr_print (&mi->real, &gc), sep, print_in_addr_t (mi->reporting_addr, IA_EMPTY_IF_UNDEF, &gc), sep, mi->context.c2.link_read_bytes, sep, mi->context.c2.link_write_bytes, sep, time_string (mi->created, 0, false, &gc), - sep, (unsigned int)mi->created); + sep, (unsigned int)mi->created, + sep, tls_username (mi->context.c2.tls_multi, false)); } gc_free (&gc); } |