Browse code

More parser/ doxygen changes

oej authored on 25/10/2009 17:26:46
Showing 23 changed files
... ...
@@ -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,6 +20,13 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: Allow header
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
34
+
28 35
 #include <stdlib.h>
29 36
 #include <string.h>
30 37
 #include "../dprint.h"
... ...
@@ -34,11 +36,11 @@
34 34
 #include "msg_parser.h"
35 35
 
36 36
  
37
-/*
37
+/*! \brief
38 38
  * This method is used to parse Allow header.
39 39
  *
40
- * params: msg : sip msg
41
- * returns 0 on success,
40
+ * \params  msg : sip msg
41
+ * \return 0 on success,
42 42
  *        -1 on failure.
43 43
  */
44 44
 int parse_allow_header(struct hdr_field* _hf)
... ...
@@ -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,13 @@
24 24
  * along with this program; if not, write to the Free Software 
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27
+
28
+/*! \file
29
+ * \brief Parser :: Allow header
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
27 34
  
28 35
 #ifndef PARSE_ALLOW_H
29 36
 #define PARSE_ALLOW_H
... ...
@@ -32,7 +34,7 @@
32 32
 #include "msg_parser.h"
33 33
 
34 34
  
35
-/* 
35
+/*! \brief
36 36
  * casting macro for accessing Allow body 
37 37
  */
38 38
 #define get_allow_methods(p_msg)							\
... ...
@@ -40,26 +42,26 @@
40 40
 
41 41
 
42 42
 struct allow_body {
43
-	unsigned int allow;     /* allow mask for the current hdr */
44
-	unsigned int allow_all; /* allow mask for the all allow hdr - it's
43
+	unsigned int allow;     /*!< allow mask for the current hdr */
44
+	unsigned int allow_all; /*!< allow mask for the all allow hdr - it's
45 45
 							 * set only for the first hdr in sibling
46 46
 							 * list*/
47 47
 };
48 48
 
49 49
 
50
-/*
50
+/*! \brief
51 51
  * Parse all Allow HFs
52 52
  */
53 53
 int parse_allow(struct sip_msg *msg);
54 54
 
55 55
 
56
-/*
56
+/*! \brief
57 57
  * Parse Allow HF body
58 58
  */
59 59
 int parse_allow_header(struct hdr_field* _h);
60 60
 
61 61
 
62
-/*
62
+/*! \brief
63 63
  * Release memory
64 64
  */
65 65
 void free_allow_body(struct allow_body **ab);
... ...
@@ -29,6 +29,13 @@
29 29
  *  2008-05-22  Initial version, get_body_part() is introduced (Miklos)
30 30
  */
31 31
 
32
+/*! \file
33
+ * \brief Parser :: Body handling
34
+ *
35
+ * \ingroup parser
36
+ */
37
+
38
+
32 39
 #include "../trim.h"
33 40
 #include "parser_f.h"
34 41
 #include "parse_content.h"
... ...
@@ -36,7 +43,7 @@
36 36
 #include "keys.h"
37 37
 #include "parse_body.h"
38 38
 
39
-/* returns the value of boundary parameter from the Contect-Type HF */
39
+/*! \brief returns the value of boundary parameter from the Contect-Type HF */
40 40
 static inline int get_boundary_param(struct sip_msg *msg, str *boundary)
41 41
 {
42 42
 	str	s;
... ...
@@ -91,7 +98,7 @@ static inline int get_boundary_param(struct sip_msg *msg, str *boundary)
91 91
 	return 0;
92 92
 }
93 93
 
94
-/* search the next boundary in the buffer */
94
+/*! \brief search the next boundary in the buffer */
95 95
 static inline char *search_boundary(char *buf, char *buf_end, str *boundary)
96 96
 {
97 97
 	char *c;
... ...
@@ -110,7 +117,7 @@ static inline char *search_boundary(char *buf, char *buf_end, str *boundary)
110 110
 	return NULL;
111 111
 }
112 112
 
