瀏覽代碼

More parser/ doxygen changes

oej 16 年之前
父節點
當前提交
7b7456b07e

+ 10 - 8
parser/parse_allow.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Allow header
+ *
+ * \ingroup parser
+ */
+
+
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 #include "../dprint.h"
 #include "../dprint.h"
@@ -34,11 +36,11 @@
 #include "msg_parser.h"
 #include "msg_parser.h"
 
 
  
  
-/*
+/*! \brief
  * This method is used to parse Allow header.
  * This method is used to parse Allow header.
  *
  *
- * params: msg : sip msg
- * returns 0 on success,
+ * \params  msg : sip msg
+ * \return 0 on success,
  *        -1 on failure.
  *        -1 on failure.
  */
  */
 int parse_allow_header(struct hdr_field* _hf)
 int parse_allow_header(struct hdr_field* _hf)

+ 13 - 11
parser/parse_allow.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -24,6 +19,13 @@
  * along with this program; if not, write to the Free Software 
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
+
+/*! \file
+ * \brief Parser :: Allow header
+ *
+ * \ingroup parser
+ */
+
  
  
 #ifndef PARSE_ALLOW_H
 #ifndef PARSE_ALLOW_H
 #define PARSE_ALLOW_H
 #define PARSE_ALLOW_H
@@ -32,7 +34,7 @@
 #include "msg_parser.h"
 #include "msg_parser.h"
 
 
  
  
-/* 
+/*! \brief
  * casting macro for accessing Allow body 
  * casting macro for accessing Allow body 
  */
  */
 #define get_allow_methods(p_msg)							\
 #define get_allow_methods(p_msg)							\
@@ -40,26 +42,26 @@
 
 
 
 
 struct allow_body {
 struct allow_body {
-	unsigned int allow;     /* allow mask for the current hdr */
-	unsigned int allow_all; /* allow mask for the all allow hdr - it's
+	unsigned int allow;     /*!< allow mask for the current hdr */
+	unsigned int allow_all; /*!< allow mask for the all allow hdr - it's
 							 * set only for the first hdr in sibling
 							 * set only for the first hdr in sibling
 							 * list*/
 							 * list*/
 };
 };
 
 
 
 
-/*
+/*! \brief
  * Parse all Allow HFs
  * Parse all Allow HFs
  */
  */
 int parse_allow(struct sip_msg *msg);
 int parse_allow(struct sip_msg *msg);
 
 
 
 
-/*
+/*! \brief
  * Parse Allow HF body
  * Parse Allow HF body
  */
  */
 int parse_allow_header(struct hdr_field* _h);
 int parse_allow_header(struct hdr_field* _h);
 
 
 
 
-/*
+/*! \brief
  * Release memory
  * Release memory
  */
  */
 void free_allow_body(struct allow_body **ab);
 void free_allow_body(struct allow_body **ab);

+ 12 - 5
parser/parse_body.c

@@ -29,6 +29,13 @@
  *  2008-05-22  Initial version, get_body_part() is introduced (Miklos)
  *  2008-05-22  Initial version, get_body_part() is introduced (Miklos)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Body handling
+ *
+ * \ingroup parser
+ */
+
+
 #include "../trim.h"
 #include "../trim.h"
 #include "parser_f.h"
 #include "parser_f.h"
 #include "parse_content.h"
 #include "parse_content.h"
@@ -36,7 +43,7 @@
 #include "keys.h"
 #include "keys.h"
 #include "parse_body.h"
 #include "parse_body.h"
 
 
-/* returns the value of boundary parameter from the Contect-Type HF */
+/*! \brief returns the value of boundary parameter from the Contect-Type HF */
 static inline int get_boundary_param(struct sip_msg *msg, str *boundary)
 static inline int get_boundary_param(struct sip_msg *msg, str *boundary)
 {
 {
 	str	s;
 	str	s;
@@ -91,7 +98,7 @@ static inline int get_boundary_param(struct sip_msg *msg, str *boundary)
 	return 0;
 	return 0;
 }
 }
 
 
