blob: b14e54c0f89e17c7d2063b9f78287fb437692d9b [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001/*********************************************************************************************************
2* Software License Agreement (BSD License) *
3* Author: Sebastien Decugis <sdecugis@freediameter.net> *
4* *
5* Copyright (c) 2011, WIDE Project and NICT *
6* All rights reserved. *
7* *
8* Redistribution and use of this software in source and binary forms, with or without modification, are *
9* permitted provided that the following conditions are met: *
10* *
11* * Redistributions of source code must retain the above *
12* copyright notice, this list of conditions and the *
13* following disclaimer. *
14* *
15* * Redistributions in binary form must reproduce the above *
16* copyright notice, this list of conditions and the *
17* following disclaimer in the documentation and/or other *
18* materials provided with the distribution. *
19* *
20* * Neither the name of the WIDE Project or NICT nor the *
21* names of its contributors may be used to endorse or *
22* promote products derived from this software without *
23* specific prior written permission of WIDE Project and *
24* NICT. *
25* *
26* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
27* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
28* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
29* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
30* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
31* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
32* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
33* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
34*********************************************************************************************************/
35#include "rgw_common.h"
36
37/* The content of this file was semi-automatically generated from the IANA registry. */
38
39/* Name of RADIUS attribute from its code */
40const char * rgw_msg_attrtype_str(unsigned char c) {
41 /* 1 User-Name */
42 if ( c == 1) return "User-Name ";
43 /* 2 User-Password */
44 if ( c == 2) return "User-Password ";
45 /* 3 CHAP-Password */
46 if ( c == 3) return "CHAP-Password ";
47 /* 4 NAS-IP-Address */
48 if ( c == 4) return "NAS-IP-Address ";
49 /* 5 NAS-Port */
50 if ( c == 5) return "NAS-Port ";
51 /* 6 Service-Type */
52 if ( c == 6) return "Service-Type ";
53 /* 7 Framed-Protocol */
54 if ( c == 7) return "Framed-Protocol ";
55 /* 8 Framed-IP-Address */
56 if ( c == 8) return "Framed-IP-Address ";
57 /* 9 Framed-IP-Netmask */
58 if ( c == 9) return "Framed-IP-Netmask ";
59 /* 10 Framed-Routing */
60 if ( c == 10) return "Framed-Routing ";
61 /* 11 Filter-Id */
62 if ( c == 11) return "Filter-Id ";
63 /* 12 Framed-MTU */
64 if ( c == 12) return "Framed-MTU ";
65 /* 13 Framed-Compression */
66 if ( c == 13) return "Framed-Compression ";
67 /* 14 Login-IP-Host */
68 if ( c == 14) return "Login-IP-Host ";
69 /* 15 Login-Service */
70 if ( c == 15) return "Login-Service ";
71 /* 16 Login-TCP-Port */
72 if ( c == 16) return "Login-TCP-Port ";
73 /* 17 Unassigned */
74 if ( c == 17) return "Unassigned ";
75 /* 18 Reply-Message */
76 if ( c == 18) return "Reply-Message ";
77 /* 19 Callback-Number */
78 if ( c == 19) return "Callback-Number ";
79 /* 20 Callback-Id */
80 if ( c == 20) return "Callback-Id ";
81 /* 21 Unassigned */
82 if ( c == 21) return "Unassigned ";
83 /* 22 Framed-Route */
84 if ( c == 22) return "Framed-Route ";
85 /* 23 Framed-IPX-Network */
86 if ( c == 23) return "Framed-IPX-Network ";
87 /* 24 State */
88 if ( c == 24) return "State ";
89 /* 25 Class */
90 if ( c == 25) return "Class ";
91 /* 26 Vendor-Specific */
92 if ( c == 26) return "Vendor-Specific ";
93 /* 27 Session-Timeout */
94 if ( c == 27) return "Session-Timeout ";
95 /* 28 Idle-Timeout */
96 if ( c == 28) return "Idle-Timeout ";
97 /* 29 Termination-Action */
98 if ( c == 29) return "Termination-Action ";
99 /* 30 Called-Station-Id */
100 if ( c == 30) return "Called-Station-Id ";
101 /* 31 Calling-Station-Id */
102 if ( c == 31) return "Calling-Station-Id ";
103 /* 32 NAS-Identifier */
104 if ( c == 32) return "NAS-Identifier ";
105 /* 33 Proxy-State */
106 if ( c == 33) return "Proxy-State ";
107 /* 34 Login-LAT-Service */
108 if ( c == 34) return "Login-LAT-Service ";
109 /* 35 Login-LAT-Node */
110 if ( c == 35) return "Login-LAT-Node ";
111 /* 36 Login-LAT-Group */
112 if ( c == 36) return "Login-LAT-Group ";
113 /* 37 Framed-AppleTalk-Link */
114 if ( c == 37) return "Framed-AppleTalk-Link ";
115 /* 38 Framed-AppleTalk-Network */
116 if ( c == 38) return "Framed-AppleTalk-Network ";
117 /* 39 Framed-AppleTalk-Zone */
118 if ( c == 39) return "Framed-AppleTalk-Zone ";
119 /* 40 Acct-Status-Type [RFC2866] */
120 if ( c == 40) return "Acct-Status-Type [RFC2866]";
121 /* 41 Acct-Delay-Time [RFC2866] */
122 if ( c == 41) return "Acct-Delay-Time [RFC2866]";
123 /* 42 Acct-Input-Octets [RFC2866] */
124 if ( c == 42) return "Acct-Input-Octets [RFC2866]";
125 /* 43 Acct-Output-Octets [RFC2866] */
126 if ( c == 43) return "Acct-Output-Octets [RFC2866]";
127 /* 44 Acct-Session-Id [RFC2866] */
128 if ( c == 44) return "Acct-Session-Id [RFC2866]";
129 /* 45 Acct-Authentic [RFC2866] */
130 if ( c == 45) return "Acct-Authentic [RFC2866]";
131 /* 46 Acct-Session-Time [RFC2866] */
132 if ( c == 46) return "Acct-Session-Time [RFC2866]";
133 /* 47 Acct-Input-Packets [RFC2866] */
134 if ( c == 47) return "Acct-Input-Packets [RFC2866]";
135 /* 48 Acct-Output-Packets [RFC2866] */
136 if ( c == 48) return "Acct-Output-Packets [RFC2866]";
137 /* 49 Acct-Terminate-Cause [RFC2866] */
138 if ( c == 49) return "Acct-Terminate-Cause [RFC2866]";
139 /* 50 Acct-Multi-Session-Id [RFC2866] */
140 if ( c == 50) return "Acct-Multi-Session-Id [RFC2866]";
141 /* 51 Acct-Link-Count [RFC2866] */
142 if ( c == 51) return "Acct-Link-Count [RFC2866]";
143 /* 52 Acct-Input-Gigawords [RFC2869] */
144 if ( c == 52) return "Acct-Input-Gigawords [RFC2869]";
145 /* 53 Acct-Output-Gigawords [RFC2869] */
146 if ( c == 53) return "Acct-Output-Gigawords [RFC2869]";
147 /* 54 Unassigned */
148 if ( c == 54) return "Unassigned ";
149 /* 55 Event-Timestamp [RFC2869] */
150 if ( c == 55) return "Event-Timestamp [RFC2869]";
151 /* 56 Egress-VLANID [RFC4675] */
152 if ( c == 56) return "Egress-VLANID [RFC4675]";
153 /* 57 Ingress-Filters [RFC4675] */
154 if ( c == 57) return "Ingress-Filters [RFC4675]";
155 /* 58 Egress-VLAN-Name [RFC4675] */
156 if ( c == 58) return "Egress-VLAN-Name [RFC4675]";
157 /* 59 User-Priority-Table [RFC4675] */
158 if ( c == 59) return "User-Priority-Table [RFC4675]";
159 /* 60 CHAP-Challenge */
160 if ( c == 60) return "CHAP-Challenge ";
161 /* 61 NAS-Port-Type */
162 if ( c == 61) return "NAS-Port-Type ";
163 /* 62 Port-Limit */
164 if ( c == 62) return "Port-Limit ";
165 /* 63 Login-LAT-Port */
166 if ( c == 63) return "Login-LAT-Port ";
167 /* 64 Tunnel-Type [RFC2868] */
168 if ( c == 64) return "Tunnel-Type [RFC2868]";
169 /* 65 Tunnel-Medium-Type [RFC2868] */
170 if ( c == 65) return "Tunnel-Medium-Type [RFC2868]";
171 /* 66 Tunnel-Client-Endpoint [RFC2868] */
172 if ( c == 66) return "Tunnel-Client-Endpoint [RFC2868]";
173 /* 67 Tunnel-Server-Endpoint [RFC2868] */
174 if ( c == 67) return "Tunnel-Server-Endpoint [RFC2868]";
175 /* 68 Acct-Tunnel-Connection [RFC2867] */
176 if ( c == 68) return "Acct-Tunnel-Connection [RFC2867]";
177 /* 69 Tunnel-Password [RFC2868] */
178 if ( c == 69) return "Tunnel-Password [RFC2868]";
179 /* 70 ARAP-Password [RFC2869] */
180 if ( c == 70) return "ARAP-Password [RFC2869]";
181 /* 71 ARAP-Features [RFC2869] */
182 if ( c == 71) return "ARAP-Features [RFC2869]";
183 /* 72 ARAP-Zone-Access [RFC2869] */
184 if ( c == 72) return "ARAP-Zone-Access [RFC2869]";
185 /* 73 ARAP-Security [RFC2869] */
186 if ( c == 73) return "ARAP-Security [RFC2869]";
187 /* 74 ARAP-Security-Data [RFC2869] */
188 if ( c == 74) return "ARAP-Security-Data [RFC2869]";
189 /* 75 Password-Retry [RFC2869] */
190 if ( c == 75) return "Password-Retry [RFC2869]";
191 /* 76 Prompt [RFC2869] */
192 if ( c == 76) return "Prompt [RFC2869]";
193 /* 77 Connect-Info [RFC2869] */
194 if ( c == 77) return "Connect-Info [RFC2869]";
195 /* 78 Configuration-Token [RFC2869] */
196 if ( c == 78) return "Configuration-Token [RFC2869]";
197 /* 79 EAP-Message [RFC2869] */
198 if ( c == 79) return "EAP-Message [RFC2869]";
199 /* 80 Message-Authenticator [RFC2869] */
200 if ( c == 80) return "Message-Authenticator [RFC2869]";
201 /* 81 Tunnel-Private-Group-ID [RFC2868] */
202 if ( c == 81) return "Tunnel-Private-Group-ID [RFC2868]";
203 /* 82 Tunnel-Assignment-ID [RFC2868] */
204 if ( c == 82) return "Tunnel-Assignment-ID [RFC2868]";
205 /* 83 Tunnel-Preference [RFC2868] */
206 if ( c == 83) return "Tunnel-Preference [RFC2868]";
207 /* 84 ARAP-Challenge-Response [RFC2869] */
208 if ( c == 84) return "ARAP-Challenge-Response [RFC2869]";
209 /* 85 Acct-Interim-Interval [RFC2869] */
210 if ( c == 85) return "Acct-Interim-Interval [RFC2869]";
211 /* 86 Acct-Tunnel-Packets-Lost [RFC2867] */
212 if ( c == 86) return "Acct-Tunnel-Packets-Lost [RFC2867]";
213 /* 87 NAS-Port-Id [RFC2869] */
214 if ( c == 87) return "NAS-Port-Id [RFC2869]";
215 /* 88 Framed-Pool [RFC2869] */
216 if ( c == 88) return "Framed-Pool [RFC2869]";
217 /* 89 CUI [RFC4372] */
218 if ( c == 89) return "CUI [RFC4372]";
219 /* 90 Tunnel-Client-Auth-ID [RFC2868] */
220 if ( c == 90) return "Tunnel-Client-Auth-ID [RFC2868]";
221 /* 91 Tunnel-Server-Auth-ID [RFC2868] */
222 if ( c == 91) return "Tunnel-Server-Auth-ID [RFC2868]";
223 /* 92 NAS-Filter-Rule [RFC4849] */
224 if ( c == 92) return "NAS-Filter-Rule [RFC4849]";
225 /* 93 Unassigned */
226 if ( c == 93) return "Unassigned ";
227 /* 94 Originating-Line-Info [RFC4005] */
228 if ( c == 94) return "Originating-Line-Info [RFC4005]";
229 /* 95 NAS-IPv6-Address [RFC3162] */
230 if ( c == 95) return "NAS-IPv6-Address [RFC3162]";
231 /* 96 Framed-Interface-Id [RFC3162] */
232 if ( c == 96) return "Framed-Interface-Id [RFC3162]";
233 /* 97 Framed-IPv6-Prefix [RFC3162] */
234 if ( c == 97) return "Framed-IPv6-Prefix [RFC3162]";
235 /* 98 Login-IPv6-Host [RFC3162] */
236 if ( c == 98) return "Login-IPv6-Host [RFC3162]";
237 /* 99 Framed-IPv6-Route [RFC3162] */
238 if ( c == 99) return "Framed-IPv6-Route [RFC3162]";
239 /* 100 Framed-IPv6-Pool [RFC3162] */
240 if ( c == 100) return "Framed-IPv6-Pool [RFC3162]";
241 /* 101 Error-Cause Attribute [RFC3576] */
242 if ( c == 101) return "Error-Cause Attribute[RFC3576]";
243 /* 102 EAP-Key-Name [RFC4072] */
244 if ( c == 102) return "EAP-Key-Name [RFC4072]";
245 /* 103 Digest-Response [RFC5090] */
246 if ( c == 103) return "Digest-Response [RFC5090]";
247 /* 104 Digest-Realm [RFC5090] */
248 if ( c == 104) return "Digest-Realm [RFC5090]";
249 /* 105 Digest-Nonce [RFC5090] */
250 if ( c == 105) return "Digest-Nonce [RFC5090]";
251 /* 106 Digest-Response-Auth [RFC5090] */
252 if ( c == 106) return "Digest-Response-Auth [RFC5090]";
253 /* 107 Digest-Nextnonce [RFC5090] */
254 if ( c == 107) return "Digest-Nextnonce [RFC5090]";
255 /* 108 Digest-Method [RFC5090] */
256 if ( c == 108) return "Digest-Method [RFC5090]";
257 /* 109 Digest-URI [RFC5090] */
258 if ( c == 109) return "Digest-URI [RFC5090]";
259 /* 110 Digest-Qop [RFC5090] */
260 if ( c == 110) return "Digest-Qop [RFC5090]";
261 /* 111 Digest-Algorithm [RFC5090] */
262 if ( c == 111) return "Digest-Algorithm [RFC5090]";
263 /* 112 Digest-Entity-Body-Hash [RFC5090] */
264 if ( c == 112) return "Digest-Entity-Body-Hash [RFC5090]";
265 /* 113 Digest-CNonce [RFC5090] */
266 if ( c == 113) return "Digest-CNonce [RFC5090]";
267 /* 114 Digest-Nonce-Count [RFC5090] */
268 if ( c == 114) return "Digest-Nonce-Count [RFC5090]";
269 /* 115 Digest-Username [RFC5090] */
270 if ( c == 115) return "Digest-Username [RFC5090]";
271 /* 116 Digest-Opaque [RFC5090] */
272 if ( c == 116) return "Digest-Opaque [RFC5090]";
273 /* 117 Digest-Auth-Param [RFC5090] */
274 if ( c == 117) return "Digest-Auth-Param [RFC5090]";
275 /* 118 Digest-AKA-Auts [RFC5090] */
276 if ( c == 118) return "Digest-AKA-Auts [RFC5090]";
277 /* 119 Digest-Domain [RFC5090] */
278 if ( c == 119) return "Digest-Domain [RFC5090]";
279 /* 120 Digest-Stale [RFC5090] */
280 if ( c == 120) return "Digest-Stale [RFC5090]";
281 /* 121 Digest-HA1 [RFC5090] */
282 if ( c == 121) return "Digest-HA1 [RFC5090]";
283 /* 122 SIP-AOR [RFC5090] */
284 if ( c == 122) return "SIP-AOR [RFC5090]";
285 /* 123 Delegated-IPv6-Prefix [RFC4818] */
286 if ( c == 123) return "Delegated-IPv6-Prefix [RFC4818]";
287 /* 124 MIP6-Feature-Vector [RFC5447] */
288 if ( c == 124) return "MIP6-Feature-Vector [RFC5447]";
289 /* 125 MIP6-Home-Link-Prefix [RFC5447] */
290 if ( c == 125) return "MIP6-Home-Link-Prefix [RFC5447]";
291 /* 126-191 Unassigned */
292 if ((c >= 126) && (c <= 191)) return "Unassigned ";
293 /* 192-223 Experimental Use [RFC3575] */
294 if ((c >= 192) && (c <= 223)) return "Experimental Use[RFC3575]";
295 /* 224-240 Implementation Specific [RFC3575] */
296 if ((c >= 224) && (c <= 240)) return "Implementation Specific[RFC3575]";
297 /* 241-255 Reserved [RFC3575] */
298 if ((c >= 241)) return "Reserved [RFC3575]";
299 /* fallback */ return "[Unknown]";
300}