113
-/* extract the body of a part from a multipart SIP msg body */
113
+/*! \brief extract the body of a part from a multipart SIP msg body */
114 114
 inline static char *get_multipart_body(char *buf,
115 115
 					char *buf_end,
116 116
 					str *boundary,
... ...
@@ -155,13 +162,13 @@ error:
155 155
 }
156 156
 
157 157
 
158
-/* macros from parse_hname2.c */
158
+/*! \brief macros from parse_hname2.c */
159 159
 #define READ(val) \
160 160
 (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) << 24))
161 161
 
162 162
 #define LOWER_DWORD(d) ((d) | 0x20202020)
163 163
 
164
-/* Returns the pointer within the msg body to the given type/subtype,
164
+/*! \brief Returns the pointer within the msg body to the given type/subtype,
165 165
  * and sets the length of the body part.
166 166
  * The result can be the whole msg body, or a part of a multipart body.
167 167
  */
... ...
@@ -25,11 +25,17 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  *
27 27
  */
28
+/*! \file
29
+ * \brief Parser :: Body handling
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
28 34
 
29 35
 #ifndef PARSE_BODY_H
30 36
 #define PARSE_BODY_H
31 37
 
32
-/* Returns the pointer within the msg body to the given type/subtype,
38
+/*! \brief Returns the pointer within the msg body to the given type/subtype,
33 39
  * and sets the length.
34 40
  * The result can be the whole msg body, or a part of a multipart body.
35 41
  */
... ...
@@ -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
... ...
@@ -35,6 +30,12 @@
35 35
  *		some remaining characters (Miklos)
36 36
  */
37 37
 
38
+/*! \file
39
+ * \brief Parser :: Content part
40
+ *
41
+ * \ingroup parser
42
+ */
43
+
38 44
 
39 45
 #include <stdio.h>
40 46
 #include <stdlib.h>
... ...
@@ -53,15 +54,15 @@
53 53
 	( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )
54 54
 
55 55
 
56
-/*
56
+/*! \brief
57 57
  * Node of the type's tree; this tree contains all the known types;
58 58
  */
59 59
 typedef struct type_node_s {
60
-	char c;                      /* char contained by this node */
61
-	unsigned char final;         /* says what mime type/subtype was detected
62
-	                              * if string ends at this node */
63
-	unsigned char nr_sons;       /* the number of sub-nodes */
64
-	int next;                    /* the next sibling node */
60
+	char c;                      /*!< char contained by this node */
61
+	unsigned char final;         /*!< says what mime type/subtype was detected
62
+	                              *!< if string ends at this node */
63
+	unsigned char nr_sons;       /*!< the number of sub-nodes */
64
+	int next;                    /*!< the next sibling node */
65 65
 }type_node_t;
66 66
 
67 67
 
... ...
@@ -379,9 +380,11 @@ error:
379 379
 
380 380
 
381 381
 
382
-/* returns: > 0 mime found
383
- *          = 0 hdr not found
384
- *          =-1 error */
382
+/*! \brief
383
+ * \return
384
+ *  	-   > 0 mime found
385
+ *      -   = 0 hdr not found
386
+ *      -   =-1 error */
385 387
 int parse_content_type_hdr( struct sip_msg *msg )
386 388
 {
387 389
 	char *end;
... ...
@@ -485,7 +488,8 @@ error:
485 485
 	return -1;
486 486
 }
487 487
 
488
-/* returns: > 0 ok
488
+/*! \brief
489
+ * returns: > 0 ok
489 490
  *          = 0 hdr not found
490 491
  *          = -1 error */
491 492
 int parse_accept_hdr( struct sip_msg *msg )
... ...
@@ -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
... ...
@@ -26,6 +21,13 @@
26 26
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief Parser :: Content
31
+ *
32
+ * \ingroup parser
33
+ */
34
+
35
+
29 36
 #ifndef _PARSE_CONTENT_H
30 37
 #define _PARSE_CONTENT_H
31 38
 
