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,168 +0,0 @@
1
-/*
2
- * Include file for RADIUS
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
- * \file
24
- * \brief Kamailio core :: Radius include file
25
- * \ingroup core
26
- * Module: \ref core
27
- *
28
- * \note WARNING: Don't forget to update sip_router/etc/dictionary.sip-router if you 
29
- * update this file !
30
- */
31
-
32
-#ifndef _RAD_DICT_H
33
-#define _RAD_DICT_H
34
-
35
-struct attr {
36
-	const char *n;
37
-	int v;
38
-};
39
-
40
-struct val {
41
-	const char *n;
42
-	int v;
43
-};
44
-
45
-typedef enum rad_attr {
46
-	     /* Standard attributes according to RFC2865 and RFC2866 */
47
-	A_USER_NAME = 0,
48
-	A_NAS_IP_ADDRESS,
49
-	A_NAS_PORT,
50
-	A_SERVICE_TYPE,
51
-	A_CALLED_STATION_ID,
52
-	A_CALLING_STATION_ID,
53
-	A_ACCT_STATUS_TYPE,
54
-	A_ACCT_SESSION_ID,
55
-	A_ACCT_SESSION_TIME,
56
-
57
-	     /* Attributes according to draft-schulzrinne-sipping-radius-accounting-00 */
58
-	A_SIP_METHOD,
59
-	A_SIP_RESPONSE_CODE,
60
-	A_SIP_CSEQ,
61
-	A_SIP_TO_TAG,
62
-	A_SIP_FROM_TAG,
63
-	A_SIP_BRANCH_ID,
64
-	A_SIP_TRANSLATED_REQUEST_ID,
65
-	A_SIP_SOURCE_IP_ADDRESS,
66
-	A_SIP_SOURCE_PORT,
67
-	
68
-	     /* Attributes according to draft-sterman-aaa-sip-00 */
69
-	A_DIGEST_RESPONSE,
70
-	A_DIGEST_REALM,
71
-	A_DIGEST_NONCE,
72
-	A_DIGEST_METHOD,
73
-	A_DIGEST_URI,
74
-	A_DIGEST_QOP,
75
-	A_DIGEST_ALGORITHM,
76
-	A_DIGEST_BODY_DIGEST,
77
-	A_DIGEST_CNONCE,
78
-	A_DIGEST_NONCE_COUNT,
79
-	A_DIGEST_USER_NAME,
80
-
81
-	     /* To be deprecated in the future */
82
-
83
-	     /* SER-specific attributes */
84
-	A_SER_FROM,
85
-	A_SER_FLAGS,
86
-	A_SER_ORIGINAL_REQUEST_ID,
87
-	A_SER_TO,
88
-	A_SER_DIGEST_USERNAME,
89
-	A_SER_DIGEST_REALM,
90
-	A_SER_REQUEST_TIMESTAMP,
91
-	A_SER_TO_DID,
92
-	A_SER_FROM_UID,
93
-	A_SER_FROM_DID,
94
-	A_SER_TO_UID,
95
-	A_SER_RESPONSE_TIMESTAMP,
96
-	A_SER_ATTR,
97
-	A_SER_SERVICE_TYPE,
98
-	A_SER_DID,
99
-	A_SER_UID,
100
-	A_SER_DOMAIN,
101
-	A_SER_URI_USER,
102
-	A_SER_URI_SCHEME,
103
-	A_SER_SERVER_ID,
104
-
105
-	     /* CISCO Vendor Specific Attributes */
106
-	A_CISCO_AVPAIR,
107
-	A_MAX
108
-} rad_attr_t;
109
-
110
-
111
-typedef enum rad_val {
112
-	 /* Acct-Status-Type */
113
-	V_START = 0,
114
-	V_STOP,
115
-	V_INTERIM_UPDATE,
116
-	V_FAILED,
117
-
118
-	     /* Service-Type */
119
-	V_SIP_SESSION,
120
-	V_CALL_CHECK,
121
-
122
-	     /* SER-Service-Type */
123
-	V_GET_URI_ATTRS,
124
-	V_GET_USER_ATTRS,
125
-	V_DIGEST_AUTHENTICATION,
126
-	V_GET_DOMAIN_ATTRS,
127
-	V_GET_GLOBAL_ATTRS,
128
-	V_LOOKUP_DOMAIN,
129
-
130
-	V_MAX
131
-} rad_val_t;
132
-
133
-
134
-/*
135
- * Search the RADIUS dictionary for codes of all attributes
136
- * and values defined above
137
- */
138
-#define	INIT_AV(rh, at, vl, fn, e1, e2)					\
139
-{									\
140
-	int i;								\
141
-	DICT_ATTR *da;							\
142
-	DICT_VALUE *dv;							\
143
-									\
144
-	for (i = 0; i < A_MAX; i++) {					\
145
-		if (at[i].n == NULL)					\
146
-			continue;					\
147
-		da = rc_dict_findattr(rh, at[i].n);			\
148
-		if (da == NULL) {					\
149
-			LM_ERR("%s: can't get code for %s attr\n",	\
150
-					fn, at[i].n);			\
151
-			return e1;					\
152
-		}							\
153
-		at[i].v = da->value;					\
154
-	}								\
155
-	for (i = 0; i < V_MAX; i++) {					\
156
-		if (vl[i].n == NULL)					\
157
-			continue;					\
158
-		dv = rc_dict_findval(rh, vl[i].n);			\
159
-		if (dv == NULL) {					\
160
-			LM_ERR("%s: can't get code for %s attr value\n",\
161
-					fn, vl[i].n);			\
162
-			return e2;					\
163
-		}							\
164
-		vl[i].v = dv->value;					\
165
-	}								\
166
-}
167
-
168
-#endif /* _RAD_DICT_H */
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
... ...
@@ -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,9 +19,13 @@
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
-
28
-/*
29
- * WARNING: Don't forget to update sip_router/etc/dictionary.sip-router if you 
22
+/*!
23
+ * \file
24
+ * \brief Kamailio core :: Radius include file
25
+ * \ingroup core
26
+ * Module: \ref core
27
+ *
28
+ * \note WARNING: Don't forget to update sip_router/etc/dictionary.sip-router if you 
30 29
  * update this file !
31 30
  */
