summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/packet.c
diff options
context:
space:
mode:
authorAndreas Gunnarsson <andreas@cvs.openbsd.org>2009-05-27 06:36:08 +0000
committerAndreas Gunnarsson <andreas@cvs.openbsd.org>2009-05-27 06:36:08 +0000
commit562c9dda1d71bc6ac3940b83046a639f51284569 (patch)
tree95d2acac808b8380e7792143dc7c287af5bd8855 /usr.bin/ssh/packet.c
parentbe16f61d021eb0ed2f1fb2d2ef0d99d4b084f4f8 (diff)
Add packet_put_int64() and packet_get_int64(), part of a larger change
from Martin Forssen. ok markus@
Diffstat (limited to 'usr.bin/ssh/packet.c')
-rw-r--r--usr.bin/ssh/packet.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 6869d86d586..8a3b1e124eb 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.161 2009/05/25 06:48:01 andreas Exp $ */
+/* $OpenBSD: packet.c,v 1.162 2009/05/27 06:36:07 andreas Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -587,6 +587,12 @@ packet_put_int(u_int value)
}
void
+packet_put_int64(u_int64_t value)
+{
+ buffer_put_int64(&active_state->outgoing_packet, value);
+}
+
+void
packet_put_string(const void *buf, u_int len)
{
buffer_put_string(&active_state->outgoing_packet, buf, len);
@@ -1457,6 +1463,14 @@ packet_get_int(void)
return buffer_get_int(&active_state->incoming_packet);
}
+/* Returns an 64 bit integer from the packet data. */
+
+u_int64_t
+packet_get_int64(void)
+{
+ return buffer_get_int64(&active_state->incoming_packet);
+}
+
/*
* Returns an arbitrary precision integer from the packet data. The integer
* must have been initialized before this call.