Mercurial > dropbear
comparison dbutil.h @ 1028:5ad81aa19c2d fastopen
fallback for old glibc and fastopen
memset rather than = {0} initialiser
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 19 Feb 2015 22:33:51 +0800 |
parents | daf21fd50abf |
children | 0da8ba489c23 |
comparison
equal
deleted
inserted
replaced
1027:daf21fd50abf | 1028:5ad81aa19c2d |
---|---|
78 void set_sock_priority(int sock, enum dropbear_prio prio); | 78 void set_sock_priority(int sock, enum dropbear_prio prio); |
79 | 79 |
80 #if defined(__linux__) && HAVE_SENDMSG | 80 #if defined(__linux__) && HAVE_SENDMSG |
81 #define DROPBEAR_TCP_FAST_OPEN | 81 #define DROPBEAR_TCP_FAST_OPEN |
82 void set_listen_fast_open(int sock); | 82 void set_listen_fast_open(int sock); |
83 /* may be supported by kernel but not libc */ | |
84 #ifndef TCP_FASTOPEN | |
85 #define TCP_FASTOPEN 23 | |
86 #endif | |
87 #ifndef MSG_FASTOPEN | |
88 #define MSG_FASTOPEN 0x20000000 | |
89 #endif | |
83 #endif | 90 #endif |
84 | 91 |
85 int dropbear_listen(const char* address, const char* port, | 92 int dropbear_listen(const char* address, const char* port, |
86 int *socks, unsigned int sockcount, char **errstring, int *maxfd); | 93 int *socks, unsigned int sockcount, char **errstring, int *maxfd); |
87 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data, | 94 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data, |