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,96 +0,0 @@
1
-/*
2
- * Require, Request-Disposition Header Field Name Parsing Macros
3
- *
4
- * Copyright (C) 2001-2003 FhG Fokus
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
-/*! \file 
25
- * \brief Parser ::  Require, Request-Disposition Header Field Name Parsing Macros
26
- *
27
- * \ingroup parser
28
- */
29
-
30
-
31
-
32
-#ifndef CASE_REQU_H
33
-#define CASE_REQU_H
34
-
35
-#include "../comp_defs.h"
36
-
37
-#define REQUESTDISPOSIT_ion_CASE                    \
38
-        switch(LOWER_DWORD(val)) {                  \
39
-        case _ion1_:                                \
40
-	        hdr->type = HDR_REQUESTDISPOSITION_T; \
41
-	        hdr->name.len = 19;                 \
42
-	        return (p + 4);                     \
43
-                                                    \
44
-        case _ion2_:                                \
45
-                hdr->type = HDR_REQUESTDISPOSITION_T; \
46
-                p += 4;                             \
47
-	        goto dc_end;                        \
48
-        }
49
-
50
-
51
-#define REQUESTDISP_OSITION_CASE   \
52
-        switch(LOWER_DWORD(val)) { \
53
-        case _osit_:               \
54
-		p += 4;            \
55
-		val = READ(p);     \
56
-		REQUESTDISPOSIT_ion_CASE;  \
57
-		goto other;        \
58
-	}
59
-
60
-#define REQUEST_DISPOSITION_CASE             \
61
-        switch(LOWER_DWORD(val)) {           \
62
-        case _disp_:                         \
63
-                p += 4;                      \
64
-		val = READ(p);               \
65
-		REQUESTDISP_OSITION_CASE;    \
66
-                goto other;                  \
67
-        }
68
-
69
-
70
-#define IRE_CASE                         \
71
-        switch(LOWER_DWORD(val)) {       \
72
-        case _ire1_:                     \
73
-                hdr->type = HDR_REQUIRE_T; \
74
-                hdr->name.len = 7;       \
75
-                return (p + 4);          \
76
-                                         \
77
-        case _ire2_:                     \
78
-                hdr->type = HDR_REQUIRE_T; \
79
-                p += 4;                  \
80
-                goto dc_end;             \
81
-        case _est__:                     \
82
-                p += 4;                  \
83
-                val = READ(p);           \
84
-                REQUEST_DISPOSITION_CASE;\
85
-                goto other;              \
86
-        }
87
-
88
-
89
-#define requ_CASE         \
90
-        p += 4;           \
91
-        val = READ(p);    \
92
-        IRE_CASE;         \
93
-        goto other;
94
-
95
-
96
-#endif /* CASE_REQU_H */
Browse code

parser Updates to header files, remove history etc

Olle E. Johansson authored on 16/01/2015 16:51:51
Showing 1 changed files
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2001-2003 FhG Fokus
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of Kamailio, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * Kamailio is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * Kamailio is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -24,10 +19,6 @@
24 19
  * along with this program; if not, write to the Free Software
25 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26 21
  *
27
- * History:
28
- * -------------
29
- * 2003-02-28 scratchpad compatibility abandoned (jiri)
30
- * 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri)
31 22
  */
32 23
 
33 24
 /*! \file 
Browse code

all: updated FSF address in GPL text

Anthony Messina authored on 04/07/2014 09:36:37 • Daniel-Constantin Mierla committed on 04/07/2014 09:37:36
Showing 1 changed files
... ...
@@ -22,7 +22,7 @@
22 22
  *
23 23
  * You should have received a copy of the GNU General Public License
24 24
  * along with this program; if not, write to the Free Software
25
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26 26
  *
27 27
  * History:
28 28
  * -------------
Browse code

parser: remove old $Id$ docs header from subversion times, not usable anymore

Henning Westerholt authored on 05/07/2012 21:39:51
Showing 1 changed files
... ...
@@ -1,6 +1,4 @@
1 1
 /*
2
- * $Id$
3
- *
4 2
  * Require, Request-Disposition Header Field Name Parsing Macros
5 3
  *
6 4
  * Copyright (C) 2001-2003 FhG Fokus
Browse code

Doxygen for the parser directory

There's still a lot of files untouched. Feel free to jump in and help!

oej authored on 25/10/2009 15:58:41
Showing 1 changed files
... ...
@@ -32,6 +32,13 @@
32 32
  * 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri)
33 33
  */
34 34
 
35
+/*! \file 
36
+ * \brief Parser ::  Require, Request-Disposition Header Field Name Parsing Macros
37
+ *
38
+ * \ingroup parser
39
+ */
40
+
41
+
35 42
 
36 43
 #ifndef CASE_REQU_H
37 44
 #define CASE_REQU_H
Browse code

- adjusted compact headers. There were missing compact equivalents for Subject, Refer-To and completely missing Session-Expires, Accept-Contact, etc. support. Currently I've implemented both compact header and case switches to assign enumeration type. No next parsing is processed, but probably will be done, good candidate e.g. Session-Expires.