... ...
@@ -39,9 +41,10 @@ struct mime_type {
39 39
 
40 40
 
41 41
 
42
-/*
43
- * Mimes types/subtypes that are recognize
42
+/*! \name MimeTypes
43
+ * Mimes types/subtypes that are recognized
44 44
  */
45
+/*! { */
45 46
 #define TYPE_TEXT            1
46 47
 #define TYPE_MESSAGE         2
47 48
 #define TYPE_APPLICATION     3
... ...
@@ -66,34 +69,35 @@ struct mime_type {
66 66
 #define SUBTYPE_ALL          0xfe
67 67
 #define SUBTYPE_UNKNOWN      0xff
68 68
 
69
+/*! } */
69 70
 
70
-/* taken from PA module - will be useful here */
71
+/*! \brief taken from PA module - will be useful here */
71 72
 #define MIMETYPE(x_,y_) ((TYPE_##x_ << 16) | (SUBTYPE_##y_))
72 73
 
73
-/*
74
+/*! \brief
74 75
  * Maximum number of mimes allowed in Accept header 
75 76
  */
76 77
 #define MAX_MIMES_NR         128
77 78
 
78
-/*
79
+/*! \brief
79 80
  * returns the content-length value of a sip_msg as an integer
80 81
  */
81 82
 #define get_content_length(_msg_)   ((long)((_msg_)->content_length->parsed))
82 83
 
83 84
 
84
-/*
85
+/*! \brief
85 86
  * returns the content-type value of a sip_msg as an integer
86 87
  */
87 88
 #define get_content_type(_msg_)   ((int)(long)((_msg_)->content_type->parsed))
88 89
 
89 90
 
90
-/*
91
+/*! \brief
91 92
  * returns the accept values of a sip_msg as an null-terminated array
92 93
  * of integer
93 94
  */
94 95
 #define get_accept(_msg_) ((int*)((_msg_)->accept->parsed))
95 96
 
96
-/*
97
+/*! \brief
97 98
  * parse the body of the Content-Type header. It's value is also converted
98 99
  * as int.
99 100
  * Returns:   n (n>0)  : the found type
... ...
@@ -104,7 +108,7 @@ int parse_content_type_hdr( struct sip_msg *msg);
104 104
 
105 105
 int parse_accept_body(struct hdr_field *hdr);
106 106
 
107
-/*
107
+/*! \brief
108 108
  * parse the body of the Accept header. It's values are also converted
109 109
  * as an null-terminated array of ints.
110 110
  * Returns:   1 : OK
... ...
@@ -114,14 +118,14 @@ int parse_accept_body(struct hdr_field *hdr);
114 114
 int parse_accept_hdr( struct sip_msg *msg );
115 115
 
116 116
 
117
-/*
117
+/*! \brief
118 118
  *  parse the body of a Content_-Length header. Also tries to recognize the
119 119
  *  type specified by this header (see th above defines).
120 120
  *  Returns the first chr after the end of the header.
121 121
  */
122 122
 char* parse_content_length( char* buffer, char* end, int* len);
123 123
 
124
-/*
124
+/*! \brief
125 125
  * Sets the mime type from the body of a Content-Type header
126 126
  */
127 127
 char* decode_mime_type(char *start, char *end, unsigned int *mime_type);
... ...
@@ -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
... ...
@@ -30,6 +25,13 @@
30 30
  * 2003-01-22 zero-termination in CSeq eliminated (jiri)
31 31
  */
32 32
 
33
+/*! \file
34
+ * \brief Parser :: Cseq header field handling
35
+ *
36
+ * \ingroup parser
37
+ */
38
+
39
+
33 40
 
34 41
 #include "../comp_defs.h"
35 42
 #include "parse_cseq.h"
... ...
@@ -39,10 +41,6 @@
39 39
 #include "parse_methods.h"
40 40
 #include "../mem/mem.h"
41 41
 
42
-/*
43
- * Parse CSeq header field
44
- */
45
-
46 42
 /*BUGGY*/
47 43
 char* parse_cseq(char *buf, char* end, struct cseq_body* cb)
48 44
 {
... ...
@@ -25,6 +25,13 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: Parse CSEQ header
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
34
+
28 35
 
29 36
 #ifndef PARSE_CSEQ
30 37
 #define PARSE_CSEQ
... ...
@@ -33,24 +40,24 @@
33 33
 
34 34
 
35 35
 struct cseq_body{
36
-	int error;  /* Error code */
37
-	str number; /* CSeq number */
38
-	str method; /* Associated method */
39
-	unsigned int method_id; /* Associated method ID */
36
+	int error;  /*!< Error code */
37
+	str number; /*!< CSeq number */
38
+	str method; /*!< Associated method */
39
+	unsigned int method_id; /*!< Associated method ID */
40 40
 };
41 41
 
42 42
 
43
-/* casting macro for accessing CSEQ body */
43
+/*! \brief casting macro for accessing CSEQ body */
44 44
 #define get_cseq(p_msg) ((struct cseq_body*)(p_msg)->cseq->parsed)
45 45
 
46 46
 
47
-/*
47
+/*! \brief
48 48
  * Parse CSeq header field
49 49
  */
50 50
 char* parse_cseq(char *buf, char* end, struct cseq_body* cb);
51 51
 
52 52
 
53
-/*
53
+/*! \brief
54 54
  * Free all associated memory
55 55
  */
56 56
 void free_cseq(struct cseq_body* cb);
... ...
@@ -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,6 +20,13 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: Date header
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
34
+
28 35
 
29 36
 #include <string.h>
30 37
 #include "parse_date.h"
... ...
@@ -48,7 +50,7 @@ inline static int char2int (char *p, int *t)
48 48
 	return 0;
49 49
 }
50 50
 
51
-/*
51
+/*! \brief
52 52
  * Converts a RFC 1123 formatted date string to stuct tm
53 53
  */
54 54
 static int rfc1123totm (char *stime, struct tm *ttm ) {
... ...
@@ -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,6 +20,13 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: Date header
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
34
+
28 35
 
29 36
 #ifndef PARSE_DATE
30 37
 #define PARSE_DATE
... ...
@@ -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,6 +20,13 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: Definitions
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
34
+
28 35
 
29 36
 #ifndef PARSE_DEF_H
30 37
 #define PARSE_DEF_H
... ...
@@ -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
... ...
@@ -29,6 +24,12 @@
29 29
  * 2003-09-09 created (bogdan)
30 30
  */
31 31
 
32
+/*! \file
33
+ * \brief Parser :: Content-Disposition header
34
+ *
35
+ * \ingroup parser
36
+ */
37
+
32 38
 
33 39
 #include <stdio.h>
34 40
 #include <stdlib.h>
... ...
@@ -41,7 +42,7 @@
41 41
 
42 42
 
43 43
 
44
-/* parse a string that supposed to be a disposition and fills up the structure
44
+/*! \brief parse a string that supposed to be a disposition and fills up the structure
45 45
  * Returns: -1 : error
46 46
  *           o : success */
47 47
 int parse_disposition( str *s, struct disposition *disp)
... ...
@@ -346,7 +347,7 @@ error:
346 346
 
347 347
 
348 348
 
349
-/* Frees the entire disposition structure (params + itself) */
349
+/*! \brief Frees the entire disposition structure (params + itself) */
350 350
 void free_disposition( struct disposition **disp)
351 351
 {
352 352
 	struct disposition_param *param;
... ...
@@ -363,7 +364,7 @@ void free_disposition( struct disposition **disp)
363 363
 
364 364
 
365 365
 
366
-/* looks inside the message, gets the Content-Disposition hdr, parse it, builds
366
+/*! \brief looks inside the message, gets the Content-Disposition hdr, parse it, builds
367 367
  * and fills a disposition structure for it what will be attached to hdr as
368 368
  * parsed link.
369 369
  * Returns:  -1 : error
... ...
@@ -413,7 +414,7 @@ error:
413 413
 }
414 414
 
415 415
 
416
-/* Prints recursive a disposition structure */
416
+/*! \brief Prints recursive a disposition structure */
417 417
 void print_disposition( struct disposition *disp)
418 418
 {
419 419
 	struct disposition_param *param;
... ...
@@ -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
... ...
@@ -29,6 +24,13 @@
29 29
  * 2003-09-09 created (bogdan)
30 30
  */
31 31
 
32
+/*! \file
33
+ * \brief Parser :: Content-Disposition header
34
+ *
35
+ * \ingroup parser
36
+ */
37
+
38
+
32 39
 #ifndef _PARSE_DISPOSITION_H_
33 40
 #define _PARSE_DISPOSITION_H_
34 41
 
... ...
@@ -54,7 +56,7 @@ struct disposition {
54 54
 };
55 55
 
56 56
 
57
-/* looks inside the message, gets the Content-Disposition hdr, parse it, builds
57
+/*! \brief looks inside the message, gets the Content-Disposition hdr, parse it, builds
58 58
  * and fills a disposition structure for it what will be attached to hdr as
59 59
  * parsed link.
60 60
  * Returns:  -1 : error
... ...
@@ -64,16 +66,16 @@ struct disposition {
64 64
 int parse_content_disposition( struct sip_msg *msg );
65 65
 
66 66
 
67
-/* parse a string that supposed to be a disposition and fills up the structure
67
+/*! \brief parse a string that supposed to be a disposition and fills up the structure
68 68
  * Returns: -1 : error
69 69
  *           o : success */
70 70
 int parse_disposition( str *s, struct disposition *disp);
71 71
 
72 72
 
73
-/* Frees the entire disposition structure (params + itself) */
73
+/*! \brief Frees the entire disposition structure (params + itself) */
74 74
 void free_disposition( struct disposition **disp);
75 75
 
76
-/* Prints recursive a disposition structure */
76
+/*! \brief Prints recursive a disposition structure */
77 77
 void print_disposition( struct disposition *disp);
78 78
 
79 79
 #endif
... ...
@@ -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,13 @@
24 24
  * along with this program; if not, write to the Free Software 
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27
+
28
+/*! \file
29
+ * \brief Parser :: Diversion header
30
+ * 
31
+ * \ingroup parser
32
+ */
33
+
27 34
  
28 35
 #include <stdlib.h>
29 36
 #include <string.h> 
... ...
@@ -34,7 +36,7 @@
34 34
 #include "parse_to.h"
35 35
 #include "msg_parser.h"
36 36
 
37
-/*
37
+/*! \brief
38 38
  * This method is used to parse DIVERSION header.
39 39
  *
40 40
  * params: msg : sip msg
... ...
@@ -78,7 +80,7 @@ int parse_diversion_header(struct sip_msg *msg)
78 78
 }
79 79
 
80 80
 
81
-/**
81
+/*! \brief
82 82
  * Get the value of a given diversion parameter
83 83
  */
84 84
 str *get_diversion_param(struct sip_msg *msg, str* name)
... ...
@@ -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,13 @@
24 24
  * along with this program; if not, write to the Free Software 
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27
+
28
+/*! \file
29
+ * \brief Parser :: Diversion header
30
+ * 
31
+ * \ingroup parser
32
+ */
33
+
27 34
  
28 35
 #ifndef PARSE_DIVERSION_H
29 36
 #define PARSE_DIVERSION_H
... ...
@@ -31,16 +33,16 @@
31 31
 #include "msg_parser.h"
32 32
  
33 33
 
34
-/* casting macro for accessing Diversion body */
34
+/*! \brief casting macro for accessing Diversion body */
35 35
 #define get_diversion(p_msg)  ((struct to_body*)(p_msg)->diversion->parsed)
36 36
  
37 37
  
38
-/*
38
+/*! \brief
39 39
  * Diversion header field parser
40 40
  */
41 41
 int parse_diversion_header(struct sip_msg *msg);
42 42
  
43
-/**
43
+/*! \brief
44 44
  * Get the value of a given diversion parameter
45 45
  */
46 46
 str *get_diversion_param(struct sip_msg *msg, str* name);
... ...
@@ -2,10 +2,6 @@
2 2
  * $Id$
3 3
  *
4 4
  * Event header field body parser.
5
- * The parser was written for Presence Agent module only.
6
- * it recognize presence package only, no sub-packages, no parameters
7
- * It should be replaced by a more generic parser if sub-packages or
8
- * parameters should be parsed too.
9 5
  *
10 6
  * Copyright (C) 2001-2003 FhG Fokus
11 7
  *
... ...
@@ -16,11 +12,6 @@
16 16
  * the Free Software Foundation; either version 2 of the License, or
17 17
  * (at your option) any later version
18 18
  *
19
- * For a license to use the ser software under conditions
20
- * other than those described here, or to purchase support for this
21
- * software, please contact iptel.org by e-mail at the following addresses:
22
- *    info@iptel.org
23
- *
24 19
  * ser is distributed in the hope that it will be useful,
25 20
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 21
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -35,6 +26,17 @@
35 35
  * 2003-04-26 ZSW (jiri)
36 36
  */
37 37
 
38
+/*! \file
39
+ * \brief Parser :: Event header field body parser.
40
+ *
41
+ * The parser was written for Presence Agent module only.
42
+ * it recognize presence package only, no sub-packages, no parameters
43
+ * It should be replaced by a more generic parser if sub-packages or
44
+ * parameters should be parsed too.
45
+ *
46
+ * \ingroup parser
47
+ */
48
+
38 49
 
39 50
 #include "parse_event.h"
40 51
 #include "../mem/mem.h"    /* pkg_malloc, pkg_free */
... ...
@@ -141,7 +143,7 @@ int event_parser(char* s, int len, event_t* e)
141 141
 }
142 142
 
143 143
 
144
-/*
144
+/*! \brief
145 145
  * Parse Event header field body
146 146
  */
147 147
 int parse_event(struct hdr_field* _h)
... ...
@@ -171,7 +173,7 @@ int parse_event(struct hdr_field* _h)
171 171
 }
172 172
 
173 173
 
174
-/*
174
+/*! \brief
175 175
  * Free all memory
176 176
  */
177 177
 void free_event(event_t** _e)
... ...
@@ -184,7 +186,7 @@ void free_event(event_t** _e)
184 184
 }
185 185
 
186 186
 
187
-/*
187
+/*! \brief
188 188
  * Print structure, for debugging only
189 189
  */
190 190
 void print_event(event_t* e)
... ...
@@ -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,6 +20,13 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: Event header field body parser.
30
+ *
31
+ *
32
+ * \ingroup parser
33
+ */
34
+
28 35
 
29 36
 #ifndef PARSE_EVENT_H
30 37
 #define PARSE_EVENT_H
... ...
@@ -31,6 +31,14 @@
31 31
  * 2003-04-26 ZSW (jiri)
32 32
  */
33 33
 
34
+/*! \file
35
+ * \brief Parser :: Expires header field body parser.
36
+ *
37
+ *
38
+ * \ingroup parser
39
+ */
40
+
41
+
34 42
 
35 43
 #include "parse_expires.h"
36 44
 #include <stdio.h>          /* printf */
... ...
@@ -99,7 +107,7 @@ static inline int expires_parser(char* _s, int _l, exp_body_t* _e)
99 99
 }
100 100
 
101 101
 
102
-/*
102
+/*! \brief
103 103
  * Parse expires header field body
104 104
  */
105 105
 int parse_expires(struct hdr_field* _h)
... ...
@@ -129,7 +137,7 @@ int parse_expires(struct hdr_field* _h)
129 129
 }
