Browse Source

Doxygen changes

oej 16 years ago
parent
commit
1eb01c664d

+ 3 - 2
parser/parse_content.h

@@ -44,7 +44,8 @@ struct mime_type {
 /*! \name MimeTypes
  * Mimes types/subtypes that are recognized
  */
-/*! { */
+/*@{ */
+
 #define TYPE_TEXT            1
 #define TYPE_MESSAGE         2
 #define TYPE_APPLICATION     3
@@ -69,7 +70,7 @@ struct mime_type {
 #define SUBTYPE_ALL          0xfe
 #define SUBTYPE_UNKNOWN      0xff
 
-/*! } */
+/*@} */
 
 /*! \brief taken from PA module - will be useful here */
 #define MIMETYPE(x_,y_) ((TYPE_##x_ << 16) | (SUBTYPE_##y_))

+ 9 - 2
parser/parse_hname2.c

@@ -35,6 +35,11 @@
  * 2007-07-27 added support for Retry-After (andrei)
  */
 
+/*! \file
+ * \brief Parser :: Fast 32-bit Header Field Name Parser
+ *
+ * \ingroup parser
+ */
 
 #include "../comp_defs.h"
 #include "parse_hname2.h"
@@ -44,7 +49,7 @@
 #define LOWER_BYTE(b) ((b) | 0x20)
 #define LOWER_DWORD(d) ((d) | 0x20202020)
 
-/*
+/*! \brief
  * Skip all white-chars and return position of the first
  * non-white char
  */
@@ -59,9 +64,10 @@ static inline char* skip_ws(char* p, unsigned int size)
 	return p;
 }
 
-/*
+/*! \name 
  * Parser macros
  */
+/*! { */
 #include "case_via.h"      /* Via */
 #include "case_from.h"     /* From */
 #include "case_to.h"       /* To */
@@ -101,6 +107,7 @@ static inline char* skip_ws(char* p, unsigned int size)
 #include "case_path.h"     /* Path */
 #include "case_priv.h"
 
+/*! } */
 
 #define READ(val) \
 (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) << 24))

+ 6 - 6
parser/parse_hname2.h

@@ -12,11 +12,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -27,6 +22,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Fast 32-bit Header Field Name Parser
+ *
+ * \ingroup parser
+ */
 
 #ifndef PARSE_HNAME2_H
 #define PARSE_HNAME2_H
@@ -34,7 +34,7 @@
 #include "hf.h"
 
 
-/*
+/*! \brief
  * Fast 32-bit header field name parser
  */
 char* parse_hname2(char* begin, char* end, struct hdr_field* hdr);

+ 7 - 5
parser/parse_hostport.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * 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
  */
 
+/*! \file
+ * \brief Parser :: Parse domain/hostname and port argument
+ *
+ * \ingroup parser
+ */
+
+
 #ifdef _OBSOLETED
 
 #include "parse_hostport.h"

+ 6 - 0
parser/parse_hostport.h

@@ -25,6 +25,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Parse domain/hostname and port argument
+ *
+ * \ingroup parser
+ */
+
 
 #ifndef PARSE_HOSTPORT_H
 #define PARSE_HOSTPORT_H

+ 7 - 1
parser/parse_identity.c

@@ -25,6 +25,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Parse Identity header field
+ *
+ * \ingroup parser
+ */
+
 
 #include <string.h>
 #include "parse_identity.h"
@@ -50,7 +56,7 @@ inline static int isendofhash (char* p, char* end)
 }
 
 
-/*
+/*! \brief
  * If the value of Identity header contains any LWS then we've to create
  * a new buffer and move there the LWSless part
  */

+ 15 - 10
parser/parse_identity.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * 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
  */
 
+/*! \file
+ * \brief Parser :: Parse Identity header field
+ *
+ * \ingroup parser
+ */
+
 
 #ifndef PARSE_IDENTITY
 #define PARSE_IDENTITY
@@ -33,24 +34,28 @@
 #include "msg_parser.h"
 
 struct identity_body{
-	int error;  		/* Error code */
-	int ballocated;  	/* Does hash point to an allocated area */
+	int error;  		/*!< Error code */
+	int ballocated;  	/*!< Does hash point to an allocated area */
 	str hash;
 };
 
 
-/* casting macro for accessing IDENTITY body */
+/*! \brief casting macro for accessing IDENTITY body */
 #define get_identity(p_msg) ((struct identity_body*)(p_msg)->identity->parsed)
 
 
-/*
+/*! \brief
  * Parse Identity header field
  */
 void parse_identity(char *buf, char *end, struct identity_body *ib);
