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,60 +0,0 @@
1
-/* 
2
- * Copyright (C) 2006 iptelorg GmbH
3
- *
4
- * This file is part of Kamailio, a free SIP server.
5
- *
6
- * Kamailio is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version
10
- *
11
- * Kamailio is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19
- */
20
-/*!
21
- * \file
22
- * \brief Kamailio core :: Non-sip callbacks
23
- * non-sip callbacks, called whenever a message with protocol != SIP/2.0
24
- * is received (the message must have at least a sip like first line or
25
- * else they will be dropped before this callbacks are called
26
- * \ingroup core
27
- * \author andrei
28
- * Module: \ref core
29
- */
30
-
31
-
32
-#ifndef _nonsip_hooks_h
33
-#define _nonsip_hooks_h
34
-
35
-#include "parser/msg_parser.h" /* sip_msg */
36
-
37
-#define MAX_NONSIP_HOOKS 1
38
-
39
-enum nonsip_msg_returns{ NONSIP_MSG_ERROR=-1, NONSIP_MSG_DROP=0,
40
-						 NONSIP_MSG_PASS,     NONSIP_MSG_ACCEPT };
41
-
42
-struct nonsip_hook{
43
-	char* name; /* must be !=0, it has only "debugging" value */
44
-	/* called each time a sip like request (from the first line point of view)
45
-	 * with protocol/version !=  SIP/2.0 is received
46
-	 * return: 0 - drop message immediately, >0 - continue with other hooks,
47
-	 *        <0 - error (drop message)
48
-	 */
49
-	int (*on_nonsip_req)(struct sip_msg* msg);
50
-	/* called before ser shutdown (last minute cleanups) */
51
-	void (*destroy)(void);
52
-};
53
-
54
-
55
-int init_nonsip_hooks(void);
56
-void destroy_nonsip_hooks(void);
57
-int register_nonsip_msg_hook(struct nonsip_hook *h);
58
-int nonsip_msg_run_hooks(struct sip_msg* msg);
59
-
60
-#endif
Browse code

Core Update of doxygen, removal of history, changing "ser" to "kamailio"

Olle E. Johansson authored on 03/01/2015 14:03:24
Showing 1 changed files
... ...
@@ -1,21 +1,14 @@
1 1
 /* 
2
- * $Id$
3
- * 
4 2
  * Copyright (C) 2006 iptelorg GmbH
5 3
  *
6
- * This file is part of ser, a free SIP server.
4
+ * This file is part of Kamailio, a free SIP server.
7 5
  *
8
- * ser is free software; you can redistribute it and/or modify
6
+ * Kamailio is free software; you can redistribute it and/or modify
9 7
  * it under the terms of the GNU General Public License as published by
10 8
  * the Free Software Foundation; either version 2 of the License, or
11 9
  * (at your option) any later version
12 10
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
11
+ * Kamailio is distributed in the hope that it will be useful,
19 12
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 14
  * GNU General Public License for more details.
... ...
@@ -24,15 +17,15 @@
24 17
  * along with this program; if not, write to the Free Software
25 18
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26 19
  */
27
-/*
20
+/*!
21
+ * \file
22
+ * \brief Kamailio core :: Non-sip callbacks
28 23
  * non-sip callbacks, called whenever a message with protocol != SIP/2.0
29 24
  * is received (the message must have at least a sip like first line or
30 25
  * else they will be dropped before this callbacks are called
31
- */
32
-/* 
33
- * History:
34
- * --------
35
- *  2006-11-29  created by andrei
26
+ * \ingroup core
27
+ * \author andrei
28
+ * Module: \ref core
36 29
  */
37 30
 
38 31
 
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
... ...
@@ -22,7 +22,7 @@
22 22
  *
23 23
  * You should have received a copy of the GNU General Public License
24 24
  * along with this program; if not, write to the Free Software
25
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26 26
  */
27 27
 /*
28 28
  * non-sip callbacks, called whenever a message with protocol != SIP/2.0
Browse code

core: Added void to declarations of functions with empty argument list

In C language, a declaration in the form int f(); is equivalent to int f(...);, thus being able to accept an indefinit number of parameters. With the -Wstrict-prototypes GCC options, these declarations are reported as "function declaration isn’t a prototype".
On some cases, this may trick the compiler into generating unoptimized code (like preparing to handle variadic argument list).
In all cases having a declaration int f() and a definition inf f(int) is missleading, even if standard compliant.
This is still Work in Progress. (maybe adding the -Wstrict-prototypes option to default is desireable)

Marius Zbihlei authored on 02/04/2012 14:19:17
Showing 1 changed files
... ...
@@ -59,8 +59,8 @@ struct nonsip_hook{
59 59
 };
60 60
 
61 61
 
62
-int init_nonsip_hooks();
63
-void destroy_nonsip_hooks();
62
+int init_nonsip_hooks(void);
63
+void destroy_nonsip_hooks(void);
64 64
 int register_nonsip_msg_hook(struct nonsip_hook *h);
65 65
 int nonsip_msg_run_hooks(struct sip_msg* msg);
66 66
 
Browse code

- added special callbacks for non-sip msg (e.g http), They are called every time a message with the first line in sip/http format is received and the protocol != SIP. These callbacks are needed as a part of an xmlrpc bug fix.

Andrei Pelinescu-Onciul authored on 11/12/2006 15:47:32
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,67 @@
1
+/* 
2
+ * $Id$
3
+ * 
4
+ * Copyright (C) 2006 iptelorg GmbH
5
+ *
6
+ * This file is part of ser, a free SIP server.
7
+ *
8
+ * ser 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
+ * For a license to use the ser software under conditions
14
+ * other than those described here, or to purchase support for this
15
+ * software, please contact iptel.org by e-mail at the following addresses:
16
+ *    info@iptel.org
17
+ *
18
+ * ser is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
+ * GNU General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU General Public License
24
+ * along with this program; if not, write to the Free Software
25
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
+ */
27
+/*
28
+ * non-sip callbacks, called whenever a message with protocol != SIP/2.0
29
+ * is received (the message must have at least a sip like first line or
30
+ * else they will be dropped before this callbacks are called
31
+ */
32
+/* 
33
+ * History:
34
+ * --------
35
+ *  2006-11-29  created by andrei
36
+ */
37
+
38
+
39
+#ifndef _nonsip_hooks_h
40
+#define _nonsip_hooks_h
41
+
42
+#include "parser/msg_parser.h" /* sip_msg */
43
+
44
+#define MAX_NONSIP_HOOKS 1
45
+
46
+enum nonsip_msg_returns{ NONSIP_MSG_ERROR=-1, NONSIP_MSG_DROP=0,
47
+						 NONSIP_MSG_PASS,     NONSIP_MSG_ACCEPT };
48
+
49
+struct nonsip_hook{
50
+	char* name; /* must be !=0, it has only "debugging" value */
51
+	/* called each time a sip like request (from the first line point of view)
52
+	 * with protocol/version !=  SIP/2.0 is received
53
+	 * return: 0 - drop message immediately, >0 - continue with other hooks,
54
+	 *        <0 - error (drop message)
55
+	 */
56
+	int (*on_nonsip_req)(struct sip_msg* msg);
57
+	/* called before ser shutdown (last minute cleanups) */
58
+	void (*destroy)(void);
59
+};
60
+
61
+
62
+int init_nonsip_hooks();
63
+void destroy_nonsip_hooks();
64
+int register_nonsip_msg_hook(struct nonsip_hook *h);
65
+int nonsip_msg_run_hooks(struct sip_msg* msg);
66
+
67
+#endif