X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/a8a21a53bf8e9f5701c04c6229264a1329730220..69538b0c680486cc60423b48f419583a9e5b4650:/packet.h diff --git a/packet.h b/packet.h index 11e8be8c..151ca74a 100644 --- a/packet.h +++ b/packet.h @@ -1,3 +1,5 @@ +/* $OpenBSD: packet.h,v 1.34 2002/03/18 17:16:38 markus Exp $ */ + /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -11,8 +13,6 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: packet.h,v 1.29 2001/12/27 20:39:58 markus Exp $"); */ - #ifndef PACKET_H #define PACKET_H @@ -40,22 +40,32 @@ void packet_put_cstring(const char *str); void packet_put_raw(const void *buf, u_int len); void packet_send(void); -int packet_read(int *payload_len_ptr); -void packet_read_expect(int *payload_len_ptr, int type); -int packet_read_poll(int *packet_len_ptr); +int packet_read(void); +void packet_read_expect(int type); +int packet_read_poll(void); void packet_process_incoming(const char *buf, u_int len); -int packet_read_seqnr(int *payload_len_ptr, u_int32_t *seqnr_p); -int packet_read_poll_seqnr(int *packet_len_ptr, u_int32_t *seqnr_p); +int packet_read_seqnr(u_int32_t *seqnr_p); +int packet_read_poll_seqnr(u_int32_t *seqnr_p); u_int packet_get_char(void); u_int packet_get_int(void); -void packet_get_bignum(BIGNUM * value, int *length_ptr); -void packet_get_bignum2(BIGNUM * value, int *length_ptr); +void packet_get_bignum(BIGNUM * value); +void packet_get_bignum2(BIGNUM * value); void *packet_get_raw(int *length_ptr); void *packet_get_string(u_int *length_ptr); void packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2))); void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); +void set_newkeys(int mode); +int packet_get_keyiv_len(int); +void packet_get_keyiv(int, u_char *, u_int); +int packet_get_keycontext(int, u_char *); +void packet_set_keycontext(int, u_char *); +u_int32_t packet_get_seqnr(int); +void packet_set_seqnr(int, u_int32_t); +int packet_get_ssh1_cipher(void); +void packet_set_iv(int, u_char *); + void packet_write_poll(void); void packet_write_wait(void); int packet_have_data_to_write(void); @@ -74,7 +84,8 @@ extern int max_packet_size; int packet_set_maxsize(int); #define packet_get_maxsize() max_packet_size -#define packet_done() \ +/* don't allow remaining bytes after the end of the message */ +#define packet_check_eom() \ do { \ int _len = packet_remaining(); \ if (_len > 0) { \