Browse code

Doxygen updates

oej authored on 25/10/2009 19:11:28
Showing 24 changed files
... ...
@@ -15,8 +15,10 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
19
- *  atomic operations and memory barriers (alpha specific)
18
+
19
+/** @file
20
+ *  @brief atomic operations and memory barriers (alpha specific)
21
+ *
20 22
  *  WARNING: atomic ops do not include memory barriers
21 23
  *  see atomic_ops.h for more details 
22 24
  *
... ...
@@ -15,7 +15,8 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file	@brief
19 20
  *  atomic ops and memory barriers for arm (>= v3)
20 21
  *  see atomic_ops.h for more details 
21 22
  *
... ...
@@ -15,10 +15,12 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file       @brief
19 20
  * common part for all the atomic operations (atomic_t and common operations)
20
- *  See atomic_ops.h for more info.
21
+ *  See @ref atomic_ops.h for more info.
21 22
  */
23
+
22 24
 /* 
23 25
  * History:
24 26
  * --------
... ...
@@ -28,16 +30,18 @@
28 30
 #ifndef __atomic_common
29 31
 #define __atomic_common
30 32
 
31
-/* atomic_t defined as a struct to easily catch non atomic ops. on it,
33
+/** @brief atomic_t defined as a struct to easily catch non atomic ops. on it,
32 34
  * e.g.  atomic_t  foo; foo++  will generate a compile error */
33 35
 typedef struct{ volatile int val; } atomic_t; 
34 36
 
35 37
 
36
-/* store and load operations are atomic on all cpus, note however that they
38
+/** @name AtomicOps store and load operations are atomic on all cpus, note however that they
37 39
  * don't include memory barriers so if you want to use atomic_{get,set} 
38 40
  * to implement mutexes you must use the mb_* versions or explicitely use
39 41
  * the barriers */
40 42
 
43
+/*@{ */
44
+
41 45
 #define atomic_set_int(pvar, i) (*(int*)(pvar)=i)
42 46
 #define atomic_set_long(pvar, i) (*(long*)(pvar)=i)
43 47
 #define atomic_get_int(pvar) (*(int*)(pvar))
... ...
@@ -50,5 +54,6 @@ inline static int atomic_get(atomic_t *v)
50 54
 	return atomic_get_int(&(v->val));
51 55
 }
52 56
 
57
+/*@} */
53 58
 
54 59
 #endif
... ...
@@ -15,7 +15,8 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file @brief
19 20
  *  atomic operations and memory barriers (mips isa 2 and mips64 specific)
20 21
  *  WARNING: atomic ops do not include memory barriers
21 22
  *  see atomic_ops.h for more details 
... ...
@@ -15,7 +15,8 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file @brief
19 20
  *  include file for native (asm) atomic operations and memory barriers
20 21
  *  WARNING: atomic ops do not include memory barriers
21 22
  *  See atomic_ops.h for more info.
... ...
@@ -15,7 +15,8 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file @brief
19 20
  *  atomic operations and memory barriers (powerpc and powerpc64 versions)
20 21
  *  WARNING: atomic ops do not include memory barriers
21 22
  *  see atomic_ops.h for more details 
... ...
@@ -15,12 +15,14 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file @brief
19 20
  *  memory barriers for sparc32 ( version < v 9))
20 21
  *  see atomic_ops.h for more details 
21 22
  *
22 23
  * Config defines: NOSMP
23 24
  */
25
+
24 26
 /* 
25 27
  * History:
26 28
  * --------
... ...
@@ -15,7 +15,8 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file @brief
19 20
  *  atomic operations and memory barriers (sparc64 version, 32 and 64 bit modes)
20 21
  *  WARNING: atomic ops do not include memory barriers
21 22
  *  see atomic_ops.h for more details 
... ...
@@ -25,6 +26,7 @@
25 26
  *                               sparc32plus code)
26 27
  *               - NOSMP
27 28
  */
