Move TCP_FASTOPEN to netutils.h

This commit is contained in:
Max Lv
2016-08-08 12:59:33 +08:00
parent 1df8d06e3e
commit 6f65fedbbd
2 changed files with 22 additions and 21 deletions
-21
View File
@@ -22,27 +22,6 @@
#ifndef _COMMON_H
#define _COMMON_H
// only enable TCP_FASTOPEN on linux
#if defined(__linux__)
/* conditional define for TCP_FASTOPEN */
#ifndef TCP_FASTOPEN
#define TCP_FASTOPEN 23
#endif
/* conditional define for MSG_FASTOPEN */
#ifndef MSG_FASTOPEN
#define MSG_FASTOPEN 0x20000000
#endif
#elif !defined(__APPLE__)
#ifdef TCP_FASTOPEN
#undef TCP_FASTOPEN
#endif
#endif
#define DEFAULT_CONF_PATH "/etc/shadowsocks-libev/config.json"
#ifndef SOL_TCP
+22
View File
@@ -23,6 +23,28 @@
#ifndef _NETUTILS_H
#define _NETUTILS_H
// only enable TCP_FASTOPEN on linux
#if defined(__linux__)
/* conditional define for TCP_FASTOPEN */
#ifndef TCP_FASTOPEN
#define TCP_FASTOPEN 23
#endif
/* conditional define for MSG_FASTOPEN */
#ifndef MSG_FASTOPEN
#define MSG_FASTOPEN 0x20000000
#endif
#elif !defined(__APPLE__)
#ifdef TCP_FASTOPEN
#undef TCP_FASTOPEN
#endif
#endif
/* Define the flag MPTCP_ENABLED if not defined*/
#ifndef MPTCP_ENABLED
#define MPTCP_ENABLED 26