+
+/*! \brief
+ * Parse Identity header field
+ */
 int parse_identity_header(struct sip_msg *msg);
 
 
-/*
+/*! \brief
  * Free all associated memory
  */
 void free_identity(struct identity_body *ib);

+ 7 - 5
parser/parse_identityinfo.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * 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
  */
 
+/*! \file
+ * \brief Parser :: Parse Identity-info header field
+ *
+ * \ingroup parser
+ */
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -34,6 +35,7 @@
 #include "parser_f.h"  /* eat_space_end and so on */
 
 
+/*! \brief Parse Identity-info header field */
 void parse_identityinfo(char *buffer, char *end, struct identityinfo_body *ii_b)
 {
 	int status = II_START;

+ 5 - 5
parser/parse_identityinfo.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Parse Identity-info header field
+ *
+ * \ingroup parser
+ */
 
 #ifndef PARSE_IDENTITYNFO
 #define PARSE_IDENTITYNFO

+ 13 - 11
parser/parse_methods.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,13 +20,19 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Parse Methods
+ *
+ * \ingroup parser
+ */
+
 #include <strings.h>
 #include "../dprint.h"
 #include "../trim.h"
 #include "parse_methods.h"
 
 
-/*
+/*! \brief
  * Check if argument is valid RFC3261 token character.
  */
 static int token_char(char _c)
@@ -46,10 +47,11 @@ static int token_char(char _c)
 
 
 
-/** Parse a string containing a method.
+/*! \brief Parse a string containing a method.
+ *
  * Parse a method pointed by s & assign its enum bit to method. The string
  * _must_ contain _only_ the method (without trailing or heading whitespace).
- * @return 0 on success, -1 on error
+ * \return 0 on success, -1 on error
  */
 int parse_method_name(str* s, enum request_method* method)
  {
@@ -159,14 +161,14 @@ int parse_method_name(str* s, enum request_method* method)
 		default:
 			break;
 	}
-/* unknown method */
+	/* unknown method */
 	*method = METHOD_OTHER;
 	return 0;
 }
 
 
 
- /*
+ /*! \brief
   * Parse a method pointed by _next, assign its enum bit to _method, and update
   * _next past the method. Returns 1 if parse succeeded and 0 otherwise.
   */
@@ -352,7 +354,7 @@ found:
  }
  
  
- /* 
+ /*! \brief
   * Parse comma separated list of methods pointed by _body and assign their
   * enum bits to _methods.  Returns 0 on success and -1 on failure.
   */

+ 7 - 0
parser/parse_methods.h

@@ -25,6 +25,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Parse Methods
+ *
+ * \ingroup parser
+ */
+
+
 #ifndef PARSE_METHODS_H
 #define PARSE_METHODS_H
 

+ 8 - 7
parser/parse_nameaddr.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -30,6 +25,12 @@
  * 2003-04-26 ZSW (jiri)
  */
 
+/*! \file
+ * \brief Parser :: Parse name-addr part
+ *
+ * \ingroup parser
+ */
+
 #include <string.h>
 #include "../dprint.h"
 #include "parse_nameaddr.h"
@@ -37,7 +38,7 @@
 #include "../ut.h"
 
 
-/*
+/*! \brief
  * Parse name-addr part, the given string can be longer,
  * parsing will stop when closing > is found
  */
@@ -73,7 +74,7 @@ int parse_nameaddr(str* _s, name_addr_t* _a)
 }
 
 
-/*
+/*! \brief
  * Print a name-addr structure, just for debugging
  */
 void print_nameaddr(FILE* _o, name_addr_t* _a)

+ 12 - 11
parser/parse_nameaddr.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -29,31 +24,37 @@
  * 2003-03-24 Created by janakj
  */
 
+/*! \file
+ * \brief Parser :: Parse name-addr part
+ *
+ * \ingroup parser
+ */
+
 #ifndef PARSE_NAMEADDR_H
 #define PARSE_NAMEADDR_H
 
 #include <stdio.h>
 #include "../str.h"
 
-/*
+/*! \brief
  * Name-addr structure, see RFC3261 for more details
  */
 typedef struct name_addr {
-	str name;   /* Display name part */
-	str uri;    /* Uri part without surrounding <> */
-	int len;    /* Total length of the field (including all
+	str name;   /*!< Display name part */
+	str uri;    /*!< Uri part without surrounding <> */
+	int len;    /*!< Total length of the field (including all
 		    * whitechars present in the parsed message */
 } name_addr_t;
 
 
