1
2##################################
3# Define the various data spaces #
4##################################
5
6$set default atr_ofs=0 atr_size=1	# Defaults for the space(s) that follow
7
8# Note: the server uses space numbers 0-2 below as constants. If you change
9# them, you must update common/constants.h as well.
10
11$add space 0 UDP-PKT atr_size=0
12$add space 1 RAD-PKT atr_size=0		 # The fixed field space 'radius pkt'
13$add space 2 RAD-ATR			 # The attribute space 'radius attrs'
14
15$set default vnd_ofs=2 vnd_size=4	# Defaults for the following spaces
16
17$add space 3 RAD-EXT-VSA single=1	 # Space for VSAs as seen from 'outside'
18
19$set default vnd_ofs=0 vnd_size=0	# Defaults for the following spaces
20	     single=1
21
22$add space 4 RAD-VSA-STD		# Space that applies inside std VSAs
23$add space 5 RAD-VSA-MULTI single=0	 # Space inside multiple-attr VSAs
24$add space 6 RAD-VSA-NONSTD-2 atr_size=2 # Space inside 2-octet attr. VSAs
25$add space 7 RAD-VSA-NONSTD-4 atr_size=4 # Space inside 4-octet attr. VSAs
26$add space 8 RAD-VSA-NMC atr_size=4 	# Space inside USR's "NMC" VSAs
27
28# The space for internal attributes. These never appear in actual packets.
29# This space's number is constant; update constants.h as well if you change it.
30# The same goes for space nrs. 1 and 2 (RAD-PKT and RAD-ATR, resp.), since
31# modules that don't read the dictionary may still need them.
32
33$add space 100 INTERNAL atr_ofs=0 atr_size=0 vnd_ofs=0 vnd_size=0
34
35# Another internal space, designated for use by RadLDAP.
36# See subdicts/dict.str-ldap for details.
37
38$add space 102 STR-LDAP atr_ofs=0 atr_size=0 vnd_ofs=0 vnd_size=0
39
40#########################################
41# Include the table of IANA Vendor PECs #
42#########################################
43
44$include subdicts/dict.vendors
45
46
47##########################################
48# Define the fixed fields and attributes #
49##########################################
50
51
52#
53# Attributes in space 100: internal attributes. Don't need encoding
54# properties.
55#
56
57$set default space=INTERNAL
58
59$include subdicts/dict.internal
60
61
62#
63# Attributes in space 102: string versions of standard attributes for use with
64# RadLDAP. Don't need encoding properties, just for use in the behaviour file.
65#
66
67$set default space=STR-LDAP
68
69$include subdicts/dict.str-ldap
70
71
72#
73# Fields in space 0: the received UDP packet
74#
75
76$set default space=UDP-PKT
77
78$add field 0 RAD-Packet		len_ofs=2 len_size=2 len_adj=0
79				val_ofs=0 val_size=0 val_type=String
80				vendor=x noenc=1 nodec=0 subspace=RAD-PKT
81
82#
83# Fields in space 1: the radius packet
84#
85
86$set default space=RAD-PKT vendor=x noenc=0 nodec=0
87
88$add field 4 RAD-Attributes	val_ofs=20 val_size=-20 val_type=String
89				vendor=x noenc=1 nodec=1 subspace=RAD-ATR
90$add field 3 RAD-Authenticator	val_ofs=4  val_size=16  val_type=String
91$add field 2 RAD-Length		val_ofs=2  val_size=2	val_type=Integer noenc=1
92$add field 1 RAD-Identifier	val_ofs=1  val_size=1	val_type=Integer
93$add field 0 RAD-Code		val_ofs=0  val_size=1	val_type=Integer
94
95# Values
96
97$set default item=RAD-Code
98
99$add value 1 Access-Request
100$add value 2 Access-Accept
101$add value 3 Access-Reject
102$add value 4 Accounting-Request
103$add value 5 Accounting-Response
104$add value 11 Access-Challenge
105$add value 12 Status-Server
106$add value 13 Status-Client
107
108#
109# Attributes in space 2: standard IETF radius attributes
110#
111
112$set default space=RAD-ATR
113
114$include subdicts/dict.stdauth
115$include subdicts/dict.stdacct
116
117$include subdicts/dict.rfc2869
118
119$include subdicts/dict.tunnel
120
121
122#
123# Attributes in space 3: different variations of attribute 26 that
124#			 select particular subspaces
125#
126
127$set default space=RAD-EXT-VSA
128	     len_ofs=1 len_size=1 len_adj=0
129	     val_ofs=6 val_size=-6 val_type=String
130	     nodec=1 noenc=0
131
132# Basically, this says which subspace applies inside the VSAs of particular
133# vendors. Eg. If a vendor uses 2-octet attributes inside their VSAs, you'd use
134# $add attribute 26 VND-2-Octet-VSA vendor=VND subspace=RAD-VSA-NONSTD-2
135
136#$add attribute 26 Strange-VSA	vendor=Strange	subspace=RAD-VSA-NONSTD-2
137#$add attribute 26 Stupid-VSA	vendor=Stupid	subspace=RAD-VSA-NONSTD-2
138#$add attribute 26 Worse-VSA	vendor=Worse	subspace=RAD-VSA-NONSTD-4
139#$add attribute 26 Multi-VSA	vendor=Another	subspace=RAD-VSA-MULTI
140
141$add attribute 26 NMC-VSA	vendor=USR	 subspace=RAD-VSA-NMC
142$add attribute 26 Normal-VSA	vendor=Cisco	 subspace=RAD-VSA-STD
143$add attribute 26 Normal-VSA	vendor=Microsoft subspace=RAD-VSA-STD
144$add attribute 26 Normal-VSA	vendor=x	 subspace=RAD-VSA-STD
145
146
147#
148# Attributes in the vendor specific attribute spaces
149#
150#
151
152# Space 4: Standard VSAs
153
154$set default space=RAD-VSA-STD
155	     len_ofs=1 len_size=1 len_adj=0
156	     val_ofs=2 val_size=-2 val_type=String
157	     nodec=0 noenc=0
158
159$include subdicts/dict.cisco
160$include subdicts/dict.ascend
161#$include subdicts/dict.microsoft
162
163$add attribute x Unknown-Std-VSA vendor=x space=RAD-VSA-STD
164	     len_ofs=1 len_size=1 len_adj=0
165	     val_ofs=2 val_size=-2 val_type=String
166	     nodec=0 noenc=0
167
168
169# Space 5: Nonstandard multiple-attribute VSAs
170
171$set default space=RAD-VSA-MULTI
172	     len_ofs=1 len_size=1 len_adj=0
173	     val_ofs=2 val_size=-2 val_type=String
174	     nodec=0 noenc=0
175
176#$include subdicts/dict.vendor-with-multiattr-vsas
177
178$add attribute x Unknown-Multi-VSA vendor=x
179	     len_ofs=1 len_size=1 len_adj=0
180	     val_ofs=2 val_size=-2 val_type=String
181	     nodec=0 noenc=0
182
183
184# Space 6: Nonstandard 2-octet VSAs
185
186$set default space=RAD-VSA-NONSTD-2
187	     len_ofs=2 len_size=1 len_adj=0
188	     val_ofs=3 val_size=-3 val_type=String
189	     nodec=0 noenc=0
190
191#$include subdicts/dict.strange
192#$include subdicts/dict.stupid
193
194$add attribute x Unknown-Nonstd-2-VSA vendor=x
195	     len_ofs=2 len_size=1 len_adj=0
196	     val_ofs=3 val_size=-3 val_type=String
197	     nodec=0 noenc=0
198
199
200# Space 7: Nonstandard 4-octet VSAs
201
202$set default space=RAD-VSA-NONSTD-4
203	     len_ofs=4 len_size=1 len_adj=0
204	     val_ofs=5 val_size=-5 val_type=String
205	     nodec=0 noenc=0
206
207#$include subdicts/dict.worse
208
209$add attribute x Unknown-Nonstd-4-VSA vendor=x
210	     len_ofs=4 len_size=1 len_adj=0
211	     val_ofs=5 val_size=-5 val_type=String
212	     nodec=0 noenc=0
213
214
215# Space 8: (USR's) NMC VSAs
216
217$set default space=RAD-VSA-NMC
218	     len_ofs=0 len_size=0 len_adj=0
219	     val_ofs=4 val_size=-4 val_type=String
220	     nodec=0 noenc=0
221
222#$include subdicts/dict.usr
223
224$add attribute x Unknown-USR-VSA vendor=USR
225
226$add attribute x Unknown-NMC-VSA vendor=x
227
228#	     len_ofs=0 len_size=0 len_adj=0
229#	     val_ofs=4 val_size=-4 val_type=String
230#	     nodec=0 noenc=0
231
232