- 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,67 +0,0 @@ |
1 |
-/** |
|
2 |
- * Copyright (C) 2013 Daniel-Constantin Mierla (asipto.com) |
|
3 |
- * |
|
4 |
- * This file is part of Kamailio, a free SIP server. |
|
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 |
-/*! |
|
19 |
- * \file |
|
20 |
- * \brief Kamailio core :: SCTP support |
|
21 |
- * \ingroup core |
|
22 |
- * Module: \ref core |
|
23 |
- * Copyright (C) 2013 Daniel-Constantin Mierla (asipto.com) |
|
24 |
- */ |
|
25 |
- |
|
26 |
-#ifndef __sctp_core_h__ |
|
27 |
-#define __sctp_core_h__ |
|
28 |
- |
|
29 |
-#include "ip_addr.h" |
|
30 |
- |
|
31 |
-int sctp_core_init(void); |
|
32 |
-typedef int (*sctp_srapi_init_f)(void); |
|
33 |
- |
|
34 |
-void sctp_core_destroy(void); |
|
35 |
-typedef void (*sctp_srapi_destroy_f)(void); |
|
36 |
- |
|
37 |
-int sctp_core_init_sock(struct socket_info* sock_info); |
|
38 |
-typedef int (*sctp_srapi_init_sock_f)(struct socket_info* sock_info); |
|
39 |
- |
|
40 |
-void sctp_core_init_options(void); |
|
41 |
-typedef void (*sctp_srapi_init_options_f)(void); |
|
42 |
- |
|
43 |
-int sctp_core_check_compiled_sockopts(char* buf, int size); |
|
44 |
-typedef int (*sctp_srapi_check_compiled_sockopts_f)(char* buf, int size); |
|
45 |
- |
|
46 |
-int sctp_core_check_support(void); |
|
47 |
-typedef int (*sctp_srapi_check_support_f)(void); |
|
48 |
- |
|
49 |
-int sctp_core_rcv_loop(void); |
|
50 |
-typedef int (*sctp_srapi_rcv_loop_f)(void); |
|
51 |
- |
|
52 |
-int sctp_core_msg_send(struct dest_info* dst, char* buf, unsigned len); |
|
53 |
-typedef int (*sctp_srapi_msg_send_f)(struct dest_info* dst, char* buf, |
|
54 |
- unsigned len); |
|
55 |
- |
|
56 |
-typedef struct sctp_srapi { |
|
57 |
- sctp_srapi_init_f init; |
|
58 |
- sctp_srapi_destroy_f destroy; |
|
59 |
- sctp_srapi_init_sock_f init_sock; |
|
60 |
- sctp_srapi_check_support_f check_support; |
|
61 |
- sctp_srapi_rcv_loop_f rcv_loop; |
|
62 |
- sctp_srapi_msg_send_f msg_send; |
|
63 |
-} sctp_srapi_t; |
|
64 |
- |
|
65 |
-int sctp_core_register_api(sctp_srapi_t *api); |
|
66 |
- |
|
67 |
-#endif |
... | ... |
@@ -1,6 +1,4 @@ |
1 | 1 |
/** |
2 |
- * $Id$ |
|
3 |
- * |
|
4 | 2 |
* Copyright (C) 2013 Daniel-Constantin Mierla (asipto.com) |
5 | 3 |
* |
6 | 4 |
* This file is part of Kamailio, a free SIP server. |
... | ... |
@@ -17,6 +15,13 @@ |
17 | 15 |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
18 | 16 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
19 | 17 |
*/ |
18 |
+/*! |
|
19 |
+ * \file |
|
20 |
+ * \brief Kamailio core :: SCTP support |
|
21 |
+ * \ingroup core |
|
22 |
+ * Module: \ref core |
|
23 |
+ * Copyright (C) 2013 Daniel-Constantin Mierla (asipto.com) |
|
24 |
+ */ |
|
20 | 25 |
|
21 | 26 |
#ifndef __sctp_core_h__ |
22 | 27 |
#define __sctp_core_h__ |
- cleanup of not needed members
... | ... |
@@ -52,8 +52,6 @@ typedef struct sctp_srapi { |
52 | 52 |
sctp_srapi_init_f init; |
53 | 53 |
sctp_srapi_destroy_f destroy; |
54 | 54 |
sctp_srapi_init_sock_f init_sock; |
55 |
- sctp_srapi_init_options_f init_options; |
|
56 |
- sctp_srapi_check_compiled_sockopts_f check_compiled_sockopts; |
|
57 | 55 |
sctp_srapi_check_support_f check_support; |
58 | 56 |
sctp_srapi_rcv_loop_f rcv_loop; |
59 | 57 |
sctp_srapi_msg_send_f msg_send; |
- functions needed in core - callbacks to be set by sctp module
... | ... |
@@ -24,19 +24,41 @@ |
24 | 24 |
#include "ip_addr.h" |
25 | 25 |
|
26 | 26 |
int sctp_core_init(void); |
27 |
+typedef int (*sctp_srapi_init_f)(void); |
|
27 | 28 |
|
28 | 29 |
void sctp_core_destroy(void); |
30 |
+typedef void (*sctp_srapi_destroy_f)(void); |
|
29 | 31 |
|
30 | 32 |
int sctp_core_init_sock(struct socket_info* sock_info); |
33 |
+typedef int (*sctp_srapi_init_sock_f)(struct socket_info* sock_info); |
|
31 | 34 |
|
32 | 35 |
void sctp_core_init_options(void); |
36 |
+typedef void (*sctp_srapi_init_options_f)(void); |
|
33 | 37 |
|
34 | 38 |
int sctp_core_check_compiled_sockopts(char* buf, int size); |
39 |
+typedef int (*sctp_srapi_check_compiled_sockopts_f)(char* buf, int size); |
|
35 | 40 |
|
36 | 41 |
int sctp_core_check_support(void); |
42 |
+typedef int (*sctp_srapi_check_support_f)(void); |
|
37 | 43 |
|
38 | 44 |
int sctp_core_rcv_loop(void); |
45 |
+typedef int (*sctp_srapi_rcv_loop_f)(void); |
|
39 | 46 |
|
40 | 47 |
int sctp_core_msg_send(struct dest_info* dst, char* buf, unsigned len); |
48 |
+typedef int (*sctp_srapi_msg_send_f)(struct dest_info* dst, char* buf, |
|
49 |
+ unsigned len); |
|
50 |
+ |
|
51 |
+typedef struct sctp_srapi { |
|
52 |
+ sctp_srapi_init_f init; |
|
53 |
+ sctp_srapi_destroy_f destroy; |
|
54 |
+ sctp_srapi_init_sock_f init_sock; |
|
55 |
+ sctp_srapi_init_options_f init_options; |
|
56 |
+ sctp_srapi_check_compiled_sockopts_f check_compiled_sockopts; |
|
57 |
+ sctp_srapi_check_support_f check_support; |
|
58 |
+ sctp_srapi_rcv_loop_f rcv_loop; |
|
59 |
+ sctp_srapi_msg_send_f msg_send; |
|
60 |
+} sctp_srapi_t; |
|
61 |
+ |
|
62 |
+int sctp_core_register_api(sctp_srapi_t *api); |
|
41 | 63 |
|
42 | 64 |
#endif |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,42 @@ |
1 |
+/** |
|
2 |
+ * $Id$ |
|
3 |
+ * |
|
4 |
+ * Copyright (C) 2013 Daniel-Constantin Mierla (asipto.com) |
|
5 |
+ * |
|
6 |
+ * This file is part of Kamailio, a free SIP server. |
|
7 |
+ * |
|
8 |
+ * Permission to use, copy, modify, and distribute this software for any |
|
9 |
+ * purpose with or without fee is hereby granted, provided that the above |
|
10 |
+ * copyright notice and this permission notice appear in all copies. |
|
11 |
+ * |
|
12 |
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|
13 |
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|
14 |
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|
15 |
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|
16 |
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|
17 |
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|
18 |
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
19 |
+ */ |
|
20 |
+ |
|
21 |
+#ifndef __sctp_core_h__ |
|
22 |
+#define __sctp_core_h__ |
|
23 |
+ |
|
24 |
+#include "ip_addr.h" |
|
25 |
+ |
|
26 |
+int sctp_core_init(void); |
|
27 |
+ |
|
28 |
+void sctp_core_destroy(void); |
|
29 |
+ |
|
30 |
+int sctp_core_init_sock(struct socket_info* sock_info); |
|
31 |
+ |
|
32 |
+void sctp_core_init_options(void); |
|
33 |
+ |
|
34 |
+int sctp_core_check_compiled_sockopts(char* buf, int size); |
|
35 |
+ |
|
36 |
+int sctp_core_check_support(void); |
|
37 |
+ |
|
38 |
+int sctp_core_rcv_loop(void); |
|
39 |
+ |
|
40 |
+int sctp_core_msg_send(struct dest_info* dst, char* buf, unsigned len); |
|
41 |
+ |
|
42 |
+#endif |