Browse code

kstats: cleanup - move type defs. to separate file

- moved kamailio statistics type defs to kstats_types.h (from
lib/kcore/kstats_wrapper.h). This removes core dependency on
lib/kcore include files (the statistics types are needed for the
kamailio module interface defs).
- removed statistics.h (it is obsolete, counters.h should be used
instead and if somebody really needs it, it should include
lib/kcore/kstats_wrapper.h or lib/kcore/statistics.h).

Andrei Pelinescu-Onciul authored on 18/08/2010 18:01:31
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-/*
2
- * $Id$
3
- *
4
- * Copyright (C) 2008 iptelorg GmbH
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
- * statistics compatibility wrapper for kamailio
20
- * for now it doesn't do anything
21
- * (obsolete, do not use anymore)
22
- *
23
- * History:
24
- * --------
25
- *  2008-11-17  initial version compatible with kamailio statistics.h (andrei)
26
- */
27
-
28
-#ifndef _STATISTICS_H_
29
-#define _STATISTICS_H_
30
-
31
-#include "lib/kcore/statistics.h"
32
-
33
-#endif /* _STATISTICS_H_ */
Browse code

core: remove compile-time warning about K statistics

- all statistics but core:* from K are now available

Daniel-Constantin Mierla authored on 28/05/2009 12:29:57
Showing 1 changed files
... ...
@@ -30,8 +30,4 @@
30 30
 
31 31
 #include "lib/kcore/statistics.h"
32 32
 
33
-#ifdef STATISTICS
34
-#warning "sorry sip-router does not support all STATISTICS"
35
-#endif
36
-
37 33
 #endif /* _STATISTICS_H_ */
Browse code

core: statistics.h only includes lib/kcore/statistics.h

- this should be removed in the future
- mi and statistics API are libraries, initialization is done from
modules, the fields in module_exports are not used by core

Daniel-Constantin Mierla authored on 22/04/2009 15:11:05
Showing 1 changed files
... ...
@@ -28,46 +28,10 @@
28 28
 #ifndef _STATISTICS_H_
29 29
 #define _STATISTICS_H_
30 30
 
31
-#include "str.h"
32
-
33
-#define STAT_NO_RESET  1
34
-#define STAT_NO_SYNC   2
35
-#define STAT_SHM_NAME  4
36
-#define STAT_IS_FUNC   8
37
-
38
-
39
-
40
-typedef unsigned int stat_val;
41
-typedef unsigned long (*stat_function)(void);
42
-
43
-typedef struct stat_var_{
44
-	unsigned int mod_idx;
45
-	str name;
46
-	int flags;
47
-	union{
48
-		stat_val *val;
49
-		stat_function f;
50
-	}u;
51
-	struct stat_var_ *hnext;
52
-	struct stat_var_ *lnext;
53
-} stat_var;
54
-
55
-
56
-typedef struct stat_export_ {
57
-	char* name;                /* null terminated statistic name */
58
-	int flags;                 /* flags */
59
-	stat_var** stat_pointer;   /* pointer to the variable's shm mem location */
60
-} stat_export_t;
61
-
62
-#define get_stat(name)  0
63
-#define get_stat_val(v) 0
64
-#define get_stat_var_from_num_code(num_code, in_code) 0
65
-#define update_stat(v, n)
66
-#define reset_stat(v)
67
-#define if_update_stat(cond, v, n)
31
+#include "lib/kcore/statistics.h"
68 32
 
69 33
 #ifdef STATISTICS
70
-#warning "sorry sip-router does not support STATISTICS"
34
+#warning "sorry sip-router does not support all STATISTICS"
71 35
 #endif
72 36
 
73 37
 #endif /* _STATISTICS_H_ */
Browse code

minor macro additions for kamailio compatibility

Andrei Pelinescu-Onciul authored on 20/11/2008 19:02:05
Showing 1 changed files
... ...
@@ -61,9 +61,10 @@ typedef struct stat_export_ {
61 61
 
62 62
 #define get_stat(name)  0
63 63
 #define get_stat_val(v) 0
64
+#define get_stat_var_from_num_code(num_code, in_code) 0
64 65
 #define update_stat(v, n)
65 66
 #define reset_stat(v)
66
-#define if_update_stat (cond, v, n)
67
+#define if_update_stat(cond, v, n)
67 68
 
68 69
 #ifdef STATISTICS
69 70
 #warning "sorry sip-router does not support STATISTICS"
Browse code

kamailio compatibility header files

- mi, pvar & statistics basic include files. For now they contain only
basic type declarations and defines to allow compilation (so you cannot
use them, but the code will compile).
- pvar needs more work or replacement

Andrei Pelinescu-Onciul authored on 17/11/2008 23:21:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ * Copyright (C) 2008 iptelorg GmbH
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
+ * statistics compatibility wrapper for kamailio
20
+ * for now it doesn't do anything
21
+ * (obsolete, do not use anymore)
22
+ *
23
+ * History:
24
+ * --------
25
+ *  2008-11-17  initial version compatible with kamailio statistics.h (andrei)
26
+ */
27
+
28
+#ifndef _STATISTICS_H_
29
+#define _STATISTICS_H_
30
+
31
+#include "str.h"
32
+
33
+#define STAT_NO_RESET  1
34
+#define STAT_NO_SYNC   2
35
+#define STAT_SHM_NAME  4
36
+#define STAT_IS_FUNC   8
37
+
38
+
39
+
40
+typedef unsigned int stat_val;
41
+typedef unsigned long (*stat_function)(void);
42
+
43
+typedef struct stat_var_{
44
+	unsigned int mod_idx;
45
+	str name;
46
+	int flags;
47
+	union{
48
+		stat_val *val;
49
+		stat_function f;
50
+	}u;
51
+	struct stat_var_ *hnext;
52
+	struct stat_var_ *lnext;
53
+} stat_var;
54
+
55
+
56
+typedef struct stat_export_ {
57
+	char* name;                /* null terminated statistic name */
58
+	int flags;                 /* flags */
59
+	stat_var** stat_pointer;   /* pointer to the variable's shm mem location */
60
+} stat_export_t;
61
+
62
+#define get_stat(name)  0
63
+#define get_stat_val(v) 0
64
+#define update_stat(v, n)
65
+#define reset_stat(v)
66
+#define if_update_stat (cond, v, n)
67
+
68
+#ifdef STATISTICS
69
+#warning "sorry sip-router does not support STATISTICS"
70
+#endif
71
+
72
+#endif /* _STATISTICS_H_ */