diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-06-24 14:42:28 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-29 08:52:44 -0500 |
commit | e15f4a992cd8c6fcec42bc00c85c2641a2fbcb14 (patch) | |
tree | 0029aef7dbe3c3cc1d9cf7d688b285013726eec4 /net.c | |
parent | b35725c544eca03f09783f03a677c9faa5658e2e (diff) |
Revert "User networking: Show active connections"
This reverts commit 1c6ed9f3379faac83da0ed3e95cbd49003ac0dd1.
It's redundant to slirp statistics, which are going to be split up /
reworked later on.
Conflicts:
monitor.c
net.c
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 44 |
1 files changed, 0 insertions, 44 deletions
@@ -756,45 +756,6 @@ static int net_slirp_init(VLANState *vlan, const char *model, const char *name, return 0; } -static void net_slirp_redir_print(void *opaque, int is_udp, - struct in_addr *laddr, u_int lport, - struct in_addr *faddr, u_int fport) -{ - Monitor *mon = (Monitor *)opaque; - uint32_t h_addr; - uint32_t g_addr; - char buf[16]; - - h_addr = ntohl(faddr->s_addr); - g_addr = ntohl(laddr->s_addr); - - monitor_printf(mon, " %s |", is_udp ? "udp" : "tcp" ); - snprintf(buf, 15, "%d.%d.%d.%d", (h_addr >> 24) & 0xff, - (h_addr >> 16) & 0xff, - (h_addr >> 8) & 0xff, - (h_addr) & 0xff); - monitor_printf(mon, " %15s |", buf); - monitor_printf(mon, " %5d |", fport); - - snprintf(buf, 15, "%d.%d.%d.%d", (g_addr >> 24) & 0xff, - (g_addr >> 16) & 0xff, - (g_addr >> 8) & 0xff, - (g_addr) & 0xff); - monitor_printf(mon, " %15s |", buf); - monitor_printf(mon, " %5d\n", lport); - -} - -static void net_slirp_redir_list(Monitor *mon) -{ - if (!mon) - return; - - monitor_printf(mon, " Prot | Host Addr | HPort | Guest Addr | GPort\n"); - monitor_printf(mon, " | | | | \n"); - slirp_redir_loop(net_slirp_redir_print, mon); -} - static void net_slirp_redir_rm(Monitor *mon, const char *port_str) { int host_port; @@ -904,11 +865,6 @@ void net_slirp_redir(Monitor *mon, const char *redir_str, const char *redir_opt2 return; } - if (!strcmp(redir_str, "list")) { - net_slirp_redir_list(mon); - return; - } - slirp_redirection(mon, redir_str); } |