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,82 +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
-/*! \file
22
- * \brief Parser :: Event header field body parser.
23
- *
24
- *
25
- * \ingroup parser
26
- */
27
-
28
-
29
-#ifndef PARSE_EVENT_H
30
-#define PARSE_EVENT_H
31
-
32
-#include "../str.h"
33
-#include "hf.h"
34
-#include "parse_param.h"
35
-
36
-/* Recognized event types */
37
-enum event_type {
38
-	EVENT_OTHER = 0,
39
-	EVENT_PRESENCE,
40
-	EVENT_PRESENCE_WINFO,
41
-	EVENT_SIP_PROFILE,
42
-	EVENT_XCAP_CHANGE,
43
-	EVENT_DIALOG,
44
-	EVENT_MESSAGE_SUMMARY,
45
-	EVENT_UA_PROFILE
46
-};
47
-
48
-
49
-struct event_params {
50
-	param_hooks_t hooks; /* Well known dialog package params */
51
-	param_t* list; /* Linked list of all parsed parameters */
52
-};
53
-
54
-
55
-typedef struct event {
56
-	enum event_type type; /* Parsed variant */
57
-	str name;             /* Original string representation */
58
-	struct event_params params;
59
-} event_t;
60
-
61
-
62
-/*
63
- * Parse Event HF body
64
- */
65
-int parse_event(struct hdr_field* hf);
66
-
67
-
68
-/*
69
- * Release memory
70
- */
71
-void free_event(event_t** e);
72
-
73
-
74
-/*
75
- * Print structure, for debugging only
76
- */
77
-void print_event(event_t* e);
78
-
79
-int event_parser(char* s, int l, event_t* e);
80
-
81
-
82
-#endif /* PARSE_EVENT_H */
Browse code

core parser - remove svn ID, remove history, change "ser" => "Kamailio"

Olle E. Johansson authored on 18/01/2015 19:36:18
Showing 1 changed files
... ...
@@ -1,14 +1,14 @@
1 1
 /*
2 2
  * Copyright (C) 2001-2003 FhG Fokus
3 3
  *
4
- * This file is part of ser, a free SIP server.
4
+ * This file is part of Kamailio, a free SIP server.
5 5
  *
6
- * ser is free software; you can redistribute it and/or modify
6
+ * Kamailio is free software; you can redistribute it and/or modify
7 7
  * it under the terms of the GNU General Public License as published by
8 8
  * the Free Software Foundation; either version 2 of the License, or
9 9
  * (at your option) any later version
10 10
  *
11
- * ser is distributed in the hope that it will be useful,
11
+ * Kamailio is distributed in the hope that it will be useful,
12 12
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 14
  * GNU General Public License for more details.
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
... ...
@@ -15,7 +15,7 @@
15 15
  *
16 16
  * You should have received a copy of the GNU General Public License 
17 17
  * along with this program; if not, write to the Free Software 
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19 19
  */
20 20
 
21 21
 /*! \file
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
  * Copyright (C) 2001-2003 FhG Fokus
5 3
  *
6 4
  * This file is part of ser, a free SIP server.
Browse code

parser: added ua-profile event type

Mihály Mészáros authored on 20/10/2011 15:47:50
Showing 1 changed files
... ...
@@ -43,7 +43,8 @@ enum event_type {
43 43
 	EVENT_SIP_PROFILE,
44 44
 	EVENT_XCAP_CHANGE,
45 45
 	EVENT_DIALOG,
46
-	EVENT_MESSAGE_SUMMARY
46
+	EVENT_MESSAGE_SUMMARY,
47
+	EVENT_UA_PROFILE
47 48
 };
48 49
 
49 50
 
Browse code

core: event_t uses param_hooks_t

- parse_params() requires a param_hooks_t field since it memsets it to
0, previously, the dialog specific hooks structure had a shorter size
resulting in buffer overflow

Daniel-Constantin Mierla authored on 29/09/2010 21:33:02
Showing 1 changed files
... ...
@@ -48,7 +48,7 @@ enum event_type {
48 48
 
49 49
 
50 50
 struct event_params {
51
-	struct event_dialog_hooks dialog; /* Well known dialog package params */
51
+	param_hooks_t hooks; /* Well known dialog package params */
52 52
 	param_t* list; /* Linked list of all parsed parameters */