32 31
 
Browse code

rad_dict.h: logging: convert LOG to LM_*

Ovidiu Sas authored on 03/10/2014 20:41:51
Showing 1 changed files
... ...
@@ -147,8 +147,8 @@ typedef enum rad_val {
147 147
 			continue;					\
148 148
 		da = rc_dict_findattr(rh, at[i].n);			\
149 149
 		if (da == NULL) {					\
150
-			LOG(L_ERR, "ERROR: %s: can't get code for the "	\
151
-				   "%s attribute\n", fn, at[i].n);	\
150
+			LM_ERR("%s: can't get code for %s attr\n",	\
151
+					fn, at[i].n);			\
152 152
 			return e1;					\
153 153
 		}							\
154 154
 		at[i].v = da->value;					\
... ...
@@ -158,8 +158,8 @@ typedef enum rad_val {
158 158
 			continue;					\
159 159
 		dv = rc_dict_findval(rh, vl[i].n);			\
160 160
 		if (dv == NULL) {					\
161
-			LOG(L_ERR, "ERROR: %s: can't get code for the "	\
162
-				   "%s attribute value\n", fn, vl[i].n);\
161
+			LM_ERR("%s: can't get code for %s attr value\n",\
162
+					fn, vl[i].n);			\
163 163
 			return e2;					\
164 164
 		}							\
165 165
 		vl[i].v = dv->value;					\
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
 
28 28
 /*
Browse code

* Core, etc, documentation: renamed ser to sip-router

* Renamed ser to sip-router in Makefile, etc files and some core files.
* Renamed some etc files from ser based name to sip-router based name.

Juha Heinanen authored on 24/06/2009 12:44:10
Showing 1 changed files
... ...
@@ -26,7 +26,7 @@
26 26
  */
27 27
 
28 28
 /*
29
- * WARNING: Don't forget to update sip_router/etc/dictionary.ser if you 
29
+ * WARNING: Don't forget to update sip_router/etc/dictionary.sip-router if you 
30 30
  * update this file !
31 31
  */
32 32
 
Browse code

- SER-Server-ID RADIUS attribute

Jan Janak authored on 15/04/2008 21:23:59
Showing 1 changed files
... ...
@@ -101,6 +101,7 @@ typedef enum rad_attr {
101 101
 	A_SER_DOMAIN,
102 102
 	A_SER_URI_USER,
103 103
 	A_SER_URI_SCHEME,
104
+	A_SER_SERVER_ID,
104 105
 
105 106
 	     /* CISCO Vendor Specific Attributes */
106 107
 	A_CISCO_AVPAIR,
Browse code

- added missing V_CALL_CHECK value of Service-Type attribute

Jan Janak authored on 12/02/2007 13:15:20
Showing 1 changed files
... ...
@@ -116,7 +116,8 @@ typedef enum rad_val {
116 116
 	V_FAILED,
117 117
 
118 118
 	     /* Service-Type */
119
-	V_SIP_SESSION,     
119
+	V_SIP_SESSION,
120
+	V_CALL_CHECK,
120 121
 
121 122
 	     /* SER-Service-Type */
122 123
 	V_GET_URI_ATTRS,
Browse code

RADIUS dictionary update: - SER-Service-Type attribute added - Added Digest-Authentication value for SER-Service-Type

Jan Janak authored on 13/12/2006 16:47:40
Showing 1 changed files
... ...
@@ -80,12 +80,8 @@ typedef enum rad_attr {
80 80
 	A_DIGEST_USER_NAME,
81 81
 
82 82
 	     /* To be deprecated in the future */
83
-	A_SER_URI_USER,
84
-	A_SER_GROUP,
85
-	A_SER_RPID,
86 83
 
87 84
 	     /* SER-specific attributes */
88
-	A_SER_ATTRS,
89 85
 	A_SER_FROM,
90 86
 	A_SER_FLAGS,
91 87
 	A_SER_ORIGINAL_REQUEST_ID,
... ...
@@ -98,6 +94,13 @@ typedef enum rad_attr {
98 94
 	A_SER_FROM_DID,
99 95
 	A_SER_TO_UID,
100 96
 	A_SER_RESPONSE_TIMESTAMP,
97
+	A_SER_ATTR,
98
+	A_SER_SERVICE_TYPE,
99
+	A_SER_DID,
100
+	A_SER_UID,
101
+	A_SER_DOMAIN,
102
+	A_SER_URI_USER,
103
+	A_SER_URI_SCHEME,
101 104
 
102 105
 	     /* CISCO Vendor Specific Attributes */
103 106
 	A_CISCO_AVPAIR,
... ...
@@ -106,15 +109,23 @@ typedef enum rad_attr {
106 109
 
107 110
 
108 111
 typedef enum rad_val {
112
+	 /* Acct-Status-Type */
109 113
 	V_START = 0,
110 114
 	V_STOP,
111 115
 	V_INTERIM_UPDATE,
112 116
 	V_FAILED,
113
-	V_CALL_CHECK,
114
-	V_SIP_SESSION,
115
-	V_SER_CALLER_AVPS,
116
-	V_SER_CALLEE_AVPS,
117
-	V_SER_GROUP_CHECK,
117
+
118
+	     /* Service-Type */
119
+	V_SIP_SESSION,     
120
+
121
+	     /* SER-Service-Type */
122
+	V_GET_URI_ATTRS,
123
+	V_GET_USER_ATTRS,
124
+	V_DIGEST_AUTHENTICATION,
125
+	V_GET_DOMAIN_ATTRS,
126
+	V_GET_GLOBAL_ATTRS,
127
+	V_LOOKUP_DOMAIN,
128
+
118 129
 	V_MAX
119 130
 } rad_val_t;
120 131
 
Browse code

- radius dictionary management (originaly in modules/acc/dict.h) - aligned to the updated dictionary.ser file

Jan Janak authored on 15/11/2005 12:25:07
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,156 @@
1
+/*
2
+ * Include file for RADIUS
3
+ *
4
+ * Copyright (C) 2001-2003 FhG FOKUS
5
+ *
6
+ * This file is part of ser, a free SIP server.
7
+ *
8
+ * ser 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
+ * 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,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
+ * GNU General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU General Public License 
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
26
+ */
27
+
28
+/*
29
+ * WARNING: Don't forget to update sip_router/etc/dictionary.ser if you 
30
+ * update this file !
31
+ */
32
+
33
+#ifndef _RAD_DICT_H
34
+#define _RAD_DICT_H
35
+
36
+struct attr {
37
+	const char *n;
38
+	int v;
39
+};
40
+
41
+struct val {
42
+	const char *n;
43
+	int v;
44
+};
45
+
46
+typedef enum rad_attr {
47
+	     /* Standard attributes according to RFC2865 and RFC2866 */
48
+	A_USER_NAME = 0,
49
+	A_NAS_IP_ADDRESS,
50
+	A_NAS_PORT,
51
+	A_SERVICE_TYPE,
52
+	A_CALLED_STATION_ID,
53
+	A_CALLING_STATION_ID,
54
+	A_ACCT_STATUS_TYPE,
55
+	A_ACCT_SESSION_ID,
56
+	A_ACCT_SESSION_TIME,
57
+
58
+	     /* Attributes according to draft-schulzrinne-sipping-radius-accounting-00 */
59
+	A_SIP_METHOD,
60
+	A_SIP_RESPONSE_CODE,
61
+	A_SIP_CSEQ,
62
+	A_SIP_TO_TAG,
63
+	A_SIP_FROM_TAG,
64
+	A_SIP_BRANCH_ID,
65
+	A_SIP_TRANSLATED_REQUEST_ID,
66
+	A_SIP_SOURCE_IP_ADDRESS,
67
+	A_SIP_SOURCE_PORT,
68
+	
69
+	     /* Attributes according to draft-sterman-aaa-sip-00 */
70
+	A_DIGEST_RESPONSE,
71
+	A_DIGEST_REALM,
72
+	A_DIGEST_NONCE,
73
+	A_DIGEST_METHOD,
74
+	A_DIGEST_URI,
75
+	A_DIGEST_QOP,
76
+	A_DIGEST_ALGORITHM,
77
+	A_DIGEST_BODY_DIGEST,
78
+	A_DIGEST_CNONCE,
79
+	A_DIGEST_NONCE_COUNT,
80
+	A_DIGEST_USER_NAME,
81
+
82
+	     /* To be deprecated in the future */
83
+	A_SER_URI_USER,
84
+	A_SER_GROUP,
85
+	A_SER_RPID,
86
+
87
+	     /* SER-specific attributes */
88
+	A_SER_ATTRS,
89
+	A_SER_FROM,
90
+	A_SER_FLAGS,
91
+	A_SER_ORIGINAL_REQUEST_ID,
92
+	A_SER_TO,
93
+	A_SER_DIGEST_USERNAME,
94
+	A_SER_DIGEST_REALM,
95
+	A_SER_REQUEST_TIMESTAMP,
96
+	A_SER_TO_DID,
97
+	A_SER_FROM_UID,
98
+	A_SER_FROM_DID,
99
+	A_SER_TO_UID,
100
+	A_SER_RESPONSE_TIMESTAMP,
101
+
102
+	     /* CISCO Vendor Specific Attributes */
103
+	A_CISCO_AVPAIR,
104
+	A_MAX
105
+} rad_attr_t;
106
+
107
+
108
+typedef enum rad_val {
109
+	V_START = 0,
110
+	V_STOP,
111
+	V_INTERIM_UPDATE,
112
+	V_FAILED,
113
+	V_CALL_CHECK,
114
+	V_SIP_SESSION,
115
+	V_SER_CALLER_AVPS,
116
+	V_SER_CALLEE_AVPS,
117
+	V_SER_GROUP_CHECK,
118
+	V_MAX
119
+} rad_val_t;
120
+
121
+
122
+/*
123
+ * Search the RADIUS dictionary for codes of all attributes
124
+ * and values defined above
125
+ */
126
+#define	INIT_AV(rh, at, vl, fn, e1, e2)					\
127
+{									\
128
+	int i;								\
129
+	DICT_ATTR *da;							\
130
+	DICT_VALUE *dv;							\
131
+									\
132
+	for (i = 0; i < A_MAX; i++) {					\
133
+		if (at[i].n == NULL)					\
134
+			continue;					\
135
+		da = rc_dict_findattr(rh, at[i].n);			\
136
+		if (da == NULL) {					\
137
+			LOG(L_ERR, "ERROR: %s: can't get code for the "	\
138
+				   "%s attribute\n", fn, at[i].n);	\
139
+			return e1;					\
140
+		}							\
141
+		at[i].v = da->value;					\
142
+	}								\
143
+	for (i = 0; i < V_MAX; i++) {					\
144
+		if (vl[i].n == NULL)					\
145
+			continue;					\
146
+		dv = rc_dict_findval(rh, vl[i].n);			\
147
+		if (dv == NULL) {					\
148
+			LOG(L_ERR, "ERROR: %s: can't get code for the "	\
149
+				   "%s attribute value\n", fn, vl[i].n);\
150
+			return e2;					\
151
+		}							\
152
+		vl[i].v = dv->value;					\
153
+	}								\
154
+}
155
+
156
+#endif /* _RAD_DICT_H */