Module: sip-router Branch: master Commit: d4f64eb262f73e316772955afc4153b84ba74954 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d4f64eb2...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Fri Feb 8 21:41:11 2013 +0100
maxfwd Update README, fix typos
---
modules/maxfwd/README | 29 +++++++++++++++++------------ modules/maxfwd/doc/maxfwd_admin.xml | 16 +++++++++++----- 2 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/modules/maxfwd/README b/modules/maxfwd/README index dd14e67..845a855 100644 --- a/modules/maxfwd/README +++ b/modules/maxfwd/README @@ -65,9 +65,14 @@ Chapter 1. Admin Guide
1. Overview
- The module implements all the operations regarding MaX-Forward header - field, like adding it (if not present) or decrementing and checking the - value of the existent one. + The module implements all of the operations that handle the Max-Forward + SIP header field, like adding it (if not present) or decrementing and + checking the value of the existent one. + + The SIP Max-Forward header is used to prevent loops in a SIP network. + Every server that process and forward a SIP request lowers the + Max-Forward value with one. When the value reaches zero, the request is + not forwarded and an error response is sent to the UAC.
2. Dependencies
@@ -99,7 +104,7 @@ Chapter 1. Admin Guide Note: This check is done when calling the maxfwd_process() function.
The range of values stretches from 1 to 256, which is the maximum - MAX-FORWARDS value allowed by RFC 3261. Its value can be changed at + MAX-FORWARDS value allowed by RFC 3261. The value can be changed at runtime.
Default value is "256". @@ -118,14 +123,14 @@ modparam("maxfwd", "max_limit", 32) 4.5. maxfwd_at_least(max_value) 4.6. mf_lowlimit(max_value)
-4.1. maxfwd_process(max_value) +4.1. maxfwd_process(max_value)
If no Max-Forward header is present in the received request, a header will be added having the original value equal with "max_value". If a Max-Forward header is already present, its value will be decremented (if not 0). The parameter can be a variable.
- Retuning codes: + Return codes: * 2 (true) - header was not found and a new header was succesfully added. * 1 (true) - header was found and its value was successfully @@ -153,15 +158,15 @@ if (!maxfwd_process("10") && $retcode==-1) { }; ...
-4.2. mf_process_maxfwd_header(max_value) +4.2. mf_process_maxfwd_header(max_value)
Same as maxfwd_process(max_value).
-4.3. process_maxfwd(max_value) +4.3. process_maxfwd(max_value)
Same as maxfwd_process(max_value).
-4.4. is_maxfwd_lt(max_value) +4.4. is_maxfwd_lt(max_value)
Checks if the Max-Forward header value is less then the "max_value" parameter value. It considers also the value of the new inserted header @@ -184,7 +189,7 @@ if (!maxfwd_process("10") && $retcode==-1) {
Example 1.3. is_maxfwd_lt usage ... -# next hope is a gateway, so make no sens to +# next hop is a gateway, so make no sense to # forward if MF is 0 (after decrement) if ( is_maxfwd_lt("1") ) { sl_send_reply("483","Too Many Hops"); @@ -192,10 +197,10 @@ if ( is_maxfwd_lt("1") ) { }; ...
-4.5. maxfwd_at_least(max_value) +4.5. maxfwd_at_least(max_value)
Same as is_maxfwd_lt(max_value).
-4.6. mf_lowlimit(max_value) +4.6. mf_lowlimit(max_value)
Same as is_maxfwd_lt(max_value). diff --git a/modules/maxfwd/doc/maxfwd_admin.xml b/modules/maxfwd/doc/maxfwd_admin.xml index 4f75bb2..5fbdc9f 100644 --- a/modules/maxfwd/doc/maxfwd_admin.xml +++ b/modules/maxfwd/doc/maxfwd_admin.xml @@ -16,10 +16,16 @@ <section> <title>Overview</title> <para> - The module implements all the operations regarding MaX-Forward header - field, like adding it (if not present) or decrementing and checking + The module implements all of the operations that handle the Max-Forward + SIP header field, like adding it (if not present) or decrementing and checking the value of the existent one. </para> + <para> + The SIP Max-Forward header is used to prevent loops in a SIP network. + Every server that process and forward a SIP request lowers the Max-Forward + value with one. When the value reaches zero, the request is not forwarded + and an error response is sent to the UAC. + </para> </section> <section> <title>Dependencies</title> @@ -67,7 +73,7 @@ </para> <para> The range of values stretches from 1 to 256, which is the maximum - MAX-FORWARDS value allowed by RFC 3261. Its value can be changed at + MAX-FORWARDS value allowed by RFC 3261. The value can be changed at runtime. </para> <para> @@ -100,7 +106,7 @@ modparam("maxfwd", "max_limit", 32) its value will be decremented (if not 0). The parameter can be a variable. </para> - <para>Retuning codes:</para> + <para>Return codes:</para> <itemizedlist> <listitem> <para><emphasis>2 (true)</emphasis> - header was not found and @@ -218,7 +224,7 @@ if (!maxfwd_process("10") && $retcode==-1) { <title><function>is_maxfwd_lt</function> usage</title> <programlisting format="linespecific"> ... -# next hope is a gateway, so make no sens to +# next hop is a gateway, so make no sense to # forward if MF is 0 (after decrement) if ( is_maxfwd_lt("1") ) { sl_send_reply("483","Too Many Hops");