Browse code

- applied doxygen patch from Olle E. Johansson (closes #2026968)

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4506 689a6050-402a-0410-94f2-e92a70836424

Daniel-Constantin Mierla authored on 25/07/2008 07:13:13
Showing 3 changed files
... ...
@@ -40,6 +40,11 @@
40 40
  * 2007-09-17  added list-file support for reload data (carstenbock)
41 41
  */
42 42
 
43
+/*! \file
44
+ * \ingroup dispatcher
45
+ * \brief Dispatcher :: Dispatch
46
+ */
47
+
43 48
 #include <stdio.h>
44 49
 #include <string.h>
45 50
 #include <stdlib.h>
... ...
@@ -73,17 +78,17 @@ typedef struct _ds_dest
73 78
 {
74 79
 	str uri;
75 80
 	int flags;
76
-	struct ip_addr ip_address; /* IP-Address of the entry */
77
-    unsigned short int port; /* Port of the request URI */
78
-    int failure_count;
81
+	struct ip_addr ip_address; 	/*!< IP-Address of the entry */
82
+	unsigned short int port; 	/*!< Port of the request URI */
83
+	int failure_count;
79 84
 	struct _ds_dest *next;
80 85
 } ds_dest_t, *ds_dest_p;
81 86
 
82 87
 typedef struct _ds_set
83 88
 {
84
-	int id;				/* id of dst set */
85
-	int nr;				/* number of items in dst set */
86
-	int last;			/* last used item in dst set */
89
+	int id;				/*!< id of dst set */
90
+	int nr;				/*!< number of items in dst set */
91
+	int last;			/*!< last used item in dst set */
87 92
 	ds_dest_p dlist;
88 93
 	struct _ds_set *next;
89 94
 } ds_set_t, *ds_set_p;
... ...
@@ -229,7 +234,7 @@ err:
229 234
 	return -1;
230 235
 }
231 236
 
232
-/* compact destinations from sets for fast access */
237
+/*! \brief  compact destinations from sets for fast access */
233 238
 int reindex_dests(int list_idx, int setn)
234 239
 {
235 240
 	int j;
... ...
@@ -270,7 +275,7 @@ err1:
270 275
 	return -1;
271 276
 }
272 277
 
273
-/*load groups of destinations from file */
278
+/*! \brief load groups of destinations from file */
274 279
 int ds_load_list(char *lfile)
275 280
 {
276 281
 	char line[256], *p;
... ...
@@ -408,7 +413,7 @@ void ds_disconnect_db(void)
408 413
 	}
409 414
 }
410 415
 
411
-/*initialize and verify DB stuff*/
416
+/*! \brief Initialize and verify DB stuff*/
412 417
 int init_ds_db(void)
413 418
 {
414 419
 	int ret;
... ...
@@ -452,7 +457,7 @@ int init_ds_db(void)
452 457
 	return ret;
453 458
 }
454 459
 
455
-/*load groups of destinations from DB*/
460
+/*! \brief load groups of destinations from DB*/
456 461
 int ds_load_db(void)
457 462
 {
458 463
 	int i, id, nr_rows, setn;
... ...
@@ -544,7 +549,7 @@ err2:
544 549
 	return -1;
545 550
 }
546 551
 
547
-/*called from dispatcher.c: free all*/
552
+/*! \brief called from dispatcher.c: free all*/
548 553
 int ds_destroy_list(void)
549 554
 {
550 555
 	if (ds_lists) {
... ...
@@ -640,19 +645,19 @@ unsigned int ds_get_hash(str *x, str *y)
640 645
 }
641 646
 
642 647
 
643
-/*
648
+/*! \brief
644 649
  * gets the part of the uri we will use as a key for hashing
645
- * params:  key1       - will be filled with first part of the key
650
+ * \param  key1       - will be filled with first part of the key
646 651
  *                       (uri user or "" if no user)
647
- *          key2       - will be filled with the second part of the key
652
+ * \param  key2       - will be filled with the second part of the key
648 653
  *                       (uri host:port)
649
- *          uri        - str with the whole uri
650
- *          parsed_uri - struct sip_uri pointer with the parsed uri
654
+ * \param  uri        - str with the whole uri
655
+ * \param  parsed_uri - struct sip_uri pointer with the parsed uri
651 656
  *                       (it must point inside uri). It can be null
652 657
  *                       (in this case the uri will be parsed internally).
653
- *          flags  -    if & DS_HASH_USER_ONLY, only the user part of the uri
658
+ * \param  flags  -    if & DS_HASH_USER_ONLY, only the user part of the uri
654 659
  *                      will be used
655
- * returns: -1 on error, 0 on success
660
+ * \return: -1 on error, 0 on success
656 661
  */
657 662
 static inline int get_uri_hash_keys(str* key1, str* key2,
658 663
 							str* uri, struct sip_uri* parsed_uri, int flags)
... ...
@@ -1481,7 +1486,7 @@ int ds_print_mi_list(struct mi_node* rpl)
1481 1486
 	return 0;
1482 1487
 }
