summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-06-21 18:53:53 +1000
committerDarren Tucker <dtucker@zip.com.au>2009-06-21 18:53:53 +1000
commitc5564e1c4c41ae9af96973e2996e2a4285acbae8 (patch)
treef9fae51c40975704cc73af6073914b00821e3009 /monitor.c
parent1cc55d7a607455d75db0204b5acebce47667b0f8 (diff)
- andreas@cvs.openbsd.org 2009/05/28 16:50:16
[sshd.c packet.c serverloop.c monitor_wrap.c clientloop.c sshconnect.c monitor.c Added roaming.h roaming_common.c roaming_dummy.c] Keep track of number of bytes read and written. Needed for upcoming changes. Most code from Martin Forssen, maf at appgate dot com. ok markus@ Also, applied appropriate changes to Makefile.in
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 61242e6d..36a9e1dc 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.102 2009/05/25 06:48:01 andreas Exp $ */
+/* $OpenBSD: monitor.c,v 1.103 2009/05/28 16:50:16 andreas Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -125,6 +125,8 @@ struct {
u_int ilen;
u_char *output;
u_int olen;
+ u_int64_t sent_bytes;
+ u_int64_t recv_bytes;
} child_state;
/* Functions on the monitor that answer unprivileged requests */
@@ -1679,6 +1681,10 @@ monitor_apply_keystate(struct monitor *pmonitor)
child_state.olen);
memset(child_state.output, 0, child_state.olen);
xfree(child_state.output);
+
+ /* Roaming */
+ if (compat20)
+ roam_set_bytes(child_state.sent_bytes, child_state.recv_bytes);
}
static Kex *
@@ -1794,6 +1800,12 @@ mm_get_keystate(struct monitor *pmonitor)
child_state.input = buffer_get_string(&m, &child_state.ilen);
child_state.output = buffer_get_string(&m, &child_state.olen);
+ /* Roaming */
+ if (compat20) {
+ child_state.sent_bytes = buffer_get_int64(&m);
+ child_state.recv_bytes = buffer_get_int64(&m);
+ }
+
buffer_free(&m);
}