summaryrefslogtreecommitdiff
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 dfe21fa1c..fd7a32259 100644
--- a/packet.c
+++ b/packet.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: packet.c,v 1.22 2000/05/07 02:03:17 damien Exp $"); 20RCSID("$Id: packet.c,v 1.23 2000/05/17 12:53:35 damien Exp $");
21 21
22#include "xmalloc.h" 22#include "xmalloc.h"
23#include "buffer.h" 23#include "buffer.h"
@@ -1237,10 +1237,12 @@ packet_set_interactive(int interactive, int keepalives)
1237 * Set IP options for an interactive connection. Use 1237 * Set IP options for an interactive connection. Use
1238 * IPTOS_LOWDELAY and TCP_NODELAY. 1238 * IPTOS_LOWDELAY and TCP_NODELAY.
1239 */ 1239 */
1240#ifdef IP_TOS
1240 int lowdelay = IPTOS_LOWDELAY; 1241 int lowdelay = IPTOS_LOWDELAY;
1241 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay, 1242 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay,
1242 sizeof(lowdelay)) < 0) 1243 sizeof(lowdelay)) < 0)
1243 error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); 1244 error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno));
1245#endif
1244 if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on, 1246 if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on,
1245 sizeof(on)) < 0) 1247 sizeof(on)) < 0)
1246 error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); 1248 error("setsockopt TCP_NODELAY: %.100s", strerror(errno));
@@ -1249,10 +1251,12 @@ packet_set_interactive(int interactive, int keepalives)
1249 * Set IP options for a non-interactive connection. Use 1251 * Set IP options for a non-interactive connection. Use
1250 * IPTOS_THROUGHPUT. 1252 * IPTOS_THROUGHPUT.
1251 */ 1253 */
1254#ifdef IP_TOS
1252 int throughput = IPTOS_THROUGHPUT; 1255 int throughput = IPTOS_THROUGHPUT;
1253 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput, 1256 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput,
1254 sizeof(throughput)) < 0) 1257 sizeof(throughput)) < 0)
1255 error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno)); 1258 error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno));
1259#endif
1256 } 1260 }
1257} 1261}
1258 1262