130 130
 
131 131
 
132
-/*
132
+/*! \brief
133 133
  * Free all memory associated with exp_body_t
134 134
  */
135 135
 void free_expires(exp_body_t** _e)
... ...
@@ -139,7 +147,7 @@ void free_expires(exp_body_t** _e)
139 139
 }
140 140
 
141 141
 
142
-/*
142
+/*! \brief
143 143
  * Print exp_body_t content, for debugging only
144 144
  */
145 145
 void print_expires(exp_body_t* _e)
... ...
@@ -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
... ...
@@ -27,6 +22,13 @@
27 27
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28 28
  */
29 29
 
30
+/*! \file
31
+ * \brief Parser :: Expires header field body parser
32
+ *
33
+ * \ingroup parser
34
+ */
35
+
36
+
30 37
 
31 38
 #ifndef PARSE_EXPIRES_H
32 39
 #define PARSE_EXPIRES_H
... ...
@@ -36,25 +38,25 @@
36 36
 
37 37
 
38 38
 typedef struct exp_body {
39
-	str text;            /* Original text representation */
40
-	unsigned char valid; /* Was parsing successful ? */
41
-	unsigned int val;    /* Parsed value */
39
+	str text;            /*!< Original text representation */
40
+	unsigned char valid; /*!< Was parsing successful ? */
41
+	unsigned int val;    /*!< Parsed value */
42 42
 } exp_body_t;