1483 1488
 
1484
-/**
1489
+/*! \brief
1485 1490
  * Callback-Function for the OPTIONS-Request
1486 1491
  * This Function is called, as soon as the Transaction is finished
1487 1492
  * (e. g. a Response came in, the timeout was hit, ...)
... ...
@@ -1539,7 +1544,7 @@ static void ds_options_callback( struct cell *t, int type,
1539 1544
 	return;
1540 1545
 }
1541 1546
 
1542
-/*
1547
+/*! \brief
1543 1548
  * Timer for checking inactive destinations
1544 1549
  * 
1545 1550
  * This timer is regularly fired.
... ...
@@ -32,6 +32,11 @@
32 32
  *		to ds_is_from_list.
33 33
  */
34 34
 
35
+/*! \file
36
+ * \ingroup dispatcher
37
+ * \brief Dispatcher :: Dispatch
38
+ */
39
+
35 40
 #ifndef _DISPATCH_H_
36 41
 #define _DISPATCH_H_
37 42
 
... ...
@@ -41,12 +46,12 @@
41 46
 #include "../tm/tm_load.h"
42 47
 
43 48
 
44
-#define DS_HASH_USER_ONLY	1  /* use only the uri user part for hashing */
45
-#define DS_FAILOVER_ON		2  /* store the other dest in avps */
49
+#define DS_HASH_USER_ONLY	1  /*!< use only the uri user part for hashing */
50
+#define DS_FAILOVER_ON		2  /*!< store the other dest in avps */
46 51
 
47
-#define DS_INACTIVE_DST		1  /* inactive destination */
48
-#define DS_PROBING_DST		2  /* checking destination */
49
-#define DS_RESET_FAIL_DST	4  /* Reset-Failure-Counter */
52
+#define DS_INACTIVE_DST		1  /*!< inactive destination */
53
+#define DS_PROBING_DST		2  /*!< checking destination */
54
+#define DS_RESET_FAIL_DST	4  /*!< Reset-Failure-Counter */
50 55
 
51 56
 extern str ds_db_url;
52 57
 extern str ds_table_name;
... ...
@@ -73,7 +78,7 @@ extern pv_spec_t ds_setid_pv;
73 78
 struct tm_binds tmb;
74 79
 extern str ds_ping_method;
75 80
 extern str ds_ping_from;
76
-extern int probing_threshhold; /* number of failed requests,
81
+extern int probing_threshhold; /*!< number of failed requests,
77 82
 						before a destination is taken into probing */ 
78 83
 extern int ds_probing_mode;
79 84
 
... ...
@@ -92,7 +97,7 @@ int ds_print_list(FILE *fout);
92 97
 int ds_print_mi_list(struct mi_node* rpl);
93 98
 
94 99
 int ds_is_from_list(struct sip_msg *_m, int group);
95
-/*
100
+/*! \brief
96 101
  * Timer for checking inactive destinations
97 102
  */
98 103
 void ds_check_timer(unsigned int ticks, void* param);
... ...
@@ -35,6 +35,19 @@
35 35
  * 			   reload triggered from ds_reload MI_Command (ancuta)
36 36
  */
37 37
 
38
+/*! \file
39
+ * \ingroup dispatcher
40
+ * \brief Dispatcher :: Dispatch
41
+ */
42
+
43
+/*! \defgroup dispatcher Dispatcher :: Load balancing and failover module
44
+ * 	The dispatcher module implements a set of functions for distributing SIP requests on a 
45
+ *	set of servers, but also grouping of server resources.
46
+ *
47
+ *	- The module has an internal API exposed to other modules.
48
+ *	- The module implements a couple of MI functions for managing the list of server resources
49
+ */
50
+
38 51
 #include <stdio.h>
39 52
 #include <string.h>
40 53
 #include <stdlib.h>
... ...
@@ -337,7 +350,7 @@ static int mod_init(void)
337 350
 	return 0;
338 351
 }
339 352
 
340
-/**
353
+/*! \brief
341 354
  * Initialize children
342 355
  */
343 356
 static int child_init(int rank)
... ...
@@ -359,7 +372,7 @@ static int mi_child_init(void)
359 372
 
360 373
 }
361 374
 
362
-/**
375
+/*! \brief
363 376
  * destroy function
364 377
  */
365 378
 static void destroy(void)