-/*
+/*! \brief
  * Parse name-addr part, the given string can be longer,
  * parsing will stop when closing > is found
  */
 int parse_nameaddr(str* _s, name_addr_t* _a);
 
 
-/*
+/*! \brief
  * Print a name-addr structure, just for debugging
  */
 void print_nameaddr(FILE* _o, name_addr_t* _a);

+ 28 - 26
parser/parse_param.c

@@ -12,11 +12,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -33,6 +28,12 @@
  * 2003-04-07 URI class added (janakj)
  */
 
+/*! \file
+ * \brief Parser :: Generic Parameter Parser
+ *
+ * \ingroup parser
+ */
+
 #include <string.h>
 #include "../str.h"
 #include "../ut.h"
@@ -103,7 +104,7 @@ static inline void parse_event_dialog_class(param_hooks_t* h, param_t* p)
 }
 
 
-/*
+/*! \brief
  * Try to find out parameter name, recognized parameters
  * are q, expires and methods
  */
@@ -164,7 +165,7 @@ static inline void parse_contact_class(param_hooks_t* _h, param_t* _p)
 }
 
 
-/*
+/*! \brief
  * Try to find out parameter name, recognized parameters
  * are transport, lr, r2, maddr
  */
@@ -245,7 +246,7 @@ static inline void parse_uri_class(param_hooks_t* _h, param_t* _p)
 }
 
 
-/*
+/*! \brief
  * Parse quoted string in a parameter body
  * return the string without quotes in _r
  * parameter and update _s to point behind the
@@ -292,7 +293,7 @@ static inline int parse_quoted_param(str* _s, str* _r)
 }
 
 
-/*
+/*! \brief
  * Parse unquoted token in a parameter body
  * let _r point to the token and update _s
  * to point right behind the token
@@ -354,7 +355,7 @@ static inline int parse_token_param(str* _s, str* _r)
 }
 
 
-/*
+/*! \brief
  * Parse a parameter name
  */
 static inline void parse_param_name(str* _s, pclass_t _c, param_hooks_t* _h, param_t* _p)
@@ -397,7 +398,7 @@ static inline void parse_param_name(str* _s, pclass_t _c, param_hooks_t* _h, par
 
 
 
-/*
+/*! \brief
  * Parse body of a parameter. It can be quoted string or
  * a single token.
  */
@@ -419,7 +420,7 @@ static inline int parse_param_body(str* _s, param_t* _c)
 }
 
 
-/**
+/*!  \brief
  * Only parse one parameter
  * Returns:
  * 	t: out parameter
@@ -491,13 +492,14 @@ error:
 
 
 
-/*
+/*! \brief
  * Parse parameters
- * _s is string containing parameters, it will be updated to point behind the parameters
- * _c is class of parameters
- * _h is pointer to structure that will be filled with pointer to well known parameters
- * linked list of parsed parameters will be stored in
- * the variable _p is pointing to
+ *  \param _s is string containing parameters, it will be updated to point behind the parameters
+ *  \param _c is class of parameters
+ *  \param _h is pointer to structure that will be filled with pointer to well known parameters
+ *  \param the variable _p is pointing to
+ * linked list of parsed parameters will be stored
+ *
  * The function returns 0 on success and negative number
  * on an error
  */
@@ -548,7 +550,7 @@ int parse_params(str* _s, pclass_t _c, param_hooks_t* _h, param_t** _p)
 }
 
 
-/*
+/*! \brief
  * Free linked list of parameters
  */
 static inline void do_free_params(param_t* _p, int _shm)
@@ -564,7 +566,7 @@ static inline void do_free_params(param_t* _p, int _shm)
 }
 
 
-/*
+/*! \brief
  * Free linked list of parameters
  */
 void free_params(param_t* _p)
@@ -573,7 +575,7 @@ void free_params(param_t* _p)
 }
 
 
-/*
+/*! \brief
  * Free linked list of parameters
  */
 void shm_free_params(param_t* _p)
@@ -582,7 +584,7 @@ void shm_free_params(param_t* _p)
 }
 
 
-/*
+/*! \brief
  * Print a parameter structure, just for debugging
  */
 static inline void print_param(FILE* _o, param_t* _p)
@@ -622,7 +624,7 @@ static inline void print_param(FILE* _o, param_t* _p)
 }
 
 
-/*
+/*! \brief
  * Print linked list of parameters, just for debugging
  */
 void print_params(FILE* _o, param_t* _p)
@@ -637,7 +639,7 @@ void print_params(FILE* _o, param_t* _p)
 }
 
 
-/*
+/*! \brief
  * Duplicate linked list of parameters
  */
 static inline int do_duplicate_params(param_t** _n, param_t* _p, int _shm)