Now e.g. textops hf_value correctly recognizes "Session-Expires" and "x" as equal headers.

Tomas Mandys authored on 18/06/2006 23:15:22
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1
-/* 
2
- * $Id$ 
1
+/*
2
+ * $Id$
3 3
  *
4
- * Require Header Field Name Parsing Macros
4
+ * Require, Request-Disposition Header Field Name Parsing Macros
5 5
  *
6 6
  * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
... ...
@@ -22,8 +22,8 @@
22 22
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 23
  * GNU General Public License for more details.
24 24
  *
25
- * You should have received a copy of the GNU General Public License 
26
- * along with this program; if not, write to the Free Software 
25
+ * You should have received a copy of the GNU General Public License
26
+ * along with this program; if not, write to the Free Software
27 27
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28 28
  *
29 29
  * History:
... ...
@@ -38,6 +38,38 @@
38 38
 
39 39
 #include "../comp_defs.h"
40 40
 
41
+#define REQUESTDISPOSIT_ion_CASE                    \
42
+        switch(LOWER_DWORD(val)) {                  \
43
+        case _ion1_:                                \
44
+	        hdr->type = HDR_REQUESTDISPOSITION_T; \
45
+	        hdr->name.len = 19;                 \
46
+	        return (p + 4);                     \
47
+                                                    \
48
+        case _ion2_:                                \
49
+                hdr->type = HDR_REQUESTDISPOSITION_T; \
50
+                p += 4;                             \
51
+	        goto dc_end;                        \
52
+        }
53
+
54
+
55
+#define REQUESTDISP_OSITION_CASE   \
56
+        switch(LOWER_DWORD(val)) { \
57
+        case _osit_:               \
58
+		p += 4;            \
59
+		val = READ(p);     \
60
+		REQUESTDISPOSIT_ion_CASE;  \
61
+		goto other;        \
62
+	}
63
+
64
+#define REQUEST_DISPOSITION_CASE             \
65
+        switch(LOWER_DWORD(val)) {           \
66
+        case _disp_:                         \
67
+                p += 4;                      \
68
+		val = READ(p);               \
69
+		REQUESTDISP_OSITION_CASE;    \
70
+                goto other;                  \
71
+        }
72
+
41 73
 
42 74
 #define IRE_CASE                         \
43 75
         switch(LOWER_DWORD(val)) {       \
... ...
@@ -50,6 +82,11 @@
50 82
                 hdr->type = HDR_REQUIRE_T; \
51 83
                 p += 4;                  \
52 84
                 goto dc_end;             \
85
+        case _est__:                     \
86
+                p += 4;                  \
87
+                val = READ(p);           \
88
+                REQUEST_DISPOSITION_CASE;\
89
+                goto other;              \
53 90
         }
54 91
 
55 92
 
Browse code

- changed parse_headers api, HDR_xxx split into HDR_xxx_F (hdr_flags_t) and HDR_xxx_T (hdr_types_t), for more info read doc/parse_headers.txt. The header flags were extended top 64 bits. Be carefull not to mix types with flags, they won't work!

Andrei Pelinescu-Onciul authored on 23/02/2005 17:16:01
Showing 1 changed files
... ...
@@ -42,12 +42,12 @@
42 42
 #define IRE_CASE                         \
43 43
         switch(LOWER_DWORD(val)) {       \
44 44
         case _ire1_:                     \
45
-                hdr->type = HDR_REQUIRE; \
45
+                hdr->type = HDR_REQUIRE_T; \
46 46
                 hdr->name.len = 7;       \
47 47
                 return (p + 4);          \
48 48
                                          \
49 49
         case _ire2_:                     \
50
-                hdr->type = HDR_REQUIRE; \
50
+                hdr->type = HDR_REQUIRE_T; \
51 51
                 p += 4;                  \
52 52
                 goto dc_end;             \
53 53
         }
Browse code

- Spelling checked

Jan Janak authored on 24/08/2004 09:01:24
Showing 1 changed files
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Require Header Field Name Parsing Macros
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
Browse code

elderly (un)defs junked (hopefuly the right ones)

Jiri Kuthan authored on 28/02/2003 14:12:25
Showing 1 changed files
... ...
@@ -28,6 +28,7 @@
28 28
  *
29 29
  * History:
30 30
  * -------------
31
+ * 2003-02-28 scratchpad compatibility abandoned (jiri)
31 32
  * 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri)
32 33
  */
33 34
 
... ...
@@ -43,7 +44,6 @@
43 44
         case _ire1_:                     \
44 45
                 hdr->type = HDR_REQUIRE; \
45 46
                 hdr->name.len = 7;       \
46
-                SET_ZT(*(p + 3));        \
47 47
                 return (p + 4);          \
48 48
                                          \
49 49
         case _ire2_:                     \
Browse code