43 43
 
44 44
 
45
-/*
45
+/*! \brief
46 46
  * Parse expires header field body
47 47
  */
48 48
 int parse_expires(struct hdr_field* _h);
49 49
 
50 50
 
51
-/*
51
+/*! \brief
52 52
  * Free all memory associated with exp_body_t
53 53
  */
54 54
 void free_expires(exp_body_t** _e);
55 55
 
56 56
 
57
-/*
57
+/*! \brief
58 58
  * Print exp_body_t content, for debugging only
59 59
  */
60 60
 void print_expires(exp_body_t* _e);
... ...
@@ -34,6 +34,12 @@
34 34
  * 2003-04-26 ZSW (jiri)
35 35
  */
36 36
 
37
+/*! \file
38
+ * \brief Parser :: SIP first line parsing automaton
39
+ *
40
+ * \ingroup parser
41
+ */
42
+
37 43
 
38 44
 #include "../comp_defs.h"
39 45
 #include "../dprint.h"
... ...
@@ -25,6 +25,11 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: SIP first line parsing automaton
30
+ *
31
+ * \ingroup parser
32
+ */
28 33
 
29 34
 #ifndef PARSE_FLINE_H
30 35
 #define PARSE_FLINE_H
... ...
@@ -66,20 +71,20 @@
66 66
 #define PUBLISH_LEN 7
