Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,97 +0,0 @@
1
-/* 
2
- * Copyright (C) 2010 iptelorg GmbH
3
- *
4
- * Permission to use, copy, modify, and distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
- */
16
-
17
-/** 
18
- * @brief Macros used for various core statistics
19
- * 
20
- * Macros used for various core statistics, (if USE_CORE_STATS is not defined
21
- * they won't do anything).
22
- * @file
23
- * @ingroup core
24
- * @author andrei
25
- */
26
- 
27
-#ifndef __core_stats_h
28
-#define __core_stats_h
29
-
30
-/* define USE_CORE_STATS to enable statistics events 
31
-   (SREV_CORE_STATS callbacks) */
32
-/*#define USE_CORE_STATS */
33
-
34
-#ifndef USE_CORE_STATS
35
-
36
-#define STATS_REQ_FWD_DROP()
37
-#define STATS_REQ_FWD_OK()
38
-#define STATS_RPL_FWD_DROP()
39
-#define STATS_RPL_FWD_OK()
40
-#define STATS_BAD_MSG()
41
-#define STATS_BAD_RPL()
42
-#define STATS_BAD_URI()
43
-#define STATS_BAD_MSG_HDR()
44
-
45
-#else /* USE_CORE_STATS */
46
-
47
-#include "events.h"
48
-
49
-/** called each time a received request is dropped.
50
- * The request might be dropped explicitly (e.g. pre script callback)
51
- * or there might be an error while trying to forward it (e.g. send).
52
- */
53
-#define STATS_REQ_FWD_DROP() sr_event_exec(SREV_CORE_STATS, (void*)3)
54
-
55
-
56
-/** called each time forwarding a request succeeds (send).*/
57
-#define STATS_REQ_FWD_OK() sr_event_exec(SREV_CORE_STATS, (void*)1)
58
-
59
-
60
-/** called each time forwarding a reply fails.
61
- * The reply forwarding might fail due to send errors,
62
- * pre script callbacks (module denying forwarding) or explicit script
63
- * drop (drop or module function returning 0).
64
- */
65
-#define STATS_RPL_FWD_DROP() sr_event_exec(SREV_CORE_STATS, (void*)4)
66
-
67
-
68
-/* called each time forwarding a reply succeeds. */
69
-#define STATS_RPL_FWD_OK() sr_event_exec(SREV_CORE_STATS, (void*)2)
70
-
71
-
72
-/** called each time a received request is too bad to process.
73
-  * For now it's called in case the message does not have any via.
74
-  */
75
-#define STATS_BAD_MSG() sr_event_exec(SREV_CORE_STATS, (void*)5)
76
-
77
-
78
-/** called each time a received reply is too bad to process.
79
-  * For now it's called in case the message does not have any via.
80
-  */
81
-#define STATS_BAD_RPL() sr_event_exec(SREV_CORE_STATS, (void*)6)
82
-
83
-
84
-/** called each time uri parsing fails. */
85
-#define STATS_BAD_URI() sr_event_exec(SREV_CORE_STATS, (void*)7)
86
-
87
-
88
-/** called each time parsing some header fails. */
89
-#define STATS_BAD_MSG_HDR() sr_event_exec(SREV_CORE_STATS, (void*)8)
90
-
91
-
92
-
93
-#endif /* USE_CORE_STATS */
94
-
95
-#endif /*__core_stats_h*/
96
-
97
-/* vi: set ts=4 sw=4 tw=79:ai:cindent: */
Browse code

core : Update include files - delete IDs, update doxygen, delete history

Olle E. Johansson authored on 03/01/2015 10:55:48
Showing 1 changed files
... ...
@@ -21,14 +21,9 @@
21 21
  * they won't do anything).
22 22
  * @file
23 23
  * @ingroup core
24
+ * @author andrei
24 25
  */
25 26
  
26
-/*
27
- * History:
28
- * --------
29
- *  2010-02-01  initial version (andrei)
30
-*/
31
-
32 27
 #ifndef __core_stats_h
33 28
 #define __core_stats_h
34 29
 
Browse code

core, counters mod: fix a bunch of doxygen errors, small whitespace fix

Henning Westerholt authored on 20/07/2011 22:11:09
Showing 1 changed files
... ...
@@ -1,6 +1,4 @@
1 1
 /* 
2
- * $Id$
3
- * 
4 2
  * Copyright (C) 2010 iptelorg GmbH
5 3
  *
6 4
  * Permission to use, copy, modify, and distribute this software for any
... ...
@@ -15,11 +13,16 @@
15 13
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 14
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 15
  */