parser changed to make body to point to body (w/o LWS), have a len encompassing the complete hf (name.s..CRLF) and not to put zero- terminators after header field names and cseq

Jiri Kuthan authored on 27/01/2003 21:19:48
Showing 1 changed files
... ...
@@ -25,19 +25,25 @@
25 25
  * You should have received a copy of the GNU General Public License 
26 26
  * along with this program; if not, write to the Free Software 
27 27
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28
+ *
29
+ * History:
30
+ * -------------
31
+ * 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri)
28 32
  */
29 33
 
30 34
 
31 35
 #ifndef CASE_REQU_H
32 36
 #define CASE_REQU_H
33 37
 
38
+#include "../comp_defs.h"
39
+
34 40
 
35 41
 #define IRE_CASE                         \
36 42
         switch(LOWER_DWORD(val)) {       \
37 43
         case _ire1_:                     \
38 44
                 hdr->type = HDR_REQUIRE; \
39 45
                 hdr->name.len = 7;       \
40
-                *(p + 3) = '\0';         \
46
+                SET_ZT(*(p + 3));        \
41 47
                 return (p + 4);          \
42 48
                                          \
43 49
         case _ire2_:                     \
Browse code

Faster parse_hname function, hash table removed, several minor optimizations

Jan Janak authored on 18/11/2002 19:08:16
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1
-/*
2
- * $Id$
1
+/* 
2
+ * $Id$ 
3 3
  *
4
- * Require header field parser macros
4
+ * Require Header Field Name Parsing Macros
5 5
  *
6 6
  * Copyright (C) 2001-2003 Fhg Fokus
7 7
  *
... ...
@@ -33,7 +33,7 @@
33 33
 
34 34
 
35 35
 #define IRE_CASE                         \
36
-        switch(val) {                    \
36
+        switch(LOWER_DWORD(val)) {       \
37 37
         case _ire1_:                     \
38 38
                 hdr->type = HDR_REQUIRE; \
39 39
                 hdr->name.len = 7;       \
... ...
@@ -47,12 +47,9 @@
47 47
         }
48 48
 
49 49
 
50
-#define Requ_CASE         \
50
+#define requ_CASE         \
51 51
         p += 4;           \
52 52
         val = READ(p);    \
53
-        IRE_CASE;         \
54
-                          \
55
-        val = unify(val); \
56 53
         IRE_CASE;         \
57 54
         goto other;
58 55
 
Browse code

GPLization banner introduced to *.[hc] files

Jiri Kuthan authored on 19/09/2002 12:23:52
Showing 1 changed files
... ...
@@ -2,8 +2,32 @@
2 2
  * $Id$
3 3
  *
4 4
  * Require header field parser macros
5
+ *
6
+ * Copyright (C) 2001-2003 Fhg Fokus
7
+ *
8
+ * This file is part of ser, a free SIP server.
9
+ *
10
+ * ser is free software; you can redistribute it and/or modify
11
+ * it under the terms of the GNU General Public License as published by
12
+ * the Free Software Foundation; either version 2 of the License, or
13
+ * (at your option) any later version
14
+ *
15
+ * For a license to use the ser software under conditions
16
+ * other than those described here, or to purchase support for this
17
+ * software, please contact iptel.org by e-mail at the following addresses:
18
+ *    info@iptel.org
19
+ *
20
+ * ser is distributed in the hope that it will be useful,
21
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
+ * GNU General Public License for more details.
24
+ *
25
+ * You should have received a copy of the GNU General Public License 
26
+ * along with this program; if not, write to the Free Software 
27
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
5 28
  */
6 29
 
30
+
7 31
 #ifndef CASE_REQU_H
8 32
 #define CASE_REQU_H
9 33
 
Browse code

*** empty log message ***

Jan Janak authored on 12/08/2002 12:04:50
Showing 1 changed files
... ...
@@ -33,4 +33,4 @@
33 33
         goto other;
34 34
 
35 35
 
36
-#endif
36
+#endif /* CASE_REQU_H */
Browse code

New header field name parser

Jan Janak authored on 25/07/2002 12:28:26
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ * Require header field parser macros
5
+ */
6
+
7
+#ifndef CASE_REQU_H
8
+#define CASE_REQU_H
9
+
10
+
11
+#define IRE_CASE                         \
12
+        switch(val) {                    \
13
+        case _ire1_:                     \
14
+                hdr->type = HDR_REQUIRE; \
15
+                hdr->name.len = 7;       \
16
+                *(p + 3) = '\0';         \
17
+                return (p + 4);          \
18
+                                         \
19
+        case _ire2_:                     \
20
+                hdr->type = HDR_REQUIRE; \
21
+                p += 4;                  \
22
+                goto dc_end;             \
23
+        }
24
+
25
+
26
+#define Requ_CASE         \
27
+        p += 4;           \
28
+        val = READ(p);    \
29
+        IRE_CASE;         \
30
+                          \
31
+        val = unify(val); \
32
+        IRE_CASE;         \
33
+        goto other;
34
+
35
+
36
+#endif