67 67
 
68 68
 struct msg_start {
69
-	int type;					/* Type of the Message - Request/Response */
70
-	int len; 					/* length including delimiter */
69
+	int type;					/*!< Type of the Message - Request/Response */
70
+	int len; 					/*!< length including delimiter */
71 71
 	union {
72 72
 		struct {
73
-			str method;       /* Method string */
74
-			str uri;          /* Request URI */
75
-			str version;      /* SIP version */
73
+			str method;       /*!< Method string */
74
+			str uri;          /*!< Request URI */
75
+			str version;      /*!< SIP version */
76 76
 			int method_value;
77 77
 		} request;
78 78
 		struct {
79
-			str version;      /* SIP version */
80
-			str status;       /* Reply status */
81
-			str reason;       /* Reply reason phrase */
82
-			unsigned int /* statusclass,*/ statuscode;
79
+			str version;      /*!< SIP version */
80
+			str status;       /*!< Reply status */
81
+			str reason;       /*!< Reply reason phrase */
82
+			unsigned int /*!< statusclass,*/ statuscode;
83 83
 		} reply;
84 84
 	}u;
85 85
 };
... ...
@@ -25,6 +25,11 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: SIP From header parsing
30
+ *
31
+ * \ingroup parser
32
+ */
28 33
 
29 34
 #include "parse_from.h"
30 35
 #include "parse_to.h"
... ...
@@ -35,8 +40,10 @@
35 35
 #include "../ut.h"
36 36
 #include "../mem/mem.h"
37 37
 
38
-/*
39
- * This method is used to parse the from header. It was decided not to parse
38
+/*! \brief
39
+ * This method is used to parse the from header.
40
+ *
41
+ * \note It was decided not to parse
40 42
  * anything in core that is not *needed* so this method gets called by 
41 43
  * rad_acc module and any other modules that needs the FROM header.
42 44
  *
... ...
@@ -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,6 +20,12 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
+/*! \file
29
+ * \brief Parser :: SIP From header parsing
30
+ *
31
+ * \ingroup parser
32
+ */
33
+
28 34
 
29 35
 #ifndef _PARSE_FROM_H
30 36
 #define _PARSE_FROM_H