53 53
 };
54 54
 
Browse code

More parser/ doxygen changes

oej authored on 25/10/2009 17:26:46
Showing 1 changed files
... ...
@@ -10,11 +10,6 @@
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 13
  * ser 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
... ...
@@ -25,6 +20,13 @@
25 20
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 21
  */
27 22
 
23
+/*! \file
24
+ * \brief Parser :: Event header field body parser.
25
+ *
26
+ *
27
+ * \ingroup parser
28
+ */
29
+
28 30
 
29 31
 #ifndef PARSE_EVENT_H
30 32
 #define PARSE_EVENT_H
Browse code

Refurbished event header field parser.

This is a new refurbished version of the Event header parser which adds
support for extra event packages and parameters needed by kamailio
presence modules, however both the implementation and the parser API
are different. It turned out that the original k. event parser (which
is an extended version of the same parser in ser) did not parse dialog
event packages correctly. The parser relies on the recently added
extensions to the generic parameter parser.

First off, the event structure contains different fields now, field
text has been renamed to name and field parsed has been renamed to type.
In addition that that there is a new structure dialog which contains
the linked list of all parsed parameters in variable list and pointers
to well known dialog event package parameters in structure dialog.

The test for the presence of the sla dialog event parameter would then
look like this:

if (e->type == EVENT_DIALOG && e->params.dialog.sla) ...

Support for new event types can be easily added by extending the global
variable events in parse_event.c, previously it was necessary to modify
the parser function, in the refurbished version it is sufficient just
to add a new element in the array and define a new event type in
parse_event.h

The original k. version handled "dialog;sla" and "dialog" as different
event types. This is no more so, in both cases event->type will be set
to EVENT_DIALOG and the caller can descriminate them by testing for
the presence of the sla parameter as described in the text above.

Function free_event has been modified to free the linked list of parsed
parameters in event->params.list.

Jan Janak authored on 17/03/2009 16:41:19
Showing 1 changed files
... ...
@@ -1,12 +1,6 @@
1 1
 /*
2 2
  * $Id$
3 3
  *
4
- * Event header field body parser
5
- * This parser was written for Presence Agent module only.
6
- * it recognizes presence package only, no subpackages, no parameters
7
- * It should be replaced by a more generic parser if subpackages or
8
- * parameters should be parsed too.
9
- *
10 4
  * Copyright (C) 2001-2003 FhG Fokus
11 5
  *
12 6
  * This file is part of ser, a free SIP server.
... ...
@@ -37,35 +31,51 @@
37 31
 
38 32
 #include "../str.h"
39 33
 #include "hf.h"
34
+#include "parse_param.h"
35
+
36
+/* Recognized event types */
37
+enum event_type {
38
+	EVENT_OTHER = 0,
39
+	EVENT_PRESENCE,
40
+	EVENT_PRESENCE_WINFO,
41
+	EVENT_SIP_PROFILE,
42
+	EVENT_XCAP_CHANGE,
43
+	EVENT_DIALOG,
44
+	EVENT_MESSAGE_SUMMARY
45
+};
46
+
47
+
48
+struct event_params {
49
+	struct event_dialog_hooks dialog; /* Well known dialog package params */
50
+	param_t* list; /* Linked list of all parsed parameters */
51
+};
40 52
 
41
-#define EVENT_OTHER          0
42
-#define EVENT_PRESENCE       1
43
-#define EVENT_PRESENCE_WINFO 2
44
-#define EVENT_SIP_PROFILE    3
45
-#define EVENT_XCAP_CHANGE    4
46 53
 
47 54
 typedef struct event {
48
-	str text;       /* Original string representation */
49
-	int parsed;     /* Parsed variant */
55
+	enum event_type type; /* Parsed variant */
56
+	str name;             /* Original string representation */
57
+	struct event_params params;
50 58
 } event_t;
51 59
 
52 60
 
53 61
 /*
54 62
  * Parse Event HF body
55 63
  */
56
-int parse_event(struct hdr_field* _h);
64
+int parse_event(struct hdr_field* hf);
57 65
 
58 66
 
59 67
 /*
60 68
  * Release memory
61 69
  */
62
-void free_event(event_t** _e);
70
+void free_event(event_t** e);
63 71
 
64 72
 
65 73
 /*
66 74
  * Print structure, for debugging only
67 75
  */
