2 * Include file for RADIUS
4 * Copyright (C) 2001-2003 FhG FOKUS
6 * This file is part of ser, a free SIP server.
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
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:
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.
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
29 * WARNING: Don't forget to update sip_router/etc/dictionary.sip-router if you
46 typedef enum rad_attr {
47 /* Standard attributes according to RFC2865 and RFC2866 */
58 /* Attributes according to draft-schulzrinne-sipping-radius-accounting-00 */
65 A_SIP_TRANSLATED_REQUEST_ID,
66 A_SIP_SOURCE_IP_ADDRESS,
69 /* Attributes according to draft-sterman-aaa-sip-00 */
82 /* To be deprecated in the future */
84 /* SER-specific attributes */
87 A_SER_ORIGINAL_REQUEST_ID,
89 A_SER_DIGEST_USERNAME,
91 A_SER_REQUEST_TIMESTAMP,
96 A_SER_RESPONSE_TIMESTAMP,
106 /* CISCO Vendor Specific Attributes */
112 typedef enum rad_val {
113 /* Acct-Status-Type */
123 /* SER-Service-Type */
126 V_DIGEST_AUTHENTICATION,
136 * Search the RADIUS dictionary for codes of all attributes
137 * and values defined above
139 #define INIT_AV(rh, at, vl, fn, e1, e2) \
145 for (i = 0; i < A_MAX; i++) { \
146 if (at[i].n == NULL) \
148 da = rc_dict_findattr(rh, at[i].n); \
150 LOG(L_ERR, "ERROR: %s: can't get code for the " \
151 "%s attribute\n", fn, at[i].n); \
154 at[i].v = da->value; \
156 for (i = 0; i < V_MAX; i++) { \
157 if (vl[i].n == NULL) \
159 dv = rc_dict_findval(rh, vl[i].n); \
161 LOG(L_ERR, "ERROR: %s: can't get code for the " \
162 "%s attribute value\n", fn, vl[i].n);\
165 vl[i].v = dv->value; \
169 #endif /* _RAD_DICT_H */