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
new file mode 100644
... ...
@@ -0,0 +1,60 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ * The initial version of this code was written by Dragos Vingarzan
5
+ * (dragos(dot)vingarzan(at)fokus(dot)fraunhofer(dot)de and the
6
+ * Fruanhofer Institute. It was and still is maintained in a separate
7
+ * branch of the original SER. We are therefore migrating it to
8
+ * Kamailio/SR and look forward to maintaining it from here on out.
9
+ * 2011/2012 Smile Communications, Pty. Ltd.
10
+ * ported/maintained/improved by 
11
+ * Jason Penton (jason(dot)penton(at)smilecoms.com and
12
+ * Richard Good (richard(dot)good(at)smilecoms.com) as part of an 
13
+ * effort to add full IMS support to Kamailio/SR using a new and
14
+ * improved architecture
15
+ * 
16
+ * NB: Alot of this code was originally part of OpenIMSCore,
17
+ * FhG Focus. Thanks for great work! This is an effort to 
18
+ * break apart the various CSCF functions into logically separate
19
+ * components. We hope this will drive wider use. We also feel
20
+ * that in this way the architecture is more complete and thereby easier
21
+ * to manage in the Kamailio/SR environment
22
+ *
23
+ * This file is part of Kamailio, a free SIP server.
24
+ *
25
+ * Kamailio is free software; you can redistribute it and/or modify
26
+ * it under the terms of the GNU General Public License as published by
27
+ * the Free Software Foundation; either version 2 of the License, or
28
+ * (at your option) any later version
29
+ *
30
+ * Kamailio is distributed in the hope that it will be useful,
31
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33
+ * GNU General Public License for more details.
34
+ *
35
+ * You should have received a copy of the GNU General Public License 
36
+ * along with this program; if not, write to the Free Software 
37
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
38
+ * 
39
+ */
40
+
41
+#include "avp_new.h"
42
+
43
+extern struct cdp_binds *cdp;
44
+
45
+/**
46
+ * Just create an AVP and return it
47
+ * @param d - buffer with the encoded data
48
+ * @param len - length of the data
49
+ * @param avp_code - code of the avp
50
+ * @param avp_flags - flags for the avp
51
+ * @param avp_vendorid - vendorid for the avp
52
+ * @param data_do - what to do with the data next 
53
+ * @return ptr to the new avp or null on error
54
+ */
55
+inline AAA_AVP *cdp_avp_new(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do)
56
+{
57
+	if (avp_vendorid!=0) avp_flags |= AAA_AVP_FLAG_VENDOR_SPECIFIC;
58
+	return cdp->AAACreateAVP(avp_code,avp_flags,avp_vendorid,data.s,data.len,data_do);	
59
+}
60
+