Skip to content

Commit

Permalink
Merge pull request #491 from mslehto/bsdtcpops
Browse files Browse the repository at this point in the history
Make tcpops module usable on BSD
  • Loading branch information
camilleoudot committed Jan 29, 2016
2 parents 868bf24 + 6627098 commit 094613b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
10 changes: 5 additions & 5 deletions modules/tcpops/doc/functions.xml
Expand Up @@ -18,7 +18,7 @@
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>conid</emphasis> (optionnal): the Kamailio internal
<para><emphasis>conid</emphasis> (optional): the Kamailio internal
connection id (as in the <emphasis>$conid</emphasis> pseudovariable).
</para>
</listitem>
Expand Down Expand Up @@ -48,7 +48,7 @@
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>conid</emphasis> (optionnal): the Kamailio internal
<para><emphasis>conid</emphasis> (optional): the Kamailio internal
connection id (as in the <emphasis>$conid</emphasis> pseudovariable).
</para>
</listitem>
Expand Down Expand Up @@ -83,7 +83,7 @@
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>conid</emphasis> (optionnal): the kamailio internal
<para><emphasis>conid</emphasis> (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.
Expand Down Expand Up @@ -140,7 +140,7 @@ onreply_route[foo] {
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>conid</emphasis> (optionnal): the kamailio internal
<para><emphasis>conid</emphasis> (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.
Expand Down Expand Up @@ -181,7 +181,7 @@ onreply_route[foo] {
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>conid</emphasis> (optionnal): the kamailio internal
<para><emphasis>conid</emphasis> (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.
</para>
Expand Down
2 changes: 1 addition & 1 deletion modules/tcpops/doc/tcpops.xml
Expand Up @@ -45,7 +45,7 @@
<para>
<emphasis>Note</emphasis>: 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).
</para>
</section>

Expand Down
15 changes: 8 additions & 7 deletions tcp_options.h
Expand Up @@ -23,6 +23,7 @@

#ifdef USE_TCP

#include <netinet/tcp.h>
#ifndef NO_TCP_ASYNC
#define TCP_ASYNC /* enabled async mode */
#endif
Expand Down Expand Up @@ -74,24 +75,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 */


Expand Down

0 comments on commit 094613b

Please sign in to comment.