@@ -679,7 +681,7 @@ static inline int do_duplicate_params(param_t** _n, param_t* _p, int _shm)
 }
 
 
-/*
+/*! \brief
  * Duplicate linked list of parameters
  */
 int duplicate_params(param_t** _n, param_t* _p)
@@ -688,7 +690,7 @@ int duplicate_params(param_t** _n, param_t* _p)
 }
 
 
-/*
+/*! \brief
  * Duplicate linked list of parameters
  */
 int shm_duplicate_params(param_t** _n, param_t* _p)

+ 67 - 60
parser/parse_param.h

@@ -33,85 +33,92 @@
  * 2003-04-07 URI class added (janakj)
  */
 
+/*! \file
+ * \brief Parser :: Generic Parameter Parser
+ *
+ * \ingroup parser
+ */
+
+
 #ifndef PARSE_PARAM_H
 #define PARSE_PARAM_H
 
 #include <stdio.h>
 
 
-/*
+/*! \brief
  * Supported types of parameters
  */
 typedef enum ptype {
-	P_OTHER = 0, /* Unknown parameter */
-	P_Q,         /* Contact: q parameter */
-	P_EXPIRES,   /* Contact: expires parameter */
-	P_METHODS,   /* Contact: methods parameter */
-	P_RECEIVED,  /* Contact: received parameter */
-	P_TRANSPORT, /* URI: transport parameter */
-	P_LR,        /* URI: lr parameter */
-	P_R2,        /* URI: r2 parameter (ser specific) */
-	P_MADDR,     /* URI: maddr parameter */
-	P_TTL,       /* URI: ttl parameter */
-	P_DSTIP,     /* URI: dstip parameter */
-	P_DSTPORT,   /* URi: dstport parameter */
-	P_INSTANCE,  /* Contact: sip.instance parameter */
-	P_FTAG,      /* URI: ftag parameter */
-	P_CALL_ID,   /* Dialog event package: call-id */
-	P_FROM_TAG,  /* Dialog event package: from-tag */
-	P_TO_TAG,    /* Dialog event package: to-tag */
-	P_ISD,       /* Dialog event package: include-session-description */
-	P_SLA        /* Dialog event package: sla */
+	P_OTHER = 0, /*!< Unknown parameter */
+	P_Q,         /*!< Contact: q parameter */
+	P_EXPIRES,   /*!< Contact: expires parameter */
+	P_METHODS,   /*!< Contact: methods parameter */
+	P_RECEIVED,  /*!< Contact: received parameter */
+	P_TRANSPORT, /*!< URI: transport parameter */
+	P_LR,        /*!< URI: lr parameter */
+	P_R2,        /*!< URI: r2 parameter (ser specific) */
+	P_MADDR,     /*!< URI: maddr parameter */
+	P_TTL,       /*!< URI: ttl parameter */
+	P_DSTIP,     /*!< URI: dstip parameter */
+	P_DSTPORT,   /*!< URi: dstport parameter */
+	P_INSTANCE,  /*!< Contact: sip.instance parameter */
+	P_FTAG,      /*!< URI: ftag parameter */
+	P_CALL_ID,   /*!< Dialog event package: call-id */
+	P_FROM_TAG,  /*!< Dialog event package: from-tag */
+	P_TO_TAG,    /*!< Dialog event package: to-tag */
+	P_ISD,       /*!< Dialog event package: include-session-description */
+	P_SLA        /*!< Dialog event package: sla */
 } ptype_t;
 
 
-/*
+/*! \brief
  * Class of parameters
  */
 typedef enum pclass {
-	CLASS_ANY = 0,      /* Any parameters, well-known hooks will be not used */
-	CLASS_CONTACT,      /* Contact parameters */
-	CLASS_URI,          /* URI parameters */
-	CLASS_EVENT_DIALOG  /* Event dialog parameters */
+	CLASS_ANY = 0,      /*!< Any parameters, well-known hooks will be not used */
+	CLASS_CONTACT,      /*!< Contact parameters */
+	CLASS_URI,          /*!< URI parameters */
+	CLASS_EVENT_DIALOG  /*!< Event dialog parameters */
 } pclass_t;
 
 
-/*
+/*! \brief
  * Structure representing a parameter
  */
 typedef struct param {
-	ptype_t type;         /* Type of the parameter */
-	str name;             /* Parameter name */
-	str body;             /* Parameter body */
-	int len;              /* Total length of the parameter including = and quotes */
-	struct param* next;   /* Next parameter in the list */
+	ptype_t type;         /*!< Type of the parameter */
+	str name;             /*!< Parameter name */
+	str body;             /*!< Parameter body */
+	int len;              /*!< Total length of the parameter including = and quotes */
+	struct param* next;   /*!< Next parameter in the list */
 } param_t;
 
 
