Browse code

core, libs, modules: removed kcore internal library

- instead of kcore stats wrapers, use directly counters.h from core
- parse of sst header moved to sst module (only use)
- string helper functions compacted in strutils.h
- statistics helper functions used only by snmpstats module moved to it

Daniel-Constantin Mierla authored on 05/12/2016 13:27:19
Showing 238 changed files
... ...
@@ -1976,7 +1976,7 @@ ifeq ($(OS), darwin)
1976 1976
 	# the modules uses symbols from ser => either
1977 1977
 	# -flat_namespace -undefined_suppress or -bundle_loader ../../$(MAIN_NAME)
1978 1978
 	MOD_LDFLAGS:= -bundle -flat_namespace -undefined suppress
1979
-	# for libs using symbols from ser (e.g srdb2, kcore a.s.o) we
1979
+	# for libs using symbols from ser (e.g srdb2, a.s.o) we
1980 1980
 	# need -flat_namespace -undefined suppress
1981 1981
 	LIB_LDFLAGS:= -dynamiclib -flat_namespace -undefined suppress
1982 1982
 	LIB_SUFFIX:=.dylib
... ...
@@ -802,4 +802,83 @@ void counter_iterate_grp_vars(const char* group,
802 802
 			cbk(p, &r->group, &r->name, r->h);
803 803
 }
804 804
 
805
+#ifdef STATISTICS
806
+
807
+
808
+/** internal wrapper for kamailio type stat callbacks.
809
+ * sr counter callbacks are different from the kamailio type stat callbacks.
810
+ * This function is meant as a sr counter callback that will call
811
+ * k stat callback passed as parameter.
812
+ * @param h - not used.
813
+ * @param param - k stat callback function pointer (stat_function).
814
+ * @return result of calling the passed k stat_function.
815
+ */
816
+static counter_val_t cnt_cbk_wrapper(counter_handle_t h, void* param)
817
+{
818
+	stat_function k_stat_f;
819
+
820
+	k_stat_f = param;
821
+	return k_stat_f();
822
+}
823
+
824
+
825
+
826
+int register_stat( char *module, char *name, stat_var **pvar, int flags)
827
+{
828
+	int cnt_flags;
829
+	counter_handle_t h;
830
+	int ret;
831
+
832
+	if (module == 0 || name == 0 || pvar == 0) {
833
+		BUG("invalid parameters (%p, %p, %p)\n", module, name, pvar);
834
+		return -1;
835
+	}
836
+	/* translate kamailio stat flags into sr counter flags */
837
+	cnt_flags = (flags & STAT_NO_RESET) ? CNT_F_NO_RESET : 0;
838
+	if (flags & STAT_IS_FUNC)
839
+		ret = counter_register(&h, module, name, cnt_flags,
840
+					cnt_cbk_wrapper,(stat_function)pvar,
841
+					"kamailio statistic (no description)",
842
+					0);
843
+	else
844
+		ret = counter_register(&h, module, name, cnt_flags, 0, 0,
845
+					"kamailio statistic (no description)", 0);
846
+	if (ret < 0) {
847
+		if (ret == -2)
848
+			ERR("counter %s.%s already registered\n", module, name);
849
+		goto error;
850
+	}
851
+	if (!(flags & STAT_IS_FUNC))
852
+		*pvar = (void*)(unsigned long)h.id;
853
+	return 0;
854
+error:
855
+	if (!(flags & STAT_IS_FUNC))
856
+		*pvar = 0;
857
+	return -1;
858
+}
859
+
860
+
861
+
862
+int register_module_stats(char *module, stat_export_t *stats)
863
+{
864
+	if (module == 0 || *module == 0) {
865
+		BUG("null or empty module name\n");
866
+		goto error;
867
+	}
868
+	if (stats == 0 || stats[0].name == 0)
869
+		/* empty stats */
870
+		return 0;
871
+	for (; stats->name; stats++)
872
+		if (register_stat(module, stats->name, stats->stat_pointer,
873
+							stats->flags) < 0 ){
874
+			ERR("failed to add statistic %s.%s\n", module, stats->name);
875
+			goto error;
876
+		}
877
+	return 0;
878
+error:
879
+	return -1;
880
+}
881
+
882
+#endif /* STATISTICS */
883
+
805 884
 /* vi: set ts=4 sw=4 tw=79:ai:cindent: */
