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,67 +0,0 @@
1
-/*
2
- * timer frequency and ticks conversions
3
- *
4
- * Copyright (C) 2005 iptelorg GmbH
5
- *
6
- * This file is part of Kamailio, a free SIP server.
7
- *
8
- * Kamailio is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version
12
- *
13
- * Kamailio is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, write to the Free Software
20
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21
- */
22
-/**
23
- * @file
24
- * @brief Kamailio core :: timer frequency and ticks conversions
25
- * @ingroup core
26
- * Module: @ref core
27
- */
28
-
29
-#ifndef _timer_ticks_h
30
-#define _timer_ticks_h
31
-
32
-/** @brief how many ticks per second (must >1 and < 100 (on linux x86))
33
- * recomended values >=8, <=32 (a 2^k value is better/faster)*/
34
-#define TIMER_TICKS_HZ	16U
35
-
36
-/** @brief how many ticks per m milliseconds? (rounded up) */
37
-#define MS_TO_TICKS(m)  (((m)*TIMER_TICKS_HZ+999U)/1000U)
38
-
39
-
40
-/** @brief how many ticks per s seconds? */
41
-#define S_TO_TICKS(s)	((s)*TIMER_TICKS_HZ)
42
-
43
-
44
-/** @brief how many s pe per t ticks, integer value */
45
-#define TICKS_TO_S(t)	((t)/TIMER_TICKS_HZ)
46
-
47
-/** @brief how many ms per t ticks, integer value */
48
-#define TICKS_TO_MS(t) (((t)*1000U)/TIMER_TICKS_HZ)
49
-
50
-
51
-/** @brief ticks comparison operations: t1 OP t2, where OP can be <, >, <=, >= */
52
-#define TICKS_CMP_OP(t1, t2, OP) \
53
-	(((s_ticks_t)((ticks_t)(t1)-(ticks_t)(t2))) OP (s_ticks_t)0)
54
-/** @brief t1 < t2 */
55
-#define TICKS_LT(t1, t2)  TICKS_CMP_OP(t1, t2, <)
56
-/** @brief t1 <= t2 */
57
-#define TICKS_LE(t1, t2)  TICKS_CMP_OP(t1, t2, <=)
58
-/** @brief t1 > t2 */
59
-#define TICKS_GT(t1, t2)  TICKS_CMP_OP(t1, t2, >)
60
-/** @brief t1 >= t2 */
61
-#define TICKS_GE(t1, t2)  TICKS_CMP_OP(t1, t2, >=)
62
-
63
-
64
-typedef unsigned int ticks_t;/* type used to keep the ticks (must be 32 bits)*/
65
-typedef signed   int s_ticks_t; /* signed ticks type */
66
-
67
-#endif
Browse code

core: timer - coherent indentation and whitespacing

Daniel-Constantin Mierla authored on 05/05/2016 06:28:19
Showing 1 changed files
... ...
@@ -15,8 +15,8 @@
15 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
  * GNU General Public License for more details.
17 17
  *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program; if not, write to the Free Software
20 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 21
  */
22 22
 /**
Browse code

core: Modify doxygen, remove history, remove SVN IDs, change "ser" and "sip-router" to "KAMAILIO"

Olle E. Johansson authored on 16/01/2015 16:38:46
Showing 1 changed files
... ...
@@ -1,19 +1,16 @@
1 1
 /*
2
- * $Id$
3
- *
4
- *
5 2
  * timer frequency and ticks conversions
6 3
  *
7 4
  * Copyright (C) 2005 iptelorg GmbH
8 5
  *
9
- * This file is part of SIP-router, a free SIP server.
6
+ * This file is part of Kamailio, a free SIP server.
10 7
  *
11
- * SIP-router is free software; you can redistribute it and/or modify
8
+ * Kamailio is free software; you can redistribute it and/or modify
12 9
  * it under the terms of the GNU General Public License as published by
13 10
  * the Free Software Foundation; either version 2 of the License, or
14 11
  * (at your option) any later version
15 12
  *
16
- * SIP-router is distributed in the hope that it will be useful,
13
+ * Kamailio is distributed in the hope that it will be useful,
17 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 16
  * GNU General Public License for more details.
... ...
@@ -22,15 +19,9 @@
22 19
  * along with this program; if not, write to the Free Software 
23 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24 21
  */
25
-/* History:
26
- * --------
27
- *  2005-07-27  complete re-design/re-implemnetation (andrei)
28
- *  2007-07-02  added ticks comparison macros (andrei)
29
- */
30
-
31 22
 /**
32 23
  * @file
33
- * @brief SIP-router core :: timer frequency and ticks conversions
24
+ * @brief Kamailio core :: timer frequency and ticks conversions
34 25
  * @ingroup core
35 26
  * Module: @ref core
36 27
  */
