From ab7bf76e8d7cce405d4a90b727cde6be67015c4a Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Wed, 27 Jan 2016 19:26:46 +0200 Subject: [PATCH 1/4] tcp: use macros from netinet/tcp.h to detect TCP feature makes tcpops module usable on FreeBSD 10 --- tcp_options.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tcp_options.h b/tcp_options.h index f3b181d8600..7a134aeab45 100644 --- a/tcp_options.h +++ b/tcp_options.h @@ -74,24 +74,24 @@ /* keepintvl */ #ifndef NO_TCP_KEEPINTVL -#ifdef __OS_linux +#ifdef TCP_KEEPINTVL #define HAVE_TCP_KEEPINTVL -#endif /* __OS_ */ -#endif /* NO_TCP_KEEPIDLE */ +#endif /* TCP_KEEPINTVL */ +#endif /* NO_TCP_KEEPINTVL */ /* keepidle */ #ifndef NO_TCP_KEEPIDLE -#ifdef __OS_linux +#ifdef TCP_KEEPIDLE #define HAVE_TCP_KEEPIDLE -#endif /* __OS_*/ +#endif /* TCP_KEEPIDLE*/ #endif /* NO_TCP_KEEPIDLE */ /* keepcnt */ #ifndef NO_TCP_KEEPCNT -#ifdef __OS_linux +#ifdef TCP_KEEPCNT #define HAVE_TCP_KEEPCNT -#endif /* __OS_ */ +#endif /* TCP_KEEPCNT */ #endif /* NO_TCP_KEEPCNT */ From 957e8a04f798b9c30964005bdaedd895bd62f46f Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Wed, 27 Jan 2016 19:22:41 +0200 Subject: [PATCH 2/4] modules/tcpops: fix documentation typo --- modules/tcpops/doc/functions.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/tcpops/doc/functions.xml b/modules/tcpops/doc/functions.xml index b7b98429e88..937018acc57 100644 --- a/modules/tcpops/doc/functions.xml +++ b/modules/tcpops/doc/functions.xml @@ -18,7 +18,7 @@ Meaning of the parameters is as follows: - conid (optionnal): the Kamailio internal + conid (optional): the Kamailio internal connection id (as in the $conid pseudovariable). @@ -48,7 +48,7 @@ Meaning of the parameters is as follows: - conid (optionnal): the Kamailio internal + conid (optional): the Kamailio internal connection id (as in the $conid pseudovariable). @@ -83,7 +83,7 @@ Meaning of the parameters is as follows: - conid (optionnal): the kamailio internal + conid (optional): the kamailio internal connection id on which TCP keepalive will be enabled. If no parameter is given, the keepalive mechanism will be enabled on the current message source connection. @@ -140,7 +140,7 @@ onreply_route[foo] { Meaning of the parameters is as follows: - conid (optionnal): the kamailio internal + conid (optional): the kamailio internal connection id on which TCP keepalive will be disabled. If no parameter is given, the keepalive mechanism will be disabled on the current message source connection. @@ -181,7 +181,7 @@ onreply_route[foo] { Meaning of the parameters is as follows: - conid (optionnal): the kamailio internal + conid (optional): the kamailio internal connection id on which to set the new lifetime. If no parameter is given, it will be set on the current message source connection. From bb1f0472614186e933c2caa002c151cf64b60756 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Wed, 27 Jan 2016 19:45:12 +0200 Subject: [PATCH 3/4] modules/tcpops: update list of platforms --- modules/tcpops/doc/tcpops.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tcpops/doc/tcpops.xml b/modules/tcpops/doc/tcpops.xml index f142b7d5396..e4137e0f84e 100644 --- a/modules/tcpops/doc/tcpops.xml +++ b/modules/tcpops/doc/tcpops.xml @@ -45,7 +45,7 @@ Note: the keepalive functions only work on systems with the HAVE_TCP_KEEPIDLE, HAVE_TCP_KEEPCNT and HAVE_TCP_KEEPINTVL macros defined - (currently only Linux). + (Linux, FreeBSD, DragonFly BSD, NetBSD). From 6627098eb4adad706d20f6b73d1b7e75cc08a21f Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Fri, 29 Jan 2016 14:55:34 +0200 Subject: [PATCH 4/4] tcp: include netinet/tcp.h to make certain macros available Following are tested: TCP_KEEPINTVL, TCP_KEEPIDLE, TCP_KEEPCNT --- tcp_options.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tcp_options.h b/tcp_options.h index 7a134aeab45..d8da5f3295c 100644 --- a/tcp_options.h +++ b/tcp_options.h @@ -23,6 +23,7 @@ #ifdef USE_TCP +#include #ifndef NO_TCP_ASYNC #define TCP_ASYNC /* enabled async mode */ #endif