- 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,39 +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 |
- * 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 |
- |
|
22 |
-#ifndef tcp_server_h |
|
23 |
-#define tcp_server_h |
|
24 |
- |
|
25 |
-#include "ip_addr.h" |
|
26 |
- |
|
27 |
- |
|
28 |
-/* "public" functions*/ |
|
29 |
- |
|
30 |
-int tcp_send(struct dest_info* dst, union sockaddr_union* from, |
|
31 |
- const char* buf, unsigned len); |
|
32 |
- |
|
33 |
-int tcpconn_add_alias(int id, int port, int proto); |
|
34 |
- |
|
35 |
- |
|
36 |
- |
|
37 |
- |
|
38 |
- |
|
39 |
-#endif |
... | ... |
@@ -1,21 +1,14 @@ |
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 |
|
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. |
... | ... |
@@ -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 |
|
Instead of 2 different tls send callbacks (with a 3rd one needed),
switch to a different model: 1 tls callback that is supposed to
replace the passed buffer with a tls processed version of it.
This simplifies the tls code and more importantly doesn't require
that the tls send code has very detailed knowledge about the tcp
state machine. Some of the saved complexity moved from the tls
module to the tcp code, but at least this way on changes there's
only one place to update.
The tls callbacks for reading and sending are now very different:
while the send callback has become now more of an encoder
callback, the read callback should still perform the tcp read by
itself. While this is not very consistent it does saves unneeded
memory copies.
... | ... |
@@ -34,7 +34,8 @@ |
34 | 34 |
|
35 | 35 |
/* "public" functions*/ |
36 | 36 |
|
37 |
-int tcp_send(struct dest_info* dst, char* buf, unsigned len); |
|
37 |
+int tcp_send(struct dest_info* dst, union sockaddr_union* from, |
|
38 |
+ char* buf, unsigned len); |
|
38 | 39 |
|
39 | 40 |
int tcpconn_add_alias(int id, int port, int proto); |
40 | 41 |
|
... | ... |
@@ -34,9 +34,6 @@ |
34 | 34 |
|
35 | 35 |
/* "public" functions*/ |
36 | 36 |
|
37 |
-struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port, |
|
38 |
- int timeout); |
|
39 |
-void tcpconn_put(struct tcp_connection* c); |
|
40 | 37 |
int tcp_send(struct dest_info* dst, char* buf, unsigned len); |
41 | 38 |
|
42 | 39 |
int tcpconn_add_alias(int id, int port, int proto); |
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
#ifndef tcp_server_h |
30 | 30 |
#define tcp_server_h |
31 | 31 |
|
32 |
+#include "ip_addr.h" |
|
32 | 33 |
|
33 | 34 |
|
34 | 35 |
/* "public" functions*/ |
... | ... |
@@ -36,8 +37,7 @@ |
36 | 37 |
struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port, |
37 | 38 |
int timeout); |
38 | 39 |
void tcpconn_put(struct tcp_connection* c); |
39 |
-int tcp_send(int type, char* buf, unsigned len, union sockaddr_union* to, |
|
40 |
- int id); |
|
40 |
+int tcp_send(struct dest_info* dst, char* buf, unsigned len); |
|
41 | 41 |
|
42 | 42 |
int tcpconn_add_alias(int id, int port, int proto); |
43 | 43 |
|
... | ... |
@@ -31,7 +31,6 @@ |
31 | 31 |
|
32 | 32 |
|
33 | 33 |
|
34 |
- |
|
35 | 34 |
/* "public" functions*/ |
36 | 35 |
|
37 | 36 |
struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port, |
... | ... |
@@ -40,6 +39,7 @@ void tcpconn_put(struct tcp_connection* c); |
40 | 39 |
int tcp_send(int type, char* buf, unsigned len, union sockaddr_union* to, |
41 | 40 |
int id); |
42 | 41 |
|
42 |
+int tcpconn_add_alias(int id, int port, int proto); |
|
43 | 43 |
|
44 | 44 |
|
45 | 45 |
|
... | ... |
@@ -37,7 +37,8 @@ |
37 | 37 |
struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port, |
38 | 38 |
int timeout); |
39 | 39 |
void tcpconn_put(struct tcp_connection* c); |
40 |
-int tcp_send(char* buf, unsigned len, union sockaddr_union* to, int id); |
|
40 |
+int tcp_send(int type, char* buf, unsigned len, union sockaddr_union* to, |
|
41 |
+ int id); |
|
41 | 42 |
|
42 | 43 |
|
43 | 44 |
|
... | ... |
@@ -34,7 +34,8 @@ |
34 | 34 |
|
35 | 35 |
/* "public" functions*/ |
36 | 36 |
|
37 |
-struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port); |
|
37 |
+struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port, |
|
38 |
+ int timeout); |
|
38 | 39 |
void tcpconn_put(struct tcp_connection* c); |
39 | 40 |
int tcp_send(char* buf, unsigned len, union sockaddr_union* to, int id); |
40 | 41 |
|
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,46 @@ |
1 |
+/* |
|
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 |
|
26 |
+ */ |
|
27 |
+ |
|
28 |
+ |
|
29 |
+#ifndef tcp_server_h |
|
30 |
+#define tcp_server_h |
|
31 |
+ |
|
32 |
+ |
|
33 |
+ |
|
34 |
+ |
|
35 |
+/* "public" functions*/ |
|
36 |
+ |
|
37 |
+struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port); |
|
38 |
+void tcpconn_put(struct tcp_connection* c); |
|
39 |
+int tcp_send(char* buf, unsigned len, union sockaddr_union* to, int id); |
|
40 |
+ |
|
41 |
+ |
|
42 |
+ |
|
43 |
+ |
|
44 |
+ |
|
45 |
+ |
|
46 |
+#endif |