summaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-17 22:53:33 +1000
committerDamien Miller <djm@mindrot.org>2000-05-17 22:53:33 +1000
commit615f939ebb48fdde404aae705057202512731331 (patch)
treee07b9fd90a8f8cb58b4b687919bb849b97fe6fc9 /packet.c
parentdcb6ecd1b3b25b6909296ff0546ca6b18d0c19d3 (diff)
- Several patches from SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
- INSTALL typo and URL fix - Makefile fix - Solaris fixes - Checking for ssize_t and memmove. Based on patch from SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index dfe21fa1..fd7a3225 100644
--- a/packet.c
+++ b/packet.c
@@ -17,7 +17,7 @@
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.22 2000/05/07 02:03:17 damien Exp $");
+RCSID("$Id: packet.c,v 1.23 2000/05/17 12:53:35 damien Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -1237,10 +1237,12 @@ packet_set_interactive(int interactive, int keepalives)
* Set IP options for an interactive connection. Use
* IPTOS_LOWDELAY and TCP_NODELAY.
*/
+#ifdef IP_TOS
int lowdelay = IPTOS_LOWDELAY;
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay,
sizeof(lowdelay)) < 0)
error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno));
+#endif
if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on,
sizeof(on)) < 0)
error("setsockopt TCP_NODELAY: %.100s", strerror(errno));
@@ -1249,10 +1251,12 @@ packet_set_interactive(int interactive, int keepalives)
* Set IP options for a non-interactive connection. Use
* IPTOS_THROUGHPUT.
*/
+#ifdef IP_TOS
int throughput = IPTOS_THROUGHPUT;
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput,
sizeof(throughput)) < 0)
error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno));
+#endif
}
}