-/*
+/*! \brief
  * Hooks to well known parameters for contact class of parameters
  */
 struct contact_hooks {
-	struct param* expires;  /* expires parameter */
-	struct param* q;        /* q parameter */
-	struct param* methods;  /* methods parameter */
-	struct param* received; /* received parameter */
-	struct param* instance; /* sip.instance parameter */
+	struct param* expires;  /*!< expires parameter */
+	struct param* q;        /*!< q parameter */
+	struct param* methods;  /*!< methods parameter */
+	struct param* received; /*!< received parameter */
+	struct param* instance; /*!< sip.instance parameter */
 };
 
 
-/*
+/*! \brief
  * Hooks to well known parameter for URI class of parameters
  */
 struct uri_hooks {
-	struct param* transport; /* transport parameter */
-	struct param* lr;        /* lr parameter */
-	struct param* r2;        /* r2 parameter */
-	struct param* maddr;     /* maddr parameter */
-	struct param* ttl;       /* ttl parameter */
-	struct param* dstip;     /* Destination IP */
-	struct param* dstport;   /* Destination port */
-	struct param* ftag;      /* From tag in the original request */
+	struct param* transport; /*!< transport parameter */
+	struct param* lr;        /*!< lr parameter */
+	struct param* r2;        /*!< r2 parameter */
+	struct param* maddr;     /*!< maddr parameter */
+	struct param* ttl;       /*!< ttl parameter */
+	struct param* dstip;     /*!< Destination IP */
+	struct param* dstport;   /*!< Destination port */
+	struct param* ftag;      /*!< From tag in the original request */
 };
 
 
@@ -123,16 +130,16 @@ struct event_dialog_hooks {
 	struct param* sla;
 };
 
-/*
+/*! \brief
  * Union of hooks structures for all classes
  */
 typedef union param_hooks {
-	struct contact_hooks contact; /* Contact hooks */
-	struct uri_hooks uri;         /* URI hooks */
+	struct contact_hooks contact; /*!< Contact hooks */
+	struct uri_hooks uri;         /*!< URI hooks */
 	struct event_dialog_hooks event_dialog;
 } param_hooks_t;
 
-/**
+/*! \brief
  * Only parse one parameter
  * @Return:
  * 	t: out parameter
@@ -143,44 +150,44 @@ typedef union param_hooks {
 inline int parse_param(str *_s, pclass_t _c, param_hooks_t *_h, param_t *t);
 
 
-/*
+/*! \brief
  * Parse parameters
- * _s is string containing parameters
- * _c is class of parameters
- * _h is pointer to structure that will be filled with pointer to well known parameters
+ *  \param _s is string containing parameters
+ *  \param _c is class of parameters
+ *  \param _h is pointer to structure that will be filled with pointer to well known parameters
  * linked list of parsed parameters will be stored in
  * the variable _p is pointing to
- * The function returns 0 on success and negative number
+ * \return The function returns 0 on success and negative number
  * on an error
  */
 int parse_params(str* _s, pclass_t _c, param_hooks_t* _h, param_t** _p);
 
 
-/*
+/*! \brief
  * Free linked list of parameters
  */
 void free_params(param_t* _p);
 
 
-/*
+/*! \brief
  * Free linked list of parameters from shared memory
  */
 void shm_free_params(param_t* _p);
 
 
-/*
+/*! \brief
  * Print linked list of parameters, just for debugging
  */
 void print_params(FILE* _o, param_t* _p);
 
 
-/*
+/*! \brief
  * Duplicate linked list of parameters
  */
 int duplicate_params(param_t** _n, param_t* _p);
 
 
-/*
+/*! \brief
  * Duplicate linked list of parameters
  */
 int shm_duplicate_params(param_t** _n, param_t* _p);

+ 7 - 6
parser/parse_refer_to.c

@@ -8,11 +8,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -22,6 +17,12 @@
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+/*! \file
+ * \brief Parser :: Refert-To: header parser
+ *
+ * \ingroup parser
+ */
  
 #include "parse_from.h"
 #include "parse_to.h"
@@ -33,7 +34,7 @@
 #include "../mem/mem.h"
 
  