29
+
28 30
 /* 
29 31
  * History:
30 32
  * --------
... ...
@@ -15,7 +15,8 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file @brief
19 20
  *  atomic operations and memory barriers implemented using locks
20 21
  *  (for architectures not yet supported via inline asm)
21 22
  *
... ...
@@ -15,7 +15,8 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
-/*
18
+
19
+/** @file @brief
19 20
  *  atomic operations and memory barriers (x86 and x86_64/amd64 specific)
20 21
  *  WARNING: atomic ops do not include memory barriers
21 22
  *  see atomic_ops.h for more details 
... ...
@@ -175,7 +175,7 @@
175 175
 
176 176
 #include "atomic/atomic_native.h"
177 177
 
178
-/* if no native operations, emulate them using locks */
178
+/*! \brief if no native operations, emulate them using locks */
179 179
 #if  ! defined HAVE_ASM_INLINE_ATOMIC_OPS || ! defined HAVE_ASM_INLINE_MEMBAR
180 180
 
181 181
 #include "atomic/atomic_unknown.h"
... ...
@@ -10,11 +10,6 @@
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18 13
  * ser is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -24,6 +19,7 @@
24 19
  * along with this program; if not, write to the Free Software
25 20
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 21
  */
22
+
27 23
 /*!
28 24
  * \file
29 25
  * \brief SIP-router core :: atomic_ops init functions
... ...
@@ -17,6 +17,7 @@
17 17
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 18
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 19
  */
20
+
20 21
 /*!
21 22
  * \file
22 23
  * \brief SIP-router core :: convert/decode to/from ascii using various bases
... ...
@@ -27,15 +28,6 @@
27 28
  *
28 29
  *
29 30
  * Functions:
30
- *  - init_basex()                    : inits internal lookup tables
31
- *  - HEX_HI(unsigned char c)         : returns the first 4 bits of c converted to a hex digit
32
- *  - HEX_LOW(unsigned char c)         : returns the low 4 bits of converted to a hex digit
33
- *  - UNHEX(unsigned char hex_digit)            : converts hex_digit to a
34
- *                                              number (0..15); it might
35
- *                                              return 0xff for invalid 
36
- *                                              digit (but with some compile
37
- *                                              option it won't check)
38
- *
39 31
  *  - base16_enc(src, src_len, dst, dst_len)    : encode to standard hex
40 32
  *  - base16_dec(src, src_len, dst, dst_len)    : decode from standard hex
41 33
  *  - base16_enc_len(len)                       : length needed to encode len bytes (macro)
... ...
@@ -61,7 +53,7 @@
61 53
  *  for some interesting tests and ideeas).
62 54
  *
63 55
  *  Test results for 40 bytes  (typical ser nounce) in average cpu cycles:
64
-<verbatim>
56
+\verbatim
65 57
  *                    lookup   lookup_large lookup8k no-lookup
66 58
  *  base16_enc           211/231  218/199      -       1331
67 59
  *  base16_dec           252/251  236          -       1226
... ...
@@ -70,7 +62,7 @@
70 62
  *  q_base64_enc         -                              288
71 63
  *  q_base64_dec         -                              281
72 64
  *  (see test/basex.txt for more results)
73
-</verbatim>
65
+\endverbatim
74 66
  *
75 67
  * Defines:
76 68
  *  - BASE64_LOOKUP_TABLE/NO_BASE64_LOOKUP_TABLE : use (default)/don't use
... ...
@@ -144,11 +136,17 @@
144 136
 extern unsigned char _bx_hexdig_hi[256];
145 137
 extern unsigned char _bx_hexdig_low[256];
146 138
 
139
+/*! \brief returns the first 4 bits of c converted to a hex digit */
147 140
 #define HEX_HI(h)	_bx_hexdig_hi[(unsigned char)(h)]
141
+/*! \brief returns the low 4 bits of converted to a hex digit */
148 142
 #define HEX_LOW(h)	_bx_hexdig_low[(unsigned char)(h)]
149 143
 
150 144
 extern unsigned char _bx_unhexdig256[256];
151 145
 
146
+/*! \brief  converts hex_digit to a number (0..15); it might
147
+ *      \return 0xff for invalid digit (but with some compile
148
+ *      option it won't check)
149
+ */
152 150
 #define UNHEX(h)	_bx_unhexdig256[(h)]
153 151
 