68
-void print_event(event_t* _e);
76
+void print_event(event_t* e);
77
+
78
+int event_parser(char* s, int l, event_t* e);
69 79
 
70 80
 
71 81
 #endif /* PARSE_EVENT_H */
Browse code

removed nonstandard event "location" and added "sip-profile"

Jamey Hicks authored on 19/04/2005 12:52:26
Showing 1 changed files
... ...
@@ -41,8 +41,8 @@
41 41
 #define EVENT_OTHER          0
42 42
 #define EVENT_PRESENCE       1
43 43
 #define EVENT_PRESENCE_WINFO 2
44
-#define EVENT_XCAP_CHANGE    3
45
-#define EVENT_LOCATION       4
44
+#define EVENT_SIP_PROFILE    3
45
+#define EVENT_XCAP_CHANGE    4
46 46
 
47 47
 typedef struct event {
48 48
 	str text;       /* Original string representation */
Browse code

- Spelling checked

Jan Janak authored on 24/08/2004 09:01:24
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@
7 7
  * It should be replaced by a more generic parser if subpackages or
8 8
  * parameters should be parsed too.
9 9
  *
10
- * Copyright (C) 2001-2003 Fhg Fokus
10
+ * Copyright (C) 2001-2003 FhG Fokus
11 11
  *
12 12
  * This file is part of ser, a free SIP server.
13 13
  *
Browse code

added presence.winfo, xcap-change, and location event packages

Jamey Hicks authored on 21/01/2004 18:26:09
Showing 1 changed files
... ...
@@ -41,7 +41,8 @@
41 41
 #define EVENT_OTHER          0
42 42
 #define EVENT_PRESENCE       1
43 43
 #define EVENT_PRESENCE_WINFO 2
44
-
44
+#define EVENT_XCAP_CHANGE    3
45
+#define EVENT_LOCATION       4
45 46
 
46 47
 typedef struct event {
47 48
 	str text;       /* Original string representation */
Browse code

initial support for presence.winfo event package

Jamey Hicks authored on 22/12/2003 16:11:22
Showing 1 changed files
... ...
@@ -38,8 +38,9 @@
38 38
 #include "../str.h"
39 39
 #include "hf.h"
40 40
 
41
-#define EVENT_OTHER    0
42
-#define EVENT_PRESENCE 1
41
+#define EVENT_OTHER          0
42
+#define EVENT_PRESENCE       1
43
+#define EVENT_PRESENCE_WINFO 2
43 44
 
44 45
 
45 46
 typedef struct event {
Browse code

Typo fixed.

Jan Janak authored on 23/09/2002 13:42:56
Showing 1 changed files
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Event header field body parser
5 5
  * This parser was written for Presence Agent module only.
6
- * it recognize presence package only, no subpackages, no parameters
6
+ * it recognizes presence package only, no subpackages, no parameters
7 7
  * It should be replaced by a more generic parser if subpackages or
8 8
  * parameters should be parsed too.
9 9
  *
Browse code

GPLization banner introduced to *.[hc] files

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

*** empty log message ***

Jan Janak authored on 12/08/2002 12:04:50
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,45 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ * Event header field body parser
5
+ * This parser was written for Presence Agent module only.
6
+ * it recognize presence package only, no subpackages, no parameters
7
+ * It should be replaced by a more generic parser if subpackages or
8
+ * parameters should be parsed too.
9
+ */
10
+
11
+#ifndef PARSE_EVENT_H
12
+#define PARSE_EVENT_H
13
+
14
+#include "../str.h"
15
+#include "hf.h"
16
+
17
+#define EVENT_OTHER    0
18
+#define EVENT_PRESENCE 1
19
+
20
+
21
+typedef struct event {
22
+	str text;       /* Original string representation */
23
+	int parsed;     /* Parsed variant */
24
+} event_t;
25
+
26
+
27
+/*
28
+ * Parse Event HF body
29
+ */
30
+int parse_event(struct hdr_field* _h);
31
+
32
+
33
+/*
34
+ * Release memory
35
+ */
36
+void free_event(event_t** _e);
37
+
38
+
39
+/*
40
+ * Print structure, for debugging only
41
+ */
42
+void print_event(event_t* _e);
43
+
44
+
45
+#endif /* PARSE_EVENT_H */