-/* search the next boundary in the buffer */
+/*! \brief search the next boundary in the buffer */
 static inline char *search_boundary(char *buf, char *buf_end, str *boundary)
 static inline char *search_boundary(char *buf, char *buf_end, str *boundary)
 {
 {
 	char *c;
 	char *c;
@@ -110,7 +117,7 @@ static inline char *search_boundary(char *buf, char *buf_end, str *boundary)
 	return NULL;
 	return NULL;
 }
 }
 
 
-/* extract the body of a part from a multipart SIP msg body */
+/*! \brief extract the body of a part from a multipart SIP msg body */
 inline static char *get_multipart_body(char *buf,
 inline static char *get_multipart_body(char *buf,
 					char *buf_end,
 					char *buf_end,
 					str *boundary,
 					str *boundary,
@@ -155,13 +162,13 @@ error:
 }
 }
 
 
 
 
-/* macros from parse_hname2.c */
+/*! \brief macros from parse_hname2.c */
 #define READ(val) \
 #define READ(val) \
 (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) << 24))
 (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) << 24))
 
 
 #define LOWER_DWORD(d) ((d) | 0x20202020)
 #define LOWER_DWORD(d) ((d) | 0x20202020)
 
 
-/* Returns the pointer within the msg body to the given type/subtype,
+/*! \brief Returns the pointer within the msg body to the given type/subtype,
  * and sets the length of the body part.
  * and sets the length of the body part.
  * The result can be the whole msg body, or a part of a multipart body.
  * The result can be the whole msg body, or a part of a multipart body.
  */
  */

+ 7 - 1
parser/parse_body.h

@@ -25,11 +25,17 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *
  */
  */
+/*! \file
+ * \brief Parser :: Body handling
+ *
+ * \ingroup parser
+ */
+
 
 
 #ifndef PARSE_BODY_H
 #ifndef PARSE_BODY_H
 #define PARSE_BODY_H
 #define PARSE_BODY_H
 
 
-/* Returns the pointer within the msg body to the given type/subtype,
+/*! \brief Returns the pointer within the msg body to the given type/subtype,
  * and sets the length.
  * and sets the length.
  * The result can be the whole msg body, or a part of a multipart body.
  * The result can be the whole msg body, or a part of a multipart body.
  */
  */

+ 19 - 15
parser/parse_content.c

@@ -11,11 +11,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -35,6 +30,12 @@
  *		some remaining characters (Miklos)
  *		some remaining characters (Miklos)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Content part
+ *
+ * \ingroup parser
+ */
+
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
@@ -53,15 +54,15 @@
 	( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )
 	( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )
 
 
 
 
-/*
+/*! \brief
  * Node of the type's tree; this tree contains all the known types;
  * Node of the type's tree; this tree contains all the known types;
  */
  */
 typedef struct type_node_s {
 typedef struct type_node_s {
-	char c;                      /* char contained by this node */
-	unsigned char final;         /* says what mime type/subtype was detected
-	                              * if string ends at this node */
-	unsigned char nr_sons;       /* the number of sub-nodes */
-	int next;                    /* the next sibling node */
+	char c;                      /*!< char contained by this node */
+	unsigned char final;         /*!< says what mime type/subtype was detected
+	                              *!< if string ends at this node */
+	unsigned char nr_sons;       /*!< the number of sub-nodes */
+	int next;                    /*!< the next sibling node */
 }type_node_t;
 }type_node_t;
 
 
 
 
@@ -379,9 +380,11 @@ error:
 
 
 
 
 
 
-/* returns: > 0 mime found
- *          = 0 hdr not found
- *          =-1 error */
+/*! \brief
+ * \return
+ *  	-   > 0 mime found
+ *      -   = 0 hdr not found
+ *      -   =-1 error */
 int parse_content_type_hdr( struct sip_msg *msg )
 int parse_content_type_hdr( struct sip_msg *msg )
 {
 {
 	char *end;
 	char *end;
@@ -485,7 +488,8 @@ error:
 	return -1;
 	return -1;
 }
 }
 
 