154 152
 #else /* BASE16_LOOKUP_LARGE */
... ...
@@ -861,6 +859,7 @@ inline static int q_base64_dec(unsigned char* src, int slen,
861 859
 #undef q_b64_pad
862 860
 }
863 861
 
862
+/*! \brief inits internal lookup tables */
864 863
 int init_basex();
865 864
 
866 865
 
... ...
@@ -21,6 +21,7 @@
21 21
  * with this program; if not, write to the Free Software Foundation, Inc., 
22 22
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 23
  */
24
+
24 25
 /*!
25 26
  * \file
26 27
  * \brief SIP-router core :: Standalone Configuration File Parser
... ...
@@ -12,11 +12,6 @@
12 12
  * the Free Software Foundation; either version 2 of the License, or
13 13
  * (at your option) any later version
14 14
  *
15
- * For a license to use the ser software under conditions
16
- * other than those described here, or to purchase support for this
17
- * software, please contact iptel.org by e-mail at the following addresses:
18
- *    info@iptel.org
19
- *
20 15
  * ser is distributed in the hope that it will be useful,
21 16
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 17
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -43,7 +38,7 @@
43 38
 #ifndef _clist_h
44 39
 #define _clist_h
45 40
 
46
-/* circular list */
41
+/*! \brief circular list */
47 42
 #define clist_init(c, next, prev) \
