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,174 @@
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
+#ifndef __AVP_NEW_BASE_DATA_FORMAT_H
42
+#define __AVP_NEW_BASE_DATA_FORMAT_H
43
+
44
+#ifndef CDP_AVP_REFERENCE
45
+
46
+	#include "../cdp/cdp_load.h"
47
+
48
+		#include <inttypes.h>
49
+		#include <netinet/ip6.h>
50
+
51
+		typedef struct {
52
+			uint16_t ai_family;
53
+			union{
54
+				struct in_addr v4;
55
+				struct in6_addr v6;
56
+			} ip;
57
+		} ip_address;
58
+	
59
+		typedef struct {
60
+			uint8_t prefix;
61
+			ip_address addr;	
62
+		} ip_address_prefix;
63
+		
64
+
65
+	#define EPOCH_UNIX_TO_EPOCH_NTP 2208988800u // according to http://www.cis.udel.edu/~mills/y2k.html
66
+	
67
+	
68
+	/* 
69
+	 * RFC 3588 Basic AVP Data Types
70
+	 * 
71
+	 * http://tools.ietf.org/html/rfc3588#section-4.2
72
+	 * 
73
+	 */
74
+	
75
+	AAA_AVP* cdp_avp_new_OctetString(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
76
+	typedef AAA_AVP* (*cdp_avp_new_OctetString_f)(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
77
+	
78
+	AAA_AVP* cdp_avp_new_Integer32(int avp_code,int avp_flags,int avp_vendorid,int32_t data);
79
+	typedef AAA_AVP* (*cdp_avp_new_Integer32_f)(int avp_code,int avp_flags,int avp_vendorid,int32_t data);
80
+	
81
+	
82
+	AAA_AVP* cdp_avp_new_Integer64(int avp_code,int avp_flags,int avp_vendorid,int64_t data);
83
+	typedef AAA_AVP* (*cdp_avp_new_Integer64_f)(int avp_code,int avp_flags,int avp_vendorid,int64_t data);
84
+	
85
+	
86
+	AAA_AVP* cdp_avp_new_Unsigned32(int avp_code,int avp_flags,int avp_vendorid,uint32_t data);
87
+	typedef AAA_AVP* (*cdp_avp_new_Unsigned32_f)(int avp_code,int avp_flags,int avp_vendorid,uint32_t data);
88
+	
89
+	
90
+	AAA_AVP* cdp_avp_new_Unsigned64(int avp_code,int avp_flags,int avp_vendorid,uint64_t data);
91
+	typedef AAA_AVP* (*cdp_avp_new_Unsigned64_f)(int avp_code,int avp_flags,int avp_vendorid,uint64_t data);
92
+	
93
+	
94
+	AAA_AVP* cdp_avp_new_Float32(int avp_code,int avp_flags,int avp_vendorid,float data);
95
+	typedef AAA_AVP* (*cdp_avp_new_Float32_f)(int avp_code,int avp_flags,int avp_vendorid,float data);
96
+	
97
+	
98
+	AAA_AVP* cdp_avp_new_Float64(int avp_code,int avp_flags,int avp_vendorid,double data);
99
+	typedef AAA_AVP* (*cdp_avp_new_Float64_f)(int avp_code,int avp_flags,int avp_vendorid,double data);
100
+	
101
+	
102
+	AAA_AVP* cdp_avp_new_Grouped(int avp_code,int avp_flags,int avp_vendorid,AAA_AVP_LIST *list,AVPDataStatus data_do);
103
+	typedef AAA_AVP* (*cdp_avp_new_Grouped_f)(int avp_code,int avp_flags,int avp_vendorid,AAA_AVP_LIST *list,AVPDataStatus data_do);
104
+	
105
+	
106
+	/*
107
+	 * RFC 3588 Derived AVP Data Formats
108
+	 * 
109
+	 * http://tools.ietf.org/html/rfc3588#section-4.3
110
+	 * 
111
+	 */
112
+	
113
+	AAA_AVP* cdp_avp_new_Address(int avp_code,int avp_flags,int avp_vendorid,ip_address data);
114
+	typedef AAA_AVP* (*cdp_avp_new_Address_f)(int avp_code,int avp_flags,int avp_vendorid,ip_address data);
115
+	
116
+	AAA_AVP* cdp_avp_new_Time(int avp_code,int avp_flags,int avp_vendorid,time_t data);
117
+	typedef AAA_AVP* (*cdp_avp_new_Time_f)(int avp_code,int avp_flags,int avp_vendorid,time_t data);
118
+	
119
+	AAA_AVP* cdp_avp_new_UTF8String(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
120
+	typedef AAA_AVP* (*cdp_avp_new_UTF8String_f)(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
121
+	
122
+	AAA_AVP* cdp_avp_new_DiameterIdentity(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
123
+	typedef AAA_AVP* (*cdp_avp_new_DiameterIdentity_f)(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
124
+	
125
+	AAA_AVP* cdp_avp_new_DiameterURI(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
126
+	typedef AAA_AVP* (*cdp_avp_new_DiameterURI_f)(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
127
+	
128
+	AAA_AVP* cdp_avp_new_Enumerated(int avp_code,int avp_flags,int avp_vendorid,int32_t data);
129
+	typedef AAA_AVP* (*cdp_avp_new_Enumerated_f)(int avp_code,int avp_flags,int avp_vendorid,int32_t data);
130
+	
131
+	AAA_AVP* cdp_avp_new_IPFilterRule(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
132
+	typedef AAA_AVP* (*cdp_avp_new_IPFilterRule_f)(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
133
+	
134
+	AAA_AVP* cdp_avp_new_QoSFilterRule(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
135
+	typedef AAA_AVP* (*cdp_avp_new_QoSFilterRule_f)(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
136
+	
137
+
138
+#else
139
+		
140
+	AAA_AVP* basic.new_OctetString(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
141
+	
142
+	AAA_AVP* basic.new_Integer32(int avp_code,int avp_flags,int avp_vendorid,int32_t data);
143
+	
144
+	AAA_AVP* basic.new_Integer64(int avp_code,int avp_flags,int avp_vendorid,int64_t data);
145
+	
146
+	AAA_AVP* basic.new_Unsigned32(int avp_code,int avp_flags,int avp_vendorid,uint32_t data);
147
+	
148
+	AAA_AVP* basic.new_Unsigned64(int avp_code,int avp_flags,int avp_vendorid,uint64_t data);
149
+	
150
+	AAA_AVP* basic.new_Float32(int avp_code,int avp_flags,int avp_vendorid,float data);
151
+	
152
+	AAA_AVP* basic.new_Float64(int avp_code,int avp_flags,int avp_vendorid,double data);
153
+	
154
+	AAA_AVP* basic.new_Grouped(int avp_code,int avp_flags,int avp_vendorid,AAA_AVP_LIST *list,AVPDataStatus data_do);
155
+		
156
+	AAA_AVP* basic.new_Address(int avp_code,int avp_flags,int avp_vendorid,ip_address data);
157
+	
158
+	AAA_AVP* basic.new_Time(int avp_code,int avp_flags,int avp_vendorid,time_t data);
159
+	
160
+	AAA_AVP* basic.new_UTF8String(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
161
+	
162
+	AAA_AVP* basic.new_DiameterIdentity(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
163
+	
164
+	AAA_AVP* basic.new_DiameterURI(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
165
+	
166
+	AAA_AVP* basic.new_Enumerated(int avp_code,int avp_flags,int avp_vendorid,int32_t data);
167
+	
168
+	AAA_AVP* basic.new_IPFilterRule(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
169
+	
170
+	AAA_AVP* basic.new_QoSFilterRule(int avp_code,int avp_flags,int avp_vendorid,str data,AVPDataStatus data_do);
171
+#endif
172
+
173
+
174
+#endif /* __AVP_NEW_DATA_FORMAT_H */