Browse code

all: updated FSF address in GPL text

Anthony Messina authored on 04/07/2014 09:36:37 • Daniel-Constantin Mierla committed on 04/07/2014 09:37:36
Showing 1 changed files
... ...
@@ -20,7 +20,7 @@
20 20
  *
21 21
  * You should have received a copy of the GNU General Public License 
22 22
  * along with this program; if not, write to the Free Software 
23
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24 24
  */
25 25
 /* History:
26 26
  * --------
Browse code

Doxygen updates on timer modules

- changing from \ and ! to javadoc format
- adding new doxygen file headers

oej authored on 22/10/2009 17:56:48
Showing 1 changed files
... ...
@@ -6,19 +6,14 @@
6 6
  *
7 7
  * Copyright (C) 2005 iptelorg GmbH
8 8
  *
9
- * This file is part of ser, a free SIP server.
9
+ * This file is part of SIP-router, a free SIP server.
10 10
  *
11
- * ser is free software; you can redistribute it and/or modify
11
+ * SIP-router is free software; you can redistribute it and/or modify
12 12
  * it under the terms of the GNU General Public License as published by
13 13
  * the Free Software Foundation; either version 2 of the License, or
14 14
  * (at your option) any later version
15 15
  *
16
- * For a license to use the ser software under conditions
17
- * other than those described here, or to purchase support for this
18
- * software, please contact iptel.org by e-mail at the following addresses:
19
- *    info@iptel.org
20
- *
21
- * ser is distributed in the hope that it will be useful,
16
+ * SIP-router is distributed in the hope that it will be useful,
22 17
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 18
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 19
  * GNU General Public License for more details.
... ...
@@ -33,38 +28,45 @@
33 28
  *  2007-07-02  added ticks comparison macros (andrei)
34 29
  */
35 30
 
31
+/**
32
+ * @file
33
+ * @brief SIP-router core :: timer frequency and ticks conversions
34
+ * @ingroup core
35
+ * Module: @ref core
36
+ */
37
+
36 38
 #ifndef _timer_ticks_h
37 39
 #define _timer_ticks_h
38 40
 
39
-/* how many ticks per second (must >1 and < 100 (on linux x86))
41
+/** @brief how many ticks per second (must >1 and < 100 (on linux x86))
40 42
  * recomended values >=8, <=32 (a 2^k value is better/faster)*/
41 43
 #define TIMER_TICKS_HZ	16U
42 44
 
43
-/* how many ticks per m milliseconds? (rounded up) */
45
+/** @brief how many ticks per m milliseconds? (rounded up) */
44 46
 #define MS_TO_TICKS(m)  (((m)*TIMER_TICKS_HZ+999U)/1000U)
45 47
 
46 48
 
47
-/* how many ticks per s seconds? */
49
+/** @brief how many ticks per s seconds? */
48 50
 #define S_TO_TICKS(s)	((s)*TIMER_TICKS_HZ)
49 51
 
50 52
 
51
-/* how many s pe per t ticks, integer value */
53
+/** @brief how many s pe per t ticks, integer value */
52 54
 #define TICKS_TO_S(t)	((t)/TIMER_TICKS_HZ)
53 55
 
54
-/* how many ms per t ticks, integer value */
56
+/** @brief how many ms per t ticks, integer value */
55 57
 #define TICKS_TO_MS(t) (((t)*1000U)/TIMER_TICKS_HZ)
56 58
 
57 59
 
58
-/* ticks comparison operations: t1 OP t2, where OP can be <, >, <=, >= */
60
+/** @brief ticks comparison operations: t1 OP t2, where OP can be <, >, <=, >= */
59 61
 #define TICKS_CMP_OP(t1, t2, OP) \
60 62
 	(((s_ticks_t)((ticks_t)(t1)-(ticks_t)(t2))) OP (s_ticks_t)0)
61
-/* t1 < t2 */
63
+/** @brief t1 < t2 */
62 64
 #define TICKS_LT(t1, t2)  TICKS_CMP_OP(t1, t2, <)
63
-/* t1 <= t2 */
65
+/** @brief t1 <= t2 */
64 66
 #define TICKS_LE(t1, t2)  TICKS_CMP_OP(t1, t2, <=)
65
-/* t1 > t2 */
67
+/** @brief t1 > t2 */
66 68
 #define TICKS_GT(t1, t2)  TICKS_CMP_OP(t1, t2, >)
67
-/* t1 >= t2 */
69
+/** @brief t1 >= t2 */
68 70
 #define TICKS_GE(t1, t2)  TICKS_CMP_OP(t1, t2, >=)
69 71
 
70 72
 
Browse code

