diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | packet.c | 16 | ||||
-rw-r--r-- | packet.h | 4 |
3 files changed, 24 insertions, 2 deletions
@@ -75,6 +75,12 @@ [packet.h packet.c] Add packet_put_int64() and packet_get_int64(), part of a larger change from Martin Forssen. + ok markus@ + - andreas@cvs.openbsd.org 2009/05/27 06:38:16 + [sshconnect.h sshconnect.c] + Un-static ssh_exchange_identification(), part of a larger change from + Martin Forssen and needed for upcoming changes. + ok markus@ 20090616 - (dtucker) [configure.ac defines.h] Bug #1607: handle the case where fsid_t @@ -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 @@ -596,6 +596,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); @@ -1467,6 +1473,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. @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.h,v 1.50 2009/05/25 06:48:01 andreas Exp $ */ +/* $OpenBSD: packet.h,v 1.51 2009/05/27 06:36:07 andreas Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -39,6 +39,7 @@ void packet_set_authenticated(void); void packet_start(u_char); void packet_put_char(int ch); void packet_put_int(u_int value); +void packet_put_int64(u_int64_t value); void packet_put_bignum(BIGNUM * value); void packet_put_bignum2(BIGNUM * value); void packet_put_string(const void *buf, u_int len); @@ -55,6 +56,7 @@ int packet_read_poll_seqnr(u_int32_t *seqnr_p); u_int packet_get_char(void); u_int packet_get_int(void); +u_int64_t packet_get_int64(void); void packet_get_bignum(BIGNUM * value); void packet_get_bignum2(BIGNUM * value); void *packet_get_raw(u_int *length_ptr); |