summaryrefslogtreecommitdiff
path: root/netio.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-02-20 23:38:05 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-02-20 23:38:05 +0800
commit996be37485de0029912fd91ebcfcfd84ddec46a1 (patch)
treef47101175b60188d53fdef8dc657e29ff18291f8 /netio.h
parentc7b7e89f7568626e4f2ce59b24636df31667fa64 (diff)
downloaddropbear-996be37485de0029912fd91ebcfcfd84ddec46a1.tar.gz
Fixes for backwards compatibility
Diffstat (limited to 'netio.h')
-rw-r--r--netio.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/netio.h b/netio.h
index 3c98d6c..280ccaf 100644
--- a/netio.h
+++ b/netio.h
@@ -42,5 +42,17 @@ void connect_set_writequeue(struct dropbear_progress_connection *c, struct Queue
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