- timer_del() returns now an int: 0 on success and <0 on error (e.g. timer already deleted or expired, or an attempt to self-delete from a timer handler) - added macros for ticks_t comparisons: TICKS_GTi(t1, t2), TICKS_GE(t1, t2), TICKS_LT (t1, t2) and TICKS_LE (t1, t2) - updated timer docs

Andrei Pelinescu-Onciul authored on 02/07/2007 15:27:39
Showing 1 changed files
... ...
@@ -30,6 +30,7 @@
30 30
 /* History:
31 31
  * --------
32 32
  *  2005-07-27  complete re-design/re-implemnetation (andrei)
33
+ *  2007-07-02  added ticks comparison macros (andrei)
33 34
  */
34 35
 
35 36
 #ifndef _timer_ticks_h
... ...
@@ -54,6 +55,19 @@
54 55
 #define TICKS_TO_MS(t) (((t)*1000U)/TIMER_TICKS_HZ)
55 56
 
56 57
 
58
+/* ticks comparison operations: t1 OP t2, where OP can be <, >, <=, >= */
59
+#define TICKS_CMP_OP(t1, t2, OP) \
60
+	(((s_ticks_t)((ticks_t)(t1)-(ticks_t)(t2))) OP (s_ticks_t)0)
61
+/* t1 < t2 */
62
+#define TICKS_LT(t1, t2)  TICKS_CMP_OP(t1, t2, <)
63
+/* t1 <= t2 */
64
+#define TICKS_LE(t1, t2)  TICKS_CMP_OP(t1, t2, <=)
65
+/* t1 > t2 */
66
+#define TICKS_GT(t1, t2)  TICKS_CMP_OP(t1, t2, >)
67
+/* t1 >= t2 */
68
+#define TICKS_GE(t1, t2)  TICKS_CMP_OP(t1, t2, >=)
69
+
70
+
57 71
 typedef unsigned int ticks_t;/* type used to keep the ticks (must be 32 bits)*/
58 72
 typedef signed   int s_ticks_t; /* signed ticks type */
59 73
 
Browse code

- ticks_t move in timer_ticks.h - tcpconn_get() exported (tls needs it)

Andrei Pelinescu-Onciul authored on 01/02/2007 04:34:32
Showing 1 changed files
... ...
@@ -54,5 +54,7 @@
54 54
 #define TICKS_TO_MS(t) (((t)*1000U)/TIMER_TICKS_HZ)
55 55
 
56 56
 
57
+typedef unsigned int ticks_t;/* type used to keep the ticks (must be 32 bits)*/
58
+typedef signed   int s_ticks_t; /* signed ticks type */
57 59
 
58 60
 #endif
Browse code

- forgot it during last commit

Andrei Pelinescu-Onciul authored on 05/12/2005 18:33:11
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,58 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ *
5
+ * timer frequency and ticks conversions
6
+ *
7
+ * Copyright (C) 2005 iptelorg GmbH
8
+ *
9
+ * This file is part of ser, a free SIP server.
10
+ *
11
+ * ser is free software; you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation; either version 2 of the License, or
14
+ * (at your option) any later version
15
+ *
16
+ * For a license to use the ser software under conditions
17
+ * other than those described here, or to purchase support for this
18
+ * software, please contact iptel.org by e-mail at the following addresses:
19
+ *    info@iptel.org
20
+ *
21
+ * ser is distributed in the hope that it will be useful,
22
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
+ * GNU General Public License for more details.
25
+ *
26
+ * You should have received a copy of the GNU General Public License 
27
+ * along with this program; if not, write to the Free Software 
28
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
+ */
30
+/* History:
31
+ * --------
32
+ *  2005-07-27  complete re-design/re-implemnetation (andrei)
33
+ */
34
+
35
+#ifndef _timer_ticks_h
36
+#define _timer_ticks_h
37
+
38
+/* how many ticks per second (must >1 and < 100 (on linux x86))
39
+ * recomended values >=8, <=32 (a 2^k value is better/faster)*/
40
+#define TIMER_TICKS_HZ	16U
41
+
42
+/* how many ticks per m milliseconds? (rounded up) */
43
+#define MS_TO_TICKS(m)  (((m)*TIMER_TICKS_HZ+999U)/1000U)
44
+
45
+
46
+/* how many ticks per s seconds? */
47
+#define S_TO_TICKS(s)	((s)*TIMER_TICKS_HZ)
48
+
49
+
50
+/* how many s pe per t ticks, integer value */
51
+#define TICKS_TO_S(t)	((t)/TIMER_TICKS_HZ)
52
+
53
+/* how many ms per t ticks, integer value */
54
+#define TICKS_TO_MS(t) (((t)*1000U)/TIMER_TICKS_HZ)
55
+
56
+
57
+
58
+#endif