-/*
+/*! \brief
  * This method is used to parse Refer-To header.
  *
  * params: msg : sip msg

+ 7 - 7
parser/parse_refer_to.h

@@ -8,11 +8,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -22,7 +17,12 @@
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
- 
+
+/*! \file
+ * \brief Parser :: Refert-To: header parser
+ *
+ * \ingroup parser
+ */
  
 #ifndef PARSE_REFER_TO_H
 #define PARSE_REFER_TO_H
@@ -30,7 +30,7 @@
 #include "msg_parser.h"
  
  
-/* casting macro for accessing Refer-To body */
+/*! \brief casting macro for accessing Refer-To body */
 #define get_refer_to(p_msg)  ((struct to_body*)(p_msg)->refer_to->parsed)
 
 

+ 7 - 6
parser/parse_retry_after.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -29,6 +24,12 @@
  *  2007-07-27  created by andrei
  */
 
+/*! \file
+ * \brief Parser :: Retry-After: header parser
+ *
+ * \ingroup parser
+ */
+ 
 
 #include "../comp_defs.h"
 #include "parse_retry_after.h"
@@ -37,7 +38,7 @@
 #include "../dprint.h"
 #include "../mem/mem.h"
 
-/* Parse the Retry-after header field */
+/*! \brief Parse the Retry-after header field */
 char* parse_retry_after(char *buf, char* end, unsigned* after, int* err)
 {
 	char *t;

+ 5 - 5
parser/parse_retry_after.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Retry-After: header parser
+ *
+ * \ingroup parser
+ */
 
 #ifndef _parse_retry_after_h
 #define _parse_retry_after_h

+ 7 - 6
parser/parse_rpid.c

@@ -8,11 +8,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -22,6 +17,12 @@
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+/*! \file
+ * \brief Parser :: Remote-party-id: header parser
+ *
+ * \ingroup parser
+ */
  
 #include "parse_from.h"
 #include "parse_to.h"
@@ -33,7 +34,7 @@
 #include "../mem/mem.h"
 
  
-/*
+/*! \brief
  * This method is used to parse RPID header.
  *
  * params: msg : sip msg

+ 6 - 1
parser/parse_rpid.h

@@ -23,6 +23,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  
+/*! \file
+ * \brief Parser :: Remote-party-id: header parser
+ *
+ * \ingroup parser
+ */
  
 #ifndef PARSE_RPID_H
 #define PARSE_RPID_H
@@ -30,7 +35,7 @@
 #include "msg_parser.h"
  
  
-/* casting macro for accessing RPID body */
+/*! \brief casting macro for accessing RPID body */
 #define get_rpid(p_msg)  ((struct to_body*)(p_msg)->rpid->parsed)
 
 

+ 17 - 11
parser/parse_rr.c

@@ -27,6 +27,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Route & Record-Route header field parser
+ *
+ * \ingroup parser
+ */
+
 /**
  * History:
  * --------
@@ -41,7 +47,7 @@
 #include "../trim.h"
 #include "../ut.h"
 
-/*
+/*! \brief
  * Parse Route or Record-Route body
  */
 static inline int do_parse_rr_body(char *buf, int len, rr_t **head)
@@ -144,7 +150,7 @@ static inline int do_parse_rr_body(char *buf, int len, rr_t **head)
 	return 0;
 }
 
-/*
+/*! \brief
  * Wrapper to do_parse_rr_body() for external calls
  */
 int parse_rr_body(char *buf, int len, rr_t **head)
@@ -152,7 +158,7 @@ int parse_rr_body(char *buf, int len, rr_t **head)
 	return do_parse_rr_body(buf, len, head);
 }
 
-/*
+/*! \brief
  * Parse Route and Record-Route header fields
  */
 int parse_rr(struct hdr_field* _h)
@@ -175,7 +181,7 @@ int parse_rr(struct hdr_field* _h)
 	return 0;
 }
 
-/*
+/*! \brief
  * Free list of rrs
  * _r is head of the list
  */
@@ -196,7 +202,7 @@ static inline void do_free_rr(rr_t** _r, int _shm)
 }
 
 
-/*
+/*! \brief
  * Free list of rrs
  * _r is head of the list
  */
@@ -207,7 +213,7 @@ void free_rr(rr_t** _r)
 }
 
 
-/*
+/*! \brief
  * Free list of rrs
  * _r is head of the list
  */
@@ -218,7 +224,7 @@ void shm_free_rr(rr_t** _r)
 }
 
 
-/*
+/*! \brief
  * Print list of RRs, just for debugging
  */
 void print_rr(FILE* _o, rr_t* _r)
@@ -241,7 +247,7 @@ void print_rr(FILE* _o, rr_t* _r)
 }
 
 