... ...
@@ -1,4 +1,4 @@
1
-/* 
1
+/*
2 2
  * Copyright (C) 2010 iptelorg GmbH
3 3
  *
4 4
  * Permission to use, copy, modify, and distribute this software for any
... ...
@@ -143,6 +143,133 @@ void counter_iterate_grp_vars(const char* group,
143 143
 								  			counter_handle_t h),
144 144
 							  void *p);
145 145
 
146
+
147
+/* k stat flags */
148
+#define STAT_NO_RESET	1  /* used in dialog(k), nat_traversal(k),
149
+							  registrar(k), statistics(k), usrloc(k) */
150
+/* #define STAT_NO_SYN	2  -- not used */
151
+#define STAT_SHM_NAME	4 /* used only from usrloc(k) */
152
+#define STAT_IS_FUNC	8
153
+
154
+
155
+
156
+#ifdef STATISTICS
157
+
158
+/* statistics support check */
159
+#define stats_support() 1
160
+
161
+/* types */
162
+
163
+typedef counter_val_t    stat_val;
164
+/* stat_var is always used as a pointer in k, we missuse
165
+   stat_var* for holding out counter id */
166
+typedef void stat_var;
167
+/* get val callback
168
+ * TODO: change it to counter_cbk_f compatible callback?
169
+ */
170
+typedef counter_val_t (*stat_function)(void);
171
+
172
+/* statistic module interface */
173
+struct stat_export_s {
174
+	char* name;
175
+	int flags;
176
+	stat_var** stat_pointer; /* pointer to the memory location
177
+								(where a counter handle will be stored)
178
+								Note: it's a double pointer because of
179
+								the original k version which needed it
180
+								allocated in shm. This version
181
+								will store the counter id at *stat_pointer.
182
+							  */
183
+};
184
+
185
+typedef struct stat_export_s stat_export_t;
186
+
187
+int register_stat( char *module, char *name, stat_var **pvar, int flags);
188
+int register_module_stats(char *module, stat_export_t *stats);
189
+
190
+inline static stat_var* get_stat(str *name)
191
+{
192
+	counter_handle_t h;
193
+	str grp;
194
+
195
+	grp.s = 0;
196
+	grp.len = 0;
197
+	if (counter_lookup_str(&h, &grp, name) < 0)
198
+		return 0;
199
+	return (void*)(unsigned long)h.id;
200
+}
201
+
202
+
203
+
204
+inline static unsigned long get_stat_val(stat_var *v)
205
+{
206
+	counter_handle_t h;
207
+	h.id = (unsigned short)(unsigned long)v;
208
+	return (unsigned long)counter_get_val(h);
209
+}
210
+
211
+
212
+
213
+inline static char* get_stat_name(stat_var *v)
214
+{
215
+	counter_handle_t h;
216
+	h.id = (unsigned short)(unsigned long)v;
217
+	return counter_get_name(h);
218
+}
219
+
220
+
221
+
222
+inline static char* get_stat_module(stat_var *v)
223
+{
224
+	counter_handle_t h;
225
+	h.id = (unsigned short)(unsigned long)v;
226
+	return counter_get_group(h);
227
+}
228
+
229
+
230
+
231
+inline static void update_stat(stat_var* v, int n)
232
+{
233
+	counter_handle_t h;
234
+	h.id = (unsigned short)(unsigned long)v;
235
+	counter_add(h, n);
236
+}
237
+
238
+
239
+
240
+inline static void reset_stat(stat_var* v)
241
+{
242
+	counter_handle_t h;
243
+	h.id = (unsigned short)(unsigned long)v;
244
+	counter_reset(h);
245
+}
246
+
247
+
248
+#define if_update_stat(c, var, n) \
249
+	do{ \
250
+		if ((c)) update_stat((var), (n)); \
251
+	}while(0)
252
+
253
+#define if_reset_stat(c, var) \
254
+	do{ \
255
+		if ((c)) reset_stat((var)); \
256
+	}while(0)
257
+
258
+#else /* STATISTICS */
259
+
260
+/* statistics support check */
261
+#define stats_support() 0
262
+#define register_module_stats(mod, stats) 0
263
+#define register_stat(mod, name, var, flags) 0
264
+#define get_stat(name)  0
265
+#define get_stat_val(var) 0
266
+#define update_stat(v, n)
267
+#define reset_stat(v)
268
+#define if_update_stat(c, v, n)
269
+#define if_reset_stat(c, v)
270
+
271
+#endif /* STATISTICS */
272
+
146 273
 #endif /*__counters_h*/
147 274
 
148 275
 /* vi: set ts=4 sw=4 tw=79:ai:cindent: */
... ...
@@ -20,8 +20,6 @@
20 20
 /*!
21 21
 * \file
22 22
 * \brief Faked message handling
23
-* \ingroup libkcore
24
-* Module: \ref libkcore
25 23
 */
26 24
 
27 25
 #include "dprint.h"
