diff netio.h @ 1033:ca71904cf3ee fastopen

Fixes for backwards compatibility
author Matt Johnston <matt@ucc.asn.au>
date Fri, 20 Feb 2015 23:38:05 +0800
parents 0da8ba489c23
children c2a50c9f509e
line wrap: on
line diff
--- a/netio.h	Fri Feb 20 23:16:38 2015 +0800
+++ b/netio.h	Fri Feb 20 23:38:05 2015 +0800
@@ -42,5 +42,17 @@
 struct iovec * packet_queue_to_iovec(struct Queue *queue, int *ret_iov_count);
 void packet_queue_consume(struct Queue *queue, ssize_t written);
 
+#ifdef DROPBEAR_TCP_FAST_OPEN
+/* Try for any Linux builds, will fall back if the kernel doesn't support it */
+void set_listen_fast_open(int sock);
+/* Define values which may be supported by the kernel even if the libc is too old */
+#ifndef TCP_FASTOPEN
+#define TCP_FASTOPEN 23
+#endif
+#ifndef MSG_FASTOPEN
+#define MSG_FASTOPEN 0x20000000
+#endif
 #endif
 
+#endif
+