X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/07200973c579dac011b1214806cc4223dbfbf858..a7137f6b299bd3425e3a90c41206f804ebc71fbd:/packet.c diff --git a/packet.c b/packet.c index c855970f..ee936963 100644 --- a/packet.c +++ b/packet.c @@ -37,9 +37,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: packet.c,v 1.118 2005/07/25 11:59:39 markus Exp $"); - + #include "openbsd-compat/sys-queue.h" +#include +#include #include "xmalloc.h" #include "buffer.h" @@ -258,6 +259,7 @@ packet_get_keyiv_len(int mode) return (cipher_get_keyiv_len(cc)); } + void packet_set_iv(int mode, u_char *dat) { @@ -270,6 +272,7 @@ packet_set_iv(int mode, u_char *dat) cipher_set_keyiv(cc, dat); } + int packet_get_ssh1_cipher(void) { @@ -471,31 +474,37 @@ packet_put_char(int value) buffer_append(&outgoing_packet, &ch, 1); } + void packet_put_int(u_int value) { buffer_put_int(&outgoing_packet, value); } + void packet_put_string(const void *buf, u_int len) { buffer_put_string(&outgoing_packet, buf, len); } + void packet_put_cstring(const char *str) { buffer_put_cstring(&outgoing_packet, str); } + void packet_put_raw(const void *buf, u_int len) { buffer_append(&outgoing_packet, buf, len); } + void packet_put_bignum(BIGNUM * value) { buffer_put_bignum(&outgoing_packet, value); } + void packet_put_bignum2(BIGNUM * value) { @@ -572,7 +581,7 @@ packet_send1(void) buffer_clear(&outgoing_packet); /* - * Note that the packet is now only buffered in output. It won\'t be + * Note that the packet is now only buffered in output. It won't be * actually sent until packet_write_wait or packet_write_poll is * called. */ @@ -671,6 +680,7 @@ packet_enable_delayed_compress(void) for (mode = 0; mode < MODE_MAX; mode++) { comp = &newkeys[mode]->comp; if (comp && !comp->enabled && comp->type == COMP_DELAYED) { + packet_init_compression(); if (mode == MODE_OUT) buffer_compress_init_send(6); else @@ -1186,7 +1196,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p) break; default: return type; - break; } } else { type = packet_read_poll1(); @@ -1209,7 +1218,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p) if (type) DBG(debug("received packet type %d", type)); return type; - break; } } } @@ -1479,8 +1487,7 @@ packet_set_interactive(int interactive) /* Only set socket options if using a socket. */ if (!packet_connection_is_on_socket()) return; - if (interactive) - set_nodelay(connection_in); + set_nodelay(connection_in); packet_set_tos(interactive); }