48 43
 	do{ \
49 44
 		(c)->next=(void*)(c); \
... ...
@@ -10,11 +10,6 @@
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18 13
  * ser is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -25,12 +20,12 @@
25 20
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 21
  */
27 22
 
28
-/* compatibility defs for emergency roll-back if things do not work ;
23
+/*! \brief compatibility defs for emergency roll-back if things do not work ;
29 24
  * if that happens:
30
- * a) define PRESERVE_ZT (affects most of parser)
31
- * b) define DONT_REMOVE_ZT (affects first line)
32
- * c) define SCRATCH
33
- * d) undefine REMOVE_ALL_ZT (affects via)
25
+ * 	- a) define PRESERVE_ZT (affects most of parser)
26
+ * 	- b) define DONT_REMOVE_ZT (affects first line)
27
+ * 	- c) define SCRATCH
28
+ * 	- d) undefine REMOVE_ALL_ZT (affects via)
34 29
  */
35 30
 
36 31
 
... ...
@@ -15,6 +15,7 @@
15 15
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 16
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
  */
18
+
18 19
 /*!
19 20
  * \file
20 21
  * \brief SIP-router core :: Compiler specific optimizations
... ...
@@ -12,11 +12,6 @@
12 12
  * the Free Software Foundation; either version 2 of the License, or
13 13
  * (at your option) any later version
14 14
  *
15
- * For a license to use the ser software under conditions
16
- * other than those described here, or to purchase support for this
17
- * software, please contact iptel.org by e-mail at the following addresses:
18
- *    info@iptel.org
19
- *
20 15
  * ser is distributed in the hope that it will be useful,
21 16
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 17
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -26,6 +21,7 @@
26 21
  * along with this program; if not, write to the Free Software 
27 22
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28 23
  */
24
+
29 25
 /* History:
30 26
  * --------
31 27
  *  2003-01-29  s/int/enum ... more convenient for gdb (jiri)
... ...
@@ -37,6 +33,13 @@
37 33
  *
38 34
  */
39 35
 
36
+/*!
37
+ * \file
38
+ * \brief SIP-router core :: Data_lumps
39
+ * \ingroup core
40
+ * Module: \ref core
41
+ */
42
+
40 43
 
41 44
 #ifndef data_lump_h
42 45
 #define data_lump_h
... ...
@@ -45,42 +48,42 @@
45 48
 #include "parser/msg_parser.h"
46 49
 #include "parser/hf.h"
47 50
 
48
-/* adds a header to the end */
51
+/*! \brief adds a header to the end */
49 52
 struct lump* append_new_lump(struct lump** list, char* new_hdr,
50 53
 							 int len, enum _hdr_types_t type);
51
-/* inserts a header to the beginning */
54
+/*! \brief inserts a header to the beginning */
52 55
 struct lump* insert_new_lump(struct lump** list, char* new_hdr,
53 56
 							  int len, enum _hdr_types_t type);
54 57
 struct lump* insert_new_lump_after(struct lump* after,
55 58
 									char* new_hdr, int len, enum _hdr_types_t type);
56 59
 struct lump* insert_new_lump_before(struct lump* before, char* new_hdr,
57 60
 									int len,enum _hdr_types_t type);
58
-/* substitutions (replace with ip address, port etc) */
61
+/*! \brief substitutions (replace with ip address, port etc) */
59 62
 struct lump* insert_subst_lump_after(struct lump* after,  enum lump_subst subst,
60 63
 									enum _hdr_types_t type);
61 64
 struct lump* insert_subst_lump_before(struct lump* before,enum lump_subst subst,
62 65
 									enum _hdr_types_t type);
63 66
 
64
-/* conditional lumps */
67
+/*! \brief conditional lumps */
65 68
 struct lump* insert_cond_lump_after(struct lump* after, enum lump_conditions c,
66 69
 									enum _hdr_types_t type);
67 70
 struct lump* insert_cond_lump_before(struct lump* after, enum lump_conditions c,
68 71
 									enum _hdr_types_t type);
69 72
 
70
-/* removes an already existing header */
73
+/*! \brief removes an already existing header */
71 74
 struct lump* del_lump(struct sip_msg* msg, int offset, int len, enum _hdr_types_t type);
72
-/* set an anchor */
75
+/*! \brief set an anchor */
73 76
 struct lump* anchor_lump(struct sip_msg* msg, int offset, int len, enum _hdr_types_t type);
74 77
 
75 78
 
76 79
 
77
-/* duplicates a lump list shallowly in pkg-mem */
80
+/*! \brief duplicates a lump list shallowly in pkg-mem */
78 81
 struct lump* dup_lump_list( struct lump *l );
79
-/* frees a shallowly duplicated lump list */
82
+/*! \brief frees a shallowly duplicated lump list */
80 83
 void free_duped_lump_list(struct lump* l);
81 84
 
82 85
 
83
-/* remove all non-SHMEM lumps from the list */
86
+/*! \brief remove all non-SHMEM lumps from the list */
84 87
 void del_nonshm_lump( struct lump** lump_list );
85 88
 
86 89
 #endif
... ...
@@ -11,11 +11,6 @@
11 11
  * the Free Software Foundation; either version 2 of the License, or
12 12
  * (at your option) any later version
13 13
  *
14
- * For a license to use the ser software under conditions
15
- * other than those described here, or to purchase support for this
16
- * software, please contact iptel.org by e-mail at the following addresses:
17
- *    info@iptel.org
18
- *
19 14
  * ser is distributed in the hope that it will be useful,
20 15
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 16
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -36,6 +31,14 @@
36 31
  *               more easy (andrei)
37 32
  */
38 33
 
34
+/*!
35
+ * \file
36
+ * \brief SIP-router core :: Data lumps
37
+ * \ingroup core
38
+ * Module: \ref core
39
+ */
40
+
41
+
39 42
 
40 43
 #ifndef data_lump_rpl_h
41 44
 #define data_lump_rpl_h
... ...
@@ -59,7 +62,7 @@ struct lump_rpl
59 62
 struct lump_rpl** add_lump_rpl2(struct sip_msg *, char *, int , int );
60 63
 
61 64
 
62
-/* compatibility wrapper for the old add_lump_rpl version */
65
+/*! \brief compatibility wrapper for the old add_lump_rpl version */
63 66
 inline static struct lump_rpl* add_lump_rpl(struct sip_msg* msg,
64 67
 												char* s, int len , int flags )
65 68
 {
... ...
@@ -12,11 +12,6 @@
12 12
  * the Free Software Foundation; either version 2 of the License, or
13 13
  * (at your option) any later version
14 14
  *
15
- * For a license to use the ser software under conditions
16
- * other than those described here, or to purchase support for this
17
- * software, please contact iptel.org by e-mail at the following addresses:
18
- *    info@iptel.org
19
- *
20 15
  * ser is distributed in the hope that it will be useful,
21 16
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 17
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -26,6 +21,7 @@
26 21
  * along with this program; if not, write to the Free Software
27 22
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28 23
  */
24
+
29 25
 /* History:
30 26
  * --------
31 27
  *  2006-07-13  created by andrei
... ...
@@ -33,6 +29,14 @@
33 29
  *  2007-07-30  DNS cache measurements added (Gergo)
34 30
  */
35 31
 
32
+/**
33
+ * @file
34
+ * @brief SIP-router core :: resolver/dns related functions, dns cache and failover
35
+ * @ingroup core
36
+ * Module: @ref core
37
+ */
38
+
39
+
36 40
 
37 41
 #ifndef __dns_cache_h
38 42
 #define __dns_cache_h
... ...
@@ -58,69 +62,74 @@
58 62
 #define DEFAULT_DNS_CACHE_MAX_TTL ((unsigned int)(-1)) /* (maxint) */
59 63
 #define DEFAULT_DNS_MAX_MEM 500 /* 500 Kb */
60 64
 
61
-/* uncomment the define below for SRV weight based load balancing */
65
+/** @brief uncomment the define below for SRV weight based load balancing */
62 66
 #define DNS_SRV_LB
63 67
 
64 68
 #define DNS_LU_LST
65 69
 
66
-/* dns functions return them as negative values (e.g. return -E_DNS_NO_IP)
70
+/** @brief dns functions return them as negative values (e.g. return -E_DNS_NO_IP)
71
+ *
67 72
  * listed in the order of importance ( if more errors, only the most important
68 73
  * is returned)
69 74
  */
70 75
 enum dns_errors{
71 76
 					E_DNS_OK=0,
72
-					E_DNS_EOR, /* no more records (not an error)
77
+					E_DNS_EOR, /**< no more records (not an error)
73 78
 					              -- returned only by the dns_resolve*
74 79
 								  functions when called iteratively,; it
75 80
 								  signals the end of the ip/records list */
76
-					E_DNS_UNKNOWN /* unkown error */,
77
-					E_DNS_INTERNAL_ERR /* internal error */,
81
+					E_DNS_UNKNOWN /**< unkown error */,
82
+					E_DNS_INTERNAL_ERR /**< internal error */,
78 83
 					E_DNS_BAD_SRV_ENTRY,
79
-					E_DNS_NO_SRV /* unresolvable srv record */,
84
+					E_DNS_NO_SRV /**< unresolvable srv record */,
80 85
 					E_DNS_BAD_IP_ENTRY,
81
-					E_DNS_NO_IP /* unresolvable a or aaaa records*/,
82
-					E_DNS_BAD_IP /* the ip is invalid */,
83
-					E_DNS_BLACKLIST_IP /* the ip is blacklisted */,
84
-					E_DNS_NAME_TOO_LONG /* try again with a shorter name */,
85
-					E_DNS_AF_MISMATCH /* ipv4 or ipv6 only requested, but
86
+					E_DNS_NO_IP /**< unresolvable a or aaaa records*/,
87
+					E_DNS_BAD_IP /**< the ip is invalid */,
88
+					E_DNS_BLACKLIST_IP /**< the ip is blacklisted */,
89
+					E_DNS_NAME_TOO_LONG /**< try again with a shorter name */,
90
+					E_DNS_AF_MISMATCH /**< ipv4 or ipv6 only requested, but
86 91
 										 name contains an ip addr. of the
87 92
 										 opossite type */ ,
88
-					E_DNS_NO_NAPTR /* unresolvable naptr record */,
89
-					E_DNS_CRITICAL /* critical error, marks the end
93
+					E_DNS_NO_NAPTR /**< unresolvable naptr record */,
94
+					E_DNS_CRITICAL /**< critical error, marks the end
90 95
 									  of the error table (always last) */
91 96
 };
92 97
 
93 98
 
94 99
 
95
-/* return a short string, printable error description (err <=0) */
100
+/** @brief return a short string, printable error description (err <=0) */
96 101
 const char* dns_strerror(int err);
97 102
 
98
-/* dns entry error flags */
103
+/** @brief dns entry error flags */
99 104
 #define DNS_BAD_NAME     1 /* unresolvable */
100 105
 
101
-/* dns requests flags */
106
+/** @name dns requests flags */
107
+/*@{ */
102 108
 #define DNS_NO_FLAGS	0
103 109
 #define DNS_IPV4_ONLY	1
104 110
 #define DNS_IPV6_ONLY	2
105 111
 #define DNS_IPV6_FIRST	4
106
-#define DNS_SRV_RR_LB	8  /* SRV RR weight based load balancing */
107
-#define DNS_TRY_NAPTR	16 /* enable naptr lookup */
112
+#define DNS_SRV_RR_LB	8  /**< SRV RR weight based load balancing */
113
+#define DNS_TRY_NAPTR	16 /**< enable naptr lookup */
114
+/*@} */
108 115
 
109 116
 
110
-/* ip blacklist error flags */
117
+/** @name ip blacklist error flags */
118
+/*@{ */
111 119
 #define IP_ERR_BAD_DST      2 /* destination is marked as bad (e.g. bad ip) */
112 120
 #define IP_ERR_SND          3 /* send error while using this as destination */
113 121
 #define IP_ERR_TIMEOUT      4 /* timeout waiting for a response */
114 122
 #define IP_ERR_TCP_CON      5 /* could not establish tcp connection */
123
+/*@} */
115 124
 
116 125
 
117
-/* stripped down dns rr */
126
+/** @brief stripped down dns rr 
127
+	@note name, type and class are not needed, contained in struct dns_query */
118 128
 struct dns_rr{
119 129
 	struct dns_rr* next;
120
-	void* rdata; /* depends on the type */
121
-	/* name, type and class are not needed, contained in struct dns_query */
122
-	ticks_t expire; /* = ttl + crt_time */
123
-	unsigned char err_flags; /* if 0 everything is ok */
130
+	void* rdata; /**< depends on the type */
131
+	ticks_t expire; /**< = ttl + crt_time */
132
+	unsigned char err_flags; /**< if 0 everything is ok */
124 133
 
125 134
 };
126 135
 
... ...
@@ -163,15 +172,15 @@ typedef unsigned long long srv_flags_t;
163 172
 #endif
164 173
 
165 174
 struct dns_srv_handle{
166
-	struct dns_hash_entry* srv; /* srv entry */
167
-	struct dns_hash_entry* a;   /* a or aaaa current entry */
175
+	struct dns_hash_entry* srv; /**< srv entry */
176
+	struct dns_hash_entry* a;   /**< a or aaaa current entry */
168 177
 #ifdef DNS_SRV_LB
169 178
 	srv_flags_t srv_tried_rrs;
170 179
 #endif
171
-	unsigned short port; /* current port */
172
-	unsigned char srv_no; /* current record no. in the srv entry */
173
-	unsigned char ip_no;  /* current record no. in the a/aaaa entry */
174
-	unsigned char proto;  /* protocol number */
180
+	unsigned short port; /**< current port */
181
+	unsigned char srv_no; /**< current record no. in the srv entry */
182
+	unsigned char ip_no;  /**< current record no. in the a/aaaa entry */
183
+	unsigned char proto;  /**< protocol number */
175 184
 };
176 185
 
177 186
 
... ...
@@ -209,7 +218,7 @@ inline static void dns_srv_handle_put(struct dns_srv_handle* h)
209 218
 
210 219
 
211 220
 
212
-/* use it when copying, it manually increases the ref cound */
221
+/** @brief use it when copying, it manually increases the ref cound */
213 222
 inline static void dns_srv_handle_ref(struct dns_srv_handle *h)
214 223
 {
215 224
 	if (h){
... ...
@@ -222,7 +231,7 @@ inline static void dns_srv_handle_ref(struct dns_srv_handle *h)
222 231
 
223 232
 
224 233
 
225
-/* safe copy increases the refcnt, src must not change while in this function
234
+/** @brief safe copy increases the refcnt, src must not change while in this function
226 235
  * WARNING: the copy must be dns_srv_handle_put ! */
227 236
 inline static void dns_srv_handle_cpy(struct dns_srv_handle* dst,
228 237
 										struct dns_srv_handle* src)
... ...
@@ -233,7 +242,7 @@ inline static void dns_srv_handle_cpy(struct dns_srv_handle* dst,
233 242
 
234 243
 
235 244
 
236
-/* same as above but assume shm_lock held (for internal tm use only) */
245
+/** @brief same as above but assume shm_lock held (for internal tm use only) */
237 246
 inline static void dns_srv_handle_put_shm_unsafe(struct dns_srv_handle* h)
238 247
 {
239 248
 	if (h){
... ...
@@ -250,7 +259,7 @@ inline static void dns_srv_handle_put_shm_unsafe(struct dns_srv_handle* h)
250 259
 
251 260
 
252 261
 
253
-/* get "next" ip next time a dns_srv_handle function is called
262
+/** @brief get "next" ip next time a dns_srv_handle function is called
254 263
  * params: h   - struct dns_srv_handler
255 264
  *         err - return code of the last dns_*_resolve* call
256 265
  * returns: 0 if it doesn't make sense to try another record,
... ...
@@ -278,7 +287,7 @@ inline static void dns_srv_handle_init(struct dns_srv_handle* h)
278 287
 
279 288
 
280 289
 
281
-/* performes a srv query on name
290
+/** @brief performes a srv query on name
282 291
  * Params:  name  - srv query target (e.g. _sip._udp.foo.bar)
283 292
  *          ip    - result: first good ip found
284 293
  *          port  - result: corresponding port number
... ...
@@ -288,7 +297,7 @@ inline static void dns_srv_handle_init(struct dns_srv_handle* h)
288 297
 int dns_srv_get_ip(str* name, struct ip_addr* ip, unsigned short* port,
289 298
 					int flags);
290 299
 
291
-/* performs an A, AAAA (or both) query/queries
300
+/** @brief performs an A, AAAA (or both) query/queries
292 301
  * Params:  name  - query target (e.g. foo.bar)
293 302
  *          ip    - result: first good ip found
294 303
  *          flags - resolve options (like ipv4 only, ipv6 prefered a.s.o)
... ...
@@ -300,7 +309,7 @@ struct hostent* dns_srv_get_he(str* name, unsigned short* port, int flags);
300 309
 struct hostent* dns_get_he(str* name, int flags);
301 310
 
302 311
 
303
-/* resolve name to an ip, using srv record. Can be called multiple times
312
+/** @brief resolve name to an ip, using srv record. Can be called multiple times
304 313
  * to iterate on all the possible ips, e.g :
305 314
  * dns_srv_handle_init(h);
306 315
  * ret_code=dns_sip_resolve(h,...);
... ...
@@ -312,7 +321,7 @@ struct hostent* dns_get_he(str* name, int flags);
312 321
 int dns_sip_resolve(struct dns_srv_handle* h,  str* name, struct ip_addr* ip,
313 322
 					unsigned short* port, char* proto, int flags);
314 323
 
315
-/* same as above, but fills su intead of changing port and filling an ip */
324
+/** @brief same as above, but fills su intead of changing port and filling an ip */
316 325
 inline static int dns_sip_resolve2su(struct dns_srv_handle* h,
317 326
 									 union sockaddr_union* su,
318 327
 									 str* name, unsigned short port,
... ...
@@ -327,17 +336,17 @@ inline static int dns_sip_resolve2su(struct dns_srv_handle* h,
327 336
 	return ret;
328 337
 }
329 338
 
330
-/* deletes all the entries from the cache */
339
+/** @brief deletes all the entries from the cache */
331 340
 void dns_cache_flush(void);
332 341
 
333 342
 #ifdef DNS_WATCHDOG_SUPPORT
334
-/* sets the state of the DNS servers:
343
+/** @brief sets the state of the DNS servers:
335 344
  * 1: at least one server is up
336 345
  * 0: all the servers are down
337 346
  */
338 347
 void dns_set_server_state(int state);
339 348
 
340
-/* returns the state of the DNS servers */
349
+/** @brief returns the state of the DNS servers */
341 350
 int dns_get_server_state(void);
342 351
 #endif /* DNS_WATCHDOG_SUPPORT */
343 352
 
... ...
@@ -27,8 +27,6 @@
27 27
  * Module: \ref utils
28 28
  */
29 29
 
30
-
31
-
32 30
 #include "conf.h"
33 31
 #include "../../mem/mem.h"
34 32
 #include "../../mem/shm_mem.h"
... ...
@@ -41,11 +39,9 @@
41 39
 #include <stdlib.h>
42 40
 #include <stdio.h>
43 41
 
44
-
45 42
 #define BUFSIZE 1000
46 43
 
47
-
48
-/* special filter indices */
44
+/*! \brief special filter indices */
49 45
 enum {
50 46
 	sfidx_request = 0,
51 47
 	sfidx_reply,
... ...
@@ -300,7 +296,9 @@ static int update_proxy(int id, char *host_str, char *port_str)
300 296
  * Parses a configuration string for switch settings and updates
301 297
  * the configuration structure.
302 298
  * \param settings the configuration string in the following form:
299
+\verbatim
303 300
  *              <id>=<switch>[,<id>=<switch>]...
301
+\endverbatim
304 302
  * \return 1 on success, -1 otherwise
305 303
  */
306 304
 int conf_parse_switch(char *settings)
... ...
@@ -400,7 +398,9 @@ error:
400 398
  * Parses a configuration string for switch settings and
401 399
  * updates the configuration structure.
402 400
  * \param settings The configuration string in the following form:
401
+\verbatim
403 402
  *              <id>=<filter>[:<filter>]...[,<id>=<filter>[:<filter>]...]...
403
+\endverbatim
404 404
  * \return 1 on success, -1 otherwise
405 405
  */
406 406
 int conf_parse_filter(char *settings)
... ...
@@ -443,7 +443,9 @@ int conf_parse_filter(char *settings)
443 443
  * Parses a configuration string for proxy settings and
444 444
  * updates the configuration structure.
445 445
  * \param settings: The configuration string in the following form:
446
+\verbatim
446 447
  *              <id>=<host>:<port>[,<id>=<host>:<port>]...
448
+\endverbatim
447 449
  * \return: 1 on success, -1 otherwise
448 450
  */
449 451
 int conf_parse_proxy(char *settings)
... ...
@@ -47,7 +47,7 @@
47 47
  * \ingroup parser
48 48
  */
49 49
 
50
-/*! \defgroup parser
50
+/*! \defgroup parser SIP-router SIP message parser
51 51
  * 
52 52
  * The SIP message parser
53 53
  *
... ...
@@ -26,9 +26,6 @@
26 26
  * \ingroup parser
27 27
  */
28 28
 
29
-#include "parse_to.h"
30
-
31
-
32 29
 #ifndef PARSE_TO
33 30
 #define PARSE_TO
34 31
 
... ...
@@ -79,6 +79,7 @@ struct sip_uri	*select_uri_p = NULL;
79 79
  * moves pointer p to the first unused char.
80 80
  *
81 81
  * The select identifier must be of the form:
82
+\verbatim
82 83
  *   [@] <sel_id> [ '.' <sel_id> ...]
83 84
  *   
84 85
  * Where 
... ...
@@ -96,6 +97,7 @@ struct sip_uri	*select_uri_p = NULL;
96 97
  *     @eval.pop[-1]
97 98
  *     contact.uri.params.maddr
98 99
  *     cfg_get.rtp_proxy.enabled 
100
+\endverbatim
99 101
  *
100 102
  * @return -1 error
101 103
  *			  p points to the first unconsumed char
... ...
@@ -186,6 +188,7 @@ error:
186 188
  * Parse select string into select structure s and
187 189
  * moves pointer p to the first unused char.
188 190
  * 
191
+\verbatim
189 192
  * The select identifier must be of the form:
190 193
  *   [@] <sel_id> [ '.' <sel_id> ...]
191 194
  *   
... ...
@@ -204,6 +207,7 @@ error:
204 207
  *     @eval.pop[-1]
205 208
  *     contact.uri.params.maddr
206 209
  *     cfg_get.rtp_proxy.enabled 
210
+\endverbatim
207 211
   *
208 212
   * @param p - double string (asciiz) pointer, *p is moved to the first char
209 213
   *            after the select identifier