Module: sip-router
Branch: master
Commit: 93b2b3ba7951bc84a208fb296b3c7b4e52516389
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=93b2b3b…
Author: Richard Fuchs <rfuchs(a)sipwise.com>
Committer: Richard Fuchs <rfuchs(a)sipwise.com>
Date: Tue Mar 12 09:43:57 2013 -0400
nathelper: Decrease ambiguity by renaming sipping_disable_bflag to natping_disable_bflag
---
modules/nathelper/README | 60 ++++++++++++++--------------
modules/nathelper/doc/nathelper_admin.xml | 44 ++++++++++----------
modules/nathelper/nathelper.c | 8 ++--
3 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/modules/nathelper/README b/modules/nathelper/README
index 6328cb8..da8523b 100644
--- a/modules/nathelper/README
+++ b/modules/nathelper/README
@@ -53,9 +53,9 @@ Ovidiu Sas
4.5. natping_socket (string)
4.6. received_avp (str)
4.7. sipping_bflag (integer)
- 4.8. sipping_disable_bflag (integer)
- 4.9. sipping_from (string)
- 4.10. sipping_method (string)
+ 4.8. sipping_from (string)
+ 4.9. sipping_method (string)
+ 4.10. natping_disable_bflag (integer)
4.11. nortpproxy_str (string)
4.12. keepalive_timeout (int)
@@ -94,9 +94,9 @@ Ovidiu Sas
1.5. Set natping_socket parameter
1.6. Set received_avp parameter
1.7. Set sipping_bflag parameter
- 1.8. Set sipping_disable_bflag parameter
- 1.9. Set sipping_from parameter
- 1.10. Set sipping_method parameter
+ 1.8. Set sipping_from parameter
+ 1.9. Set sipping_method parameter
+ 1.10. Set natping_disable_bflag parameter
1.11. Set nortpproxy_str parameter
1.12. Set keepalive_timeout parameter
1.13. fix_nated_contact usage
@@ -130,9 +130,9 @@ Chapter 1. Admin Guide
4.5. natping_socket (string)
4.6. received_avp (str)
4.7. sipping_bflag (integer)
- 4.8. sipping_disable_bflag (integer)
- 4.9. sipping_from (string)
- 4.10. sipping_method (string)
+ 4.8. sipping_from (string)
+ 4.9. sipping_method (string)
+ 4.10. natping_disable_bflag (integer)
4.11. nortpproxy_str (string)
4.12. keepalive_timeout (int)
@@ -229,9 +229,9 @@ Chapter 1. Admin Guide
4.5. natping_socket (string)
4.6. received_avp (str)
4.7. sipping_bflag (integer)
- 4.8. sipping_disable_bflag (integer)
- 4.9. sipping_from (string)
- 4.10. sipping_method (string)
+ 4.8. sipping_from (string)
+ 4.9. sipping_method (string)
+ 4.10. natping_disable_bflag (integer)
4.11. nortpproxy_str (string)
4.12. keepalive_timeout (int)
@@ -335,21 +335,7 @@ modparam("nathelper", "received_avp",
"$avp(i:42)")
modparam("nathelper", "sipping_bflag", 7)
...
-4.8. sipping_disable_bflag (integer)
-
- What branch flag should be used by the module to disable NAT pings on a
- per-registration basis. If the given flag is set for a particular
- registration, then no NAT pings will be sent at all, regardless of any
- other conditions.
-
- Default value is -1 (disabled).
-
- Example 1.8. Set sipping_disable_bflag parameter
-...
-modparam("nathelper", "sipping_disable_bflag", 8)
-...
-
-4.9. sipping_from (string)
+4.8. sipping_from (string)
The parameter sets the SIP URI to be used in generating the SIP
requests for NAT ping purposes. To enable the SIP request pinging
@@ -358,23 +344,37 @@ modparam("nathelper", "sipping_disable_bflag",
8)
Default value is “NULL”.
- Example 1.9. Set sipping_from parameter
+ Example 1.8. Set sipping_from parameter
...
modparam("nathelper", "sipping_from",
"sip:pinger@siphub.net")
...
-4.10. sipping_method (string)
+4.9. sipping_method (string)
The parameter sets the SIP method to be used in generating the SIP
requests for NAT ping purposes.
Default value is “OPTIONS”.
- Example 1.10. Set sipping_method parameter
+ Example 1.9. Set sipping_method parameter
...
modparam("nathelper", "sipping_method", "INFO")
...
+4.10. natping_disable_bflag (integer)
+
+ What branch flag should be used by the module to disable NAT pings on a
+ per-registration basis. If the given flag is set for a particular
+ registration, then no NAT pings will be sent at all, regardless of any
+ other conditions.
+
+ Default value is -1 (disabled).
+
+ Example 1.10. Set natping_disable_bflag parameter
+...
+modparam("nathelper", "natping_disable_bflag", 8)
+...
+
4.11. nortpproxy_str (string)
The parameter sets the SDP attribute used by nathelper to mark the
diff --git a/modules/nathelper/doc/nathelper_admin.xml
b/modules/nathelper/doc/nathelper_admin.xml
index 642bf63..e052eb9 100644
--- a/modules/nathelper/doc/nathelper_admin.xml
+++ b/modules/nathelper/doc/nathelper_admin.xml
@@ -286,28 +286,6 @@ modparam("nathelper", "sipping_bflag", 7)
</example>
</section>
<section>
- <title><varname>sipping_disable_bflag</varname>
(integer)</title>
- <para>
- What branch flag should be used by the module to disable NAT pings
- on a per-registration basis. If the given flag is set for a
- particular registration, then no NAT pings will be sent at all,
- regardless of any other conditions.
- </para>
- <para>
- <emphasis>
- Default value is -1 (disabled).
- </emphasis>
- </para>
- <example>
- <title>Set <varname>sipping_disable_bflag</varname>
parameter</title>
- <programlisting format="linespecific">
-...
-modparam("nathelper", "sipping_disable_bflag", 8)
-...
-</programlisting>
- </example>
- </section>
- <section>
<title><varname>sipping_from</varname> (string)</title>
<para>
The parameter sets the SIP URI to be used in generating the SIP
@@ -350,6 +328,28 @@ modparam("nathelper", "sipping_method",
"INFO")
</example>
</section>
<section>
+ <title><varname>natping_disable_bflag</varname>
(integer)</title>
+ <para>
+ What branch flag should be used by the module to disable NAT pings
+ on a per-registration basis. If the given flag is set for a
+ particular registration, then no NAT pings will be sent at all,
+ regardless of any other conditions.
+ </para>
+ <para>
+ <emphasis>
+ Default value is -1 (disabled).
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>natping_disable_bflag</varname>
parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("nathelper", "natping_disable_bflag", 8)
+...
+</programlisting>
+ </example>
+ </section>
+ <section>
<title><varname>nortpproxy_str</varname> (string)</title>
<para>
The parameter sets the SDP attribute used by nathelper to mark
diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index b170ecc..0c1c677 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -339,7 +339,7 @@ static const char sbuf[4] = {0, 0, 0, 0};
static char *force_socket_str = 0;
static pid_t mypid;
static int sipping_flag = -1;
-static int sipping_disable_flag = -1;
+static int natping_disable_flag = -1;
static int natping_processes = 1;
static str nortpproxy_str = str_init("a=nortpproxy:yes");
@@ -413,7 +413,7 @@ static param_export_t params[] = {
{"sipping_from", STR_PARAM, &sipping_from.s },
{"sipping_method", STR_PARAM, &sipping_method.s },
{"sipping_bflag", INT_PARAM, &sipping_flag },
- {"sipping_disable_bflag", INT_PARAM, &sipping_disable_flag },
+ {"natping_disable_bflag", INT_PARAM, &natping_disable_flag },
{"natping_processes", INT_PARAM, &natping_processes },
{"natping_socket", STR_PARAM, &natping_socket },
{"keepalive_timeout", INT_PARAM, &nh_keepalive_timeout },
@@ -678,7 +678,7 @@ mod_init(void)
}
sipping_flag = (sipping_flag==-1)?0:(1<<sipping_flag);
- sipping_disable_flag = (sipping_disable_flag==-1)?0:(1<<sipping_disable_flag);
+ natping_disable_flag = (natping_disable_flag==-1)?0:(1<<natping_disable_flag);
/* set reply function if SIP natping is enabled */
if (sipping_flag) {
@@ -1997,7 +1997,7 @@ nh_timer(unsigned int ticks, void *timer_idx)
memcpy( &aorhash, cp, sizeof(aorhash));
cp = (char*)cp + sizeof(aorhash);
- if ((flags & sipping_disable_flag)) /* always 0 if sipping_disable_flag not set */
+ if ((flags & natping_disable_flag)) /* always 0 if natping_disable_flag not set */
continue;
/* determin the destination */