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
deleted file mode 100644
... ...
@@ -1,63 +0,0 @@
1
-/* 
2
- * 
3
- * Copyright (C) 2008 iptelorg GmbH
4
- *
5
- * Permission to use, copy, modify, and distribute this software for any
6
- * purpose with or without fee is hereby granted, provided that the above
7
- * copyright notice and this permission notice appear in all copies.
8
- *
9
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
- */
17
-/**
18
- * @file 
19
- * @brief Kamailio core :: lvalues (assignment)
20
- * @author andrei
21
- */
22
-
23
-#ifndef __lvalue_h_
24
-#define __lvalue_h_
25
-
26
-#include "rvalue.h"
27
-#include "usr_avp.h"
28
-#include "pvar.h"
29
-#include "parser/msg_parser.h"
30
-#include "action.h"
31
-
32
-union lval_u{
33
-	pv_spec_t *pvs;
34
-	avp_spec_t avps;
35
-};
36
-
37
-enum lval_type{
38
-	LV_NONE, LV_AVP, LV_PVAR
39
-};
40
-
41
-struct lvalue{
42
-	enum lval_type type;
43
-	union lval_u lv;
44
-};
45
-
46
-/* lval operators */
47
-#define EQ_T 254 /* k compatibility */
48
-
49
-typedef int (*log_assign_action_f)(struct sip_msg* msg, struct lvalue *lv);
50
-void set_log_assign_action_cb(log_assign_action_f f);
51
-
52
-/** eval rve and assign the result to lv
53
- * lv=eval(rve)
54
- *
55
- * @param h  - script context
56
- * @param msg - sip msg
57
- * @param lv - lvalue
58
- * @param rve - rvalue expression
59
- * @return >= 0 on success (expr. bool value), -1 on error
60
- */
61
-int lval_assign(struct run_act_ctx* h, struct sip_msg* msg, 
62
-				struct lvalue* lv, struct rval_expr* rve);
63
-#endif /* __lvalue_h_*/
Browse code

core: Modify doxygen, remove history, remove SVN IDs, change "ser" and "sip-router" to "KAMAILIO"

Olle E. Johansson authored on 16/01/2015 16:38:46
Showing 1 changed files
... ...
@@ -16,7 +16,7 @@
16 16
  */
17 17
 /**
18 18
  * @file 
19
- * @brief lvalues (assignment)
19
+ * @brief Kamailio core :: lvalues (assignment)
20 20
  * @author andrei
21 21
  */
22 22
 
Browse code

Core Update of doxygen, removal of history, changing "ser" to "kamailio"

Olle E. Johansson authored on 03/01/2015 14:03:24
Showing 1 changed files
... ...
@@ -1,5 +1,4 @@
1 1
 /* 
2
- * $Id$
3 2
  * 
4 3
  * Copyright (C) 2008 iptelorg GmbH
5 4
  *
... ...
@@ -18,11 +17,7 @@
18 17
 /**
19 18
  * @file 
20 19
  * @brief lvalues (assignment)
21
- */
22
-/* 
23
- * History:
24
- * --------
25
- *  2008-11-30  initial version (andrei)
20
+ * @author andrei
26 21
  */
27 22
 
28 23
 #ifndef __lvalue_h_
Browse code

core: Add callback to be able to log assign actions.

Victor Seva authored on 29/05/2013 10:25:09
Showing 1 changed files
... ...
@@ -51,7 +51,8 @@ struct lvalue{
51 51
 /* lval operators */
52 52
 #define EQ_T 254 /* k compatibility */
53 53
 
54
-
54
+typedef int (*log_assign_action_f)(struct sip_msg* msg, struct lvalue *lv);
55
+void set_log_assign_action_cb(log_assign_action_f f);
55 56
 
56 57
 /** eval rve and assign the result to lv
57 58
  * lv=eval(rve)
Browse code

core: use pointer to pv_spec_t on lvalue union. Use pv_cache_get() on interpreter.

Victor Seva authored on 29/05/2013 10:24:00
Showing 1 changed files
... ...
@@ -35,7 +35,7 @@
35 35
 #include "action.h"
36 36
 
37 37
 union lval_u{
38
-	pv_spec_t pvs;
38
+	pv_spec_t *pvs;
39 39
 	avp_spec_t avps;
40 40
 };
41 41
 
Browse code

script engine: generalised lvalues & rvalues

- support for rvalues (anything that can appear on the right side
of an assignment). For now an rvalue can be an avp, pvar,
select, number, string, logical expression or script command.
rvalues expressions are also supported (rvalue operator rvalue
...).
Evaluation of integer rvalue expression is highly optimized.
For performance reasons the rvalue expressions are completely
separated from the logical expressions (eval_elem/eval_expr).
- rvalue expression fixup (apart for normal fixup stuff will also
optimize away simple expressions, like 2+3 or "a" + "b").
- support for more general lvalues (anything in the left side of
an assignment operator). For now an lvalue is either an avp or a
script pvar. lvalue = rvalue_expression.
Direct assignments (lvalue to avp or pvar) are optimised.

Andrei Pelinescu-Onciul authored on 03/12/2008 23:47:29
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,67 @@
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
+ * @file 
20
+ * @brief lvalues (assignment)
21
+ */
22
+/* 
23
+ * History:
24
+ * --------
25
+ *  2008-11-30  initial version (andrei)
26
+ */
27
+
28
+#ifndef __lvalue_h_
29
+#define __lvalue_h_
30
+
31
+#include "rvalue.h"
32
+#include "usr_avp.h"
33
+#include "pvar.h"
34
+#include "parser/msg_parser.h"
35
+#include "action.h"
36
+
37
+union lval_u{
38
+	pv_spec_t pvs;
39
+	avp_spec_t avps;
40
+};
41
+
42
+enum lval_type{
43
+	LV_NONE, LV_AVP, LV_PVAR
44
+};
45
+
46
+struct lvalue{
47
+	enum lval_type type;
48
+	union lval_u lv;
49
+};
50
+
51
+/* lval operators */
52
+#define EQ_T 254 /* k compatibility */
53
+
54
+
55
+
56
+/** eval rve and assign the result to lv
57
+ * lv=eval(rve)
58
+ *
59
+ * @param h  - script context
60
+ * @param msg - sip msg
61
+ * @param lv - lvalue
62
+ * @param rve - rvalue expression
63
+ * @return >= 0 on success (expr. bool value), -1 on error
64
+ */
65
+int lval_assign(struct run_act_ctx* h, struct sip_msg* msg, 
66
+				struct lvalue* lv, struct rval_expr* rve);
67
+#endif /* __lvalue_h_*/