28 26
deleted file mode 100644
... ...
@@ -1,64 +0,0 @@
1
-/* 
2
- * Copyright (C) 2010 iptelorg GmbH
3
- *
4
- * Permission to use, copy, modify, and distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
- */
16
-
17
-/** Kamailio Core :: kamailio statistics types.
18
- * This file contains type declaration for kamailio statistics.
19
- * They are needed when modules are loaded (sr_module.c).
20
- * The rest of kamailio stats are in lib/kcore (include
21
- * lib/kcore/kstats_wrapper.h or lib/kcore/statistics.h and link with
22
- * libkcore).
23
- * Note: kamailio statistics are obsolete. Use sr counters in new code
24
- * (counters.h).
25
- * @file kstats_types.h
26
- * @ingroup core
27
- * @author andrei
28
- */
29
-
30
-#ifndef __kstats_types_h
31
-#define __kstats_types_h
32
-
33
-#include "counters.h"
34
-
35
-/* types */
36
-
37
-typedef counter_val_t    stat_val;
38
-/* stat_var is always used as a pointer in k, we missuse
39
-   stat_var* for holding out counter id */
40
-typedef void stat_var;
41
-/* get val callback
42
- * TODO: change it to counter_cbk_f compatible callback?
43
- */
44
-typedef counter_val_t (*stat_function)(void);
45
-
46
-/* statistic module interface */
47
-struct stat_export_s {
48
-	char* name;
49
-	int flags;
50
-	stat_var** stat_pointer; /* pointer to the memory location
51
-								(where a counter handle will be stored)
52
-								Note: it's a double pointer because of
53
-								the original k version which needed it
54
-								allocated in shm. This version
55
-								will store the counter id at *stat_pointer.
56
-							  */
57
-};
58
-
59
-typedef struct stat_export_s stat_export_t;
60
-
61
-
62
-#endif /*__kstats_types_h*/
63
-
64
-/* vi: set ts=4 sw=4 tw=79:ai:cindent: */
65 0
deleted file mode 100644
... ...
@@ -1,12 +0,0 @@
1
-include ../../Makefile.defs
2
-auto_gen=
3
-NAME:=kcore
4
-MAJOR_VER=1
5
-MINOR_VER=0
6
-BUGFIX_VER=0
7
-LIBS=
8
-
9
-SERLIBPATH=..
10
-SER_LIBS=
11
-
12
-include ../../Makefile.libs
13 0
deleted file mode 100644
... ...
@@ -1,239 +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
- * \file
23
- * \brief comparison functions
24
- * \ingroup libkcore
25
- */
26
-
27
-#include "../../parser/parse_uri.h"
28
-#include "../../parser/parse_param.h"
29
-#include "cmpapi.h"
30
-
31
-int cmp_str(str *s1, str *s2)
32
-{
33
-	int ret = 0;
34
-	int len = 0;
35
-	if(s1->len==0 && s2->len==0)
36
-		return 0;
37
-	if(s1->len==0)
38
-		return -1;
39
-	if(s2->len==0)
40
-		return 1;
41
-	len = (s1->len<s2->len)?s1->len:s2->len;
42
-	ret = strncmp(s1->s, s2->s, len);
43
-	if(ret==0)
44
-	{
45
-		if(s1->len==s2->len)
46
-			return 0;
47
-		if(s1->len<s2->len)
48
-			return -1;
49
-		return 1;
50
-	}
51
-	return ret;
52
-}
53
-
54
-int cmpi_str(str *s1, str *s2)
55
-{
56
-	int ret = 0;
57
-	int len = 0;
58
-	if(s1->len==0 && s2->len==0)
59
-		return 0;
60
-	if(s1->len==0)
61
-		return -1;
62
-	if(s2->len==0)
63
-		return 1;
64
-	len = (s1->len<s2->len)?s1->len:s2->len;
65
-	ret = strncasecmp(s1->s, s2->s, len);
66
-	if(ret==0)
67
-	{
68
-		if(s1->len==s2->len)
69
-			return 0;
70
-		if(s1->len<s2->len)
71
-			return -1;
72
-		return 1;
73
-	}
74
-	return ret;
75
-}
76
-
77
-int cmp_hdrname_str(str *s1, str *s2)
78
-{
79
-	/* todo: parse hdr name and compare with short/long alternative */
80
-	return cmpi_str(s1, s2);
81
-}
82
-
83
-int cmp_hdrname_strzn(str *s1, char *s2, size_t n)
84
-{
85
-	str s;
86
-	s.s = s2;
87
-	s.len = n;
88
-	return cmpi_str(s1, &s);
89
-}
90
-
91
-int cmp_str_params(str *s1, str *s2)
92
-{
93
-	param_t* pl1 = NULL;
94
-	param_hooks_t phooks1;
95
-	param_t *pit1=NULL;
96
-	param_t* pl2 = NULL;
97
-	param_hooks_t phooks2;
98
-	param_t *pit2=NULL;
99
-	
100
-	if (parse_params(s1, CLASS_ANY, &phooks1, &pl1)<0)
101
-		return -1;
102
-	if (parse_params(s2, CLASS_ANY, &phooks2, &pl2)<0)
103
-		return -1;
104
-	for (pit1 = pl1; pit1; pit1=pit1->next)
105
-	{
106
-		for (pit2 = pl2; pit2; pit2=pit2->next)
107
-		{
108
-			if (pit1->name.len==pit2->name.len
109
-				&& strncasecmp(pit1->name.s, pit2->name.s, pit2->name.len)==0)
110
-			{
111
-				if(pit1->body.len!=pit2->body.len
112
-						|| strncasecmp(pit1->body.s, pit2->body.s,
113
-							pit2->body.len)!=0)
114
-					return 1;
115
-			}
116
-		}
117
-	}
118
-	return 0;
119
-}
120
-
121
-/**
122
- * Compare SIP URI as per RFC3261, 19.1.4
123
- * return:
124
- *	- 0: match
125
- *	- >0: no match
126
- *	- <0: error
127
- */
128
-int cmp_uri(struct sip_uri *uri1, struct sip_uri *uri2)
129
-{
130
-	if(uri1->type!=uri2->type)
131
-		return 1;
132
-	/* quick check for length */
133
-	if(uri1->user.len!=uri2->user.len
134
-			|| uri1->host.len!=uri2->host.len
135
-			|| uri1->port.len!=uri2->port.len
136
-			|| uri1->passwd.len!=uri2->passwd.len)
137
-		return 1;
138
-	if(cmp_str(&uri1->user, &uri2->user)!=0)
139
-		return 1;
140
-	if(cmp_str(&uri1->port, &uri2->port)!=0)
141
-		return 1;
142
-	if(cmp_str(&uri1->passwd, &uri2->passwd)!=0)
143
-		return 1;
144
-	if(cmpi_str(&uri1->host, &uri2->host)!=0)
145
-		return 1;
146
-	/* if no params, we are done */
147
-	if(uri1->params.len==0 && uri2->params.len==0)
148
-		return 0;
149
-	if(uri1->params.len==0)
150
-	{
151
-		if(uri2->user_param.len!=0)
152
-			return 1;
153
-		if(uri2->ttl.len!=0)
154
-			return 1;
155
-		if(uri2->method.len!=0)
156
-			return 1;
157
-		if(uri2->maddr.len!=0)
158
-			return 1;
159
-	}
160
-	if(uri2->params.len==0)
161
-	{
162
-		if(uri1->user_param.len!=0)
163
-			return 1;
164
-		if(uri1->ttl.len!=0)
165
-			return 1;
166
-		if(uri1->method.len!=0)
167
-			return 1;
168
-		if(uri1->maddr.len!=0)
169
-			return 1;
170
-	}
171
-	return cmp_str_params(&uri1->params, &uri2->params);
172
-}
173
-
174
-/**
175
- * return:
176
- *	- 0: match
177
- *	- >0: no match
178
- *	- <0: error
179
- */
180
-int cmp_uri_str(str *s1, str *s2)
181
-{
182
-	struct sip_uri uri1;
183
-	struct sip_uri uri2;
184
-
185
-	/* todo: parse uri and compare the parts */
186
-	if(parse_uri(s1->s, s1->len, &uri1)!=0)
187
-		return -1;
188
-	if(parse_uri(s2->s, s2->len, &uri2)!=0)
189
-		return -1;
190
-	return cmp_uri(&uri1, &uri2);
191
-}
192
-
193
-/**
194
- * Compare SIP AoR
195
- * - match user, host and port (if port missing, assume 5060)
196
- * return:
197
- *	- 0: match
198
- *	- >0: no match
199
- *	- <0: error
200
- */
201
-int cmp_aor(struct sip_uri *uri1, struct sip_uri *uri2)
202
-{
203
-	/* quick check for length */
204
-	if(uri1->user.len!=uri2->user.len
205
-			|| uri1->host.len!=uri2->host.len)
206
-		return 1;
207
-	if(cmp_str(&uri1->user, &uri2->user)!=0)
208
-		return 1;
209
-	if(cmp_str(&uri1->port, &uri2->port)!=0)
210
-	{
211
-		if(uri1->port.len==0 && uri2->port_no!=5060)
212
-			return 1;
213
-		if(uri2->port.len==0 && uri1->port_no!=5060)
214
-			return 1;
215
-	}
216
-	if(cmpi_str(&uri1->host, &uri2->host)!=0)
217
-		return 1;
218
-	return 0;
219
-}
220
-
221
-/**
222
- * return:
223
- *	- 0: match
224
- *	- >0: no match
225
- *	- <0: error
226
- */
227
-int cmp_aor_str(str *s1, str *s2)
228
-{
229
-	struct sip_uri uri1;
230
-	struct sip_uri uri2;
231
-
232
-	/* todo: parse uri and compare the parts */
233
-	if(parse_uri(s1->s, s1->len, &uri1)!=0)
234
-		return -1;
235
-	if(parse_uri(s2->s, s2->len, &uri2)!=0)
236
-		return -1;
237
-	return cmp_aor(&uri1, &uri2);
238
-}
239
-
240 0
deleted file mode 100644
... ...
@@ -1,102 +0,0 @@
1
-/* 
2
- * Copyright (C) 2010 iptelorg GmbH
3
- *
4
- * Permission to use, copy, modify, and distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
- */
16
-/** k compatible statistics implemented in terms of sr counters.
17
- * @file kstats_wrapper.h
18
- * @ingroup: libkcore
19
- * @author andrei
20
- */
21
-
22
-#include "kstats_wrapper.h"
23
-
24
-#ifdef STATISTICS
25
-
26
-
27
-/** internal wrapper for kamailio type stat callbacks.
28
- * sr counter callbacks are different from the kamailio type stat callbacks.
29
- * This function is meant as a sr counter callback that will call
30
- * k stat callback passed as parameter.
31
- * @param h - not used.
32
- * @param param - k stat callback function pointer (stat_function).
33
- * @return result of calling the passed k stat_function.
34
- */
35
-static counter_val_t cnt_cbk_wrapper(counter_handle_t h, void* param)
36
-{
37
-	stat_function k_stat_f;
38
-	
39
-	k_stat_f = param;
40
-	return k_stat_f();
41
-}
42
-
43
-
44
-
45
-int register_stat( char *module, char *name, stat_var **pvar, int flags)
46
-{
47
-	int cnt_flags;
48
-	counter_handle_t h;
49
-	int ret;
50
-	
51
-	if (module == 0 || name == 0 || pvar == 0) {
52
-		BUG("invalid parameters (%p, %p, %p)\n", module, name, pvar);
53
-		return -1;
54
-	}
55
-	/* translate kamailio stat flags into sr counter flags */
56
-	cnt_flags = (flags & STAT_NO_RESET) ? CNT_F_NO_RESET : 0;
57
-	if (flags & STAT_IS_FUNC)
58
-		ret = counter_register(&h, module, name, cnt_flags,
59
-					cnt_cbk_wrapper,(stat_function)pvar,
60
-					"kamailio statistic (no description)",
61
-					0);
62
-	else
63
-		ret = counter_register(&h, module, name, cnt_flags, 0, 0,
64
-					"kamailio statistic (no description)", 0);
65
-	if (ret < 0) {
66
-		if (ret == -2)
67
-			ERR("counter %s.%s already registered\n", module, name);
68
-		goto error;
69
-	}
70
-	if (!(flags & STAT_IS_FUNC))
71
-		*pvar = (void*)(unsigned long)h.id;
72
-	return 0;
73
-error:
74
-	if (!(flags & STAT_IS_FUNC))
75
-		*pvar = 0;
76
-	return -1;
77
-}
78
-
79
-
80
-
81
-int register_module_stats(char *module, stat_export_t *stats)
82
-{
83
-	if (module == 0 || *module == 0) {
84
-		BUG("null or empty module name\n");
85
-		goto error;
86
-	}
87
-	if (stats == 0 || stats[0].name == 0)
88
-		/* empty stats */
89
-		return 0;
90
-	for (; stats->name; stats++)
91
-		if (register_stat(module, stats->name, stats->stat_pointer,
92
-							stats->flags) < 0 ){
93
-			ERR("failed to add statistic %s.%s\n", module, stats->name);
94
-			goto error;
95
-		}
96
-	return 0;
97
-error:
98
-	return -1;
99
-}
100
-
101
-#endif /* STATISTICS */
102
-/* vi: set ts=4 sw=4 tw=79:ai:cindent: */
103 0
deleted file mode 100644
... ...
@@ -1,145 +0,0 @@
1
-/* 
2
- * Copyright (C) 2010 iptelorg GmbH
3
- *
4
- * Permission to use, copy, modify, and distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
- */
16
-/** k compatible statistics implemented in terms of sr counters.
17
- * New functions:
18
- *  stats_support() - partially replaces get_stats_collector().
19
- *    Returns 1 if statistics support is compiled, 0 otherwise.
20
- *  get_stat_name() - returns the name of a stat_var.
21
- *  get_stat_module() - returns the module of a stat_var.
22
- * Removed functions:
23
- *  get_stats_collector()
24
- *  destroy_stats_collector()
25
- * Removed variables/structures:
26
- *   stats_collector
27
- *   module_stats
28
- *
29
- * @file kstats_wrapper.h
30
- * @ingroup: libkcore
31
- */
32
-
33
-/*! @defgroup libkcore Kamailio compatibility core library
34
- *
35
- */
36
-
37
-#ifndef __kstats_wrapper_h
38
-#define __kstats_wrapper_h
39
-
40
-#include "../../counters.h"
41
-#include "../../kstats_types.h"
42
-
43
-/* k stat flags */
44
-#define STAT_NO_RESET	1  /* used in dialog(k), nat_traversal(k),
45
-							  registrar(k), statistics(k), usrloc(k) */
46
-/* #define STAT_NO_SYN	2  -- not used */
47
-#define STAT_SHM_NAME	4 /* used only from usrloc(k) */
48
-#define STAT_IS_FUNC	8
49
-
50
-
51
-
52
-#ifdef STATISTICS
53
-
54
-/* statistics support check */
55
-#define stats_support() 1
56
-
57
-int register_stat( char *module, char *name, stat_var **pvar, int flags);
58
-int register_module_stats(char *module, stat_export_t *stats);
59
-
60
-inline static stat_var* get_stat(str *name)
61
-{
62
-	counter_handle_t h;
63
-	str grp;
64
-	
65
-	grp.s = 0;
66
-	grp.len = 0;
67
-	if (counter_lookup_str(&h, &grp, name) < 0)
68
-		return 0;
69
-	return (void*)(unsigned long)h.id;
70
-}
71
-
72
-
73
-
74
-inline static unsigned long get_stat_val(stat_var *v)
75
-{
76
-	counter_handle_t h;
77
-	h.id = (unsigned short)(unsigned long)v;
78
-	return (unsigned long)counter_get_val(h);
79
-}
80
-
81
-
82
-
83
-inline static char* get_stat_name(stat_var *v)
84
-{
85
-	counter_handle_t h;
86
-	h.id = (unsigned short)(unsigned long)v;
87
-	return counter_get_name(h);
88
-}
89
-
90
-
91
-
92
-inline static char* get_stat_module(stat_var *v)
93
-{
94
-	counter_handle_t h;
95
-	h.id = (unsigned short)(unsigned long)v;
96
-	return counter_get_group(h);
97
-}
98
-
99
-
100
-
101
-inline static void update_stat(stat_var* v, int n)
102
-{
103
-	counter_handle_t h;
104
-	h.id = (unsigned short)(unsigned long)v;
105
-	counter_add(h, n);
106
-}
107
-
108
-
109
-
110
-inline static void reset_stat(stat_var* v)
111
-{
112
-	counter_handle_t h;
113
-	h.id = (unsigned short)(unsigned long)v;
114
-	counter_reset(h);
115
-}
116
-
117
-
118
-#define if_update_stat(c, var, n) \
119
-	do{ \
120
-		if ((c)) update_stat((var), (n)); \
121
-	}while(0)
122
-
123
-#define if_reset_stat(c, var) \
124
-	do{ \
125
-		if ((c)) reset_stat((var)); \
126
-	}while(0)
127
-
128
-#else /* STATISTICS */
129
-
130
-/* statistics support check */
131
-#define stats_support() 0
132
-#define register_module_stats(mod, stats) 0
133
-#define register_stat(mod, name, var, flags) 0
134
-#define get_stat(name)  0
135
-#define get_stat_val(var) 0
136
-#define update_stat(v, n)
137
-#define reset_stat(v)
138
-#define if_update_stat(c, v, n)
139
-#define if_reset_stat(c, v)
140
-
141
-#endif /* STATISTICS */
142
-
143
-#endif /*__kstats_wrapper_h*/
144
-
145
-/* vi: set ts=4 sw=4 tw=79:ai:cindent: */
146 0
deleted file mode 100644
... ...
@@ -1,122 +0,0 @@
1
-/*
2
- * Regular expression functions
3
- *
4
- * Copyright (C) 2003 Juha Heinanen
5
- *
6
- * This file is part of Kamailio, a free SIP server.
7
- *
8
- * Kamailio 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
- * Kamailio is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
20
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21
- *
22
- */
23
-
24
-/*!
25
- * \file 
26
- * \brief Regular Expression functions
27
- * Copyright (C) 2003 Juha Heinanen
28
- * \ingroup libkcore
29
- */
30
-
31
-#include <sys/types.h>
32
-#include <string.h>
33
-#include <regex.h>
34
-#include <ctype.h>
35
-#include "regexp.h"
36
-#include "../../dprint.h"
37
-
38
-/*! \brief Replace in replacement tokens \\d with substrings of string pointed by
39
- * pmatch.
40
- */
41
-int replace(regmatch_t* pmatch, char* string, char* replacement, str* result)
42
-{
43
-	int len, i, j, digit, size;
44
-
45
-	len = strlen(replacement);
46
-	j = 0;
47
-
48
-	for (i = 0; i < len; i++) {
49
-		if (replacement[i] == '\\') {
50
-			if (i < len - 1) {
51
-				if (isdigit((unsigned char)replacement[i+1])) {
52
-					digit = replacement[i+1] - '0';
53
-					if (pmatch[digit].rm_so != -1) {
54
-						size = pmatch[digit].rm_eo - pmatch[digit].rm_so;
55
-						if (j + size < result->len) {
56
-							memcpy(&(result->s[j]), string+pmatch[digit].rm_so, size);
57
-							j = j + size;
58
-						} else {
59
-							return -1;
60
-						}
61
-					} else {
62
-						return -2;
63
-					}
64
-					i = i + 1;
65
-					continue;
66
-				} else {
67
-					i = i + 1;
68
-				}
69
-			} else {
70
-				return -3;
71
-			}
72
-		}
73
-		if (j + 1 < result->len) {
74
-			result->s[j] = replacement[i];
75
-			j = j + 1;
76
-		} else {
77
-			return -4;
78
-		}
79
-	}
80
-	result->len = j;
81
-	return 1;
82
-}
83
-
84
-
85
-/*! \brief Match pattern against string and store result in pmatch */
86
-int reg_match(char *pattern, char *string, regmatch_t *pmatch)
87
-{
88
-	regex_t preg;
89
-
90
-	if (regcomp(&preg, pattern, REG_EXTENDED | REG_NEWLINE)) {
91
-		return -1;
92
-	}
93
-	if (preg.re_nsub > MAX_MATCH) {
94
-		regfree(&preg);
95
-		return -2;
96
-	}
97
-	if (regexec(&preg, string, MAX_MATCH, pmatch, 0)) {
98
-		regfree(&preg);
99
-		return -3;
100
-	}
101
-	regfree(&preg);
102
-	return 0;
103
-}
104
-
105
-
106
-/*! \brief Match pattern against string and, if match succeeds, and replace string
107
- * with replacement substituting tokens \\d with matched substrings.
108
- */
109
-int reg_replace(char *pattern, char *replacement, char *string, str *result)
110
-{
111
-	regmatch_t pmatch[MAX_MATCH];
112
-
113
-	LM_DBG("pattern: '%s', replacement: '%s', string: '%s'\n",
114
-	    pattern, replacement, string);
115
-
116
-	if (reg_match(pattern, string, &(pmatch[0]))) {
117
-		return -1;
118
-	}
119
-
120
-	return replace(&pmatch[0], string, replacement, result);
121
-
122
-}
123 0
deleted file mode 100644
... ...
@@ -1,42 +0,0 @@
1
-/*
2
- * $Id$
3
- *
4
- * Copyright (C) 2003 Juha Heinanen
5
- *
6
- * This file is part of Kamailio, a free SIP server.
7
- *
8
- * Kamailio 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
- * Kamailio is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
20
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21
- *
22
- */
23
-
24
-/*!
25
- * \file 
26
- * \brief Regular expression definitions 
27
- * Copyright (C) 2003 Juha Heinanen
28
- * \author Juha Heinanen
29
- * \ingroup libkcore
30
- */
31
-
32
-
33
-#ifndef REGEXP_H
34
-#define REGEXP_H
35
-
36
-#include "../../str.h"
37
-
38
-#define MAX_MATCH 6
39
-
40
-extern int reg_replace(char *pattern, char *replacement, char *string, str *result);
41
-
42
-#endif
43 0
deleted file mode 100644
... ...
@@ -1,52 +0,0 @@
1
-/*
2
- * Copyright (C) 2007 voice-system.ro
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
- * \file
23
- * \brief Common string handling functions
24
- * \ingroup libkcore
25
- */
26
-
27
-#ifndef _STRCOMMON_H_
28
-#define _STRCOMMON_H_
29
-
30
-#include "../../str.h"
31
-
32
-/*
33
- * add backslashes to special characters
34
- */
35
-int escape_common(char *dst, char *src, int src_len);
36
-/*
37
- * remove backslashes to special characters
38
- */
39
-int unescape_common(char *dst, char *src, int src_len);
40
-
41
-int escape_user(str *sin, str *sout);
42
-
43
-int unescape_user(str *sin, str *sout);
44
-
45
-int escape_param(str *sin, str *sout);
46
-
47
-int unescape_param(str *sin, str *sout);
48
-
49
-int escape_csv(str *sin, str *sout);
50
-
51
-#endif
52
-
... ...
@@ -29,6 +29,6 @@ endif
29 29
 DEFS+=-DKAMAILIO_MOD_INTERFACE