-/*
+/*! \brief
  * Translate all pointers in the structure and also
  * in all parameters in the list
  */
@@ -260,7 +266,7 @@ static inline void xlate_pointers(rr_t* _orig, rr_t* _r)
 }
 
 
-/*
+/*! \brief
  * Duplicate a single rr_t structure using pkg_malloc or shm_malloc
  */
 static inline int do_duplicate_rr(rr_t** _new, rr_t* _r, int _shm)
@@ -321,7 +327,7 @@ static inline int do_duplicate_rr(rr_t** _new, rr_t* _r, int _shm)
 }
 
 
-/*
+/*! \brief
  * Duplicate a single rr_t structure using pkg_malloc
  */
 int duplicate_rr(rr_t** _new, rr_t* _r)
@@ -330,7 +336,7 @@ int duplicate_rr(rr_t** _new, rr_t* _r)
 }
 
 
-/*
+/*! \brief
  * Duplicate a single rr_t structure using pkg_malloc
  */
 int shm_duplicate_rr(rr_t** _new, rr_t* _r)

+ 11 - 6
parser/parse_rr.h

@@ -27,6 +27,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Route & Record-Route header field parser
+ *
+ * \ingroup parser
+ */
 
 #ifndef PARSE_RR_H
 #define PARSE_RR_H
@@ -38,15 +43,15 @@
 #include "hf.h"
 
 
-/*
+/*! \brief
  * Structure representing a Route & Record-Route HF body
  */
 typedef struct rr {
-	name_addr_t nameaddr; /* Name-addr part */
-	param_t* r2;          /* Hook to r2 parameter */
-	param_t* params;      /* Linked list of other parameters */
-	int len;              /* Length of the whole route field */
-	struct rr* next;      /* Next RR in the list */
+	name_addr_t nameaddr; /*!< Name-addr part */
+	param_t* r2;          /*!< Hook to r2 parameter */
+	param_t* params;      /*!< Linked list of other parameters */
+	int len;              /*!< Length of the whole route field */
+	struct rr* next;      /*!< Next RR in the list */
 } rr_t;
 
 

+ 8 - 4
parser/parse_sipifmatch.c

@@ -1,3 +1,9 @@
+/*! \file
+ * \brief Parser :: Parse if-match header
+ *
+ * \ingroup parser
+ */
+
 #include <string.h>
 
 #include "parse_sipifmatch.h"
@@ -25,8 +31,7 @@ static inline char* skip_token(char* _b, int _l)
 }
 
 
-int
-etag_parser(char *_s, int _l, str *_e)
+int etag_parser(char *_s, int _l, str *_e)
 {
         char* end;
 
@@ -47,8 +52,7 @@ etag_parser(char *_s, int _l, str *_e)
 }
 
 
