*/
#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 <netinet/in_systm.h>
+#include <netinet/ip.h>
#include "xmalloc.h"
#include "buffer.h"
return (cipher_get_keyiv_len(cc));
}
+
void
packet_set_iv(int mode, u_char *dat)
{
cipher_set_keyiv(cc, dat);
}
+
int
packet_get_ssh1_cipher(void)
{
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)
{
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.
*/
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
break;
default:
return type;
- break;
}
} else {
type = packet_read_poll1();
if (type)
DBG(debug("received packet type %d", type));
return type;
- break;
}
}
}
/* 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);
}