Module: sip-router Branch: master Commit: 0d41e1ba82c22a6e62f997add0a266ef4b2ed0ed URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0d41e1ba...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Mon Dec 17 20:42:47 2012 +0100
xprint: Change to docbook book, instead of section
---
modules/xprint/README | 95 +++++++++++++++++++--------------------- modules/xprint/doc/xprint.xml | 9 ++-- 2 files changed, 50 insertions(+), 54 deletions(-)
diff --git a/modules/xprint/README b/modules/xprint/README index 5eb945e..fb6de8b 100644 --- a/modules/xprint/README +++ b/modules/xprint/README @@ -1,43 +1,19 @@ -1. Xprint Module +The Xprint Module
Elena-Ramona Modroiu
Asipto
- Copyright © 2003 FhG FOKUS + Copyright � 2003 FhG FOKUS __________________________________________________________________
- 1.1. Overview - 1.2. Implemented Specifiers - 1.3. Parameters + List of Examples
- 1.3.1. buf_size (integer) + 1. Set buf_size parameter + 2. xplog usage + 3. xpdbg usage
- 1.4. Functions - - 1.4.1. xplog(level, format) - 1.4.2. xpdbg(format) - - 1.5. Module API - - 1.5.1. Functions - - 1.5.1.1. int xbind(xl_api_t *xl_api) - 1.5.1.2. int xparse(char *s, xl_elog_p *el) - 1.5.1.3. int shm_xparse(char *s, xl_elog_p *el) - 1.5.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - - 1.5.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb - cb) - - 1.5.1.6. xfree(xl_elog_p el) - 1.5.1.7. shm_xfree(xl_elog_p el) - 1.5.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char - *buf, int *len) - - 1.5.1.9. str *xnulstr() - -1.1. Overview +1. Overview
IMPORTANT: this is former xlog module from SIP Express Router (SER) kept because it is used by other modules via API to get the value for @@ -46,10 +22,10 @@ Elena-Ramona Modroiu
This module provides the possibility to print user formatted log or debug messages from SER scripts, similar to printf function but now a - specifier is replaced with a part of the SIP request. Section 1.2, - “Implemented Specifiers” shows what can be printed out. + specifier is replaced with a part of the SIP request. Section 2, + "Implemented Specifiers" shows what can be printed out.
-1.2. Implemented Specifiers +2. Implemented Specifiers
* %% : '%' * %br : request's first branch @@ -124,9 +100,11 @@ Elena-Ramona Modroiu E.g. %@ruri.user%|@%@ruri.host converts all featured request uri into user@host form only.
-1.3. Parameters +3. Parameters + + 3.1. buf_size (integer)
-1.3.1. buf_size (integer) +3.1. buf_size (integer)
Maximum size of the log message.
@@ -137,9 +115,12 @@ Elena-Ramona Modroiu modparam("xprint", "buf_size", 8192) ...
-1.4. Functions +4. Functions + + 4.1. xplog(level, format) + 4.2. xpdbg(format)
-1.4.1. xplog(level, format) +4.1. xplog(level, format)
Print a formated message using LOG function.
@@ -160,7 +141,7 @@ modparam("xprint", "buf_size", 8192) xplog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> 2nd via <%{via[1]}>\n"); ...
-1.4.2. xpdbg(format) +4.2. xpdbg(format)
Print a formatted message using DBG function.
@@ -172,11 +153,25 @@ xplog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> 2nd via <%{via[1]}>\n"); xpdbg("time [%Tf] method <%rm> r-uri <%ru>\n"); ...
-1.5. Module API +5. Module API + + 5.1. Functions + + 5.1.1. int xbind(xl_api_t *xl_api) + 5.1.2. int xparse(char *s, xl_elog_p *el) + 5.1.3. int shm_xparse(char *s, xl_elog_p *el) + 5.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 5.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 5.1.6. xfree(xl_elog_p el) + 5.1.7. shm_xfree(xl_elog_p el) + 5.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char *buf, + int *len) + + 5.1.9. str *xnulstr()
-1.5.1. Functions +5.1. Functions
-1.5.1.1. int xbind(xl_api_t *xl_api) +5.1.1. int xbind(xl_api_t *xl_api)
Bind to the xprint module API.
@@ -187,7 +182,7 @@ xpdbg("time [%Tf] method <%rm> r-uri <%ru>\n");
Return value: 0 - success, <0 - error.
-1.5.1.2. int xparse(char *s, xl_elog_p *el) +5.1.2. int xparse(char *s, xl_elog_p *el)
Parse an xl-formatted string in private memory.
@@ -197,12 +192,12 @@ xpdbg("time [%Tf] method <%rm> r-uri <%ru>\n");
Return value: 0 - success, <0 - error.
-1.5.1.3. int shm_xparse(char *s, xl_elog_p *el) +5.1.3. int shm_xparse(char *s, xl_elog_p *el)
Parse an xl-formatted string in shared memory. See xparse() function for details.
-1.5.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) +5.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb)
Parse an xl-formatted string in private memory. This function is able to identify regular expression back references, for example \1, \2, @@ -229,26 +224,26 @@ xpdbg("time [%Tf] method <%rm> r-uri <%ru>\n");
Return value: 0 - success, <0 - error.
-1.5.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) +5.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb)
Parse an xl-formatted string in shared memory supporting regular expression back references. See xparse2() function for details.
-1.5.1.6. xfree(xl_elog_p el) +5.1.6. xfree(xl_elog_p el)
Free the xl-lib list allocated by xparse() or xparse2().
Meaning of the parameters is as follows: * el - xl-lib list to be freed.
-1.5.1.7. shm_xfree(xl_elog_p el) +5.1.7. shm_xfree(xl_elog_p el)
Free the xl-lib list allocated by shm_xparse() or shm_xparse2().
Meaning of the parameters is as follows: * el - xl-lib list to be freed.
-1.5.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char *buf, int *len) +5.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char *buf, int *len)
Evaluate the xl-formatted string and print the result into a buffer.
@@ -261,6 +256,6 @@ xpdbg("time [%Tf] method <%rm> r-uri <%ru>\n");
Return value: 0 - success, <0 - error.
-1.5.1.9. str *xnulstr() +5.1.9. str *xnulstr()
Return the string "<null>". diff --git a/modules/xprint/doc/xprint.xml b/modules/xprint/doc/xprint.xml index 82c9b9e..3aaa0b2 100644 --- a/modules/xprint/doc/xprint.xml +++ b/modules/xprint/doc/xprint.xml @@ -2,8 +2,9 @@ <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<section id="xprint" xmlns:xi="http://www.w3.org/2001/XInclude"> - <sectioninfo> +<book id="xprint" xmlns:xi="http://www.w3.org/2001/XInclude"> + <bookinfo> + <title>The Xprint Module</title> <authorgroup> <author> <firstname>Elena-Ramona</firstname> @@ -22,7 +23,7 @@ <holder>FhG FOKUS</holder> </copyright>
- </sectioninfo> + </bookinfo>
<title>Xprint Module</title>
@@ -298,4 +299,4 @@ <xi:include href="functions.xml"/> <xi:include href="api.xml"/>
-</section> +</book>