-/* returns: > 0 ok
+/*! \brief
+ * returns: > 0 ok
  *          = 0 hdr not found
  *          = 0 hdr not found
  *          = -1 error */
  *          = -1 error */
 int parse_accept_hdr( struct sip_msg *msg )
 int parse_accept_hdr( struct sip_msg *msg )

+ 20 - 16
parser/parse_content.h

@@ -11,11 +11,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -26,6 +21,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Content
+ *
+ * \ingroup parser
+ */
+
+
 #ifndef _PARSE_CONTENT_H
 #ifndef _PARSE_CONTENT_H
 #define _PARSE_CONTENT_H
 #define _PARSE_CONTENT_H
 
 
@@ -39,9 +41,10 @@ struct mime_type {
 
 
 
 
 
 
-/*
- * Mimes types/subtypes that are recognize
+/*! \name MimeTypes
+ * Mimes types/subtypes that are recognized
  */
  */
+/*! { */
 #define TYPE_TEXT            1
 #define TYPE_TEXT            1
 #define TYPE_MESSAGE         2
 #define TYPE_MESSAGE         2
 #define TYPE_APPLICATION     3
 #define TYPE_APPLICATION     3
@@ -66,34 +69,35 @@ struct mime_type {
 #define SUBTYPE_ALL          0xfe
 #define SUBTYPE_ALL          0xfe
 #define SUBTYPE_UNKNOWN      0xff
 #define SUBTYPE_UNKNOWN      0xff
 
 
+/*! } */
 
 
-/* taken from PA module - will be useful here */
+/*! \brief taken from PA module - will be useful here */
 #define MIMETYPE(x_,y_) ((TYPE_##x_ << 16) | (SUBTYPE_##y_))
 #define MIMETYPE(x_,y_) ((TYPE_##x_ << 16) | (SUBTYPE_##y_))
 
 
-/*
+/*! \brief
  * Maximum number of mimes allowed in Accept header 
  * Maximum number of mimes allowed in Accept header 
  */
  */
 #define MAX_MIMES_NR         128
 #define MAX_MIMES_NR         128
 
 
-/*
+/*! \brief
  * returns the content-length value of a sip_msg as an integer
  * returns the content-length value of a sip_msg as an integer
  */
  */
 #define get_content_length(_msg_)   ((long)((_msg_)->content_length->parsed))
 #define get_content_length(_msg_)   ((long)((_msg_)->content_length->parsed))
 
 
 
 
-/*
+/*! \brief
  * returns the content-type value of a sip_msg as an integer
  * returns the content-type value of a sip_msg as an integer
  */
  */
 #define get_content_type(_msg_)   ((int)(long)((_msg_)->content_type->parsed))
 #define get_content_type(_msg_)   ((int)(long)((_msg_)->content_type->parsed))
 
 
 
 
-/*
+/*! \brief
  * returns the accept values of a sip_msg as an null-terminated array
  * returns the accept values of a sip_msg as an null-terminated array
  * of integer
  * of integer
  */
  */
 #define get_accept(_msg_) ((int*)((_msg_)->accept->parsed))
 #define get_accept(_msg_) ((int*)((_msg_)->accept->parsed))
 
 
-/*
+/*! \brief
  * parse the body of the Content-Type header. It's value is also converted
  * parse the body of the Content-Type header. It's value is also converted
  * as int.
  * as int.
  * Returns:   n (n>0)  : the found type
  * Returns:   n (n>0)  : the found type
@@ -104,7 +108,7 @@ int parse_content_type_hdr( struct sip_msg *msg);
 
 
 int parse_accept_body(struct hdr_field *hdr);
 int parse_accept_body(struct hdr_field *hdr);
 
 
-/*
+/*! \brief
  * parse the body of the Accept header. It's values are also converted
  * parse the body of the Accept header. It's values are also converted
  * as an null-terminated array of ints.
  * as an null-terminated array of ints.
  * Returns:   1 : OK
  * Returns:   1 : OK
@@ -114,14 +118,14 @@ int parse_accept_body(struct hdr_field *hdr);
 int parse_accept_hdr( struct sip_msg *msg );
 int parse_accept_hdr( struct sip_msg *msg );
 
 
 
 
-/*
+/*! \brief
  *  parse the body of a Content_-Length header. Also tries to recognize the
  *  parse the body of a Content_-Length header. Also tries to recognize the
  *  type specified by this header (see th above defines).
  *  type specified by this header (see th above defines).
  *  Returns the first chr after the end of the header.
  *  Returns the first chr after the end of the header.
  */
  */
 char* parse_content_length( char* buffer, char* end, int* len);
 char* parse_content_length( char* buffer, char* end, int* len);
 
 
-/*
+/*! \brief
  * Sets the mime type from the body of a Content-Type header
  * Sets the mime type from the body of a Content-Type header
  */
  */
 char* decode_mime_type(char *start, char *end, unsigned int *mime_type);
 char* decode_mime_type(char *start, char *end, unsigned int *mime_type);

+ 7 - 9
parser/parse_cseq.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -30,6 +25,13 @@
  * 2003-01-22 zero-termination in CSeq eliminated (jiri)
  * 2003-01-22 zero-termination in CSeq eliminated (jiri)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Cseq header field handling
+ *
+ * \ingroup parser
+ */
+
+
 
 
 #include "../comp_defs.h"
 #include "../comp_defs.h"
 #include "parse_cseq.h"
 #include "parse_cseq.h"
@@ -39,10 +41,6 @@
 #include "parse_methods.h"
 #include "parse_methods.h"
 #include "../mem/mem.h"
 #include "../mem/mem.h"
 
 
-/*
- * Parse CSeq header field
- */
-
 /*BUGGY*/
 /*BUGGY*/
 char* parse_cseq(char *buf, char* end, struct cseq_body* cb)
 char* parse_cseq(char *buf, char* end, struct cseq_body* cb)
 {
 {

+ 14 - 7
parser/parse_cseq.h

@@ -25,6 +25,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Parse CSEQ header
+ *
+ * \ingroup parser
+ */
+
+
 
 
 #ifndef PARSE_CSEQ
 #ifndef PARSE_CSEQ
 #define PARSE_CSEQ
 #define PARSE_CSEQ
@@ -33,24 +40,24 @@
 
 
 
 
 struct cseq_body{
 struct cseq_body{
-	int error;  /* Error code */
-	str number; /* CSeq number */
-	str method; /* Associated method */
-	unsigned int method_id; /* Associated method ID */
+	int error;  /*!< Error code */
+	str number; /*!< CSeq number */
+	str method; /*!< Associated method */
+	unsigned int method_id; /*!< Associated method ID */
 };
 };
 
 
 
 
-/* casting macro for accessing CSEQ body */
+/*! \brief casting macro for accessing CSEQ body */
 #define get_cseq(p_msg) ((struct cseq_body*)(p_msg)->cseq->parsed)
 #define get_cseq(p_msg) ((struct cseq_body*)(p_msg)->cseq->parsed)
 
 
 
 
-/*
+/*! \brief
  * Parse CSeq header field
  * Parse CSeq header field
  */
  */
 char* parse_cseq(char *buf, char* end, struct cseq_body* cb);
 char* parse_cseq(char *buf, char* end, struct cseq_body* cb);
 
 
 
 
-/*
+/*! \brief
  * Free all associated memory
  * Free all associated memory
  */
  */
 void free_cseq(struct cseq_body* cb);
 void free_cseq(struct cseq_body* cb);

+ 8 - 6
parser/parse_date.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Date header
+ *
+ * \ingroup parser
+ */
+
+
 
 
 #include <string.h>
 #include <string.h>
 #include "parse_date.h"
 #include "parse_date.h"
@@ -48,7 +50,7 @@ inline static int char2int (char *p, int *t)
 	return 0;
 	return 0;
 }
 }
 
 
-/*
+/*! \brief
  * Converts a RFC 1123 formatted date string to stuct tm
  * Converts a RFC 1123 formatted date string to stuct tm
  */
  */
 static int rfc1123totm (char *stime, struct tm *ttm ) {
 static int rfc1123totm (char *stime, struct tm *ttm ) {

+ 7 - 5
parser/parse_date.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Date header
+ *
+ * \ingroup parser
+ */
+
+
 
 
 #ifndef PARSE_DATE
 #ifndef PARSE_DATE
 #define PARSE_DATE
 #define PARSE_DATE

+ 7 - 5
parser/parse_def.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Definitions
+ *
+ * \ingroup parser
+ */
+
+
 
 
 #ifndef PARSE_DEF_H
 #ifndef PARSE_DEF_H
 #define PARSE_DEF_H
 #define PARSE_DEF_H

+ 10 - 9
parser/parse_disposition.c

@@ -11,11 +11,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -29,6 +24,12 @@
  * 2003-09-09 created (bogdan)
  * 2003-09-09 created (bogdan)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Content-Disposition header
+ *
+ * \ingroup parser
+ */
+
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
@@ -41,7 +42,7 @@
 
 
 
 
 
 
-/* parse a string that supposed to be a disposition and fills up the structure
+/*! \brief parse a string that supposed to be a disposition and fills up the structure
  * Returns: -1 : error
  * Returns: -1 : error
  *           o : success */
  *           o : success */
 int parse_disposition( str *s, struct disposition *disp)
 int parse_disposition( str *s, struct disposition *disp)
@@ -346,7 +347,7 @@ error:
 
 
 
 
 
 
-/* Frees the entire disposition structure (params + itself) */
+/*! \brief Frees the entire disposition structure (params + itself) */
 void free_disposition( struct disposition **disp)
 void free_disposition( struct disposition **disp)
 {
 {
 	struct disposition_param *param;
 	struct disposition_param *param;
@@ -363,7 +364,7 @@ void free_disposition( struct disposition **disp)
 
 
 
 
 
 
-/* looks inside the message, gets the Content-Disposition hdr, parse it, builds
+/*! \brief looks inside the message, gets the Content-Disposition hdr, parse it, builds
  * and fills a disposition structure for it what will be attached to hdr as
  * and fills a disposition structure for it what will be attached to hdr as
  * parsed link.
  * parsed link.
  * Returns:  -1 : error
  * Returns:  -1 : error
@@ -413,7 +414,7 @@ error:
 }
 }
 
 
 
 
-/* Prints recursive a disposition structure */
+/*! \brief Prints recursive a disposition structure */
 void print_disposition( struct disposition *disp)
 void print_disposition( struct disposition *disp)
 {
 {
 	struct disposition_param *param;
 	struct disposition_param *param;

+ 11 - 9
parser/parse_disposition.h

@@ -11,11 +11,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -29,6 +24,13 @@
  * 2003-09-09 created (bogdan)
  * 2003-09-09 created (bogdan)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Content-Disposition header
+ *
+ * \ingroup parser
+ */
+
+
 #ifndef _PARSE_DISPOSITION_H_
 #ifndef _PARSE_DISPOSITION_H_
 #define _PARSE_DISPOSITION_H_
 #define _PARSE_DISPOSITION_H_
 
 
@@ -54,7 +56,7 @@ struct disposition {
 };
 };
 
 
 
 
-/* looks inside the message, gets the Content-Disposition hdr, parse it, builds
+/*! \brief looks inside the message, gets the Content-Disposition hdr, parse it, builds
  * and fills a disposition structure for it what will be attached to hdr as
  * and fills a disposition structure for it what will be attached to hdr as
  * parsed link.
  * parsed link.
  * Returns:  -1 : error
  * Returns:  -1 : error
@@ -64,16 +66,16 @@ struct disposition {
 int parse_content_disposition( struct sip_msg *msg );
 int parse_content_disposition( struct sip_msg *msg );
 
 
 
 
-/* parse a string that supposed to be a disposition and fills up the structure
+/*! \brief parse a string that supposed to be a disposition and fills up the structure
  * Returns: -1 : error
  * Returns: -1 : error
  *           o : success */
  *           o : success */
 int parse_disposition( str *s, struct disposition *disp);
 int parse_disposition( str *s, struct disposition *disp);
 
 
 
 
-/* Frees the entire disposition structure (params + itself) */
+/*! \brief Frees the entire disposition structure (params + itself) */
 void free_disposition( struct disposition **disp);
 void free_disposition( struct disposition **disp);
 
 
-/* Prints recursive a disposition structure */
+/*! \brief Prints recursive a disposition structure */
 void print_disposition( struct disposition *disp);
 void print_disposition( struct disposition *disp);
 
 
 #endif
 #endif

+ 9 - 7
parser/parse_diversion.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -24,6 +19,13 @@
  * along with this program; if not, write to the Free Software 
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
+
+/*! \file
+ * \brief Parser :: Diversion header
+ * 
+ * \ingroup parser
+ */
+
  
  
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h> 
 #include <string.h> 
@@ -34,7 +36,7 @@
 #include "parse_to.h"
 #include "parse_to.h"
 #include "msg_parser.h"
 #include "msg_parser.h"
 
 
-/*
+/*! \brief
  * This method is used to parse DIVERSION header.
  * This method is used to parse DIVERSION header.
  *
  *
  * params: msg : sip msg
  * params: msg : sip msg
@@ -78,7 +80,7 @@ int parse_diversion_header(struct sip_msg *msg)
 }
 }
 
 
 
 
-/**
+/*! \brief
  * Get the value of a given diversion parameter
  * Get the value of a given diversion parameter
  */
  */
 str *get_diversion_param(struct sip_msg *msg, str* name)
 str *get_diversion_param(struct sip_msg *msg, str* name)

+ 10 - 8
parser/parse_diversion.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -24,6 +19,13 @@
  * along with this program; if not, write to the Free Software 
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
+
+/*! \file
+ * \brief Parser :: Diversion header
+ * 
+ * \ingroup parser
+ */
+
  
  
 #ifndef PARSE_DIVERSION_H
 #ifndef PARSE_DIVERSION_H
 #define PARSE_DIVERSION_H
 #define PARSE_DIVERSION_H
@@ -31,16 +33,16 @@
 #include "msg_parser.h"
 #include "msg_parser.h"
  
  
 
 
-/* casting macro for accessing Diversion body */
+/*! \brief casting macro for accessing Diversion body */
 #define get_diversion(p_msg)  ((struct to_body*)(p_msg)->diversion->parsed)
 #define get_diversion(p_msg)  ((struct to_body*)(p_msg)->diversion->parsed)
  
  
  
  
-/*
+/*! \brief
  * Diversion header field parser
  * Diversion header field parser
  */
  */
 int parse_diversion_header(struct sip_msg *msg);
 int parse_diversion_header(struct sip_msg *msg);
  
  
-/**
+/*! \brief
  * Get the value of a given diversion parameter
  * Get the value of a given diversion parameter
  */
  */
 str *get_diversion_param(struct sip_msg *msg, str* name);
 str *get_diversion_param(struct sip_msg *msg, str* name);

+ 14 - 12
parser/parse_event.c

@@ -2,10 +2,6 @@
  * $Id$
  * $Id$
  *
  *
  * Event header field body parser.
  * Event header field body parser.
- * The parser was written for Presence Agent module only.
- * it recognize presence package only, no sub-packages, no parameters
- * It should be replaced by a more generic parser if sub-packages or
- * parameters should be parsed too.
  *
  *
  * Copyright (C) 2001-2003 FhG Fokus
  * Copyright (C) 2001-2003 FhG Fokus
  *
  *
@@ -16,11 +12,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -35,6 +26,17 @@
  * 2003-04-26 ZSW (jiri)
  * 2003-04-26 ZSW (jiri)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Event header field body parser.
+ *
+ * The parser was written for Presence Agent module only.
+ * it recognize presence package only, no sub-packages, no parameters
+ * It should be replaced by a more generic parser if sub-packages or
+ * parameters should be parsed too.
+ *
+ * \ingroup parser
+ */
+
 
 
 #include "parse_event.h"
 #include "parse_event.h"
 #include "../mem/mem.h"    /* pkg_malloc, pkg_free */
 #include "../mem/mem.h"    /* pkg_malloc, pkg_free */
@@ -141,7 +143,7 @@ int event_parser(char* s, int len, event_t* e)
 }
 }
 
 
 
 
-/*
+/*! \brief
  * Parse Event header field body
  * Parse Event header field body
  */
  */
 int parse_event(struct hdr_field* _h)
 int parse_event(struct hdr_field* _h)
@@ -171,7 +173,7 @@ int parse_event(struct hdr_field* _h)
 }
 }
 
 
 
 
-/*
+/*! \brief
  * Free all memory
  * Free all memory
  */
  */
 void free_event(event_t** _e)
 void free_event(event_t** _e)
@@ -184,7 +186,7 @@ void free_event(event_t** _e)
 }
 }
 
 
 
 
-/*
+/*! \brief
  * Print structure, for debugging only
  * Print structure, for debugging only
  */
  */
 void print_event(event_t* e)
 void print_event(event_t* e)

+ 7 - 5
parser/parse_event.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Event header field body parser.
+ *
+ *
+ * \ingroup parser
+ */
+
 
 
 #ifndef PARSE_EVENT_H
 #ifndef PARSE_EVENT_H
 #define PARSE_EVENT_H
 #define PARSE_EVENT_H

+ 11 - 3
parser/parse_expires.c

@@ -31,6 +31,14 @@
  * 2003-04-26 ZSW (jiri)
  * 2003-04-26 ZSW (jiri)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Expires header field body parser.
+ *
+ *
+ * \ingroup parser
+ */
+
+
 
 
 #include "parse_expires.h"
 #include "parse_expires.h"
 #include <stdio.h>          /* printf */
 #include <stdio.h>          /* printf */
@@ -99,7 +107,7 @@ static inline int expires_parser(char* _s, int _l, exp_body_t* _e)
 }
 }
 
 
 
 
