Skip to content

Commit

Permalink
Merge pull request #2001 from alexyosifov/ipsec_tcp_multiple_conns
Browse files Browse the repository at this point in the history
Ipsec tcp multiple conns
  • Loading branch information
tdimitrov committed Jul 15, 2019
2 parents 9dab830 + 7dd380a commit 57961c9
Show file tree
Hide file tree
Showing 24 changed files with 1,282 additions and 268 deletions.
230 changes: 161 additions & 69 deletions src/modules/ims_ipsec_pcscf/cmd.c

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/modules/ims_ipsec_pcscf/cmd.h
Expand Up @@ -3,6 +3,7 @@
*
* Copyright (C) 2012 Smile Communications, jason.penton@smilecoms.com
* Copyright (C) 2012 Smile Communications, richard.good@smilecoms.com
*
* The initial version of this code was written by Dragos Vingarzan
* (dragos(dot)vingarzan(at)fokus(dot)fraunhofer(dot)de and the
Expand Down Expand Up @@ -46,12 +47,23 @@
#ifndef IPSEC_CMD_H
#define IPSEC_CMD_H

typedef void (*contact_expired_t)(pcontact_t* c, int type, void* param);

/*! ipsec pcscf API export structure */
typedef struct ipsec_pcscf_api {
contact_expired_t ipsec_on_expire;
} ipsec_pcscf_api_t;

/*! ipsec pcscf API export bind function */
typedef int (*bind_ipsec_pcscf_t)(ipsec_pcscf_api_t* api);

struct sip_msg;
struct udomain_t;

int ipsec_create(struct sip_msg* m, udomain_t* d);
int ipsec_forward(struct sip_msg* m, udomain_t* d);
int ipsec_destroy(struct sip_msg* m, udomain_t* d);
int ipsec_cleanall();
void ipsec_on_expire(pcontact_t* c, int type, void* param);

#endif /* IPSEC_CMD_H */
28 changes: 24 additions & 4 deletions src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
Expand Up @@ -82,9 +82,9 @@ modparam("ims_ipsec_pcscf", "ipsec_listen_addr6", "")
<section>
<title><varname>ipsec_client_port</varname> (int)</title>

<para>Port number which will be bound for incoming (server) IPSec traffic.</para>
<para>Start port number which will be bound for incoming (server) IPSec traffic.</para>

<para><emphasis>Default value is 5963.</emphasis></para>
<para><emphasis>Default value is 5062.</emphasis></para>

<example>
<title><varname>ipsec_client_port</varname> parameter usage</title>
Expand All @@ -100,7 +100,7 @@ modparam("ims_ipsec_pcscf", "ipsec_client_port", 5062)
<section>
<title><varname>ipsec_server_port</varname> (int)</title>

<para>Port number which will be bound for incoming (server) IPSec traffic.</para>
<para>Start port number which will be bound for incoming (server) IPSec traffic.</para>

<para><emphasis>Default value is 5063.</emphasis></para>

Expand All @@ -115,6 +115,26 @@ modparam("ims_ipsec_pcscf", "ipsec_server_port", 5063)
</example>
</section>

<section>
<title><varname>ipsec_max_connections</varname> (int)</title>

<para>Maximum IPSec connections for the process. E.g. if ipsec_client_port=5100, ipsec_server_port=6100 and
ipsec_max_connections=10, all client ports between 5100 and 5109 and all server ports between 6100 and 6109
will be used for maximum to 10 IPSec connections.</para>

<para><emphasis>Default value is 2.</emphasis></para>

<example>
<title><varname>ipsec_max_connections</varname> parameter usage</title>

<programlisting format="linespecific">
...
modparam("ims_ipsec_pcscf", "ipsec_max_connections", 10)
...
</programlisting>
</example>
</section>

<section>
<title><varname>ipsec_spi_id_start</varname> (int)</title>

Expand Down Expand Up @@ -227,7 +247,7 @@ ipsec_forward("location");
</listitem>
</itemizedlist>
<example>
<title>ipsec_forward</title>
<title>ipsec_destroy</title>

<programlisting format="linespecific">
...
Expand Down

0 comments on commit 57961c9

Please sign in to comment.