-int
-parse_sipifmatch(struct hdr_field* _h)
+int parse_sipifmatch(struct hdr_field* _h)
 {
 	str *e;
 

+ 8 - 2
parser/parse_sipifmatch.h

@@ -1,3 +1,9 @@
+/*! \file
+ * \brief Parser :: Parse if-match header
+ *
+ * \ingroup parser
+ */
+
 #ifndef PARSE_SIPIFMATCH_H
 #define PARSE_SIPIFMATCH_H
 
@@ -9,13 +15,13 @@ typedef struct etag {
 } etag_t;
 
 
-/*
+/*! \brief
  * Parse Sipifmatch HF body
  */
 int parse_sipifmatch(struct hdr_field* _h);
 
 
-/*
+/*! \brief
  * Release memory
  */
 void free_sipifmatch(str** _e);

+ 6 - 0
parser/parse_subscription_state.c

@@ -1,3 +1,9 @@
+/*! \file
+ * \brief Parser :: Parse subscription-state in NOTIFY
+ *
+ * \ingroup parser
+ */
+
 #include "parse_subscription_state.h"
 #include "../dprint.h"
 #include "../trim.h"

+ 6 - 0
parser/parse_subscription_state.h

@@ -1,3 +1,9 @@
+/*! \file
+ * \brief Parser :: Parse subscription-state in NOTIFY
+ *
+ * \ingroup parser
+ */
+
 #ifndef __PARSE_SUBSCRIPTION_STATE_H
 #define __PARSE_SUBSCRIPTION_STATE_H
 

+ 5 - 5
parser/parse_to.c

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -29,6 +24,11 @@
  * 2003-04-26 ZSW (jiri)
  */
 
+/*! \file
+ * \brief Parser :: Parse To: header
+ *
+ * \ingroup parser
+ */
 
 #include "parse_to.h"
 #include <stdlib.h>

+ 20 - 17
parser/parse_to.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,14 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*! \file
+ * \brief Parser :: Parse To: header
+ *
+ * \ingroup parser
+ */
+
+#include "parse_to.h"
+
 
 #ifndef PARSE_TO
 #define PARSE_TO
@@ -37,22 +40,22 @@ enum {
 };
 
 struct to_param{
-	int type;              /* Type of parameter */
-	str name;              /* Name of parameter */
-	str value;             /* Parameter value */
-	struct to_param* next; /* Next parameter in the list */
+	int type;              /*!< Type of parameter */
+	str name;              /*!< Name of parameter */
+	str value;             /*!< Parameter value */
+	struct to_param* next; /*!< Next parameter in the list */
 };
 
 
 struct to_body{
-	int error;                    /* Error code */
-	str body;                     /* The whole header field body */
-	str uri;                      /* URI */
-	str display;				  /* Display Name */
-	str tag_value;                /* Value of tag */
+	int error;                    /*!< Error code */
+	str body;                     /*!< The whole header field body */
+	str uri;                      /*!< URI */
+	str display;				  /*!< Display Name */
+	str tag_value;                /*!< Value of tag */
 	struct sip_uri parsed_uri;
-	struct to_param *param_lst;   /* Linked list of parameters */
-	struct to_param *last_param;  /* Last parameter in the list */
+	struct to_param *param_lst;   /*!< Linked list of parameters */
+	struct to_param *last_param;  /*!< Last parameter in the list */
 };
 
 
@@ -60,7 +63,7 @@ struct to_body{
 #define get_to( p_msg)      ((struct to_body*)(p_msg)->to->parsed)
 
 
-/*
+/*! \brief
  * To header field parser
  */
 char* parse_to(char* buffer, char *end, struct to_body *to_b);

+ 6 - 0
parser/parse_uri.c

@@ -41,6 +41,12 @@
  *
  */
 
+/** @file
+ * @brief Parser :: Parse URI's
+ *
+ * @ingroup parser
+ */
+
 
 #include "../globals.h"
 #include "parse_uri.h"

+ 5 - 5
parser/parse_uri.h

@@ -10,11 +10,6 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (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,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,6 +20,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/** @file
+ * @brief Parser :: Parse URI's
+ *
+ * @ingroup parser
+ */
 
 #ifndef PARSE_URI_H
 #define PARSE_URI_H

+ 8 - 4
parser/parse_via.c

@@ -28,7 +28,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-
+/** @file
+ * @brief Parser :: Via parsing automation
+ *
+ * @ingroup parser
+ */
 
 /* 
  *  2003-01-21  added rport parsing code, contributed by
@@ -67,7 +71,7 @@
 
 
 
-/* main via states (uri:port ...) */
+/** \brief main via states (uri:port ...) */
 enum {	         
 	F_HOST, P_HOST,
 	L_PORT, F_PORT, P_PORT,
@@ -82,7 +86,7 @@ enum {
 };
 
 
-/* first via part state */
+/** \brief first via part state */
 enum {
 	F_SIP = 100,
 	SIP1, SIP2, FIN_SIP,
@@ -96,7 +100,7 @@ enum {
 };
 
 
-/* param related states
+/** \brief param related states
  * WARNING: keep in sync with parse_via.h, PARAM_HIDDEN, ...
  */
 enum {	

+ 6 - 0
parser/parse_via.h

@@ -25,6 +25,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/** @file
+ * @brief Parser :: Via parsing automation
+ *
+ * @ingroup parser
+ */
+
 /* 
  *  2003-01-21  added rport parsing code, contributed by
  *               Maxim Sobolev  <[email protected]>

+ 7 - 1
parser/parser_f.c

@@ -32,11 +32,17 @@
  * 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri)
  */
 
+/** @file
+ * @brief Parser :: helper functions
+ *
+ * @ingroup parser
+ */
+
 
 #include  "parser_f.h"
 #include "../ut.h"
 
-/* returns pointer to next line or after the end of buffer */
+/** @brief returns pointer to next line or after the end of buffer */
 char* eat_line(char* buffer, unsigned int len)
 {
 	char* nl;

+ 9 - 0
parser/parser_f.h

@@ -30,6 +30,15 @@
  * 2003-03-24 find_not_quoted function added (janakj)
  */
 
+/*! \file
+ * \brief Parser :: Parser helper functions
+ *
+ * turn the most frequently called functions into inline functions
+ *
+ * \ingroup parser
+ */
+
+
 
 #ifndef parser_f_h
 #define parser_f_h