-/*
+/*! \brief
  * Parse expires header field body
  * Parse expires header field body
  */
  */
 int parse_expires(struct hdr_field* _h)
 int parse_expires(struct hdr_field* _h)
@@ -129,7 +137,7 @@ int parse_expires(struct hdr_field* _h)
 }
 }
 
 
 
 
-/*
+/*! \brief
  * Free all memory associated with exp_body_t
  * Free all memory associated with exp_body_t
  */
  */
 void free_expires(exp_body_t** _e)
 void free_expires(exp_body_t** _e)
@@ -139,7 +147,7 @@ void free_expires(exp_body_t** _e)
 }
 }
 
 
 
 
-/*
+/*! \brief
  * Print exp_body_t content, for debugging only
  * Print exp_body_t content, for debugging only
  */
  */
 void print_expires(exp_body_t* _e)
 void print_expires(exp_body_t* _e)

+ 13 - 11
parser/parse_expires.h

@@ -12,11 +12,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -27,6 +22,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: Expires header field body parser
+ *
+ * \ingroup parser
+ */
+
+
 
 
 #ifndef PARSE_EXPIRES_H
 #ifndef PARSE_EXPIRES_H
 #define PARSE_EXPIRES_H
 #define PARSE_EXPIRES_H
@@ -36,25 +38,25 @@
 
 
 
 
 typedef struct exp_body {
 typedef struct exp_body {
-	str text;            /* Original text representation */
-	unsigned char valid; /* Was parsing successful ? */
-	unsigned int val;    /* Parsed value */
+	str text;            /*!< Original text representation */
+	unsigned char valid; /*!< Was parsing successful ? */
+	unsigned int val;    /*!< Parsed value */
 } exp_body_t;
 } exp_body_t;
 
 
 
 