18
-/**  macros used for various core statistics.
19
- *  (if USE_CORE_STATS is not defined they won't do anything)
20
- * @file core_stats.h
16
+
17
+/** 
18
+ * @brief Macros used for various core statistics
19
+ * 
20
+ * Macros used for various core statistics, (if USE_CORE_STATS is not defined
21
+ * they won't do anything).
22
+ * @file
21 23
  * @ingroup core
22 24
  */
25
+ 
23 26
 /*
24 27
  * History:
25 28
  * --------
Browse code

core: stats events cbs are called only if USE_CORE_STATS is defined

Use macros instead of triggering directly various SREV_CORE_STATS
callbacks. This way if compiled without core stats support
(USE_CORE_STATS), there will be no performance impact (the macros
will be empty). All the macros are defined in core_stats.h.

Andrei Pelinescu-Onciul authored on 01/02/2010 17:20:10
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,99 @@
1
+/* 
2
+ * $Id$
3
+ * 
4
+ * Copyright (C) 2010 iptelorg GmbH
5
+ *
6
+ * Permission to use, copy, modify, and distribute this software for any
7
+ * purpose with or without fee is hereby granted, provided that the above
8
+ * copyright notice and this permission notice appear in all copies.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+ */
18
+/**  macros used for various core statistics.
19
+ *  (if USE_CORE_STATS is not defined they won't do anything)
20
+ * @file core_stats.h
21
+ * @ingroup core
22
+ */
23
+/*
24
+ * History:
25
+ * --------
26
+ *  2010-02-01  initial version (andrei)
27
+*/
28
+
29
+#ifndef __core_stats_h
30
+#define __core_stats_h
31
+
32
+/* define USE_CORE_STATS to enable statistics events 
33
+   (SREV_CORE_STATS callbacks) */
34
+/*#define USE_CORE_STATS */
35
+
36
+#ifndef USE_CORE_STATS
37
+
38
+#define STATS_REQ_FWD_DROP()
39
+#define STATS_REQ_FWD_OK()
40
+#define STATS_RPL_FWD_DROP()
41
+#define STATS_RPL_FWD_OK()
42
+#define STATS_BAD_MSG()
43
+#define STATS_BAD_RPL()
44
+#define STATS_BAD_URI()
45
+#define STATS_BAD_MSG_HDR()
46
+
47
+#else /* USE_CORE_STATS */
48
+
49
+#include "events.h"
50
+
51
+/** called each time a received request is dropped.
52
+ * The request might be dropped explicitly (e.g. pre script callback)
53
+ * or there might be an error while trying to forward it (e.g. send).
54
+ */
55
+#define STATS_REQ_FWD_DROP() sr_event_exec(SREV_CORE_STATS, (void*)3)
56
+
57
+
58
+/** called each time forwarding a request succeeds (send).*/
59
+#define STATS_REQ_FWD_OK() sr_event_exec(SREV_CORE_STATS, (void*)1)
60
+
61
+
62
+/** called each time forwarding a reply fails.
63
+ * The reply forwarding might fail due to send errors,
64
+ * pre script callbacks (module denying forwarding) or explicit script
65
+ * drop (drop or module function returning 0).
66
+ */
67
+#define STATS_RPL_FWD_DROP() sr_event_exec(SREV_CORE_STATS, (void*)4)
68
+
69
+
70
+/* called each time forwarding a reply succeeds. */
71
+#define STATS_RPL_FWD_OK() sr_event_exec(SREV_CORE_STATS, (void*)2)
72
+
73
+
74
+/** called each time a received request is too bad to process.
75
+  * For now it's called in case the message does not have any via.
76
+  */
77
+#define STATS_BAD_MSG() sr_event_exec(SREV_CORE_STATS, (void*)5)
78
+
79
+
80
+/** called each time a received reply is too bad to process.
81
+  * For now it's called in case the message does not have any via.
82
+  */
83
+#define STATS_BAD_RPL() sr_event_exec(SREV_CORE_STATS, (void*)6)
84
+
85
+
86
+/** called each time uri parsing fails. */
87
+#define STATS_BAD_URI() sr_event_exec(SREV_CORE_STATS, (void*)7)
88
+
89
+
90
+/** called each time parsing some header fails. */
91
+#define STATS_BAD_MSG_HDR() sr_event_exec(SREV_CORE_STATS, (void*)8)
92
+
93
+
94
+
95
+#endif /* USE_CORE_STATS */
96
+
97
+#endif /*__core_stats_h*/
98
+
99
+/* vi: set ts=4 sw=4 tw=79:ai:cindent: */