30 30
 
31 31
 SERLIBPATH=../../lib
32
-SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/kcore/kcore
32
+SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1
33 33
 
34 34
 include ../../Makefile.modules
... ...
@@ -1,6 +1,4 @@
1 1
 /*
2
- * $Id$
3
- *
4 2
  * Copyright (C) 2001-2003 FhG Fokus
5 3
  * Copyright (C) 2006 Voice Sistem SRL
6 4
  * Copyright (C) 2008 Juha Heinanen
... ...
@@ -39,7 +37,7 @@
39 37
 /*! \file
40 38
  * \ingroup acc
41 39
  * \brief Acc:: Core accounting
42
- * 
40
+ *
43 41
  * Module: \ref acc
44 42
  */
45 43
 
... ...
@@ -63,7 +61,7 @@
63 61
 #include "acc_api.h"
64 62
 
65 63
 #ifdef RAD_ACC
66
-#include "../../lib/kcore/radius.h"
64
+#include "../misc_radius/radius.h"
67 65
 #endif
68 66
 
69 67
 #ifdef DIAM_ACC
... ...
@@ -69,7 +69,7 @@ int legs2strar( struct acc_extra *legs, struct sip_msg *rq, str *val_arr,
69 69
 int extra2int( struct acc_extra *extra, int *attrs );
70 70
 
71 71
 #ifdef RAD_ACC
72
-#include "../../lib/kcore/radius.h"
72
+#include "../misc_radius/radius.h"
73 73
 int extra2attrs( struct acc_extra *extra, struct attr *attrs, int offset);
74 74
 #endif
75 75
 
... ...
@@ -1,6 +1,4 @@
1 1
 /*
2
- * $Id$
3
- * 
4 2
  * Accounting module logic
5 3
  *
6 4
  * Copyright (C) 2001-2003 FhG Fokus
... ...
@@ -42,7 +40,7 @@
42 40
 #include "../../sr_module.h"
43 41
 #include "../../parser/parse_from.h"
44 42
 #include "../../parser/parse_content.h"
45
-#include "../../lib/kcore/cmpapi.h"
43
+#include "../../strutils.h"
46 44
 #include "../../modules/tm/tm_load.h"
47 45
 #include "../rr/api.h"
48 46
 #include "../../flags.h"
... ...
@@ -1,6 +1,4 @@
1 1
 /*
2
- * $Id$
3
- * 
4 2
  * Accounting module
5 3
  *
6 4
  * Copyright (C) 2001-2003 FhG Fokus
... ...
@@ -25,7 +23,7 @@
25 23
  * History:
26 24
  * -------
27 25
  * 2003-03-06: aligned to change in callback names (jiri)
28
- * 2003-03-06: fixed improper sql connection, now from 
26
+ * 2003-03-06: fixed improper sql connection, now from
29 27
  * 	           child_init (jiri)
30 28
  * 2003-03-11: New module interface (janakj)
31 29
  * 2003-03-16: flags export parameter added (janakj)
... ...
@@ -52,12 +50,12 @@
52 50
  */
53 51
 
54 52
 /*! \defgroup acc ACC :: The Kamailio accounting Module
55
- *            
53
+ *
56 54
  * The ACC module is used to account transactions information to
57 55
  *  different backends like syslog, SQL, RADIUS and DIAMETER (beta
58 56
  *  version).
59
- *            
60
- */ 
57
+ *
58
+ */
61 59
 
62 60
 #include <stdio.h>
63 61
 #include <string.h>
... ...
@@ -76,7 +74,7 @@
76 74
 #include "acc_cdr.h"
77 75
 
78 76
 #ifdef RAD_ACC
79
-#include "../../lib/kcore/radius.h"
77
+#include "../misc_radius/radius.h"
80 78
 #endif
81 79
 
82 80
 #ifdef DIAM_ACC
... ...
@@ -12,7 +12,4 @@ include ../../Makefile.radius
12 12
 
13 13
 DEFS+=-DKAMAILIO_MOD_INTERFACE
14 14
 
15
-SERLIBPATH=../../lib
16
-SER_LIBS+=$(SERLIBPATH)/kcore/kcore
17
-
18 15
 include ../../Makefile.modules
... ...
@@ -29,10 +29,10 @@
29 29
  */
30 30
 
31 31
 /*! \defgroup acc_radius ACC_RADIUS :: The Kamailio RADIUS accounting Module
32
- *            
32
+ *
33 33
  * The ACC_RADIUS module is used to account transactions information to
34
- *  RADIUS            
35
- */ 
34
+ *  RADIUS
35
+ */
36 36
 
37 37
 #include <stdio.h>
38 38
 #include <string.h>
... ...
@@ -41,7 +41,7 @@
41 41
 #include "../../dprint.h"
42 42
 #include "../../mem/mem.h"
43 43
 #include "../../parser/parse_to.h"
44
-#include "../../lib/kcore/radius.h"
44
+#include "../misc_radius/radius.h"
45 45
 #include "../../modules/acc/acc_api.h"
46 46
 #include "acc_radius_mod.h"
47 47
 #include "../../modules/acc/acc_extra.h"
... ...
@@ -1,4 +1,4 @@
1
-# 
1
+#
2 2
 # WARNING: do not run this directly, it should be run by the master Makefile
3 3
 
4 4
 include ../../Makefile.defs
... ...
@@ -93,7 +93,4 @@ endif
93 93
 
94 94
 DEFS+=-DKAMAILIO_MOD_INTERFACE
95 95
 
96
-SERLIBPATH=../../lib
97
-SER_LIBS+=$(SERLIBPATH)/kcore/kcore
98
-
99 96
 include ../../Makefile.modules
... ...
@@ -31,7 +31,7 @@
31 31
 #include "../../locking.h"
32 32
 #include "../../data_lump.h"
33 33
 #include "../../data_lump_rpl.h"
34
-#include "../../lib/kcore/cmpapi.h"
34
+#include "../../strutils.h"
35 35
 
36 36
 #include "app_lua_api.h"
37 37
 #include "app_lua_sr.h"
... ...
@@ -36,7 +36,7 @@
36 36
 #include "../../flags.h"
37 37
 #include "../../dset.h"
38 38
 #include "../../parser/parse_uri.h"
39
-#include "../../lib/kcore/cmpapi.h"
39
+#include "../../strutils.h"
40 40
 #include "../../xavp.h"
41 41
 #include "../../kemi.h"
42 42
 
... ...
@@ -16,7 +16,4 @@ endif
16 16
 
17 17
 DEFS+=-DKAMAILIO_MOD_INTERFACE
18 18
 
19
-SERLIBPATH=../../lib
20
-SER_LIBS+=$(SERLIBPATH)/kcore/kcore
21
-
22 19
 include ../../Makefile.modules
... ...
@@ -1,6 +1,4 @@
1 1
 /**
2
- * $Id$
3
- *
4 2
  * Copyright (C) 2011 Daniel-Constantin Mierla (asipto.com)
5 3
  *
6 4
  * This file is part of Kamailio, a free SIP server.
... ...
@@ -32,7 +30,7 @@
32 30
 #include "../../mem/mem.h"
33 31
 #include "../../data_lump.h"
34 32
 #include "../../data_lump_rpl.h"
35
-#include "../../lib/kcore/cmpapi.h"
33
+#include "../../strutils.h"
36 34
 
37 35
 #include "app_mono_api.h"
38 36
 
... ...
@@ -1,7 +1,7 @@
1 1
 #
2 2
 # Digest Authentication - Database support
3 3
 #
4
-# 
4
+#
5 5
 # WARNING: do not run this directly, it should be run by the master Makefile
6 6
 
7 7
 include ../../Makefile.defs
... ...
@@ -12,5 +12,5 @@ LIBS=
12 12
 DEFS+=-DKAMAILIO_MOD_INTERFACE
13 13
 
14 14
 SERLIBPATH=../../lib
15
-SER_LIBS+=$(SERLIBPATH)/kcore/kcore $(SERLIBPATH)/srdb1/srdb1
15
+SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1
16 16
 include ../../Makefile.modules
... ...
@@ -1,5 +1,5 @@
1 1
 #
2
-# 
2
+#
3 3
 # WARNING: do not run this directly, it should be run by the master Makefile
4 4
 
5 5
 include ../../Makefile.defs
... ...
@@ -34,7 +34,6 @@ LIBS+= $(TLS_EXTRA_LIBS)
34 34
 DEFS+=-DKAMAILIO_MOD_INTERFACE
35 35
 
36 36
 SERLIBPATH=../../lib
37
-SER_LIBS+=$(SERLIBPATH)/kcore/kcore
38 37
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi
39 38
 
40 39
 include ../../Makefile.modules
... ...
@@ -1,7 +1,7 @@
1 1
 #
2 2
 # Digest Authentication - Radius support
3 3
 #
4
-# 
4
+#
5 5
 # WARNING: do not run this directly, it should be run by the master Makefile
6 6
 
7 7
 include ../../Makefile.defs
... ...
@@ -12,7 +12,4 @@ NAME=auth_radius.so
12 12
 
13 13
 DEFS+=-DKAMAILIO_MOD_INTERFACE
14 14
 
15
-SERLIBPATH=../../lib
16
-SER_LIBS+=$(SERLIBPATH)/kcore/kcore
17
-
18 15
 include ../../Makefile.modules
... ...
@@ -1,4 +1,4 @@
1
-/* 
1
+/*
2 2
  * Digest Authentication - Radius support
3 3
  *
4 4
  * Copyright (C) 2001-2003 FhG Fokus
... ...
@@ -15,8 +15,8 @@
15 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
  * GNU General Public License for more details.
17 17
  *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program; if not, write to the Free Software
20 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 21
  *
22 22
  */
... ...
@@ -31,7 +31,7 @@
31 31
 #include "../../dprint.h"
32 32
 #include "../../config.h"
33 33
 #include "../../pvar.h"
34
-#include "../../lib/kcore/radius.h"
34
+#include "../misc_radius/radius.h"
35 35
 #include "../../mem/mem.h"
36 36
 #include "auth_radius.h"
37 37
 #include "authorize.h"
... ...
@@ -15,8 +15,8 @@
15 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
  * GNU General Public License for more details.
17 17
  *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program; if not, write to the Free Software
20 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 21
  *
22 22
  */
... ...
@@ -26,7 +26,7 @@
26 26
 #define AUTHRAD_MOD_H
27 27
 
28 28
 #include "../../modules/auth/api.h"
29
-#include "../../lib/kcore/radius.h"
29
+#include "../misc_radius/radius.h"
30 30
 
31 31
 extern struct attr attrs[];
32 32
 extern struct val vals[];
... ...
@@ -15,8 +15,8 @@
15 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
  * GNU General Public License for more details.
17 17
  *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program; if not, write to the Free Software
20 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 21
  *
22 22
  */
... ...
@@ -27,7 +27,7 @@
27 27
 #include "../../str.h"
28 28
 #include "../../pvar.h"
29 29
 #include "../../parser/msg_parser.h"
30
-#include "../../lib/kcore/radius.h"
30
+#include "../misc_radius/radius.h"
31 31
 
32 32
 struct extra_attr {
33 33
     str name;
... ...
@@ -1,4 +1,4 @@
1
-/* 
1
+/*
2 2
  * Digest Authentication - Radius support
3 3
  *
4 4
  * Copyright (C) 2001-2003 FhG Fokus
... ...
@@ -15,8 +15,8 @@
15 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
  * GNU General Public License for more details.
17 17
  *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program; if not, write to the Free Software
20 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 21
  *
22 22
  */
... ...
@@ -25,7 +25,7 @@
25 25
 #include "../../mem/mem.h"
26 26
 #include "../../dprint.h"
27 27
 #include "../../usr_avp.h"
28
-#include "../../lib/kcore/radius.h"
28
+#include "../misc_radius/radius.h"
29 29
 #include "../../ut.h"
30 30
 #include "../../modules/auth/api.h"
31 31
 #include "sterman.h"
... ...
@@ -10,5 +10,4 @@ DEFS+=-DKAMAILIO_MOD_INTERFACE
10 10
 
11 11
 SERLIBPATH=../../lib
12 12
 SER_LIBS+=$(SERLIBPATH)/srutils/srutils
13
-SER_LIBS+=$(SERLIBPATH)/kcore/kcore
14