-/*
+/*! \brief
  * Parse expires header field body
  * Parse expires header field body
  */
  */
 int parse_expires(struct hdr_field* _h);
 int parse_expires(struct hdr_field* _h);
 
 
 
 
-/*
+/*! \brief
  * Free all memory associated with exp_body_t
  * Free all memory associated with exp_body_t
  */
  */
 void free_expires(exp_body_t** _e);
 void free_expires(exp_body_t** _e);
 
 
 
 
-/*
+/*! \brief
  * Print exp_body_t content, for debugging only
  * Print exp_body_t content, for debugging only
  */
  */
 void print_expires(exp_body_t* _e);
 void print_expires(exp_body_t* _e);

+ 6 - 0
parser/parse_fline.c

@@ -34,6 +34,12 @@
  * 2003-04-26 ZSW (jiri)
  * 2003-04-26 ZSW (jiri)
  */
  */
 
 
+/*! \file
+ * \brief Parser :: SIP first line parsing automaton
+ *
+ * \ingroup parser
+ */
+
 
 
 #include "../comp_defs.h"
 #include "../comp_defs.h"
 #include "../dprint.h"
 #include "../dprint.h"

+ 14 - 9
parser/parse_fline.h

@@ -25,6 +25,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: SIP first line parsing automaton
+ *
+ * \ingroup parser
+ */
 
 
 #ifndef PARSE_FLINE_H
 #ifndef PARSE_FLINE_H
 #define PARSE_FLINE_H
 #define PARSE_FLINE_H
