annotate extensions/dict_nasreq/dict_nasreq.c @ 1554:566bb46cc73f

Updated copyright information
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 06 Oct 2020 21:34:53 +0800
parents 2a5620128a9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 /*********************************************************************************************************
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2 * Software License Agreement (BSD License) *
740
4a9f08d6b6ba Updated my mail address
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 662
diff changeset
3 * Author: Sebastien Decugis <sdecugis@freediameter.net> *
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
4 * *
1554
566bb46cc73f Updated copyright information
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1318
diff changeset
5 * Copyright (c) 2017, WIDE Project and NICT *
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
6 * All rights reserved. *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
7 * *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8 * Redistribution and use of this software in source and binary forms, with or without modification, are *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 * permitted provided that the following conditions are met: *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 * *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 * * Redistributions of source code must retain the above *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 * copyright notice, this list of conditions and the *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
13 * following disclaimer. *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14 * *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
15 * * Redistributions in binary form must reproduce the above *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
16 * copyright notice, this list of conditions and the *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
17 * following disclaimer in the documentation and/or other *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
18 * materials provided with the distribution. *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
19 * *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
20 * * Neither the name of the WIDE Project or NICT nor the *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
21 * names of its contributors may be used to endorse or *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
22 * promote products derived from this software without *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
23 * specific prior written permission of WIDE Project and *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
24 * NICT. *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
25 * *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
34 *********************************************************************************************************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
35
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
36 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
37 * Dictionary definitions of objects specified in Diameter NASREQ (RFC4005).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
38 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
39 #include <freeDiameter/extension.h>
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
40
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
41 /* The content of this file follows the same structure as dict_base_proto.c */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
42
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
43 #define CHECK_dict_new( _type, _data, _parent, _ref ) \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
44 CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
45
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
46 #define CHECK_dict_search( _type, _criteria, _what, _result ) \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
47 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
48
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
49 struct local_rules_definition {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
50 char *avp_name;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
51 enum rule_position position;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
52 int min;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
53 int max;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
54 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
55
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
56 #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 )
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
57
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
58 #define PARSE_loc_rules( _rulearray, _parent) { \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
59 int __ar; \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
60 for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
61 struct dict_rule_data __data = { NULL, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
62 (_rulearray)[__ar].position, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
63 0, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
64 (_rulearray)[__ar].min, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
65 (_rulearray)[__ar].max}; \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
66 __data.rule_order = RULE_ORDER(__data.rule_position); \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
67 CHECK_FCT( fd_dict_search( \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
68 fd_g_config->cnf_dict, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
69 DICT_AVP, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
70 AVP_BY_NAME, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
71 (_rulearray)[__ar].avp_name, \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
72 &__data.rule_avp, 0 ) ); \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
73 if ( !__data.rule_avp ) { \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
74 TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
75 return ENOENT; \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
76 } \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
77 CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
78 { \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
79 TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
80 (_rulearray)[__ar].avp_name ); \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
81 return EINVAL; \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
82 } ); \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
83 } \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
84 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
85
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
86 #define enumval_def_u32( _val_, _str_ ) \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
87 { _str_, { .u32 = _val_ }}
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
88
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
89 #define enumval_def_os( _len_, _val_, _str_ ) \
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
90 { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}}
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
91
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
92
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
93 static int dnr_entry(char * conffile)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
94 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
95 struct dict_object * nasreq;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
96 TRACE_ENTRY("%p", conffile);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
97
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
98 /* No Vendors definitions */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
99
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
100 /* Applications section */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
101 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
102 /* NASREQ (RFC 4005) */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
103 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
104 struct dict_application_data data = { 1, "Diameter Network Access Server Application" };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
105 CHECK_dict_new( DICT_APPLICATION, &data, NULL, &nasreq);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
106 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
107 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
108
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
109 /* Derived AVP types section */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
110 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
111 /* QoSFilterRule */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
112 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
113 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
114 The QosFilterRule format is derived from the OctetString AVP Base
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
115 Format. It uses the ASCII charset. Packets may be marked or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
116 metered based on the following information:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
117
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
118 Direction (in or out)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
119 Source and destination IP address (possibly masked)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
120 Protocol
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
121 Source and destination port (lists or ranges)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
122 DSCP values (no mask or range)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
123
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
124 Rules for the appropriate direction are evaluated in order; the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
125 first matched rule terminates the evaluation. Each packet is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
126 evaluated once. If no rule matches, the packet is treated as best
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
127 effort. An access device unable to interpret or apply a QoS rule
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
128 SHOULD NOT terminate the session.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
129
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
130 QoSFilterRule filters MUST follow the following format:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
131
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
132 action dir proto from src to dst [options]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
133
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
134 tag - Mark packet with a specific DSCP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
135 [DIFFSERV]. The DSCP option MUST be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
136 included.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
137 meter - Meter traffic. The metering options
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
138 MUST be included.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
139
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
140 dir The format is as described under IPFilterRule.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
141
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
142 proto The format is as described under IPFilterRule.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
143
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
144 src and dst The format is as described under IPFilterRule.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
145
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
146 options:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
147
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
148 DSCP <color>
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
149 Color values as defined in [DIFFSERV]. Exact
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
150 matching of DSCP values is required (no masks or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
151 ranges).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
152
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
153 metering <rate> <color_under> <color_over>
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
154 The metering option provides Assured Forwarding,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
155 as defined in [DIFFSERVAF], and MUST be present
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
156 if the action is set to meter. The rate option is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
157 the throughput, in bits per second, used
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
158 by the access device to mark packets. Traffic
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
159 over the rate is marked with the color_over
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
160 codepoint, and traffic under the rate is marked
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
161 with the color_under codepoint. The color_under
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
162 and color_over options contain the drop
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
163 preferences and MUST conform to the recommended
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
164 codepoint keywords described in [DIFFSERVAF]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
165 (e.g., AF13).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
166
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
167 The metering option also supports the strict
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
168 limit on traffic required by Expedited
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
169 Forwarding, as defined in [DIFFSERVEF]. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
170 color_over option may contain the keyword "drop"
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
171 to prevent forwarding of traffic that exceeds the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
172 rate parameter.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
173
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
174 The rule syntax is a modified subset of ipfw(8) from FreeBSD,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
175 and the ipfw.c code may provide a useful base for
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
176 implementations.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
177 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
178 struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "QoSFilterRule" , NULL , NULL };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
179 CHECK_dict_new( DICT_TYPE, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
180 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
181
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
182 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
183
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
184 /* AVP section */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
185 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
186 struct dict_object * UTF8String_type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
187 struct dict_object * IPFilterRule_type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
188 struct dict_object * QoSFilterRule_type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
189 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
190 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
191 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "QoSFilterRule", &QoSFilterRule_type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
192
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
193 /********************************
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
194 * NAS Session AVPs *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
195 ********************************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
196 /* NAS-Port */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
197 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
198 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
199 The NAS-Port AVP (AVP Code 5) is of type Unsigned32 and contains the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
200 physical or virtual port number of the NAS which is authenticating
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
201 the user. Note that "port" is meant in its sense as a service
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
202 connection on the NAS, not as an IP protocol identifier.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
203
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
204 Either NAS-Port or NAS-Port-Id (AVP Code 87) SHOULD be present in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
205 AA-Request (AAR) commands if the NAS differentiates among its ports.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
206 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
207 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
208 5, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
209 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
210 "NAS-Port", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
211 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
212 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
213 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
214 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
215 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
216 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
217
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
218 /* NAS-Port-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
219 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
220 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
221 The NAS-Port-Id AVP (AVP Code 87) is of type UTF8String and consists
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
222 of ASCII text identifying the port of the NAS authenticating the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
223 user. Note that "port" is meant in its sense as a service connection
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
224 on the NAS, not as an IP protocol identifier.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
225
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
226 Either NAS-Port or NAS-Port-Id SHOULD be present in AA-Request (AAR)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
227 commands if the NAS differentiates among its ports. NAS-Port-Id is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
228 intended for use by NASes that cannot conveniently number their
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
229 ports.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
230 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
231 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
232 87, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
233 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
234 "NAS-Port-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
235 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
236 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
237 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
238 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
239 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
240 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
241
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
242 /* NAS-Port-Type */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
243 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
244 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
245 The NAS-Port-Type AVP (AVP Code 61) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
246 contains the type of the port on which the NAS is authenticating the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
247 user. This AVP SHOULD be present if the NAS uses the same NAS-Port
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
248 number ranges for different service types concurrently.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
249
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
250 The supported values are defined in [RADIUSTypes]. The following
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
251 list is informational and subject to change by the IANA.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
252
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
253 http://www.iana.org/assignments/radius-types
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
254 Sub-registry: Values for RADIUS Attribute 61, NAS-Port-Type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
255 Reference: [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
256
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
257 Extract on 2009.06.01:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
258 0 Async [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
259 1 Sync [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
260 2 ISDN Sync [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
261 3 ISDN Async V.120 [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
262 4 ISDN Async V.110 [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
263 5 Virtual [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
264 6 PIAFS [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
265 7 HDLC Clear Channel [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
266 8 X.25 [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
267 9 X.75 [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
268 10 G.3 Fax [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
269 11 SDSL - Symmetric DSL [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
270 12 ADSL-CAP - Asymmetric DSL, Carrierless Amplitude Phase Modulation [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
271 13 ADSL-DMT - Asymmetric DSL, Discrete Multi-Tone [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
272 14 IDSL - ISDN Digital Subscriber Line [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
273 15 Ethernet [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
274 16 xDSL - Digital Subscriber Line of unknown type [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
275 17 Cable [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
276 18 Wireless - Other [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
277 19 Wireless - IEEE 802.11 [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
278 20 Token-Ring [RFC3580]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
279 21 FDDI [RFC3580]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
280 22 Wireless - CDMA2000 [McCann]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
281 23 Wireless - UMTS [McCann]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
282 24 Wireless - 1X-EV [McCann]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
283 25 IAPP [IEEE 802.11F][Kerry]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
284 26 FTTP - Fiber to the Premises [Nyce]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
285 27 Wireless - IEEE 802.16 [IEEE 802.16] 12 December 2006
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
286 28 Wireless - IEEE 802.20 [IEEE 802.20] 12 December 2006
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
287 29 Wireless - IEEE 802.22 [IEEE 802.22] 12 December 2006
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
288 30 PPPoA - PPP over ATM [RFC4603]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
289 31 PPPoEoA - PPP over Ethernet over ATM [RFC4603]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
290 32 PPPoEoE - PPP over Ethernet over Ethernet [RFC4603]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
291 33 PPPoEoVLAN - PPP over Ethernet over VLAN [RFC4603]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
292 34 PPPoEoQinQ - PPP over Ethernet over IEEE 802.1QinQ [RFC4603]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
293 35 xPON - Passive Optical Network [Hublet][Yan] 19 June 2007
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
294 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
295
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
296 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
297 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(NAS-Port-Type)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
298 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
299 enumval_def_u32( 0, "Async [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
300 enumval_def_u32( 1, "Sync [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
301 enumval_def_u32( 2, "ISDN Sync [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
302 enumval_def_u32( 3, "ISDN Async V.120 [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
303 enumval_def_u32( 4, "ISDN Async V.110 [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
304 enumval_def_u32( 5, "Virtual [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
305 enumval_def_u32( 6, "PIAFS [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
306 enumval_def_u32( 7, "HDLC Clear Channel [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
307 enumval_def_u32( 8, "X.25 [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
308 enumval_def_u32( 9, "X.75 [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
309 enumval_def_u32(10, "G.3 Fax [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
310 enumval_def_u32(11, "SDSL - Symmetric DSL [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
311 enumval_def_u32(12, "ADSL-CAP - Asymmetric DSL, Carrierless Amplitude Phase Modulation [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
312 enumval_def_u32(13, "ADSL-DMT - Asymmetric DSL, Discrete Multi-Tone [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
313 enumval_def_u32(14, "IDSL - ISDN Digital Subscriber Line [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
314 enumval_def_u32(15, "Ethernet [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
315 enumval_def_u32(16, "xDSL - Digital Subscriber Line of unknown type [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
316 enumval_def_u32(17, "Cable [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
317 enumval_def_u32(18, "Wireless - Other [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
318 enumval_def_u32(19, "Wireless - IEEE 802.11 [RFC2865]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
319 enumval_def_u32(20, "Token-Ring [RFC3580]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
320 enumval_def_u32(21, "FDDI [RFC3580]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
321 enumval_def_u32(22, "Wireless - CDMA2000 [McCann]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
322 enumval_def_u32(23, "Wireless - UMTS [McCann]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
323 enumval_def_u32(24, "Wireless - 1X-EV [McCann]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
324 enumval_def_u32(25, "IAPP [IEEE 802.11F][Kerry]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
325 enumval_def_u32(26, "FTTP - Fiber to the Premises [Nyce]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
326 enumval_def_u32(27, "Wireless - IEEE 802.16 [IEEE 802.16]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
327 enumval_def_u32(28, "Wireless - IEEE 802.20 [IEEE 802.20]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
328 enumval_def_u32(29, "Wireless - IEEE 802.22 [IEEE 802.22]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
329 enumval_def_u32(30, "PPPoA - PPP over ATM [RFC4603]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
330 enumval_def_u32(31, "PPPoEoA - PPP over Ethernet over ATM [RFC4603]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
331 enumval_def_u32(32, "PPPoEoE - PPP over Ethernet over Ethernet [RFC4603]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
332 enumval_def_u32(33, "PPPoEoVLAN - PPP over Ethernet over VLAN [RFC4603]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
333 enumval_def_u32(34, "PPPoEoQinQ - PPP over Ethernet over IEEE 802.1QinQ [RFC4603]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
334 enumval_def_u32(35, "xPON - Passive Optical Network [Hublet][Yan]")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
335 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
336 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
337 61, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
338 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
339 "NAS-Port-Type", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
340 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
341 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
342 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
343 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
344 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
345 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
346 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
347 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
348 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
349 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
350 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
351 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
352
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
353 /* Called-Station-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
354 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
355 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
356 The Called-Station-Id AVP (AVP Code 30) is of type UTF8String and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
357 allows the NAS to send the ASCII string describing the layer 2
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
358 address the user contacted in the request. For dialup access, this
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
359 can be a phone number obtained by using Dialed Number Identification
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
360 (DNIS) or a similar technology. Note that this may be different from
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
361 the phone number the call comes in on. For use with IEEE 802 access,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
362 the Called-Station-Id MAY contain a MAC address formatted as
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
363 described in [RAD802.1X]. It SHOULD only be present in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
364 authentication and/or authorization requests.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
365
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
366 If the Auth-Request-Type AVP is set to authorization-only and the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
367 User-Name AVP is absent, the Diameter Server MAY perform
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
368 authorization based on this field. This can be used by a NAS to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
369 request whether a call should be answered based on the DNIS.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
370 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
371 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
372 30, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
373 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
374 "Called-Station-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
375 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
376 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
377 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
378 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
379 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
380 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
381
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
382 /* Calling-Station-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
383 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
384 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
385 The Calling-Station-Id AVP (AVP Code 31) is of type UTF8String and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
386 allows the NAS to send the ASCII string describing the layer 2
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
387 address from which the user connected in the request. For dialup
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
388 access, this is the phone number the call came from, using Automatic
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
389 Number Identification (ANI) or a similar technology. For use with
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
390 IEEE 802 access, the Calling-Station-Id AVP MAY contain a MAC
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
391 address, formated as described in [RAD802.1X]. It SHOULD only be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
392 present in authentication and/or authorization requests.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
393
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
394 If the Auth-Request-Type AVP is set to authorization-only and the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
395 User-Name AVP is absent, the Diameter Server MAY perform
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
396 authorization based on this field. This can be used by a NAS to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
397 request whether a call should be answered based on the layer 2
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
398 address (ANI, MAC Address, etc.)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
399 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
400 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
401 31, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
402 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
403 "Calling-Station-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
404 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
405 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
406 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
407 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
408 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
409 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
410
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
411 /* Connect-Info */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
412 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
413 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
414 The Connect-Info AVP (AVP Code 77) is of type UTF8String and is sent
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
415 in the AA-Request message or ACR STOP message. When sent in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
416 Access-Request, it indicates the nature of the user's connection.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
417 The connection speed SHOULD be included at the beginning of the first
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
418 Connect-Info AVP in the message. If the transmit and receive
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
419 connection speeds differ, both may be included in the first AVP with
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
420 the transmit speed listed first (the speed the NAS modem transmits
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
421 at), then a slash (/), then the receive speed, and then other
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
422 optional information.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
423
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
424 For example: "28800 V42BIS/LAPM" or "52000/31200 V90"
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
425
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
426 More than one Connect-Info attribute may be present in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
427 Accounting-Request packet to accommodate expected efforts by the ITU
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
428 to have modems report more connection information in a standard
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
429 format that might exceed 252 octets.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
430
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
431 If sent in the ACR STOP, this attribute may summarize statistics
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
432 relating to session quality. For example, in IEEE 802.11, the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
433 Connect-Info attribute may contain information on the number of link
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
434 layer retransmissions. The exact format of this attribute is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
435 implementation specific.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
436 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
437 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
438 77, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
439 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
440 "Connect-Info", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
441 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
442 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
443 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
444 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
445 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
446 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
447
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
448 /* Originating-Line-Info */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
449 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
450 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
451 The Originating-Line-Info AVP (AVP Code 94) is of type OctetString
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
452 and is sent by the NAS system to convey information about the origin
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
453 of the call from an SS7 system.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
454
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
455 The originating line information (OLI) element indicates the nature
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
456 and/or characteristics of the line from which a call originated
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
457 (e.g., pay phone, hotel, cellular). Telephone companies are starting
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
458 to offer OLI to their customers as an option over Primary Rate
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
459 Interface (PRI). Internet Service Providers (ISPs) can use OLI in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
460 addition to Called-Station-Id and Calling-Station-Id attributes to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
461 differentiate customer calls and to define different services.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
462
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
463 The Value field contains two octets (00 - 99). ANSI T1.113 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
464 BELLCORE 394 can be used for additional information about these
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
465 values and their use. For more information on current assignment
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
466 values, see [http://www.nanpa.com/number_resource_info/ani_ii_assignments.html].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
467
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
468 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
469 struct dict_object *type;
1318
2a5620128a9a Remove '*' from the couple enumerated values that had them.
Thomas Klausner <tk@giga.or.at>
parents: 1127
diff changeset
470 struct dict_type_data tdata = { AVP_TYPE_OCTETSTRING, "Enumerated(Originating-Line-Info)" , NULL, NULL};
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
471 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
472 enumval_def_os( 2, "00", "Plain Old Telephone Service (POTS)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
473 enumval_def_os( 2, "01", "Multiparty Line (more than 2)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
474 enumval_def_os( 2, "02", "ANI Failure"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
475 enumval_def_os( 2, "06", "Station Level Rating"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
476 enumval_def_os( 2, "07", "Special Operator Handling Required"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
477 enumval_def_os( 2, "20", "Automatic Identified Outward Dialing (AIOD)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
478 enumval_def_os( 2, "23", "Coin or Non-Coin"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
479 enumval_def_os( 2, "24", "Toll Free Service (Non-Pay Origination)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
480 enumval_def_os( 2, "25", "Toll Free Service (Pay Origination)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
481 enumval_def_os( 2, "27", "Toll Free Service (Coin Control Origination)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
482 enumval_def_os( 2, "29", "Prison/Inmate Service"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
483 enumval_def_os( 2, "30", "Intercept (Blank)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
484 enumval_def_os( 2, "31", "Intercept (Trouble)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
485 enumval_def_os( 2, "32", "Intercept (Regular)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
486 enumval_def_os( 2, "34", "Telco Operator Handled Call"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
487 enumval_def_os( 2, "52", "Outward Wide Area Telecommunications Service (OUTWATS)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
488 enumval_def_os( 2, "60", "Telecommunications Relay Service (TRS)(Unrestricted)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
489 enumval_def_os( 2, "61", "Cellular/Wireless PCS (Type 1)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
490 enumval_def_os( 2, "62", "Cellular/Wireless PCS (Type 2)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
491 enumval_def_os( 2, "63", "Cellular/Wireless PCS (Roaming)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
492 enumval_def_os( 2, "66", "TRS (Hotel)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
493 enumval_def_os( 2, "67", "TRS (Restricted)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
494 enumval_def_os( 2, "70", "Pay Station, No Coin Control"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
495 enumval_def_os( 2, "93", "Access for Private Virtual Network Service")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
496 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
497 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
498 94, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
499 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
500 "Originating-Line-Info", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
501 AVP_FLAG_VENDOR, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
502 0, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
503 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
504 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
505 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
506 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
507 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
508 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
509 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
510 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
511 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
512 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
513
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
514 /* Reply-Message */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
515 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
516 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
517 The Reply-Message AVP (AVP Code 18) is of type UTF8String and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
518 contains text that MAY be displayed to the user. When used in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
519 AA-Answer message with a successful Result-Code AVP, it indicates
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
520 success. When found in an AAA message with a Result-Code other than
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
521 DIAMETER_SUCCESS, the AVP contains a failure message.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
522
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
523 The Reply-Message AVP MAY indicate dialog text to prompt the user
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
524 before another AA-Request attempt. When used in an AA-Answer with a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
525 Result-Code of DIAMETER_MULTI_ROUND_AUTH or in an Re-Auth-Request
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
526 message, it MAY contain a dialog text to prompt the user for a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
527 response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
528
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
529 Multiple Reply-Messages MAY be included, and if any are displayed,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
530 they MUST be displayed in the same order as they appear in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
531 Diameter message.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
532 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
533 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
534 18, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
535 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
536 "Reply-Message", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
537 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
538 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
539 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
540 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
541 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
542 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
543
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
544 /********************************
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
545 * NAS Authentication AVPs *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
546 ********************************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
547 /* User-Password */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
548 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
549 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
550 The User-Password AVP (AVP Code 2) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
551 contains the password of the user to be authenticated, or the user's
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
552 input in a multi-round authentication exchange.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
553
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
554 The User-Password AVP contains a user password or one-time password
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
555 and therefore represents sensitive information. As required in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
556 [BASE], Diameter messages are encrypted by using IPsec or TLS.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
557 Unless this AVP is used for one-time passwords, the User-Password AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
558 SHOULD NOT be used in untrusted proxy environments without encrypting
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
559 it by using end-to-end security techniques, such as the proposed CMS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
560 Security [DiamCMS].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
561
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
562 The clear-text password (prior to encryption) MUST NOT be longer than
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
563 128 bytes in length.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
564 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
565 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
566 2, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
567 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
568 "User-Password", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
569 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
570 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
571 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
572 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
573 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
574 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
575
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
576 /* Password-Retry */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
577 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
578 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
579 The Password-Retry AVP (AVP Code 75) is of type Unsigned32 and MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
580 included in the AA-Answer if the Result-Code indicates an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
581 authentication failure. The value of this AVP indicates how many
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
582 authentication attempts a user is permitted before being
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
583 disconnected. This AVP is primarily intended for use when the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
584 Framed-Protocol AVP (see section 6.10.1) is set to ARAP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
585 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
586 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
587 75, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
588 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
589 "Password-Retry", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
590 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
591 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
592 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
593 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
594 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
595 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
596
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
597 /* Prompt */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
598 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
599 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
600 The Prompt AVP (AVP Code 76) is of type Enumerated and MAY be present
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
601 in the AA-Answer message. When present, it is used by the NAS to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
602 determine whether the user's response, when entered, should be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
603 echoed.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
604
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
605 The supported values are listed in http://www.iana.org/assignments/radius-types
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
606 Sub-registry: Values for RADIUS Attribute 76, Prompt
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
607 Reference: [RFC2869]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
608 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
609 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
610 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Prompt)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
611 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
612 enumval_def_u32( 0, "No Echo [RFC2869]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
613 enumval_def_u32( 1, "Echo [RFC2869]")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
614 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
615 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
616 76, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
617 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
618 "Prompt", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
619 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
620 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
621 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
622 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
623 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
624 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
625 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
626 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
627 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
628 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
629 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
630 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
631
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
632 /* CHAP-Algorithm */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
633 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
634 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
635 The CHAP-Algorithm AVP (AVP Code 403) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
636 contains the algorithm identifier used in the computation of the CHAP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
637 response [PPPCHAP]. The following values are currently supported:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
638
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
639 CHAP with MD5 5
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
640 The CHAP response is computed by using the procedure described
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
641 in [PPPCHAP]. This algorithm requires that the CHAP-Response
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
642 AVP MUST be present in the CHAP-Auth AVP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
643 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
644 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
645 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(CHAP-Algorithm)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
646 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
647 enumval_def_u32( 5, "CHAP with MD5")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
648 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
649 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
650 403, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
651 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
652 "CHAP-Algorithm", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
653 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
654 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
655 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
656 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
657 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
658 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
659 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
660 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
661 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
662 CHECK_dict_new( DICT_AVP, &adata , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
663 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
664
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
665 /* CHAP-Ident */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
666 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
667 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
668 The CHAP-Ident AVP (AVP Code 404) is of type OctetString and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
669 the 1 octet CHAP Identifier used in the computation of the CHAP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
670 response [PPPCHAP].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
671 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
672 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
673 404, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
674 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
675 "CHAP-Ident", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
676 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
677 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
678 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
679 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
680 CHECK_dict_new( DICT_AVP, &adata , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
681 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
682
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
683 /* CHAP-Response */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
684 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
685 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
686 The CHAP-Response AVP (AVP Code 405) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
687 contains the 16 octet authentication data provided by the user in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
688 response to the CHAP challenge [PPPCHAP].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
689 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
690 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
691 405, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
692 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
693 "CHAP-Response", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
694 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
695 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
696 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
697 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
698 CHECK_dict_new( DICT_AVP, &adata , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
699 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
700
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
701 /* CHAP-Auth */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
702 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
703 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
704 The CHAP-Auth AVP (AVP Code 402) is of type Grouped and contains the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
705 information necessary to authenticate a user using the PPP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
706 Challenge-Handshake Authentication Protocol (CHAP) [PPPCHAP]. If the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
707 CHAP-Auth AVP is found in a message, the CHAP-Challenge AVP MUST be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
708 present as well. The optional AVPs containing the CHAP response
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
709 depend upon the value of the CHAP-Algorithm AVP. The grouped AVP has
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
710 the following ABNF grammar:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
711
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
712 CHAP-Auth ::= < AVP Header: 402 >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
713 { CHAP-Algorithm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
714 { CHAP-Ident }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
715 [ CHAP-Response ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
716 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
717 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
718 struct dict_object * avp;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
719 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
720 402, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
721 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
722 "CHAP-Auth", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
723 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
724 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
725 AVP_TYPE_GROUPED /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
726 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
727 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
728 { { "CHAP-Algorithm", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
729 ,{ "CHAP-Ident", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
730 ,{ "CHAP-Response", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
731 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
732
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
733 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
734 PARSE_loc_rules( rules, avp );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
735 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
736
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
737 /* CHAP-Challenge */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
738 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
739 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
740 The CHAP-Challenge AVP (AVP Code 60) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
741 contains the CHAP Challenge sent by the NAS to the CHAP peer
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
742 [PPPCHAP].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
743 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
744 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
745 60, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
746 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
747 "CHAP-Challenge", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
748 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
749 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
750 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
751 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
752 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
753 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
754
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
755 /* ARAP-Password */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
756 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
757 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
758 The ARAP-Password AVP (AVP Code 70) is of type OctetString and is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
759 only present when the Framed-Protocol AVP (see section 6.10.1) is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
760 included in the message and is set to ARAP. This AVP MUST NOT be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
761 present if either the User-Password or the CHAP-Auth AVP is present.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
762 See [RADIUSExt] for more information on the contents of this AVP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
763 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
764 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
765 70, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
766 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
767 "ARAP-Password", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
768 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
769 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
770 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
771 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
772 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
773 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
774
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
775 /* ARAP-Challenge-Response */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
776 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
777 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
778 The ARAP-Challenge-Response AVP (AVP Code 84) is of type OctetString
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
779 and is only present when the Framed-Protocol AVP (see section 6.10.1)
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
780 is included in the message and is set to ARAP. This AVP contains an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
781 8 octet response to the dial-in client's challenge. The RADIUS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
782 server calculates this value by taking the dial-in client's challenge
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
783 from the high-order 8 octets of the ARAP-Password AVP and performing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
784 DES encryption on this value with the authenticating user's password
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
785 as the key. If the user's password is fewer than 8 octets in length,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
786 the password is padded at the end with NULL octets to a length of 8
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
787 before it is used as a key.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
788 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
789 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
790 84, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
791 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
792 "ARAP-Challenge-Response", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
793 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
794 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
795 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
796 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
797 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
798 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
799
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
800 /* ARAP-Security */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
801 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
802 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
803 The ARAP-Security AVP (AVP Code 73) is of type Unsigned32 and MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
804 present in the AA-Answer message if the Framed-Protocol AVP (see
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
805 section 6.10.1) is set to the value of ARAP, and the Result-Code AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
806 is set to DIAMETER_MULTI_ROUND_AUTH. See [RADIUSExt] for more
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
807 information on the format of this AVP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
808 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
809 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
810 73, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
811 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
812 "ARAP-Security", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
813 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
814 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
815 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
816 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
817 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
818 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
819
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
820 /* ARAP-Security-Data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
821 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
822 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
823 The ARAP-Security-Data AVP (AVP Code 74) is of type OctetString and MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
824 present in the AA-Request or AA-Answer message if the Framed-Protocol
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
825 AVP is set to the value of ARAP, and the Result-Code AVP is set to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
826 DIAMETER_MULTI_ROUND_AUTH. This AVP contains the security module
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
827 challenge or response associated with the ARAP Security Module
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
828 specified in ARAP-Security.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
829 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
830 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
831 74, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
832 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
833 "ARAP-Security-Data", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
834 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
835 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
836 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
837 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
838 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
839 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
840
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
841 /********************************
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
842 * NAS Authorization AVPs *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
843 ********************************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
844 /* Service-Type */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
845 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
846 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
847 The Service-Type AVP (AVP Code 6) is of type Enumerated and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
848 the type of service the user has requested or the type of service to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
849 be provided. One such AVP MAY be present in an authentication and/or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
850 authorization request or response. A NAS is not required to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
851 implement all of these service types. It MUST treat unknown or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
852 unsupported Service-Types received in a response as a failure and end
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
853 the session with a DIAMETER_INVALID_AVP_VALUE Result-Code.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
854
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
855 When used in a request, the Service-Type AVP SHOULD be considered a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
856 hint to the server that the NAS believes the user would prefer the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
857 kind of service indicated. The server is not required to honor the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
858 hint. Furthermore, if the service specified by the server is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
859 supported, but not compatible with the current mode of access, the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
860 NAS MUST fail to start the session. The NAS MUST also generate the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
861 appropriate error message(s).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
862
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
863 The following values have been defined for the Service-Type AVP. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
864 complete list of defined values can be found in [RADIUS] and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
865 [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
866
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
867 Registry Name: Radius Attribute Values
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
868 Reference: [RFC2865][RFC3575]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
869
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
870 Sub-registry: Values for RADIUS Attribute 6, Service-Type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
871 Reference: [RFC2865][RFC3575]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
872
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
873 1 Login
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
874 2 Framed
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
875 3 Callback Login
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
876 4 Callback Framed
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
877 5 Outbound
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
878 6 Administrative
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
879 7 NAS Prompt
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
880 8 Authenticate Only
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
881 9 Callback NAS Prompt
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
882 10 Call Check
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
883 11 Callback Administrative
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
884 12 Voice [Chiba]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
885 13 Fax [Chiba]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
886 14 Modem Relay [Chiba]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
887 15 IAPP-Register [IEEE 802.11f][Kerry]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
888 16 IAPP-AP-Check [IEEE 802.11f][Kerry]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
889 17 Authorize Only [RFC3576]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
890
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
891 The following values are further qualified:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
892
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
893 Login 1
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
894 The user should be connected to a host. The message MAY
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
895 include additional AVPs defined in sections 6.16 or 6.17.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
896
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
897 Framed 2
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
898 A Framed Protocol, such as PPP or SLIP, should be started for
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
899 the User. The message MAY include additional AVPs defined in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
900 section 6.10, or section 7 for tunneling services.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
901
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
902 Callback Login 3
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
903 The user should be disconnected and called back, then connected
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
904 to a host. The message MAY include additional AVPs defined in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
905 this section.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
906
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
907 Callback Framed 4
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
908 The user should be disconnected and called back, and then a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
909 Framed Protocol, such as PPP or SLIP, should be started for the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
910 User. The message MAY include additional AVPs defined in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
911 section 6.10, or in section 7 for tunneling services.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
912
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
913 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
914 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
915 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Service-Type)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
916 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
917 enumval_def_u32( 1, "Login"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
918 enumval_def_u32( 2, "Framed"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
919 enumval_def_u32( 3, "Callback Login"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
920 enumval_def_u32( 4, "Callback Framed"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
921 enumval_def_u32( 5, "Outbound"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
922 enumval_def_u32( 6, "Administrative"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
923 enumval_def_u32( 7, "NAS Prompt"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
924 enumval_def_u32( 8, "Authenticate Only"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
925 enumval_def_u32( 9, "Callback NAS Prompt"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
926 enumval_def_u32(10, "Call Check"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
927 enumval_def_u32(11, "Callback Administrative"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
928 enumval_def_u32(12, "Voice [Chiba]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
929 enumval_def_u32(13, "Fax [Chiba]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
930 enumval_def_u32(14, "Modem Relay [Chiba]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
931 enumval_def_u32(15, "IAPP-Register [IEEE 802.11f][Kerry]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
932 enumval_def_u32(16, "IAPP-AP-Check [IEEE 802.11f][Kerry]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
933 enumval_def_u32(17, "Authorize Only [RFC3576]")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
934 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
935 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
936 6, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
937 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
938 "Service-Type", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
939 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
940 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
941 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
942 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
943 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
944 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
945 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
946 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
947 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
948 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
949 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
950 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
951
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
952 /* Callback-Number */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
953 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
954 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
955 The Callback-Number AVP (AVP Code 19) is of type UTF8String and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
956 contains a dialing string to be used for callback. It MAY be used in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
957 an authentication and/or authorization request as a hint to the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
958 server that a Callback service is desired, but the server is not
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
959 required to honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
960 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
961 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
962 19, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
963 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
964 "Callback-Number", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
965 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
966 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
967 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
968 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
969 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
970 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
971
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
972 /* Callback-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
973 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
974 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
975 The Callback-Id AVP (AVP Code 20) is of type UTF8String and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
976 the name of a place to be called, to be interpreted by the NAS. This
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
977 AVP MAY be present in an authentication and/or authorization
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
978 response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
979
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
980 This AVP is not roaming-friendly as it assumes that the Callback-Id
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
981 is configured on the NAS. Using the Callback-Number AVP therefore
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
982 preferable.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
983 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
984 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
985 20, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
986 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
987 "Callback-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
988 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
989 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
990 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
991 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
992 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
993 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
994
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
995 /* Idle-Timeout */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
996 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
997 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
998 The Idle-Timeout AVP (AVP Code 28) is of type Unsigned32 and sets the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
999 maximum number of consecutive seconds of idle connection allowable to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1000 the user before termination of the session or before a prompt is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1001 issued. The default is none, or system specific.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1002 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1003 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1004 28, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1005 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1006 "Idle-Timeout", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1007 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1008 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1009 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1010 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1011 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1012 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1013
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1014 /* Port-Limit */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1015 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1016 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1017 The Port-Limit AVP (AVP Code 62) is of type Unsigned32 and sets the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1018 maximum number of ports the NAS provides to the user. It MAY be used
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1019 in an authentication and/or authorization request as a hint to the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1020 server that multilink PPP [PPPMP] service is desired, but the server
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1021 is not required to honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1022 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1023 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1024 62, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1025 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1026 "Port-Limit", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1027 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1028 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1029 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1030 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1031 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1032 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1033
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1034 /* NAS-Filter-Rule */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1035 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1036 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1037 The NAS-Filter-Rule AVP (AVP Code 400) is of type IPFilterRule and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1038 provides filter rules that need to be configured on the NAS for the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1039 user. One or more of these AVPs MAY be present in an authorization
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1040 response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1041 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1042 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1043 400, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1044 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1045 "NAS-Filter-Rule", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1046 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1047 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1048 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1049 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1050 CHECK_dict_new( DICT_AVP, &data , IPFilterRule_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1051 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1052
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1053 /* Filter-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1054 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1055 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1056 The Filter-Id AVP (AVP Code 11) is of type UTF8String and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1057 the name of the filter list for this user. Zero or more Filter-Id
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1058 AVPs MAY be sent in an authorization answer.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1059
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1060 Identifying a filter list by name allows the filter to be used on
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1061 different NASes without regard to filter-list implementation details.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1062 However, this AVP is not roaming friendly, as filter naming differs
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1063 from one service provider to another.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1064
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1065 In non-RADIUS environments, it is RECOMMENDED that the NAS-Filter-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1066 Rule AVP be used instead.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1067 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1068 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1069 11, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1070 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1071 "Filter-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1072 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1073 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1074 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1075 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1076 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1077 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1078
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1079 /* Configuration-Token */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1080 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1081 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1082 The Configuration-Token AVP (AVP Code 78) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1083 is sent by a Diameter Server to a Diameter Proxy Agent or Translation
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1084 Agent in an AA-Answer command to indicate a type of user profile to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1085 be used. It should not be sent to a Diameter Client (NAS).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1086
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1087 The format of the Data field of this AVP is site specific.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1088 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1089 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1090 78, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1091 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1092 "Configuration-Token", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1093 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1094 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1095 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1096 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1097 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1098 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1099
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1100 /* QoS-Filter-Rule */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1101 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1102 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1103 The QoS-Filter-Rule AVP (AVP Code 407) is of type QoSFilterRule and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1104 provides QoS filter rules that need to be configured on the NAS for
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1105 the user. One or more such AVPs MAY be present in an authorization
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1106 response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1107 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1108 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1109 407, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1110 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1111 "QoS-Filter-Rule", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1112 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1113 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1114 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1115 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1116 CHECK_dict_new( DICT_AVP, &data , QoSFilterRule_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1117 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1118
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1119 /*** Framed Access Authorization AVPs ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1120
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1121 /* Framed-Protocol */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1122 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1123 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1124 The Framed-Protocol AVP (AVP Code 7) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1125 contains the framing to be used for framed access. This AVP MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1126 present in both requests and responses. The supported values are
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1127 listed in [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1128
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1129 Sub-registry: Values for RADIUS Attribute 7, Framed-Protocol
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1130 Reference: [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1131 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1132 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1133 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Framed-Protocol)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1134 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1135 enumval_def_u32( 1, "PPP"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1136 enumval_def_u32( 2, "SLIP"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1137 enumval_def_u32( 3, "AppleTalk Remote Access Protocol (ARAP)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1138 enumval_def_u32( 4, "Gandalf proprietary SingleLink/MultiLink protocol"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1139 enumval_def_u32( 5, "Xylogics proprietary IPX/SLIP"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1140 enumval_def_u32( 6, "X.75 Synchronous"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1141 enumval_def_u32( 7, "GPRS PDP Context [Moore]")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1142 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1143 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1144 7, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1145 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1146 "Framed-Protocol", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1147 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1148 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1149 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1150 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1151 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1152 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1153 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1154 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1155 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1156 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1157 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1158 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1159
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1160 /* Framed-Routing */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1161 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1162 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1163 The Framed-Routing AVP (AVP Code 10) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1164 contains the routing method for the user when the user is a router to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1165 a network. This AVP SHOULD only be present in authorization
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1166 responses. The supported values are listed in [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1167
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1168 Sub-registry: Values for RADIUS Attribute 10, Framed-Routing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1169 Reference: [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1170 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1171 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1172 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Framed-Routing)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1173 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1174 enumval_def_u32( 0, "None"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1175 enumval_def_u32( 1, "Send routing packets"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1176 enumval_def_u32( 2, "Listen for routing packets"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1177 enumval_def_u32( 3, "Send and Listen")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1178 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1179 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1180 10, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1181 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1182 "Framed-Routing", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1183 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1184 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1185 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1186 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1187 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1188 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1189 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1190 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1191 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1192 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1193 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1194 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1195
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1196 /* Framed-MTU */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1197 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1198 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1199 The Framed-MTU AVP (AVP Code 12) is of type Unsigned32 and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1200 the Maximum Transmission Unit to be configured for the user, when it
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1201 is not negotiated by some other means (such as PPP). This AVP SHOULD
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1202 only be present in authorization responses. The MTU value MUST be in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1203 the range from 64 to 65535.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1204 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1205 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1206 12, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1207 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1208 "Framed-MTU", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1209 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1210 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1211 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1212 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1213 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1214 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1215
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1216 /* Framed-Compression */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1217 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1218 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1219 The Framed-Compression AVP (AVP Code 13) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1220 contains the compression protocol to be used for the link. It MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1221 used in an authorization request as a hint to the server that a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1222 specific compression type is desired, but the server is not required
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1223 to honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1224
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1225 More than one compression protocol AVP MAY be sent. The NAS is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1226 responsible for applying the proper compression protocol to the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1227 appropriate link traffic.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1228
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1229 The supported values are listed in [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1230 Sub-registry: Values for RADIUS Attribute 13, Framed-Compression
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1231 Reference: [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1232 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1233 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1234 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Framed-Compression)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1235 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1236 enumval_def_u32( 0, "None"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1237 enumval_def_u32( 1, "VJ TCP/IP header compression"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1238 enumval_def_u32( 2, "IPX header compression"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1239 enumval_def_u32( 3, "Stac-LZS compression")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1240 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1241 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1242 13, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1243 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1244 "Framed-Compression", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1245 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1246 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1247 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1248 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1249 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1250 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1251 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1252 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1253 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1254 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1255 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1256 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1257
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1258 /*** IP Access Authorization AVPs ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1259
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1260 /* Framed-IP-Address */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1261 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1262 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1263 The Framed-IP-Address AVP (AVP Code 8) [RADIUS] is of type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1264 OctetString and contains an IPv4 address of the type specified in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1265 attribute value to be configured for the user. It MAY be used in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1266 authorization request as a hint to the server that a specific address
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1267 is desired, but the server is not required to honor the hint in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1268 corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1269
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1270 Two values have special significance: 0xFFFFFFFF and 0xFFFFFFFE. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1271 value 0xFFFFFFFF indicates that the NAS should allow the user to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1272 select an address (i.e., negotiated). The value 0xFFFFFFFE indicates
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1273 that the NAS should select an address for the user (e.g., assigned
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1274 from a pool of addresses kept by the NAS).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1275 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1276 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1277 8, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1278 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1279 "Framed-IP-Address", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1280 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1281 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1282 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1283 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1284 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1285 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1286
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1287 /* Framed-IP-Netmask */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1288 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1289 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1290 The Framed-IP-Netmask AVP (AVP Code 9) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1291 contains the four octets of the IPv4 netmask to be configured for the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1292 user when the user is a router to a network. It MAY be used in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1293 authorization request as a hint to the server that a specific netmask
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1294 is desired, but the server is not required to honor the hint in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1295 corresponding response. This AVP MUST be present in a response if
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1296 the request included this AVP with a value of 0xFFFFFFFF.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1297 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1298 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1299 9, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1300 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1301 "Framed-IP-Netmask", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1302 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1303 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1304 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1305 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1306 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1307 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1308
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1309 /* Framed-Route */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1310 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1311 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1312 The Framed-Route AVP (AVP Code 22) is of type UTF8String and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1313 the ASCII routing information to be configured for the user on the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1314 NAS. Zero or more of these AVPs MAY be present in an authorization
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1315 response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1316
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1317 The string MUST contain a destination prefix in dotted quad form
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1318 optionally followed by a slash and a decimal length specifier stating
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1319 how many high-order bits of the prefix should be used. This is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1320 followed by a space, a gateway address in dotted quad form, a space,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1321 and one or more metrics separated by spaces; for example,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1322
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1323 "192.168.1.0/24 192.168.1.1 1".
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1324
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1325 The length specifier may be omitted, in which case it should default
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1326 to 8 bits for class A prefixes, to 16 bits for class B prefixes, and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1327 to 24 bits for class C prefixes; for example,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1328
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1329 "192.168.1.0 192.168.1.1 1".
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1330
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1331 Whenever the gateway address is specified as "0.0.0.0" the IP address
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1332 of the user SHOULD be used as the gateway address.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1333 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1334 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1335 22, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1336 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1337 "Framed-Route", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1338 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1339 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1340 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1341 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1342 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1343 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1344
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1345 /* Framed-Pool */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1346 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1347 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1348 The Framed-Pool AVP (AVP Code 88) is of type OctetString and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1349 the name of an assigned address pool that SHOULD be used to assign an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1350 address for the user. If a NAS does not support multiple address
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1351 pools, the NAS SHOULD ignore this AVP. Address pools are usually
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1352 used for IP addresses but can be used for other protocols if the NAS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1353 supports pools for those protocols.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1354
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1355 Although specified as type OctetString for compatibility with RADIUS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1356 [RADIUSExt], the encoding of the Data field SHOULD also conform to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1357 the rules for the UTF8String Data Format.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1358 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1359 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1360 88, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1361 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1362 "Framed-Pool", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1363 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1364 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1365 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1366 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1367 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1368 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1369
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1370 /* Framed-Interface-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1371 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1372 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1373 The Framed-Interface-Id AVP (AVP Code 96) is of type Unsigned64 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1374 contains the IPv6 interface identifier to be configured for the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1375 It MAY be used in authorization requests as a hint to the server that
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1376 a specific interface id is desired, but the server is not required to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1377 honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1378 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1379 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1380 96, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1381 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1382 "Framed-Interface-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1383 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1384 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1385 AVP_TYPE_UNSIGNED64 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1386 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1387 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1388 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1389
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1390 /* Framed-IPv6-Prefix */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1391 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1392 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1393 The Framed-IPv6-Prefix AVP (AVP Code 97) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1394 contains the IPv6 prefix to be configured for the user. One or more
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1395 AVPs MAY be used in authorization requests as a hint to the server
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1396 that specific IPv6 prefixes are desired, but the server is not
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1397 required to honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1398 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1399 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1400 97, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1401 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1402 "Framed-IPv6-Prefix", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1403 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1404 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1405 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1406 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1407 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1408 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1409
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1410 /* Framed-IPv6-Route */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1411 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1412 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1413 The Framed-IPv6-Route AVP (AVP Code 99) is of type UTF8String and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1414 contains the ASCII routing information to be configured for the user
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1415 on the NAS. Zero or more of these AVPs MAY be present in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1416 authorization response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1417
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1418 The string MUST contain an IPv6 address prefix followed by a slash
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1419 and a decimal length specifier stating how many high order bits of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1420 the prefix should be used. This is followed by a space, a gateway
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1421 address in hexadecimal notation, a space, and one or more metrics
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1422 separated by spaces; for example,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1423
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1424 "2000:0:0:106::/64 2000::106:a00:20ff:fe99:a998 1".
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1425
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1426 Whenever the gateway address is the IPv6 unspecified address, the IP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1427 address of the user SHOULD be used as the gateway address, such as
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1428 in:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1429
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1430 "2000:0:0:106::/64 :: 1".
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1431 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1432 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1433 99, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1434 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1435 "Framed-IPv6-Route", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1436 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1437 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1438 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1439 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1440 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1441 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1442
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1443 /* Framed-IPv6-Pool */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1444 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1445 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1446 The Framed-IPv6-Pool AVP (AVP Code 100) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1447 contains the name of an assigned pool that SHOULD be used to assign
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1448 an IPv6 prefix for the user. If the access device does not support
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1449 multiple prefix pools, it MUST ignore this AVP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1450
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1451 Although specified as type OctetString for compatibility with RADIUS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1452 [RADIUSIPv6], the encoding of the Data field SHOULD also conform to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1453 the rules for the UTF8String Data Format.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1454 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1455 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1456 100, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1457 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1458 "Framed-IPv6-Pool", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1459 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1460 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1461 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1462 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1463 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1464 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1465
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1466 /*** IPX Access ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1467
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1468 /* Framed-IPX-Network */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1469 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1470 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1471 The Framed-IPX-Network AVP (AVP Code 23) is of type Unsigned32 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1472 contains the IPX Network number to be configured for the user. It
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1473 MAY be used in an authorization request as a hint to the server that
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1474 a specific address is desired, but the server is not required to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1475 honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1476
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1477 Two addresses have special significance: 0xFFFFFFFF and 0xFFFFFFFE.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1478 The value 0xFFFFFFFF indicates that the NAS should allow the user to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1479 select an address (i.e., Negotiated). The value 0xFFFFFFFE indicates
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1480 that the NAS should select an address for the user (e.g., assign it
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1481 from a pool of one or more IPX networks kept by the NAS).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1482 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1483 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1484 23, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1485 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1486 "Framed-IPX-Network", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1487 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1488 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1489 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1490 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1491 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1492 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1493
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1494 /*** AppleTalk Network Access ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1495
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1496 /* Framed-AppleTalk-Link */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1497 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1498 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1499 The Framed-AppleTalk-Link AVP (AVP Code 37) is of type Unsigned32 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1500 contains the AppleTalk network number that should be used for the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1501 serial link to the user, which is another AppleTalk router. This AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1502 MUST only be present in an authorization response and is never used
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1503 when the user is not another router.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1504
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1505 Despite the size of the field, values range from 0 to 65,535. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1506 special value of 0 indicates an unnumbered serial link. A value of 1
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1507 to 65,535 means that the serial line between the NAS and the user
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1508 should be assigned that value as an AppleTalk network number.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1509 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1510 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1511 37, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1512 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1513 "Framed-AppleTalk-Link", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1514 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1515 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1516 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1517 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1518 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1519 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1520
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1521 /* Framed-AppleTalk-Network */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1522 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1523 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1524 The Framed-AppleTalk-Network AVP (AVP Code 38) is of type Unsigned32
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1525 and contains the AppleTalk Network number that the NAS should probe
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1526 to allocate an AppleTalk node for the user. This AVP MUST only be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1527 present in an authorization response and is never used when the user
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1528 is not another router. Multiple instances of this AVP indicate that
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1529 the NAS may probe, using any of the network numbers specified.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1530
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1531 Despite the size of the field, values range from 0 to 65,535. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1532 special value 0 indicates that the NAS should assign a network for
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1533 the user, using its default cable range. A value between 1 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1534 65,535 (inclusive) indicates to the AppleTalk Network that the NAS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1535 should probe to find an address for the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1536 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1537 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1538 38, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1539 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1540 "Framed-AppleTalk-Network", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1541 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1542 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1543 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1544 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1545 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1546 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1547
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1548 /* Framed-AppleTalk-Zone */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1549 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1550 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1551 The Framed-AppleTalk-Zone AVP (AVP Code 39) is of type OctetString
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1552 and contains the AppleTalk Default Zone to be used for this user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1553 This AVP MUST only be present in an authorization response. Multiple
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1554 instances of this AVP in the same message are not allowed.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1555
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1556 The codification of this field's allowed range is outside the scope
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1557 of this specification.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1558 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1559 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1560 39, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1561 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1562 "Framed-AppleTalk-Zone", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1563 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1564 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1565 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1566 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1567 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1568 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1569
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1570 /*** AppleTalk Remote Access [RFC2869] ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1571
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1572 /* ARAP-Features */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1573 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1574 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1575 The ARAP-Features AVP (AVP Code 71) is of type OctetString and MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1576 present in the AA-Accept message if the Framed-Protocol AVP is set to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1577 the value of ARAP. See [RADIUSExt] for more information about the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1578 format of this AVP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1579 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1580 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1581 71, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1582 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1583 "ARAP-Features", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1584 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1585 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1586 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1587 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1588 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1589 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1590
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1591 /* ARAP-Zone-Access */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1592 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1593 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1594 The ARAP-Zone-Access AVP (AVP Code 72) is of type Enumerated and MAY
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1595 be present in the AA-Accept message if the Framed-Protocol AVP is set
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1596 to the value of ARAP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1597
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1598 The supported values are listed in [RADIUSTypes] and defined in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1599 [RADIUSExt].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1600 Sub-registry: Values for RADIUS Attribute 72, ARAP-Zone-Access
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1601 Reference: [RFC2869]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1602 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1603 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1604 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(ARAP-Zone-Access)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1605 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1606 enumval_def_u32( 1, "Only allow access to default zone [RFC2869]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1607 enumval_def_u32( 2, "Use zone filter inclusively [RFC2869]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1608 enumval_def_u32( 3, "Not used [RFC2869]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1609 enumval_def_u32( 4, "Use zone filter exclusively [RFC2869]")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1610 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1611 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1612 72, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1613 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1614 "ARAP-Zone-Access", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1615 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1616 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1617 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1618 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1619 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1620 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1621 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1622 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1623 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1624 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1625 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1626 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1627
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1628 /*** Non-Framed Access Authorization AVPs ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1629
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1630 /* Login-IP-Host */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1631 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1632 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1633 The Login-IP-Host AVP (AVP Code 14) [RADIUS] is of type OctetString
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1634 and contains the IPv4 address of a host with which to connect the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1635 user when the Login-Service AVP is included. It MAY be used in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1636 AA-Request command as a hint to the Diameter Server that a specific
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1637 host is desired, but the Diameter Server is not required to honor the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1638 hint in the AA-Answer.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1639
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1640 Two addresses have special significance: all ones and 0. The value
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1641 of all ones indicates that the NAS SHOULD allow the user to select an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1642 address. The value 0 indicates that the NAS SHOULD select a host to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1643 connect the user to.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1644 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1645 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1646 uint32_t allzeros = 0;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1647 uint32_t allones = (uint32_t) -1;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1648 struct dict_type_data tdata = { AVP_TYPE_OCTETSTRING, "Enumerated(Login-IP-Host)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1649 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1650 enumval_def_os( 4, &allzeros, "(0) NAS selects the host"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1651 enumval_def_os( 4, &allones , "(1) User selects the address")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1652 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1653 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1654 14, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1655 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1656 "Login-IP-Host", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1657 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1658 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1659 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1660 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1661 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1662 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1663 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1664 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1665 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1666 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1667 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1668 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1669
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1670 /* Login-IPv6-Host */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1671 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1672 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1673 The Login-IPv6-Host AVP (AVP Code 98) [RADIUSIPv6] is of type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1674 OctetString and contains the IPv6 address of a host with which to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1675 connect the user when the Login-Service AVP is included. It MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1676 used in an AA-Request command as a hint to the Diameter Server that a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1677 specific host is desired, but the Diameter Server is not required to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1678 honor the hint in the AA-Answer.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1679
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1680 Two addresses have special significance:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1681
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1682 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF and 0. The value
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1683 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF indicates that the NAS SHOULD
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1684 allow the user to select an address. The value 0 indicates that the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1685 NAS SHOULD select a host to connect the user to.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1686
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1687 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1688 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1689 unsigned char allzeros[16];
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1690 unsigned char allones[16];
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1691 struct dict_type_data tdata = { AVP_TYPE_OCTETSTRING, "Enumerated(Login-IPv6-Host)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1692 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1693 enumval_def_os( 16, &allzeros, "(0) NAS selects the host"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1694 enumval_def_os( 16, &allones , "(1) User selects the address")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1695 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1696 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1697 98, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1698 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1699 "Login-IPv6-Host", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1700 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1701 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1702 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1703 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1704 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1705 memset(allzeros, 0, sizeof(allzeros));
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1706 memset(allones, 0xff, sizeof(allones));
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1707 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1708 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1709 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1710 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1711 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1712 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1713 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1714
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1715 /* Login-Service */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1716 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1717 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1718 The Login-Service AVP (AVP Code 15) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1719 contains the service that should be used to connect the user to the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1720 login host. This AVP SHOULD only be present in authorization
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1721 responses.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1722
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1723 The supported values are listed in [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1724 Sub-registry: Values for RADIUS Attribute 15, Login-Service
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1725 Reference: [RFC2865]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1726 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1727 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1728 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Login-Service)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1729 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1730 enumval_def_u32( 0, "Telnet"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1731 enumval_def_u32( 1, "Rlogin"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1732 enumval_def_u32( 2, "TCP Clear"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1733 enumval_def_u32( 3, "PortMaster (proprietary)"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1734 enumval_def_u32( 4, "LAT"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1735 enumval_def_u32( 5, "X25-PAD"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1736 enumval_def_u32( 6, "X25-T3POS"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1737 enumval_def_u32( 8, "TCP Clear Quiet (suppresses any NAS-generated connect string)")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1738 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1739 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1740 15, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1741 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1742 "Login-Service", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1743 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1744 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1745 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1746 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1747 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1748 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1749 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1750 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1751 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1752 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1753 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1754 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1755
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1756 /*** TCP Services ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1757
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1758 /* Login-TCP-Port */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1759 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1760 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1761 The Login-TCP-Port AVP (AVP Code 16) is of type Unsigned32 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1762 contains the TCP port with which the user is to be connected when the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1763 Login-Service AVP is also present. This AVP SHOULD only be present
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1764 in authorization responses. The value MUST NOT be greater than
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1765 65,535.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1766 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1767 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1768 16, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1769 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1770 "Login-TCP-Port", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1771 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1772 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1773 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1774 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1775 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1776 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1777
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1778 /*** LAT Services ***/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1779
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1780 /* Login-LAT-Service */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1781 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1782 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1783 The Login-LAT-Service AVP (AVP Code 34) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1784 contains the system with which the user is to be connected by LAT.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1785 It MAY be used in an authorization request as a hint to the server
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1786 that a specific service is desired, but the server is not required to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1787 honor the hint in the corresponding response. This AVP MUST only be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1788 present in the response if the Login-Service AVP states that LAT is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1789 desired.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1790
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1791 Administrators use this service attribute when dealing with clustered
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1792 systems, such as a VAX or Alpha cluster. In these environments,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1793 several different time-sharing hosts share the same resources (disks,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1794 printers, etc.), and administrators often configure each host to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1795 offer access (service) to each of the shared resources. In this
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1796 case, each host in the cluster advertises its services through LAT
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1797 broadcasts.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1798
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1799 Sophisticated users often know which service providers (machines) are
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1800 faster and tend to use a node name when initiating a LAT connection.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1801 Some administrators want particular users to use certain machines as
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1802 a primitive form of load balancing (although LAT knows how to do load
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1803 balancing itself).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1804
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1805 The String field contains the identity of the LAT service to use.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1806 The LAT Architecture allows this string to contain $ (dollar), -
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1807 (hyphen), . (period), _ (underscore), numerics, upper- and lowercase
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1808 alphabetics, and the ISO Latin-1 character set extension [ISOLatin].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1809 All LAT string comparisons are case insensitive.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1810 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1811 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1812 34, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1813 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1814 "Login-LAT-Service", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1815 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1816 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1817 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1818 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1819 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1820 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1821
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1822 /* Login-LAT-Node */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1823 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1824 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1825 The Login-LAT-Node AVP (AVP Code 35) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1826 contains the Node with which the user is to be automatically
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1827 connected by LAT. It MAY be used in an authorization request as a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1828 hint to the server that a specific LAT node is desired, but the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1829 server is not required to honor the hint in the corresponding
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1830 response. This AVP MUST only be present in a response if the Login-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1831 Service-Type AVP is set to LAT.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1832
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1833 The String field contains the identity of the LAT service to use.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1834 The LAT Architecture allows this string to contain $ (dollar), -
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1835 (hyphen), . (period), _ (underscore), numerics, upper- and lowercase
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1836 alphabetics, and the ISO Latin-1 character set extension [ISOLatin].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1837 All LAT string comparisons are case insensitive.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1838 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1839 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1840 35, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1841 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1842 "Login-LAT-Node", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1843 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1844 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1845 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1846 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1847 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1848 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1849
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1850 /* Login-LAT-Group */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1851 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1852 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1853 The Login-LAT-Group AVP (AVP Code 36) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1854 contains a string identifying the LAT group codes this user is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1855 authorized to use. It MAY be used in an authorization request as a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1856 hint to the server that a specific group is desired, but the server
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1857 is not required to honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1858 This AVP MUST only be present in a response if the Login-Service-Type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1859 AVP is set to LAT.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1860
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1861 LAT supports 256 different group codes, which LAT uses as a form of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1862 access rights. LAT encodes the group codes as a 256-bit bitmap.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1863
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1864 Administrators can assign one or more of the group code bits at the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1865 LAT service provider; it will only accept LAT connections that have
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1866 these group codes set in the bitmap. The administrators assign a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1867 bitmap of authorized group codes to each user. LAT gets these from
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1868 the operating system and uses them in its requests to the service
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1869 providers.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1870
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1871 The codification of the range of allowed usage of this field is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1872 outside the scope of this specification.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1873 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1874 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1875 36, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1876 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1877 "Login-LAT-Group", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1878 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1879 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1880 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1881 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1882 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1883 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1884
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1885 /* Login-LAT-Port */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1886 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1887 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1888 The Login-LAT-Port AVP (AVP Code 63) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1889 contains the Port with which the user is to be connected by LAT. It
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1890 MAY be used in an authorization request as a hint to the server that
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1891 a specific port is desired, but the server is not required to honor
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1892 the hint in the corresponding response. This AVP MUST only be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1893 present in a response if the Login-Service-Type AVP is set to LAT.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1894
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1895 The String field contains the identity of the LAT service to use.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1896 The LAT Architecture allows this string to contain $ (dollar), -
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1897 (hyphen), . (period), _ (underscore), numerics, upper- and lower-case
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1898 alphabetics, and the ISO Latin-1 character set extension [ISOLatin].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1899 All LAT string comparisons are case insensitive.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1900 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1901 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1902 63, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1903 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1904 "Login-LAT-Port", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1905 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1906 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1907 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1908 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1909 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1910 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1911
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1912 /********************************
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1913 * NAS Tunneling AVPs *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1914 ********************************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1915 /* Tunnel-Type */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1916 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1917 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1918 The Tunnel-Type AVP (AVP Code 64) is of type Enumerated and contains
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1919 the tunneling protocol(s) to be used (in the case of a tunnel
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1920 initiator) or in use (in the case of a tunnel terminator). It MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1921 used in an authorization request as a hint to the server that a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1922 specific tunnel type is desired, but the server is not required to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1923 honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1924
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1925 The Tunnel-Type AVP SHOULD also be included in Accounting-Request
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1926 messages.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1927
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1928 A tunnel initiator is not required to implement any of these tunnel
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1929 types. If a tunnel initiator receives a response that contains only
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1930 unknown or unsupported Tunnel-Types, the tunnel initiator MUST behave
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1931 as though a response were received with the Result-Code indicating a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1932 failure.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1933
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1934 The supported values are listed in [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1935 Sub-registry: Values for RADIUS Attribute 64, Tunnel-Type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1936 Reference: [RFC2868]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1937 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1938 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1939 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Tunnel-Type)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1940 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1941 enumval_def_u32( 1, "Point-to-Point Tunneling Protocol (PPTP) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1942 enumval_def_u32( 2, "Layer Two Forwarding (L2F) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1943 enumval_def_u32( 3, "Layer Two Tunneling Protocol (L2TP) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1944 enumval_def_u32( 4, "Ascend Tunnel Management Protocol (ATMP) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1945 enumval_def_u32( 5, "Virtual Tunneling Protocol (VTP) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1946 enumval_def_u32( 6, "IP Authentication Header in the Tunnel-mode (AH) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1947 enumval_def_u32( 7, "IP-in-IP Encapsulation (IP-IP) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1948 enumval_def_u32( 8, "Minimal IP-in-IP Encapsulation (MIN-IP-IP) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1949 enumval_def_u32( 9, "IP Encapsulating Security Payload in the Tunnel-mode (ESP) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1950 enumval_def_u32(10, "Generic Route Encapsulation (GRE) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1951 enumval_def_u32(11, "Bay Dial Virtual Services (DVS) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1952 enumval_def_u32(12, "IP-in-IP Tunneling [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1953 enumval_def_u32(13, "Virtual LANs (VLAN) [RFC3580]")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1954 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1955 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1956 64, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1957 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1958 "Tunnel-Type", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1959 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1960 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1961 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1962 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1963 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1964 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1965 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1966 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1967 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1968 CHECK_dict_new( DICT_AVP, &adata , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1969 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1970
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1971 /* Tunnel-Medium-Type */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1972 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1973 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1974 The Tunnel-Medium-Type AVP (AVP Code 65) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1975 contains the transport medium to use when creating a tunnel for
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1976 protocols (such as L2TP) that can operate over multiple transports.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1977 It MAY be used in an authorization request as a hint to the server
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1978 that a specific medium is desired, but the server is not required to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1979 honor the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1980
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1981 The supported values are listed in [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1982 Sub-registry: Values for RADIUS Attribute 65, Tunnel-Medium-Type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1983 Reference: [RFC2868]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1984 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1985 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1986 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Tunnel-Medium-Type)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1987 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1988 enumval_def_u32( 1, "IPv4 (IP version 4) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1989 enumval_def_u32( 2, "IPv6 (IP version 6) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1990 enumval_def_u32( 3, "NSAP [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1991 enumval_def_u32( 4, "HDLC (8-bit multidrop) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1992 enumval_def_u32( 5, "BBN 1822 [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1993 enumval_def_u32( 6, "802 (includes all 802 media plus Ethernet \"canonical format\") [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1994 enumval_def_u32( 7, "E.163 (POTS) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1995 enumval_def_u32( 8, "E.164 (SMDS, Frame Relay, ATM) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1996 enumval_def_u32( 9, "F.69 (Telex) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1997 enumval_def_u32(10, "X.121 (X.25, Frame Relay) [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1998 enumval_def_u32(11, "IPX [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1999 enumval_def_u32(12, "Appletalk [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2000 enumval_def_u32(13, "Decnet IV [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2001 enumval_def_u32(14, "Banyan Vines [RFC2868]"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2002 enumval_def_u32(15, "E.164 with NSAP format subaddress [RFC2868]")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2003 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2004 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2005 65, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2006 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2007 "Tunnel-Medium-Type", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2008 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2009 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2010 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2011 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2012 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2013 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2014 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2015 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2016 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2017 CHECK_dict_new( DICT_AVP, &adata , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2018 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2019
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2020 /* Tunnel-Client-Endpoint */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2021 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2022 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2023 The Tunnel-Client-Endpoint AVP (AVP Code 66) is of type UTF8String
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2024 and contains the address of the initiator end of the tunnel. It MAY
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2025 be used in an authorization request as a hint to the server that a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2026 specific endpoint is desired, but the server is not required to honor
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2027 the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2028
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2029 This AVP SHOULD be included in the corresponding Accounting-Request
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2030 messages, in which case it indicates the address from which the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2031 tunnel was initiated. This AVP, along with the Tunnel-Server-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2032 Endpoint and Session-Id AVP [BASE], MAY be used to provide a globally
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2033 unique means to identify a tunnel for accounting and auditing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2034 purposes.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2035
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2036 If Tunnel-Medium-Type is IPv4 (1), then this string is either the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2037 fully qualified domain name (FQDN) of the tunnel client machine, or a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2038 "dotted-decimal" IP address. Implementations MUST support the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2039 dotted-decimal format and SHOULD support the FQDN format for IP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2040 addresses.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2041
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2042 If Tunnel-Medium-Type is IPv6 (2), then this string is either the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2043 FQDN of the tunnel client machine, or a text representation of the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2044 address in either the preferred or alternate form [IPv6Addr].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2045 Conforming implementations MUST support the preferred form and SHOULD
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2046 support both the alternate text form and the FQDN format for IPv6
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2047 addresses.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2048
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2049 If Tunnel-Medium-Type is neither IPv4 nor IPv6, then this string is a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2050 tag referring to configuration data local to the Diameter client that
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2051 describes the interface or medium-specific client address to use.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2052 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2053 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2054 66, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2055 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2056 "Tunnel-Client-Endpoint", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2057 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2058 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2059 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2060 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2061 CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2062 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2063
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2064 /* Tunnel-Server-Endpoint */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2065 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2066 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2067 The Tunnel-Server-Endpoint AVP (AVP Code 67) is of type UTF8String
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2068 and contains the address of the server end of the tunnel. It MAY be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2069 used in an authorization request as a hint to the server that a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2070 specific endpoint is desired, but the server is not required to honor
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2071 the hint in the corresponding response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2072
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2073 This AVP SHOULD be included in the corresponding Accounting-Request
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2074 messages, in which case it indicates the address from which the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2075 tunnel was initiated. This AVP, along with the Tunnel-Client-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2076 Endpoint and Session-Id AVP [BASE], MAY be used to provide a globally
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2077 unique means to identify a tunnel for accounting and auditing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2078 purposes.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2079
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2080 If Tunnel-Medium-Type is IPv4 (1), then this string is either the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2081 fully qualified domain name (FQDN) of the tunnel server machine, or a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2082 "dotted-decimal" IP address. Implementations MUST support the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2083 dotted-decimal format and SHOULD support the FQDN format for IP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2084 addresses.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2085
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2086 If Tunnel-Medium-Type is IPv6 (2), then this string is either the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2087 FQDN of the tunnel server machine, or a text representation of the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2088 address in either the preferred or alternate form [IPv6Addr].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2089 Implementations MUST support the preferred form and SHOULD support
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2090 both the alternate text form and the FQDN format for IPv6 addresses.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2091
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2092 If Tunnel-Medium-Type is not IPv4 or IPv6, this string is a tag
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2093 referring to configuration data local to the Diameter client that
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2094 describes the interface or medium-specific server address to use.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2095 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2096 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2097 67, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2098 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2099 "Tunnel-Server-Endpoint", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2100 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2101 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2102 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2103 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2104 CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2105 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2106
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2107 /* Tunnel-Password */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2108 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2109 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2110 The Tunnel-Password AVP (AVP Code 69) is of type OctetString and may
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2111 contain a password to be used to authenticate to a remote server.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2112 The Tunnel-Password AVP contains sensitive information. This value
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2113 is not protected in the same manner as RADIUS [RADTunnels].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2114
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2115 As required in [BASE], Diameter messages are encrypted by using IPsec
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2116 or TLS. The Tunnel-Password AVP SHOULD NOT be used in untrusted
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2117 proxy environments without encrypting it by using end-to-end security
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2118 techniques, such as CMS Security [DiamCMS].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2119 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2120 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2121 69, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2122 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2123 "Tunnel-Password", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2124 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2125 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2126 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2127 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2128 CHECK_dict_new( DICT_AVP, &adata , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2129 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2130
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2131 /* Tunnel-Private-Group-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2132 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2133 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2134 The Tunnel-Private-Group-Id AVP (AVP Code 81) is of type OctetString
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2135 and contains the group Id for a particular tunneled session. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2136 Tunnel-Private-Group-Id AVP MAY be included in an authorization
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2137 request if the tunnel initiator can predetermine the group resulting
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2138 from a particular connection. It SHOULD be included in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2139 authorization response if this tunnel session is to be treated as
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2140 belonging to a particular private group. Private groups may be used
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2141 to associate a tunneled session with a particular group of users.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2142 For example, it MAY be used to facilitate routing of unregistered IP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2143 addresses through a particular interface. This AVP SHOULD be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2144 included in the Accounting-Request messages that pertain to the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2145 tunneled session.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2146 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2147 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2148 81, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2149 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2150 "Tunnel-Private-Group-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2151 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2152 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2153 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2154 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2155 CHECK_dict_new( DICT_AVP, &adata , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2156 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2157
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2158 /* Tunnel-Assignment-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2159 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2160 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2161 The Tunnel-Assignment-Id AVP (AVP Code 82) is of type OctetString and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2162 is used to indicate to the tunnel initiator the particular tunnel to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2163 which a session is to be assigned. Some tunneling protocols, such as
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2164 [PPTP] and [L2TP], allow for sessions between the same two tunnel
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2165 endpoints to be multiplexed over the same tunnel and also for a given
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2166 session to use its own dedicated tunnel. This attribute provides a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2167 mechanism for Diameter to inform the tunnel initiator (e.g., PAC,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2168 LAC) whether to assign the session to a multiplexed tunnel or to a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2169 separate tunnel. Furthermore, it allows for sessions sharing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2170 multiplexed tunnels to be assigned to different multiplexed tunnels.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2171
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2172 A particular tunneling implementation may assign differing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2173 characteristics to particular tunnels. For example, different
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2174 tunnels may be assigned different QoS parameters. Such tunnels may
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2175 be used to carry either individual or multiple sessions. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2176 Tunnel-Assignment-Id attribute thus allows the Diameter server to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2177 indicate that a particular session is to be assigned to a tunnel
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2178 providing an appropriate level of service. It is expected that any
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2179 QoS-related Diameter tunneling attributes defined in the future
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2180 accompanying this one will be associated by the tunnel initiator with
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2181 the Id given by this attribute. In the meantime, any semantic given
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2182 to a particular Id string is a matter left to local configuration in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2183 the tunnel initiator.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2184
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2185 The Tunnel-Assignment-Id AVP is of significance only to Diameter and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2186 the tunnel initiator. The Id it specifies is only intended to be of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2187 local use to Diameter and the tunnel initiator. The Id assigned by
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2188 the tunnel initiator is not conveyed to the tunnel peer.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2189
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2190 This attribute MAY be included in authorization responses. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2191 tunnel initiator receiving this attribute MAY choose to ignore it and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2192 to assign the session to an arbitrary multiplexed or non-multiplexed
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2193 tunnel between the desired endpoints. This AVP SHOULD also be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2194 included in the Accounting-Request messages pertaining to the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2195 tunneled session.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2196
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2197 If a tunnel initiator supports the Tunnel-Assignment-Id AVP, then it
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2198 should assign a session to a tunnel in the following manner:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2199
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2200 - If this AVP is present and a tunnel exists between the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2201 specified endpoints with the specified Id, then the session
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2202 should be assigned to that tunnel.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2203
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2204 - If this AVP is present and no tunnel exists between the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2205 specified endpoints with the specified Id, then a new tunnel
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2206 should be established for the session and the specified Id
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2207 should be associated with the new tunnel.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2208
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2209 - If this AVP is not present, then the session is assigned to an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2210 unnamed tunnel. If an unnamed tunnel does not yet exist
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2211 between the specified endpoints, then it is established and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2212 used for this session and for subsequent ones established
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2213 without the Tunnel-Assignment-Id attribute. A tunnel initiator
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2214 MUST NOT assign a session for which a Tunnel-Assignment-Id AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2215 was not specified to a named tunnel (i.e., one that was
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2216 initiated by a session specifying this AVP).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2217
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2218 Note that the same Id may be used to name different tunnels if these
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2219 tunnels are between different endpoints.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2220
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2221 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2222 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2223 82, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2224 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2225 "Tunnel-Assignment-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2226 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2227 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2228 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2229 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2230 CHECK_dict_new( DICT_AVP, &adata , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2231 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2232
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2233 /* Tunnel-Preference */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2234 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2235 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2236 The Tunnel-Preference AVP (AVP Code 83) is of type Unsigned32 and is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2237 used to identify the relative preference assigned to each tunnel when
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2238 more than one set of tunneling AVPs is returned within separate
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2239 Grouped-AVP AVPs. It MAY be used in an authorization request as a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2240 hint to the server that a specific preference is desired, but the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2241 server is not required to honor the hint in the corresponding
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2242 response.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2243
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2244 For example, suppose that AVPs describing two tunnels are returned by
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2245 the server, one with a Tunnel-Type of PPTP and the other with a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2246 Tunnel-Type of L2TP. If the tunnel initiator supports only one of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2247 the Tunnel-Types returned, it will initiate a tunnel of that type.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2248 If, however, it supports both tunnel protocols, it SHOULD use the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2249 value of the Tunnel-Preference AVP to decide which tunnel should be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2250 started. The tunnel with the lowest numerical value in the Value
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2251 field of this AVP SHOULD be given the highest preference. The values
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2252 assigned to two or more instances of the Tunnel-Preference AVP within
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2253 a given authorization response MAY be identical. In this case, the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2254 tunnel initiator SHOULD use locally configured metrics to decide
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2255 which set of AVPs to use.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2256 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2257 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2258 83, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2259 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2260 "Tunnel-Preference", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2261 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2262 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2263 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2264 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2265 CHECK_dict_new( DICT_AVP, &adata , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2266 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2267
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2268 /* Tunnel-Client-Auth-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2269 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2270 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2271 The Tunnel-Client-Auth-Id AVP (AVP Code 90) is of type UTF8String and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2272 specifies the name used by the tunnel initiator during the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2273 authentication phase of tunnel establishment. It MAY be used in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2274 authorization request as a hint to the server that a specific
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2275 preference is desired, but the server is not required to honor the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2276 hint in the corresponding response. This AVP MUST be present in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2277 authorization response if an authentication name other than the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2278 default is desired. This AVP SHOULD be included in the Accounting-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2279 Request messages pertaining to the tunneled session.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2280 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2281 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2282 90, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2283 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2284 "Tunnel-Client-Auth-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2285 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2286 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2287 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2288 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2289 CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2290 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2291
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2292 /* Tunnel-Server-Auth-Id */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2293 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2294 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2295 The Tunnel-Server-Auth-Id AVP (AVP Code 91) is of type UTF8String and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2296 specifies the name used by the tunnel terminator during the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2297 authentication phase of tunnel establishment. It MAY be used in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2298 authorization request as a hint to the server that a specific
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2299 preference is desired, but the server is not required to honor the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2300 hint in the corresponding response. This AVP MUST be present in the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2301 authorization response if an authentication name other than the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2302 default is desired. This AVP SHOULD be included in the Accounting-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2303 Request messages pertaining to the tunneled session.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2304 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2305 struct dict_avp_data adata = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2306 91, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2307 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2308 "Tunnel-Server-Auth-Id", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2309 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2310 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2311 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2312 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2313 CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2314 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2315
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2316 /* Tunneling */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2317 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2318 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2319 The Tunneling AVP (AVP Code 401) is of type Grouped and contains the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2320 following AVPs, used to describe a compulsory tunnel service:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2321 [RADTunnels], [RADTunlAcct]. Its data field has the following ABNF
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2322 grammar:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2323
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2324 Tunneling ::= < AVP Header: 401 >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2325 { Tunnel-Type }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2326 { Tunnel-Medium-Type }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2327 { Tunnel-Client-Endpoint }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2328 { Tunnel-Server-Endpoint }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2329 [ Tunnel-Preference ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2330 [ Tunnel-Client-Auth-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2331 [ Tunnel-Server-Auth-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2332 [ Tunnel-Assignment-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2333 [ Tunnel-Password ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2334 [ Tunnel-Private-Group-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2335 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2336 struct dict_object * avp;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2337 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2338 401, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2339 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2340 "Tunneling", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2341 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2342 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2343 AVP_TYPE_GROUPED /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2344 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2345 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2346 { { "Tunnel-Type", RULE_REQUIRED, -1, 1 }
523
4b1b22e3b4f3 It seems the ABNF of Tunneling AVP is broken for requests...
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 287
diff changeset
2347 ,{ "Tunnel-Medium-Type", RULE_OPTIONAL, -1, 1 }
4b1b22e3b4f3 It seems the ABNF of Tunneling AVP is broken for requests...
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 287
diff changeset
2348 ,{ "Tunnel-Client-Endpoint", RULE_OPTIONAL, -1, 1 }
4b1b22e3b4f3 It seems the ABNF of Tunneling AVP is broken for requests...
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 287
diff changeset
2349 ,{ "Tunnel-Server-Endpoint", RULE_OPTIONAL, -1, 1 }
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2350 ,{ "Tunnel-Preference", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2351 ,{ "Tunnel-Client-Auth-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2352 ,{ "Tunnel-Server-Auth-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2353 ,{ "Tunnel-Assignment-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2354 ,{ "Tunnel-Password", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2355 ,{ "Tunnel-Private-Group-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2356 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2357
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2358 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2359 PARSE_loc_rules( rules, avp );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2360 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2361
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2362 /********************************
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2363 * NAS Accounting AVPs *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2364 ********************************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2365 /* Accounting-Input-Octets */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2366 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2367 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2368 The Accounting-Input-Octets AVP (AVP Code 363) is of type Unsigned64
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2369 and contains the number of octets received from the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2370
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2371 For NAS usage, this AVP indicates how many octets have been received
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2372 from the port in the course of this session. It can only be present
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2373 in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2374 STOP_RECORD.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2375 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2376 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2377 363, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2378 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2379 "Accounting-Input-Octets", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2380 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2381 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2382 AVP_TYPE_UNSIGNED64 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2383 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2384 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2385 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2386
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2387 /* Accounting-Output-Octets */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2388 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2389 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2390 The Accounting-Output-Octets AVP (AVP Code 364) is of type Unsigned64
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2391 and contains the number of octets sent to the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2392
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2393 For NAS usage, this AVP indicates how many octets have been sent to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2394 the port in the course of this session. It can only be present in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2395 ACR messages with an Accounting-Record-Type of INTERIM_RECORD or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2396 STOP_RECORD.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2397 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2398 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2399 364, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2400 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2401 "Accounting-Output-Octets", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2402 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2403 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2404 AVP_TYPE_UNSIGNED64 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2405 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2406 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2407 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2408
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2409 /* Accounting-Input-Packets */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2410 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2411 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2412 The Accounting-Input-Packets (AVP Code 365) is of type Unsigned64 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2413 contains the number of packets received from the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2414
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2415 For NAS usage, this AVP indicates how many packets have been received
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2416 from the port over the course of a session being provided to a Framed
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2417 User. It can only be present in ACR messages with an Accounting-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2418 Record-Type of INTERIM_RECORD or STOP_RECORD.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2419 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2420 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2421 365, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2422 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2423 "Accounting-Input-Packets", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2424 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2425 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2426 AVP_TYPE_UNSIGNED64 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2427 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2428 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2429 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2430
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2431 /* Accounting-Output-Packets */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2432 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2433 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2434 The Accounting-Output-Packets (AVP Code 366) is of type Unsigned64
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2435 and contains the number of IP packets sent to the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2436
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2437 For NAS usage, this AVP indicates how many packets have been sent to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2438 the port over the course of a session being provided to a Framed
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2439 User. It can only be present in ACR messages with an Accounting-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2440 Record-Type of INTERIM_RECORD or STOP_RECORD.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2441 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2442 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2443 366, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2444 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2445 "Accounting-Output-Packets", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2446 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2447 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2448 AVP_TYPE_UNSIGNED64 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2449 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2450 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2451 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2452
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2453 /* Acct-Session-Time */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2454 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2455 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2456 The Acct-Session-Time AVP (AVP Code 46) is of type Unsigned32 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2457 indicates the length of the current session in seconds. It can only
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2458 be present in ACR messages with an Accounting-Record-Type of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2459 INTERIM_RECORD or STOP_RECORD.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2460 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2461 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2462 46, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2463 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2464 "Acct-Session-Time", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2465 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2466 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2467 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2468 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2469 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2470 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2471
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2472 /* Acct-Authentic */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2473 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2474 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2475 The Acct-Authentic AVP (AVP Code 45) is of type Enumerated and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2476 specifies how the user was authenticated. The supported values are
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2477 listed in [RADIUSTypes].
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2478 Sub-registry: Values for RADIUS Attribute 45, Acct-Authentic
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2479 Reference: [RFC2866]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2480 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2481 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2482 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Acct-Authentic)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2483 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2484 enumval_def_u32( 1, "RADIUS"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2485 enumval_def_u32( 2, "Local"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2486 enumval_def_u32( 3, "Remote"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2487 enumval_def_u32( 4, "Diameter")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2488 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2489 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2490 45, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2491 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2492 "Acct-Authentic", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2493 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2494 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2495 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2496 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2497 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2498 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2499 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2500 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2501 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2502 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2503 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2504 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2505
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2506 /* Accounting-Auth-Method */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2507 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2508 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2509 The Accounting-Auth-Method AVP (AVP Code 406) is of type Enumerated.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2510 A NAS MAY include this AVP in an Accounting-Request message to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2511 indicate the method used to authenticate the user. (Note that this
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2512 is equivalent to the RADIUS MS-Acct-Auth-Type VSA attribute).
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2513
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2514 The following values are defined:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2515
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2516 1 PAP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2517 2 CHAP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2518 3 MS-CHAP-1
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2519 4 MS-CHAP-2
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2520 5 EAP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2521 7 None
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2522 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2523 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2524 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Accounting-Auth-Method)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2525 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2526 enumval_def_u32( 1, "PAP"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2527 enumval_def_u32( 2, "CHAP"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2528 enumval_def_u32( 3, "MS-CHAP-1"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2529 enumval_def_u32( 4, "MS-CHAP-2"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2530 enumval_def_u32( 5, "EAP"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2531 enumval_def_u32( 7, "None")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2532 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2533 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2534 406, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2535 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2536 "Accounting-Auth-Method", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2537 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2538 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2539 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2540 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2541 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2542 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2543 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2544 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2545 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2546 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2547 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2548 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2549
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2550 /* Acct-Delay-Time */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2551 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2552 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2553 The Acct-Delay-Time AVP (AVP Code 41) is of type Unsigned32 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2554 indicates the number of seconds the Diameter client has been trying
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2555 to send the Accounting-Request (ACR). The accounting server may
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2556 subtract this value from the time when the ACR arrives at the server
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2557 to calculate the approximate time of the event that caused the ACR to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2558 be generated.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2559
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2560 This AVP is not used for retransmissions at the transport level (TCP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2561 or SCTP). Rather, it may be used when an ACR command cannot be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2562 transmitted because there is no appropriate peer to transmit it to or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2563 was rejected because it could not be delivered. In these cases, the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2564 command MAY be buffered and transmitted later, when an appropriate
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2565 peer-connection is available or after sufficient time has passed that
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2566 the destination-host may be reachable and operational. If the ACR is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2567 resent in this way, the Acct-Delay-Time AVP SHOULD be included. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2568 value of this AVP indicates the number of seconds that elapsed
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2569 between the time of the first attempt at transmission and the current
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2570 attempt.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2571 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2572 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2573 41, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2574 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2575 "Acct-Delay-Time", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2576 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2577 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2578 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2579 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2580 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2581 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2582
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2583 /* Acct-Link-Count */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2584 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2585 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2586 The Acct-Link-Count AVP (AVP Code 51) is of type Unsigned32 and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2587 indicates the total number of links that have been active (current or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2588 closed) in a given multilink session at the time the accounting
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2589 record is generated. This AVP MAY be included in Accounting-Requests
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2590 for any session that may be part of a multilink service.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2591
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2592 The Acct-Link-Count AVP may be used to make it easier for an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2593 accounting server to know when it has all the records for a given
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2594 multilink service. When the number of Accounting-Requests received
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2595 with Accounting-Record-Type = STOP_RECORD and with the same Acct-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2596 Multi-Session-Id and unique Session-Ids equals the largest value of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2597 Acct-Link-Count seen in those Accounting-Requests, all STOP_RECORD
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2598 Accounting-Requests for that multilink service have been received.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2599
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2600 The following example, showing eight Accounting-Requests, illustrates
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2601 how the Acct-Link-Count AVP is used. In the table below, only the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2602 relevant AVPs are shown, although additional AVPs containing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2603 accounting information will be present in the Accounting-Requests.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2604
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2605 Acct-Multi- Accounting- Acct-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2606 Session-Id Session-Id Record-Type Link-Count
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2607 --------------------------------------------------------
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2608 "...10" "...10" START_RECORD 1
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2609 "...10" "...11" START_RECORD 2
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2610 "...10" "...11" STOP_RECORD 2
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2611 "...10" "...12" START_RECORD 3
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2612 "...10" "...13" START_RECORD 4
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2613 "...10" "...12" STOP_RECORD 4
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2614 "...10" "...13" STOP_RECORD 4
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2615 "...10" "...10" STOP_RECORD 4
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2616
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2617 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2618 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2619 51, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2620 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2621 "Acct-Link-Count", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2622 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2623 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2624 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2625 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2626 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2627 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2628
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2629 /* Acct-Tunnel-Connection */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2630 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2631 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2632 The Acct-Tunnel-Connection AVP (AVP Code 68) is of type OctetString
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2633 and contains the identifier assigned to the tunnel session. This
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2634 AVP, along with the Tunnel-Client-Endpoint and Tunnel-Server-Endpoint
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2635 AVPs, may be used to provide a means to uniquely identify a tunnel
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2636 session for auditing purposes.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2637
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2638 The format of the identifier in this AVP depends upon the value of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2639 the Tunnel-Type AVP. For example, to identify an L2TP tunnel
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2640 connection fully, the L2TP Tunnel Id and Call Id might be encoded in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2641 this field. The exact encoding of this field is implementation
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2642 dependent.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2643 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2644 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2645 68, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2646 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2647 "Acct-Tunnel-Connection", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2648 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2649 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2650 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2651 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2652 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2653 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2654
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2655 /* Acct-Tunnel-Packets-Lost */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2656 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2657 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2658 The Acct-Tunnel-Packets-Lost AVP (AVP Code 86) is of type Unsigned32
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2659 and contains the number of packets lost on a given link.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2660 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2661 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2662 86, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2663 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2664 "Acct-Tunnel-Packets-Lost", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2665 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2666 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2667 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2668 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2669 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2670 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2671
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2672 /***********************************
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2673 * Compatibility with RADIUS AVPs *
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2674 ***********************************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2675 /* NAS-Identifier */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2676 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2677 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2678 The NAS-Identifier AVP (AVP Code 32) [RADIUS] is of type UTF8String
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2679 and contains the identity of the NAS providing service to the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2680 This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2681 When this AVP is present, the Origin-Host AVP identifies the NAS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2682 providing service to the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2683
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2684 In RADIUS it would be possible for a rogue NAS to forge the NAS-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2685 Identifier attribute. Diameter/RADIUS translation agents SHOULD
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2686 attempt to check a received NAS-Identifier attribute against the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2687 source address of the RADIUS packet, by doing an A/AAAA RR query. If
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2688 the NAS-Identifier attribute contains an FQDN, then such a query
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2689 would resolve to an IP address matching the source address. However,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2690 the NAS-Identifier attribute is not required to contain an FQDN, so
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2691 such a query could fail. If it fails, an error should be logged, but
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2692 no action should be taken, other than a reverse lookup on the source
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2693 address and insert the resulting FQDN into the Route-Record AVP.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2694
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2695 Diameter agents and servers SHOULD check whether a NAS-Identifier AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2696 corresponds to an entry in the Route-Record AVP. If no match is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2697 found, then an error is logged, but no other action is taken.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2698 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2699 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2700 32, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2701 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2702 "NAS-Identifier", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2703 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2704 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2705 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2706 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2707 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2708 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2709
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2710 /* NAS-IP-Address */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2711 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2712 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2713 The NAS-IP-Address AVP (AVP Code 4) [RADIUS] is of type OctetString
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2714 and contains the IP Address of the NAS providing service to the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2715 This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2716 When this AVP is present, the Origin-Host AVP identifies the NAS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2717 providing service to the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2718
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2719 In RADIUS it would be possible for a rogue NAS to forge the NAS-IP-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2720 Address attribute value. Diameter/RADIUS translation agents MUST
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2721 check a received NAS-IP-Address or NAS-IPv6-Address attribute against
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2722 the source address of the RADIUS packet. If they do not match and
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2723 the Diameter/RADIUS translation agent does not know whether the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2724 packet was sent by a RADIUS proxy or NAS (e.g., no Proxy-State
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2725 attribute), then by default it is assumed that the source address
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2726 corresponds to a RADIUS proxy, and that the NAS Address is behind
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2727 that proxy, potentially with some additional RADIUS proxies in
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2728 between. The Diameter/RADIUS translation agent MUST insert entries
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2729 in the Route-Record AVP corresponding to the apparent route. This
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2730 implies doing a reverse lookup on the source address and NAS-IP-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2731 Address or NAS-IPv6-Address attributes to determine the corresponding
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2732 FQDNs.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2733
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2734 If the source address and the NAS-IP-Address or NAS-IPv6-Address do
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2735 not match, and the Diameter/RADIUS translation agent knows that it is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2736 talking directly to the NAS (e.g., there are no RADIUS proxies
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2737 between it and the NAS), then the error should be logged, and the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2738 packet MUST be discarded.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2739
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2740 Diameter agents and servers MUST check whether the NAS-IP-Address AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2741 corresponds to an entry in the Route-Record AVP. This is done by
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2742 doing a reverse lookup (PTR RR) for the NAS-IP-Address to retrieve
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2743 the corresponding FQDN, and by checking for a match with the Route-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2744 Record AVP. If no match is found, then an error is logged, but no
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2745 other action is taken.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2746 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2747 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2748 4, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2749 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2750 "NAS-IP-Address", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2751 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2752 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2753 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2754 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2755 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2756 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2757
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2758 /* NAS-IPv6-Address */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2759 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2760 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2761 The NAS-IPv6-Address AVP (AVP Code 95) [RADIUSIPv6] is of type
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2762 OctetString and contains the IPv6 Address of the NAS providing
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2763 service to the user. This AVP SHOULD only be added by a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2764 RADIUS/Diameter Translation Agent. When this AVP is present, the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2765 Origin-Host AVP identifies the NAS providing service to the user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2766
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2767 In RADIUS it would be possible for a rogue NAS to forge the NAS-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2768 IPv6-Address attribute. Diameter/RADIUS translation agents MUST
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2769 check a received NAS-IPv6-Address attribute against the source
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2770 address of the RADIUS packet. If they do not match and the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2771 Diameter/RADIUS translation agent does not know whether the packet
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2772 was sent by a RADIUS proxy or NAS (e.g., no Proxy-State attribute),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2773 then by default it is assumed that the source address corresponds to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2774 a RADIUS proxy, and that the NAS-IPv6-Address is behind that proxy,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2775 potentially with some additional RADIUS proxies in between. The
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2776 Diameter/RADIUS translation agent MUST insert entries in the Route-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2777 Record AVP corresponding to the apparent route. This implies doing a
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2778 reverse lookup on the source address and NAS-IPv6-Address attributes
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2779 to determine the corresponding FQDNs.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2780
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2781 If the source address and the NAS-IPv6-Address do not match, and the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2782 Diameter/RADIUS translation agent knows that it is talking directly
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2783 to the NAS (e.g., there are no RADIUS proxies between it and the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2784 NAS), then the error should be logged, and the packet MUST be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2785 discarded.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2786
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2787 Diameter agents and servers MUST check whether the NAS-IPv6-Address
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2788 AVP corresponds to an entry in the Route-Record AVP. This is done by
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2789 doing a reverse lookup (PTR RR) for the NAS-IPv6-Address to retrieve
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2790 the corresponding FQDN, and by checking for a match with the Record-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2791 Route AVP. If no match is found, then an error is logged, but no
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2792 other action is taken.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2793 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2794 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2795 95, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2796 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2797 "NAS-IPv6-Address", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2798 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2799 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2800 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2801 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2802 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2803 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2804
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2805 /* State */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2806 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2807 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2808 The State AVP (AVP Code 24) [RADIUS] is of type OctetString and has
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2809 two uses in the Diameter NAS application.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2810
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2811 The State AVP MAY be sent by a Diameter Server to a NAS in an AA-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2812 Response command that contains a Result-Code of
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2813 DIAMETER_MULTI_ROUND_AUTH. If so, the NAS MUST return it unmodified
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2814 in the subsequent AA-Request command.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2815
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2816 The State AVP MAY also be sent by a Diameter Server to a NAS in an
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2817 AA-Response command that also includes a Termination-Action AVP with
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2818 the value of AA-REQUEST. If the NAS performs the Termination-Action
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2819 by sending a new AA-Request command upon termination of the current
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2820 service, it MUST return the State AVP unmodified in the new request
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2821 command.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2822
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2823 In either usage, the NAS MUST NOT interpret the AVP locally. Usage
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2824 of the State AVP is implementation dependent.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2825 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2826 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2827 24, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2828 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2829 "State", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2830 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2831 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2832 AVP_TYPE_OCTETSTRING /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2833 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2834 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2835 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2836
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2837 /* Termination-Cause mapping */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2838 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2839
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2840 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2841 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2842 enumval_def_u32(11, "[RADIUS] User Request"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2843 enumval_def_u32(12, "[RADIUS] Lost Carrier"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2844 enumval_def_u32(13, "[RADIUS] Lost Service"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2845 enumval_def_u32(14, "[RADIUS] Idle Timeout"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2846 enumval_def_u32(15, "[RADIUS] Session Timeout"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2847 enumval_def_u32(16, "[RADIUS] Admin Reset"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2848 enumval_def_u32(17, "[RADIUS] Admin Reboot"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2849 enumval_def_u32(18, "[RADIUS] Port Error"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2850 enumval_def_u32(19, "[RADIUS] NAS Error"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2851 enumval_def_u32(20, "[RADIUS] NAS Request"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2852 enumval_def_u32(21, "[RADIUS] NAS Reboot"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2853 enumval_def_u32(22, "[RADIUS] Port Unneeded"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2854 enumval_def_u32(23, "[RADIUS] Port Preempted"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2855 enumval_def_u32(24, "[RADIUS] Port Suspended"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2856 enumval_def_u32(25, "[RADIUS] Service Unavailable"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2857 enumval_def_u32(26, "[RADIUS] Callback"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2858 enumval_def_u32(27, "[RADIUS] User Error"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2859 enumval_def_u32(28, "[RADIUS] Host Request"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2860 enumval_def_u32(29, "[RADIUS] Supplicant Restart"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2861 enumval_def_u32(30, "[RADIUS] Reauthentication Failure"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2862 enumval_def_u32(31, "[RADIUS] Port Reinit"),
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2863 enumval_def_u32(32, "[RADIUS] Port Disabled")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2864 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2865 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2866
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2867 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Enumerated(Termination-Cause)", &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2868 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2869 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2870 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2871
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2872 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2873
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2874 /* Origin-AAA-Protocol */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2875 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2876 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2877 The Origin-AAA-Protocol AVP (AVP Code 408) is of the type Enumerated
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2878 and should be inserted in a Diameter message translated by a gateway
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2879 system from another AAA protocol, such as RADIUS. It identifies the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2880 source protocol of the message to the Diameter system receiving the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2881 message.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2882
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2883 The supported values are:
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2884
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2885 1 RADIUS
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2886 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2887 struct dict_object *type;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2888 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Origin-AAA-Protocol)" , NULL, NULL};
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2889 struct dict_enumval_data tvals[] = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2890 enumval_def_u32( 1, "RADIUS")
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2891 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2892 struct dict_avp_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2893 408, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2894 0, /* Vendor */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2895 "Origin-AAA-Protocol", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2896 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2897 AVP_FLAG_MANDATORY, /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2898 AVP_TYPE_UNSIGNED32 /* base type of data */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2899 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2900 int i;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2901 /* Create the Enumerated type, enumerated values, and the AVP */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2902 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2903 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2904 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2905 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2906 CHECK_dict_new( DICT_AVP, &data , type, NULL);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2907 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2908
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2909 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2910
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2911 /********************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2912 /* Commands section */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2913 /********************/
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2914 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2915 /* To avoid defining global variables for all the AVP that we use here, we do search the dictionary in each sub-block.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2916 * This is far from optimal, but the code is clearer like this, and the time it requires at execution is not noticeable.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2917 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2918
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2919 /* AA-Request (AAR) Command */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2920 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2921 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2922 The AA-Request (AAR), which is indicated by setting the Command-Code
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2923 field to 265 and the 'R' bit in the Command Flags field, is used to
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2924 request authentication and/or authorization for a given NAS user.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2925 The type of request is identified through the Auth-Request-Type AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2926 [BASE]. The recommended value for most RADIUS interoperabily
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2927 situations is AUTHORIZE_AUTHENTICATE.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2928
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2929 If Authentication is requested, the User-Name attribute SHOULD be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2930 present, as well as any additional authentication AVPs that would
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2931 carry the password information. A request for authorization SHOULD
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2932 only include the information from which the authorization will be
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2933 performed, such as the User-Name, Called-Station-Id, or Calling-
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2934 Station-Id AVPs. All requests SHOULD contain AVPs uniquely
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2935 identifying the source of the call, such as Origin-Host and NAS-Port.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2936 Certain networks MAY use different AVPs for authorization purposes.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2937 A request for authorization will include some AVPs defined in section
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2938 6.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2939
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2940 It is possible for a single session to be authorized first and then
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2941 for an authentication request to follow.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2942
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2943 This AA-Request message MAY be the result of a multi-round
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2944 authentication exchange, which occurs when the AA-Answer message is
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2945 received with the Result-Code AVP set to DIAMETER_MULTI_ROUND_AUTH.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2946 A subsequent AAR message SHOULD be sent, with the User-Password AVP
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2947 that includes the user's response to the prompt, and MUST include any
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2948 State AVPs that were present in the AAA message.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2949
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2950 Message Format
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2951 <AA-Request> ::= < Diameter Header: 265, REQ, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2952 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2953 { Auth-Application-Id }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2954 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2955 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2956 { Destination-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2957 { Auth-Request-Type }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2958 [ Destination-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2959 [ NAS-Identifier ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2960 [ NAS-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2961 [ NAS-IPv6-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2962 [ NAS-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2963 [ NAS-Port-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2964 [ NAS-Port-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2965 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2966 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2967 [ Port-Limit ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2968 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2969 [ User-Password ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2970 [ Service-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2971 [ State ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2972 [ Authorization-Lifetime ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2973 [ Auth-Grace-Period ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2974 [ Auth-Session-State ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2975 [ Callback-Number ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2976 [ Called-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2977 [ Calling-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2978 [ Originating-Line-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2979 [ Connect-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2980 [ CHAP-Auth ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2981 [ CHAP-Challenge ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2982 * [ Framed-Compression ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2983 [ Framed-Interface-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2984 [ Framed-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2985 * [ Framed-IPv6-Prefix ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2986 [ Framed-IP-Netmask ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2987 [ Framed-MTU ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2988 [ Framed-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2989 [ ARAP-Password ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2990 [ ARAP-Security ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2991 * [ ARAP-Security-Data ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2992 * [ Login-IP-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2993 * [ Login-IPv6-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2994 [ Login-LAT-Group ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2995 [ Login-LAT-Node ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2996 [ Login-LAT-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2997 [ Login-LAT-Service ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2998 * [ Tunneling ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2999 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3000 * [ Route-Record ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3001 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3002 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3003 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3004 struct dict_cmd_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3005 265, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3006 "AA-Request", /* Name */
658
f198d16fa7f4 Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 523
diff changeset
3007 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3008 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3009 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3010 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3011 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3012 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3013 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3014 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3015 ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3016 ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3017 ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3018 ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3019 ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3020 ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3021 ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3022 ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3023 ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3024 ,{ "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3025 ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3026 ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3027 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3028 ,{ "User-Password", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3029 ,{ "Service-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3030 ,{ "State", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3031 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3032 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3033 ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3034 ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3035 ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3036 ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3037 ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3038 ,{ "Connect-Info", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3039 ,{ "CHAP-Auth", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3040 ,{ "CHAP-Challenge", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3041 ,{ "Framed-Compression", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3042 ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3043 ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3044 ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3045 ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3046 ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3047 ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3048 ,{ "ARAP-Password", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3049 ,{ "ARAP-Security", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3050 ,{ "ARAP-Security-Data", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3051 ,{ "Login-IP-Host", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3052 ,{ "Login-IPv6-Host", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3053 ,{ "Login-LAT-Group", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3054 ,{ "Login-LAT-Node", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3055 ,{ "Login-LAT-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3056 ,{ "Login-LAT-Service", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3057 ,{ "Tunneling", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3058 ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3059 ,{ "Route-Record", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3060 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3061
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3062 CHECK_dict_new( DICT_COMMAND, &data , nasreq, &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3063 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3064 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3065
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3066 /* AA-Answer (AAA) Command */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3067 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3068 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3069 The AA-Answer (AAA) message is indicated by setting the Command-Code
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3070 field to 265 and clearing the 'R' bit in the Command Flags field. It
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3071 is sent in response to the AA-Request (AAR) message. If
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3072 authorization was requested, a successful response will include the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3073 authorization AVPs appropriate for the service being provided, as
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3074 defined in section 6.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3075
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3076 For authentication exchanges requiring more than a single round trip,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3077 the server MUST set the Result-Code AVP to DIAMETER_MULTI_ROUND_AUTH.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3078 An AAA message with this result code MAY include one Reply-Message or
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3079 more and MAY include zero or one State AVPs.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3080
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3081 If the Reply-Message AVP was present, the network access server
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3082 SHOULD send the text to the user's client to display to the user,
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3083 instructing the client to prompt the user for a response. For
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3084 example, this capability can be achieved in PPP via PAP. If the
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3085 access client is unable to prompt the user for a new response, it
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3086 MUST treat the AA-Answer (AAA) with the Reply-Message AVP as an error
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3087 and deny access.
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3088
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3089 Message Format
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3090
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3091 <AA-Answer> ::= < Diameter Header: 265, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3092 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3093 { Auth-Application-Id }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3094 { Auth-Request-Type }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3095 { Result-Code }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3096 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3097 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3098 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3099 [ Service-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3100 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3101 * [ Configuration-Token ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3102 [ Acct-Interim-Interval ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3103 [ Error-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3104 [ Error-Reporting-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3105 * [ Failed-AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3106 [ Idle-Timeout ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3107 [ Authorization-Lifetime ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3108 [ Auth-Grace-Period ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3109 [ Auth-Session-State ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3110 [ Re-Auth-Request-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3111 [ Multi-Round-Time-Out ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3112 [ Session-Timeout ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3113 [ State ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3114 * [ Reply-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3115 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3116 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3117 * [ Filter-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3118 [ Password-Retry ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3119 [ Port-Limit ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3120 [ Prompt ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3121 [ ARAP-Challenge-Response ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3122 [ ARAP-Features ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3123 [ ARAP-Security ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3124 * [ ARAP-Security-Data ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3125 [ ARAP-Zone-Access ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3126 [ Callback-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3127 [ Callback-Number ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3128 [ Framed-Appletalk-Link ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3129 * [ Framed-Appletalk-Network ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3130 [ Framed-Appletalk-Zone ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3131 * [ Framed-Compression ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3132 [ Framed-Interface-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3133 [ Framed-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3134 * [ Framed-IPv6-Prefix ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3135 [ Framed-IPv6-Pool ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3136 * [ Framed-IPv6-Route ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3137 [ Framed-IP-Netmask ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3138 * [ Framed-Route ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3139 [ Framed-Pool ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3140 [ Framed-IPX-Network ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3141 [ Framed-MTU ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3142 [ Framed-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3143 [ Framed-Routing ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3144 * [ Login-IP-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3145 * [ Login-IPv6-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3146 [ Login-LAT-Group ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3147 [ Login-LAT-Node ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3148 [ Login-LAT-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3149 [ Login-LAT-Service ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3150 [ Login-Service ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3151 [ Login-TCP-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3152 * [ NAS-Filter-Rule ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3153 * [ QoS-Filter-Rule ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3154 * [ Tunneling ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3155 * [ Redirect-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3156 [ Redirect-Host-Usage ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3157 [ Redirect-Max-Cache-Time ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3158 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3159 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3160 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3161 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3162 struct dict_cmd_data data = {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3163 265, /* Code */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3164 "AA-Answer", /* Name */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3165 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3166 CMD_FLAG_PROXIABLE /* Fixed flag values */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3167 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3168 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3169 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3170 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3171 ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3172 ,{ "Result-Code", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3173 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3174 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3175 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3176 ,{ "Service-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3177 ,{ "Class", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3178 ,{ "Configuration-Token", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3179 ,{ "Acct-Interim-Interval", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3180 ,{ "Error-Message", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3181 ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3182 ,{ "Failed-AVP", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3183 ,{ "Idle-Timeout", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3184 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3185 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3186 ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3187 ,{ "Re-Auth-Request-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3188 ,{ "Multi-Round-Time-Out", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3189 ,{ "Session-Timeout", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3190 ,{ "State", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3191 ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3192 ,{ "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3193 ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3194 ,{ "Filter-Id", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3195 ,{ "Password-Retry", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3196 ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3197 ,{ "Prompt", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3198 ,{ "ARAP-Challenge-Response", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3199 ,{ "ARAP-Features", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3200 ,{ "ARAP-Security", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3201 ,{ "ARAP-Security-Data", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3202 ,{ "ARAP-Zone-Access", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3203 ,{ "Callback-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3204 ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3205 ,{ "Framed-AppleTalk-Link", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3206 ,{ "Framed-AppleTalk-Network", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3207 ,{ "Framed-AppleTalk-Zone", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3208 ,{ "Framed-Compression", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3209 ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3210 ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3211 ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3212 ,{ "Framed-IPv6-Pool", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3213 ,{ "Framed-IPv6-Route", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3214 ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3215 ,{ "Framed-Route", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3216 ,{ "Framed-Pool", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3217 ,{ "Framed-IPX-Network", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3218 ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3219 ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3220 ,{ "Framed-Routing", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3221 ,{ "Login-IP-Host", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3222 ,{ "Login-IPv6-Host", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3223 ,{ "Login-LAT-Group", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3224 ,{ "Login-LAT-Node", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3225 ,{ "Login-LAT-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3226 ,{ "Login-LAT-Service", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3227 ,{ "Login-Service", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3228 ,{ "Login-TCP-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3229 ,{ "NAS-Filter-Rule", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3230 ,{ "QoS-Filter-Rule", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3231 ,{ "Tunneling", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3232 ,{ "Redirect-Host", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3233 ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3234 ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3235 ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3236 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3237
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3238 CHECK_dict_new( DICT_COMMAND, &data , nasreq, &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3239 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3240 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3241
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3242 /* Re-Auth-Request */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3243 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3244 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3245 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3246
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3247 <RA-Request> ::= < Diameter Header: 258, REQ, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3248 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3249 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3250 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3251 { Destination-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3252 { Destination-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3253 { Auth-Application-Id }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3254 { Re-Auth-Request-Type }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3255 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3256 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3257 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3258 [ NAS-Identifier ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3259 [ NAS-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3260 [ NAS-IPv6-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3261 [ NAS-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3262 [ NAS-Port-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3263 [ NAS-Port-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3264 [ Service-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3265 [ Framed-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3266 [ Framed-IPv6-Prefix ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3267 [ Framed-Interface-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3268 [ Called-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3269 [ Calling-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3270 [ Originating-Line-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3271 [ Acct-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3272 [ Acct-Multi-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3273 [ State ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3274 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3275 [ Reply-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3276 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3277 * [ Route-Record ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3278 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3279 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3280 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3281 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3282 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3283 ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3284 ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3285 ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3286 ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3287 ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3288 ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3289 ,{ "Service-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3290 ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3291 ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3292 ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3293 ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3294 ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3295 ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3296 ,{ "Acct-Session-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3297 ,{ "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3298 ,{ "State", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3299 ,{ "Class", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3300 ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3301 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3302
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3303 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Request", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3304 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3305 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3306
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3307 /* Re-Auth-Answer */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3308 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3309 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3310 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3311
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3312
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3313 <RA-Answer> ::= < Diameter Header: 258, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3314 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3315 { Result-Code }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3316 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3317 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3318 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3319 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3320 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3321 [ Error-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3322 [ Error-Reporting-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3323 * [ Failed-AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3324 * [ Redirected-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3325 [ Redirected-Host-Usage ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3326 [ Redirected-Host-Cache-Time ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3327 [ Service-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3328 * [ Configuration-Token ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3329 [ Idle-Timeout ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3330 [ Authorization-Lifetime ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3331 [ Auth-Grace-Period ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3332 [ Re-Auth-Request-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3333 [ State ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3334 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3335 * [ Reply-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3336 [ Prompt ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3337 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3338 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3339 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3340 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3341 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3342 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3343 ,{ "Service-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3344 ,{ "Configuration-Token", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3345 ,{ "Idle-Timeout", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3346 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3347 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3348 ,{ "Re-Auth-Request-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3349 ,{ "State", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3350 ,{ "Class", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3351 ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3352 ,{ "Prompt", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3353 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3354
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3355 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Answer", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3356 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3357 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3358
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3359 /* Session-Termination-Request */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3360 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3361 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3362 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3363
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3364
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3365 <ST-Request> ::= < Diameter Header: 275, REQ, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3366 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3367 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3368 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3369 { Destination-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3370 { Auth-Application-Id }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3371 { Termination-Cause }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3372 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3373 [ Destination-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3374 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3375 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3376 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3377 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3378 * [ Route-Record ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3379 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3380 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3381 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3382 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3383 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3384 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3385
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3386 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Request", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3387 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3388 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3389
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3390 /* Session-Termination-Answer */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3391 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3392 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3393 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3394
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3395 <ST-Answer> ::= < Diameter Header: 275, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3396 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3397 { Result-Code }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3398 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3399 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3400 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3401 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3402 [ Error-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3403 [ Error-Reporting-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3404 * [ Failed-AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3405 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3406 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3407 * [ Redirect-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3408 [ Redirect-Host-Usase ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3409 [ Redirect-Max-Cache-Time ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3410 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3411 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3412 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3413 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3414 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3415 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3416 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3417
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3418 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Answer", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3419 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3420 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3421
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3422 /* Abort-Session-Request */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3423 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3424 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3425 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3426
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3427 <AS-Request> ::= < Diameter Header: 274, REQ, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3428 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3429 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3430 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3431 { Destination-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3432 { Destination-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3433 { Auth-Application-Id }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3434 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3435 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3436 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3437 [ NAS-Identifier ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3438 [ NAS-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3439 [ NAS-IPv6-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3440 [ NAS-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3441 [ NAS-Port-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3442 [ NAS-Port-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3443 [ Service-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3444 [ Framed-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3445 [ Framed-IPv6-Prefix ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3446 [ Framed-Interface-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3447 [ Called-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3448 [ Calling-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3449 [ Originating-Line-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3450 [ Acct-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3451 [ Acct-Multi-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3452 [ State ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3453 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3454 * [ Reply-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3455 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3456 * [ Route-Record ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3457 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3458
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3459 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3460 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3461 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3462 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3463 ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3464 ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3465 ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3466 ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3467 ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3468 ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3469 ,{ "Service-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3470 ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3471 ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3472 ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3473 ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3474 ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3475 ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3476 ,{ "Acct-Session-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3477 ,{ "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3478 ,{ "State", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3479 ,{ "Class", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3480 ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3481 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3482
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3483 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Abort-Session-Request", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3484 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3485 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3486
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3487 /* Abort-Session-Answer */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3488 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3489 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3490 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3491
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3492 <AS-Answer> ::= < Diameter Header: 274, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3493 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3494 { Result-Code }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3495 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3496 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3497 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3498 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3499 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3500 [ State]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3501 [ Error-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3502 [ Error-Reporting-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3503 * [ Failed-AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3504 * [ Redirected-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3505 [ Redirected-Host-Usage ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3506 [ Redirected-Max-Cache-Time ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3507 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3508 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3509 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3510 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3511 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3512 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
750
80cfbacdee40 Fix buggy requirement in Abort-Session-Answer ABNF (thanks again Vjacheslav)
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 740
diff changeset
3513 ,{ "State", RULE_OPTIONAL, -1, 1 }
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3514 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3515
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3516 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Abort-Session-Answer", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3517 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3518 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3519
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3520 /* Accounting-Request */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3521 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3522 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3523 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3524
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3525 <AC-Request> ::= < Diameter Header: 271, REQ, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3526 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3527 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3528 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3529 { Destination-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3530 { Accounting-Record-Type }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3531 { Accounting-Record-Number }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3532 [ Acct-Application-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3533 [ Vendor-Specific-Application-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3534 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3535 [ Accounting-Sub-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3536 [ Acct-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3537 [ Acct-Multi-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3538 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3539 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3540 [ Destination-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3541 [ Event-Timestamp ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3542 [ Acct-Delay-Time ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3543 [ NAS-Identifier ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3544 [ NAS-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3545 [ NAS-IPv6-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3546 [ NAS-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3547 [ NAS-Port-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3548 [ NAS-Port-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3549 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3550 [ Service-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3551 [ Termination-Cause ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3552 [ Accounting-Input-Octets ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3553 [ Accounting-Input-Packets ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3554 [ Accounting-Output-Octets ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3555 [ Accounting-Output-Packets ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3556 [ Acct-Authentic ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3557 [ Accounting-Auth-Method ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3558 [ Acct-Link-Count ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3559 [ Acct-Session-Time ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3560 [ Acct-Tunnel-Connection ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3561 [ Acct-Tunnel-Packets-Lost ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3562 [ Callback-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3563 [ Callback-Number ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3564 [ Called-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3565 [ Calling-Station-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3566 * [ Connection-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3567 [ Originating-Line-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3568 [ Authorization-Lifetime ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3569 [ Session-Timeout ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3570 [ Idle-Timeout ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3571 [ Port-Limit ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3572 [ Accounting-Realtime-Required ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3573 [ Acct-Interim-Interval ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3574 * [ Filter-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3575 * [ NAS-Filter-Rule ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3576 * [ Qos-Filter-Rule ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3577 [ Framed-AppleTalk-Link ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3578 [ Framed-AppleTalk-Network ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3579 [ Framed-AppleTalk-Zone ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3580 [ Framed-Compression ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3581 [ Framed-Interface-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3582 [ Framed-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3583 [ Framed-IP-Netmask ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3584 * [ Framed-IPv6-Prefix ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3585 [ Framed-IPv6-Pool ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3586 * [ Framed-IPv6-Route ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3587 [ Framed-IPX-Network ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3588 [ Framed-MTU ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3589 [ Framed-Pool ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3590 [ Framed-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3591 * [ Framed-Route ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3592 [ Framed-Routing ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3593 * [ Login-IP-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3594 * [ Login-IPv6-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3595 [ Login-LAT-Group ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3596 [ Login-LAT-Node ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3597 [ Login-LAT-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3598 [ Login-LAT-Service ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3599 [ Login-Service ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3600 [ Login-TCP-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3601 * [ Tunneling ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3602 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3603 * [ Route-Record ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3604 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3605 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3606 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3607 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3608 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3609 ,{ "Acct-Delay-Time", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3610 ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3611 ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3612 ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3613 ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3614 ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3615 ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3616 ,{ "Class", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3617 ,{ "Service-Type", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3618 ,{ "Termination-Cause", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3619 ,{ "Accounting-Input-Octets", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3620 ,{ "Accounting-Input-Packets", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3621 ,{ "Accounting-Output-Octets", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3622 ,{ "Accounting-Output-Packets", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3623 ,{ "Acct-Authentic", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3624 ,{ "Accounting-Auth-Method", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3625 ,{ "Acct-Link-Count", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3626 ,{ "Acct-Session-Time", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3627 ,{ "Acct-Tunnel-Connection", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3628 ,{ "Acct-Tunnel-Packets-Lost", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3629 ,{ "Callback-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3630 ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3631 ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3632 ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3633 ,{ "Connect-Info", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3634 ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3635 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3636 ,{ "Session-Timeout", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3637 ,{ "Idle-Timeout", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3638 ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3639 ,{ "Filter-Id", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3640 ,{ "NAS-Filter-Rule", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3641 ,{ "QoS-Filter-Rule", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3642 ,{ "Framed-AppleTalk-Link", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3643 ,{ "Framed-AppleTalk-Network", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3644 ,{ "Framed-AppleTalk-Zone", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3645 ,{ "Framed-Compression", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3646 ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3647 ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3648 ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3649 ,{ "Framed-IPv6-Pool", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3650 ,{ "Framed-IPv6-Route", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3651 ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3652 ,{ "Framed-Route", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3653 ,{ "Framed-Pool", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3654 ,{ "Framed-IPX-Network", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3655 ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3656 ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3657 ,{ "Framed-Routing", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3658 ,{ "Login-IP-Host", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3659 ,{ "Login-IPv6-Host", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3660 ,{ "Login-LAT-Group", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3661 ,{ "Login-LAT-Node", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3662 ,{ "Login-LAT-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3663 ,{ "Login-LAT-Service", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3664 ,{ "Login-Service", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3665 ,{ "Login-TCP-Port", RULE_OPTIONAL, -1, 1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3666 ,{ "Tunneling", RULE_OPTIONAL, -1,-1 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3667 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3668
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3669 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3670 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3671 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3672
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3673 /* Accounting-Answer */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3674 {
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3675 /*
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3676 Add additional rules of the ABNF (compared to Base definition):
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3677
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3678 <AC-Answer> ::= < Diameter Header: 271, PXY >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3679 < Session-Id >
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3680 { Result-Code }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3681 { Origin-Host }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3682 { Origin-Realm }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3683 { Accounting-Record-Type }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3684 { Accounting-Record-Number }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3685 [ Acct-Application-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3686 [ Vendor-Specific-Application-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3687 [ User-Name ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3688 [ Accounting-Sub-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3689 [ Acct-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3690 [ Acct-Multi-Session-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3691 [ Event-Timestamp ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3692 [ Error-Message ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3693 [ Error-Reporting-Host ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3694 * [ Failed-AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3695 [ Origin-AAA-Protocol ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3696 [ Origin-State-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3697 [ NAS-Identifier ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3698 [ NAS-IP-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3699 [ NAS-IPv6-Address ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3700 [ NAS-Port ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3701 [ NAS-Port-Id ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3702 [ NAS-Port-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3703 [ Service-Type ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3704 [ Termination-Cause ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3705 [ Accounting-Realtime-Required ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3706 [ Acct-Interim-Interval ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3707 * [ Class ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3708 * [ Proxy-Info ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3709 * [ Route-Record ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3710 * [ AVP ]
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3711
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3712 */
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3713 struct dict_object * cmd;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3714 struct local_rules_definition rules[] =
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3715 { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 }
281
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3716 ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 }
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3717 ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 }
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3718 ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 }
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3719 ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 }
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3720 ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 }
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3721 ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 }
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3722 ,{ "Service-Type", RULE_OPTIONAL, -1, 1 }
50aaa4028967 Fix erroneous ABNF rules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
3723 ,{ "Termination-Cause", RULE_OPTIONAL, -1, 1 }
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3724 };
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3725
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3726 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Accounting-Answer", &cmd);
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3727 PARSE_loc_rules( rules, cmd );
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3728 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3729 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3730
1120
c473581adff2 Cleanup some traces
Sebastien Decugis <sdecugis@freediameter.net>
parents: 750
diff changeset
3731 LOG_D( "Extension 'Dictionary definitions for NASREQ' initialized");
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3732 return 0;
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3733 }
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3734
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3735 EXTENSION_ENTRY("dict_nasreq", dnr_entry);
"Welcome to our mercurial repository"