- 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)
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,43 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2001-2003 FhG Fokus |
|
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 |
- * For a license to use the Kamailio software under conditions |
|
12 |
- * other than those described here, or to purchase support for this |
|
13 |
- * software, please contact iptel.org by e-mail at the following addresses: |
|
14 |
- * info@iptel.org |
|
15 |
- * |
|
16 |
- * Kamailio is distributed in the hope that it will be useful, |
|
17 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
- * GNU General Public License for more details. |
|
20 |
- * |
|
21 |
- * You should have received a copy of the GNU General Public License |
|
22 |
- * along with this program; if not, write to the Free Software |
|
23 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
24 |
- */ |
|
25 |
- |
|
26 |
- |
|
27 |
-#ifndef udp_server_h |
|
28 |
-#define udp_server_h |
|
29 |
- |
|
30 |
-#include <sys/types.h> |
|
31 |
-#include <sys/socket.h> |
|
32 |
-#include "ip_addr.h" |
|
33 |
- |
|
34 |
-#define MAX_RECV_BUFFER_SIZE 256*1024 |
|
35 |
-#define BUFFER_INCREMENT 2048 |
|
36 |
- |
|
37 |
- |
|
38 |
-int udp_init(struct socket_info* si); |
|
39 |
-int udp_send(struct dest_info* dst, char *buf, unsigned len); |
|
40 |
-int udp_rcv_loop(void); |
|
41 |
- |
|
42 |
- |
|
43 |
-#endif |
... | ... |
@@ -1,21 +1,19 @@ |
1 | 1 |
/* |
2 |
- * $Id$ |
|
3 |
- * |
|
4 | 2 |
* Copyright (C) 2001-2003 FhG Fokus |
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 |
|
11 |
+ * For a license to use the Kamailio software under conditions |
|
14 | 12 |
* other than those described here, or to purchase support for this |
15 | 13 |
* software, please contact iptel.org by e-mail at the following addresses: |
16 | 14 |
* info@iptel.org |
17 | 15 |
* |
18 |
- * ser is distributed in the hope that it will be useful, |
|
16 |
+ * Kamailio is distributed in the hope that it will be useful, |
|
19 | 17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | 18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | 19 |
* GNU General Public License for more details. |
... | ... |
@@ -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 |
|
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)
... | ... |
@@ -1,7 +1,31 @@ |
1 | 1 |
/* |
2 | 2 |
* $Id$ |
3 |
+ * |
|
4 |
+ * Copyright (C) 2001-2003 Fhg Fokus |
|
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 |
|
3 | 26 |
*/ |
4 | 27 |
|
28 |
+ |
|
5 | 29 |
#ifndef udp_server_h |
6 | 30 |
#define udp_server_h |
7 | 31 |
|
... | ... |
@@ -12,11 +12,10 @@ |
12 | 12 |
#define MAX_RECV_BUFFER_SIZE 256*1024 |
13 | 13 |
#define BUFFER_INCREMENT 2048 |
14 | 14 |
|
15 |
-extern int udp_sock; |
|
16 | 15 |
|
17 |
-int udp_init(struct ip_addr* ip, unsigned short port); |
|
18 |
-int udp_send(char *buf, unsigned len, union sockaddr_union* to, |
|
19 |
- unsigned tolen); |
|
16 |
+int udp_init(struct socket_info* si); |
|
17 |
+int udp_send(struct socket_info* source,char *buf, unsigned len, |
|
18 |
+ union sockaddr_union* to, unsigned tolen); |
|
20 | 19 |
int udp_rcv_loop(); |
21 | 20 |
|
22 | 21 |
|
... | ... |
@@ -7,14 +7,16 @@ |
7 | 7 |
|
8 | 8 |
#include <sys/types.h> |
9 | 9 |
#include <sys/socket.h> |
10 |
+#include "ip_addr.h" |
|
10 | 11 |
|
11 | 12 |
#define MAX_RECV_BUFFER_SIZE 256*1024 |
12 | 13 |
#define BUFFER_INCREMENT 2048 |
13 | 14 |
|
14 | 15 |
extern int udp_sock; |
15 | 16 |
|
16 |
-int udp_init(unsigned long ip, unsigned short port); |
|
17 |
-int udp_send(char *buf, unsigned len, struct sockaddr* to, unsigned tolen); |
|
17 |
+int udp_init(struct ip_addr* ip, unsigned short port); |
|
18 |
+int udp_send(char *buf, unsigned len, union sockaddr_union* to, |
|
19 |
+ unsigned tolen); |
|
18 | 20 |
int udp_rcv_loop(); |
19 | 21 |
|
20 | 22 |
|
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
1 |
+/* |
|
2 |
+ * $Id$ |
|
3 |
+ */ |
|
4 |
+ |
|
5 |
+#ifndef udp_server_h |
|
6 |
+#define udp_server_h |
|
7 |
+ |
|
8 |
+ |
|
9 |
+ |
|
10 |
+extern int udp_sock; |
|
11 |
+ |
|
12 |
+extern char* our_name; |
|
13 |
+extern unsigned long our_address; |
|
14 |
+extern unsigned short our_port; |
|
15 |
+ |
|
16 |
+int udp_init(unsigned long ip, unsigned short port); |
|
17 |
+int udp_rcv_loop(); |
|
18 |
+ |
|
19 |
+ |
|
20 |
+#endif |