@@ -66,20 +71,20 @@
 #define PUBLISH_LEN 7
 #define PUBLISH_LEN 7
 
 
 struct msg_start {
 struct msg_start {
-	int type;					/* Type of the Message - Request/Response */
-	int len; 					/* length including delimiter */
+	int type;					/*!< Type of the Message - Request/Response */
+	int len; 					/*!< length including delimiter */
 	union {
 	union {
 		struct {
 		struct {
-			str method;       /* Method string */
-			str uri;          /* Request URI */
-			str version;      /* SIP version */
+			str method;       /*!< Method string */
+			str uri;          /*!< Request URI */
+			str version;      /*!< SIP version */
 			int method_value;
 			int method_value;
 		} request;
 		} request;
 		struct {
 		struct {
-			str version;      /* SIP version */
-			str status;       /* Reply status */
-			str reason;       /* Reply reason phrase */
-			unsigned int /* statusclass,*/ statuscode;
+			str version;      /*!< SIP version */
+			str status;       /*!< Reply status */
+			str reason;       /*!< Reply reason phrase */
+			unsigned int /*!< statusclass,*/ statuscode;
 		} reply;
 		} reply;
 	}u;
 	}u;
 };
 };

+ 9 - 2
parser/parse_from.c

@@ -25,6 +25,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: SIP From header parsing
+ *
+ * \ingroup parser
+ */
 
 
 #include "parse_from.h"
 #include "parse_from.h"
 #include "parse_to.h"
 #include "parse_to.h"
@@ -35,8 +40,10 @@
 #include "../ut.h"
 #include "../ut.h"
 #include "../mem/mem.h"
 #include "../mem/mem.h"
 
 
-/*
- * This method is used to parse the from header. It was decided not to parse
+/*! \brief
+ * This method is used to parse the from header.
+ *
+ * \note It was decided not to parse
  * anything in core that is not *needed* so this method gets called by 
  * anything in core that is not *needed* so this method gets called by 
  * rad_acc module and any other modules that needs the FROM header.
  * rad_acc module and any other modules that needs the FROM header.
  *
  *

+ 6 - 5
parser/parse_from.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  * (at your option) any later version
  *
  *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
  * ser is distributed in the hope that it will be useful,
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+/*! \file
+ * \brief Parser :: SIP From header parsing
+ *
+ * \ingroup parser
+ */
+
 
 
 #ifndef _PARSE_FROM_H
 #ifndef _PARSE_FROM_H
 #define _PARSE_FROM_H
 #define _PARSE_FROM_H