2 * Routines for RADIUS packet disassembly
3 * Copyright 1999 Johan Feyaerts
5 * RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
7 * $Id: packet-radius.c,v 1.61 2002/05/14 10:40:25 guy Exp $
9 * Ethereal - Network traffic analyzer
10 * By Gerald Combs <gerald@ethereal.com>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 #ifdef HAVE_SYS_TYPES_H
33 # include <sys/types.h>
36 #ifdef HAVE_NETINET_IN_H
37 #include <netinet/in.h>
46 #include <epan/packet.h>
47 #include <epan/resolv.h>
49 #include "packet-q931.h"
51 static int proto_radius = -1;
52 static int hf_radius_length = -1;
53 static int hf_radius_code = -1;
54 static int hf_radius_id =-1;
56 static gint ett_radius = -1;
57 static gint ett_radius_avp = -1;
58 static gint ett_radius_eap = -1;
59 static gint ett_radius_vsa = -1;
61 static dissector_handle_t eap_fragment_handle;
63 #define UDP_PORT_RADIUS 1645
64 #define UDP_PORT_RADIUS_NEW 1812
65 #define UDP_PORT_RADACCT 1646
66 #define UDP_PORT_RADACCT_NEW 1813
68 #define TEXTBUFFER 2000
71 typedef struct _e_radiushdr {
77 typedef struct _e_avphdr {
82 typedef struct _value_value_string {
88 typedef struct _rd_vsa_table {
90 value_value_string *attrib;
93 typedef struct _rd_valstr_table {
95 const value_string *valstr;
98 typedef struct _rd_vsa_buffer {
104 #define AUTHENTICATOR_LENGTH 16
105 #define RD_HDR_LENGTH 4
107 #define RADIUS_ACCESS_REQUEST 1
108 #define RADIUS_ACCESS_ACCEPT 2
109 #define RADIUS_ACCESS_REJECT 3
110 #define RADIUS_ACCOUNTING_REQUEST 4
111 #define RADIUS_ACCOUNTING_RESPONSE 5
112 #define RADIUS_ACCESS_PASSWORD_REQUEST 7
113 #define RADIUS_ACCESS_PASSWORD_ACK 8
114 #define RADIUS_ACCESS_PASSWORD_REJECT 9
115 #define RADIUS_ACCESS_CHALLENGE 11
116 #define RADIUS_STATUS_SERVER 12
117 #define RADIUS_STATUS_CLIENT 13
118 #define RADIUS_VENDOR_SPECIFIC_CODE 26
119 #define RADIUS_ASCEND_ACCESS_NEXT_CODE 29
120 #define RADIUS_ASCEND_ACCESS_NEW_PIN 30
121 #define RADIUS_ASCEND_PASSWORD_EXPIRED 32
122 #define RADIUS_ASCEND_ACCESS_EVENT_REQUEST 33
123 #define RADIUS_ASCEND_ACCESS_EVENT_RESPONSE 34
124 #define RADIUS_DISCONNECT_REQUEST 40
125 #define RADIUS_DISCONNECT_REQUEST_ACK 41
126 #define RADIUS_DISCONNECT_REQUEST_NAK 42
127 #define RADIUS_CHANGE_FILTER_REQUEST 43
128 #define RADIUS_CHANGE_FILTER_REQUEST_ACK 44
129 #define RADIUS_CHANGE_FILTER_REQUEST_NAK 45
130 #define RADIUS_RESERVED 255
138 RADIUS_FRAMED_PROTOCOL,
139 RADIUS_FRAMED_ROUTING,
140 RADIUS_FRAMED_COMPRESSION,
141 RADIUS_LOGIN_SERVICE,
144 RADIUS_TERMINATING_ACTION,
145 RADIUS_ACCOUNTING_STATUS_TYPE,
146 RADIUS_ACCT_AUTHENTIC,
147 RADIUS_ACCT_TERMINATE_CAUSE,
148 RADIUS_NAS_PORT_TYPE,
150 RADIUS_TUNNEL_MEDIUM_TYPE,
151 RADIUS_STRING_TAGGED,
152 RADIUS_VENDOR_SPECIFIC,
154 RADIUS_INTEGER4_TAGGED,
159 ACC_ML_MLX_ADMIN_STATE,
161 ACC_CLEARING_LOCATION,
163 ACC_BRIDGING_SUPPORT,
164 ACC_APSM_OVERSUBSCRIBED,
165 ACC_ACCT_ON_OFF_REASON,
169 ACC_CALLBACK_CBCP_TYPE,
170 ACC_DIALOUT_AUTH_MODE,
171 ACC_ACCESS_COMMUNITY,
173 CISCO_DISCONNECT_CAUSE,
175 SHIVA_TYPE_OF_SERVICE,
177 SHIVA_DISCONNECT_REASON,
179 SHIVA_CONNECT_REASON,
181 LIVINGSTON_IPSEC_LOG_OPTIONS,
182 LIVINGSTON_IPSEC_DENY_ACTION,
183 LIVINGSTON_NAT_LOG_OPTIONS,
184 LIVINGSTON_NAT_SESS_DIR_FAIL_ACTION,
185 LIVINGSTON_MULTICAST_CLIENT,
188 MICROSOFT_ARAP_PW_CHANGE_REASON,
189 MICROSOFT_ACCT_AUTH_TYPE,
190 MICROSOFT_ACCT_EAP_TYPE,
192 ASCEND_CALLING_ID_TYPE_OF_NUMBER,
193 ASCEND_CALLING_ID_NUMBERING_PLAN,
194 ASCEND_CALLING_ID_PRESENTATION,
195 ASCEND_CALLING_ID_SCREENING,
197 BAY_TUNNEL_AUTHEN_TYPE,
198 BAY_TUNNEL_AUTHEN_MODE,
199 BAY_USER_SERVER_LOCATION,
200 BAY_SYSTEM_DISC_REASON,
201 BAY_MODEM_DISC_REASON,
202 BAY_ADDR_RESOLUTION_PROTOCOL,
206 VERSANET_TERMINATION_CAUSE,
208 REDBACK_TUNNEL_FUNCTION,
210 REDBACK_MCAST_RECEIVE,
212 REDBACK_PVC_ENCAPSULATION_TYPE,
213 REDBACK_PVC_CIRCUIT_PADDING,
215 REDBACK_BIND_AUTH_PROTOCOL,
216 REDBACK_LAC_PORT_TYPE,
217 REDBACK_LAC_REAL_PORT_TYPE,
221 SHASTA_USER_PRIVILEGE
224 static value_string radius_vals[] =
226 {RADIUS_ACCESS_REQUEST, "Access Request"},
227 {RADIUS_ACCESS_ACCEPT, "Access Accept"},
228 {RADIUS_ACCESS_REJECT, "Access Reject"},
229 {RADIUS_ACCOUNTING_REQUEST, "Accounting Request"},
230 {RADIUS_ACCOUNTING_RESPONSE, "Accounting Response"},
231 {RADIUS_ACCESS_PASSWORD_REQUEST, "Access Password Request"},
232 {RADIUS_ACCESS_PASSWORD_ACK, "Access Password Ack"},
233 {RADIUS_ACCESS_PASSWORD_REJECT, "Access Password Reject"},
234 {RADIUS_ACCESS_CHALLENGE, "Access challenge"},
235 {RADIUS_STATUS_SERVER, "StatusServer"},
236 {RADIUS_STATUS_CLIENT, "StatusClient"},
237 {RADIUS_VENDOR_SPECIFIC_CODE, "Vendor Specific"},
238 {RADIUS_ASCEND_ACCESS_NEXT_CODE, "Ascend Access Next Code"},
239 {RADIUS_ASCEND_ACCESS_NEW_PIN, "Ascend Access New Pin"},
240 {RADIUS_ASCEND_PASSWORD_EXPIRED, "Ascend Password Expired"},
241 {RADIUS_ASCEND_ACCESS_EVENT_REQUEST, "Ascend Access Event Request"},
242 {RADIUS_ASCEND_ACCESS_EVENT_RESPONSE, "Ascend Access Event Response"},
243 {RADIUS_DISCONNECT_REQUEST, "Disconnect Request"},
244 {RADIUS_DISCONNECT_REQUEST_ACK, "Disconnect Request ACK"},
245 {RADIUS_DISCONNECT_REQUEST_NAK, "Disconnect Request NAK"},
246 {RADIUS_CHANGE_FILTER_REQUEST, "Change Filter Request"},
247 {RADIUS_CHANGE_FILTER_REQUEST_ACK, "Change Filter Request ACK"},
248 {RADIUS_CHANGE_FILTER_REQUEST_NAK, "Change Filter Request NAK"},
249 {RADIUS_RESERVED, "Reserved"},
254 * These are SMI Network Management Private Enterprise Codes for
257 * http://www.isi.edu/in-notes/iana/assignments/enterprise-numbers
261 * XXX - these also appear in FreeRadius dictionary files, with items such
267 #define VENDOR_CISCO 9
268 #define VENDOR_SHIVA 166
269 #define VENDOR_LIVINGSTON 307
270 #define VENDOR_MICROSOFT 311
271 #define VENDOR_3COM 429
272 #define VENDOR_ASCEND 529
273 #define VENDOR_BAY 1584
274 #define VENDOR_VERSANET 2180
275 #define VENDOR_REDBACK 2352
276 #define VENDOR_JUNIPER 2636
277 #define VENDOR_COSINE 3085
278 #define VENDOR_SHASTA 3199
279 #define VENDOR_NOMADIX 3309
280 #define VENDOR_UNISPHERE 4874
281 #define VENDOR_ISSANNI 5948
282 #define VENDOR_QUINTUM 6618
284 static value_string radius_vendor_specific_vendors[] =
287 {VENDOR_CISCO, "Cisco"},
288 {VENDOR_SHIVA, "Shiva"},
289 {VENDOR_MICROSOFT, "Microsoft"},
290 {VENDOR_LIVINGSTON, "Livingston"},
291 {VENDOR_3COM, "3Com"},
292 {VENDOR_ASCEND, "Ascend"},
293 {VENDOR_BAY, "Bay Networks"},
294 {VENDOR_VERSANET, "Versanet"},
295 {VENDOR_REDBACK, "Redback"},
296 {VENDOR_JUNIPER, "Juniper Networks"},
297 {VENDOR_COSINE, "CoSine Communications"},
298 {VENDOR_SHASTA, "Shasta"},
299 {VENDOR_NOMADIX, "Nomadix"},
300 {VENDOR_UNISPHERE, "Unisphere Networks"},
301 {VENDOR_ISSANNI, "Issanni Communications"},
302 {VENDOR_QUINTUM, "Quintum"},
307 * XXX - should we construct this table in Ethereal at start-up time by
308 * reading files such as FreeRadius dictionary files? For example,
309 * the FreeRadius "dictionary" file has
311 * ATTRIBUTE User-Name 1 string
313 * for the attribute that's
315 * {1, RADIUS_STRING, "User Name"},
319 * "string" -> RADIUS_STRING
320 * "octets" -> RADIUS_BINSTRING
321 * "integer" -> RADIUS_INTEGER4
322 * "ipaddr" -> RADIUS_IP_ADDRESS
324 static value_value_string radius_attrib[] =
326 {1, RADIUS_STRING, "User Name"},
327 {2, RADIUS_STRING, "User Password"},
328 {3, RADIUS_BINSTRING, "CHAP Password"},
329 {4, RADIUS_IP_ADDRESS, "NAS IP Address"},
330 {5, RADIUS_INTEGER4, "NAS Port"},
331 {6, RADIUS_SERVICE_TYPE, "Service Type"},
332 {7, RADIUS_FRAMED_PROTOCOL, "Framed Protocol"},
333 {8, RADIUS_IP_ADDRESS, "Framed IP Address"},
334 {9, RADIUS_IP_ADDRESS, "Framed IP Netmask"},
335 {10, RADIUS_FRAMED_ROUTING, "Framed Routing"},
336 {11, RADIUS_STRING, "Filter Id"},
337 {12, RADIUS_INTEGER4, "Framed MTU"},
338 {13, RADIUS_FRAMED_COMPRESSION, "Framed Compression"},
339 {14, RADIUS_IP_ADDRESS, "Login IP Host"},
340 {15, RADIUS_LOGIN_SERVICE, "Login Service"},
341 {16, RADIUS_INTEGER4, "Login TCP Port"},
342 {17, RADIUS_UNKNOWN, "Unassigned"},
343 {18, RADIUS_STRING, "Reply Message"},
344 {19, RADIUS_STRING, "Callback Number"},
345 {20, RADIUS_STRING, "Callback Id"},
346 {21, RADIUS_UNKNOWN, "Unassigned"},
347 {22, RADIUS_STRING, "Framed Route"},
348 {23, RADIUS_IPX_ADDRESS, "Framed IPX network"},
349 {24, RADIUS_BINSTRING, "State"},
350 {25, RADIUS_BINSTRING, "Class"},
351 {26, RADIUS_VENDOR_SPECIFIC, "Vendor Specific"},
352 {27, RADIUS_INTEGER4, "Session Timeout"},
353 {28, RADIUS_INTEGER4, "Idle Timeout"},
354 {29, RADIUS_TERMINATING_ACTION, "Terminating Action"},
355 {30, RADIUS_STRING, "Called Station Id"},
356 {31, RADIUS_STRING, "Calling Station Id"},
357 {32, RADIUS_STRING, "NAS identifier"},
358 {33, RADIUS_BINSTRING, "Proxy State"},
359 {34, RADIUS_STRING, "Login LAT Service"},
360 {35, RADIUS_STRING, "Login LAT Node"},
361 {36, RADIUS_BINSTRING, "Login LAT Group"},
362 {37, RADIUS_INTEGER4, "Framed AppleTalk Link"},
363 {38, RADIUS_INTEGER4, "Framed AppleTalk Network"},
364 {39, RADIUS_STRING, "Framed AppleTalk Zone"},
365 {40, RADIUS_ACCOUNTING_STATUS_TYPE, "Acct Status Type"},
366 {41, RADIUS_INTEGER4, "Acct Delay Time"},
367 {42, RADIUS_INTEGER4, "Acct Input Octets"},
368 {43, RADIUS_INTEGER4, "Acct Output Octets"},
369 {44, RADIUS_STRING, "Acct Session Id"},
370 {45, RADIUS_ACCT_AUTHENTIC, "Acct Authentic"},
371 {46, RADIUS_INTEGER4, "Acct Session Time"},
372 {47, RADIUS_INTEGER4, "Acct Input Packets"},
373 {48, RADIUS_INTEGER4, "Acct Output Packets"},
374 {49, RADIUS_ACCT_TERMINATE_CAUSE, "Acct Terminate Cause"},
375 {50, RADIUS_STRING, "Acct Multi Session Id"},
376 {51, RADIUS_INTEGER4, "Acct Link Count"},
377 {52, RADIUS_INTEGER4, "Acct Input Gigawords"},
378 {53, RADIUS_INTEGER4, "Acct Output Gigawords"},
380 {55, RADIUS_TIMESTAMP, "Event Timestamp"},
382 {60, RADIUS_BINSTRING, "CHAP Challenge"},
383 {61, RADIUS_NAS_PORT_TYPE, "NAS Port Type"},
384 {62, RADIUS_INTEGER4, "Port Limit"},
385 {63, RADIUS_BINSTRING, "Login LAT Port"},
386 {64, RADIUS_TUNNEL_TYPE, "Tunnel Type"},
387 {65, RADIUS_TUNNEL_MEDIUM_TYPE, "Tunnel Medium Type"},
388 {66, RADIUS_STRING_TAGGED, "Tunnel Client Endpoint"},
389 {67, RADIUS_STRING_TAGGED, "Tunnel Server Endpoint"},
390 {68, RADIUS_STRING, "Tunnel Connection"},
391 {69, RADIUS_STRING_TAGGED, "Tunnel Password"},
392 {70, RADIUS_STRING, "ARAP Password"},
393 {71, RADIUS_STRING, "ARAP Features"},
394 {72, RADIUS_INTEGER4, "ARAP Zone-Access"},
395 {73, RADIUS_INTEGER4, "ARAP Security"},
396 {74, RADIUS_STRING, "ARAP Security Data"},
397 {75, RADIUS_INTEGER4, "Password Retry"},
398 {76, RADIUS_INTEGER4, "Prompt"},
399 {77, RADIUS_STRING, "Connect Info"},
400 {78, RADIUS_STRING, "Configuration Token"},
401 {79, RADIUS_STRING, "EAP Message"},
402 {80, RADIUS_BINSTRING, "Message Authenticator"},
403 {81, RADIUS_STRING_TAGGED, "Tunnel Private Group ID"},
404 {82, RADIUS_STRING_TAGGED, "Tunnel Assignment ID"},
405 {83, RADIUS_INTEGER4_TAGGED, "Tunnel Preference"},
406 {84, RADIUS_STRING, "ARAP Challenge Response"},
407 {85, RADIUS_INTEGER4, "Acct Interim Interval"},
408 {86, RADIUS_INTEGER4, "Tunnel Packets Lost"},
409 {87, RADIUS_STRING, "NAS Port ID"},
410 {88, RADIUS_STRING, "Framed Pool"},
411 {90, RADIUS_STRING_TAGGED, "Tunnel Client Auth ID"},
412 {91, RADIUS_STRING_TAGGED, "Tunnel Server Auth ID"},
413 {120, RADIUS_INTEGER4, "Ascend Modem Port No"},
414 {121, RADIUS_INTEGER4, "Ascend Modem Slot No"},
415 {187, RADIUS_INTEGER4, "Ascend Multilink ID"},
416 {188, RADIUS_INTEGER4, "Ascend Num In Multilink"},
417 {189, RADIUS_IP_ADDRESS, "Ascend First Dest"},
418 {190, RADIUS_INTEGER4, "Ascend Pre Input Octets"},
419 {191, RADIUS_INTEGER4, "Ascend Pre Output Octets"},
420 {192, RADIUS_INTEGER4, "Ascend Pre Input Packets"},
421 {193, RADIUS_INTEGER4, "Ascend Pre Output Packets"},
422 {194, RADIUS_INTEGER4, "Ascend Maximum Time"},
423 {195, RADIUS_INTEGER4, "Ascend Disconnect Cause"},
424 {196, RADIUS_INTEGER4, "Ascend Connect Progress"},
425 {197, RADIUS_INTEGER4, "Ascend Data Rate"},
426 {198, RADIUS_INTEGER4, "Ascend PreSession Time"},
427 {218, RADIUS_INTEGER4, "Ascend Assign IP Pool"},
428 {255, RADIUS_INTEGER4, "Ascend Xmit Rate"},
432 static value_string radius_service_type_vals[] =
436 {3, "Callback Login"},
437 {4, "Callback Framed"},
439 {6, "Administrative"},
441 {8, "Authenticate Only"},
442 {9, "Callback NAS Prompt"},
447 static value_string radius_framed_protocol_vals[] =
451 {3, "Appletalk Remote Access Protocol (ARAP)"},
452 {4, "Gandalf proprietary Singlelink/Multilink Protocol"},
453 {5, "Xylogics proprietary IPX/SLIP"},
454 {6, "X.75 Synchronous"},
457 {257, "Ascend EURAW"},
458 {258, "Ascend EUUI"},
460 {260, "Ascend COMB"},
463 {263, "Ascend FR-CIR"},
464 {264, "Ascend ATM-1483"},
465 {265, "Ascend ATM-FR-CIR"},
469 static value_string radius_framed_routing_vals[] =
471 {1, "Send Routing Packets"},
472 {2, "Listen for routing packets"},
473 {3, "Send and Listen"},
478 static value_string radius_framed_compression_vals[] =
480 {1, "VJ TCP/IP Header Compression"},
481 {2, "IPX Header Compression"},
482 {3, "Stac-LZS compression"},
487 static value_string radius_login_service_vals[] =
495 {8, "TCP Clear Quit"},
500 static value_string radius_terminating_action_vals[] =
502 {1, "RADIUS Request"},
507 static value_string radius_accounting_status_type_vals[] =
511 {3, "Interim Update"},
512 {7, "Accounting On"},
513 {8, "Accounting Off"},
514 {9, "Tunnel Start"}, /* Tunnel accounting */
515 {10, "Tunnel Stop"}, /* Tunnel accounting */
516 {11, "Tunnel Reject"}, /* Tunnel accounting */
517 {12, "Tunnel Link Start"}, /* Tunnel accounting */
518 {13, "Tunnel Link Stop"}, /* Tunnel accounting */
519 {14, "Tunnel Link Reject"}, /* Tunnel accounting */
523 static value_string radius_accounting_authentication_vals[] =
528 /* RFC 2866 says 3 is Remote. Is 7 a mistake? */
533 static value_string radius_acct_terminate_cause_vals[] =
539 {5, "Session Timeout"},
546 {12, "Port Unneeded"},
547 {13, "Port Preempted"},
548 {14, "Port Suspended"},
549 {15, "Service Unavailable"},
552 {18, "Host Request"},
556 static value_string radius_tunnel_type_vals[] =
573 static value_string radius_tunnel_medium_type_vals[] =
593 static value_string radius_nas_port_type_vals[] =
598 {3, "ISDN Async V.120"},
599 {4, "ISDN Async V.110"},
602 {7, "HDLC Clear Channel"},
613 {18, "Wireless Other"},
614 {19, "Wireless IEEE 802.11"},
620 'dictionary.acc' file from FreeRADIUS
621 http://www.freeradius.org/radiusd/raddb/dictionary.acc
623 static value_value_string radius_vendor_acc_attrib[] =
625 {1, ACC_REASON_CODE, "Acc Reason Code"},
626 {2, ACC_CCP_OPTION, "Acc Ccp Option"},
627 {3, RADIUS_INTEGER4, "Acc Input Errors"},
628 {4, RADIUS_INTEGER4, "Acc Output Errors"},
629 {5, RADIUS_STRING, "Acc Access Partition"},
630 {6, RADIUS_STRING, "Acc Customer Id"},
631 {7, RADIUS_IP_ADDRESS, "Acc Ip Gateway Pri"},
632 {8, RADIUS_IP_ADDRESS, "Acc Ip Gateway Sec"},
633 {9, ACC_ROUTE_POLICY, "Acc Route Policy"},
634 {10, ACC_ML_MLX_ADMIN_STATE, "Acc ML MLX Admin State"},
635 {11, RADIUS_INTEGER4, "Acc ML Call Threshold"},
636 {12, RADIUS_INTEGER4, "Acc ML Clear Threshold"},
637 {13, RADIUS_INTEGER4, "Acc ML Damping Factor"},
638 {14, RADIUS_STRING, "Acc Tunnel Secret"},
639 {15, ACC_CLEARING_CAUSE, "Acc Clearing Cause"},
640 {16, ACC_CLEARING_LOCATION, "Acc Clearing Location"},
641 {17, RADIUS_STRING, "Acc Service Profile"},
642 {18, ACC_REQUEST_TYPE, "Acc Request Type"},
643 {19, ACC_BRIDGING_SUPPORT, "Acc Bridging Support"},
644 {20, ACC_APSM_OVERSUBSCRIBED,"Acc Apsm Oversubscribed"},
645 {21, ACC_ACCT_ON_OFF_REASON, "Acc Acct On Off Reason"},
646 {22, RADIUS_INTEGER4, "Acc Tunnel Port"},
647 {23, RADIUS_IP_ADDRESS, "Acc Dns Server Pri"},
648 {24, RADIUS_IP_ADDRESS, "Acc Dns Server Sec"},
649 {25, RADIUS_IP_ADDRESS, "Acc Nbns Server Pri"},
650 {26, RADIUS_IP_ADDRESS, "Acc Nbns Server Sec"},
651 {27, RADIUS_INTEGER4, "Acc Dial Port Index"},
652 {28, ACC_IP_COMPRESSION, "Acc Ip Compression"},
653 {29, ACC_IPX_COMPRESSION, "Acc Ipx Compression"},
654 {30, RADIUS_INTEGER4, "Acc Connect Tx Speed"},
655 {31, RADIUS_INTEGER4, "Acc Connect Rx Speed"},
656 {32, RADIUS_STRING, "Acc Modem Modulation Type"},
657 {33, RADIUS_STRING, "Acc Modem Error Protocol"},
658 {34, RADIUS_INTEGER4, "Acc Callback Delay"},
659 {35, RADIUS_STRING, "Acc Callback Num Valid"},
660 {36, ACC_CALLBACK_MODE, "Acc Callback Mode"},
661 {37, ACC_CALLBACK_CBCP_TYPE, "Acc Callback CBCP Type"},
662 {38, ACC_DIALOUT_AUTH_MODE, "Acc Dialout Auth Mode"},
663 {39, RADIUS_STRING, "Acc Dialout Auth Password"},
664 {40, RADIUS_STRING, "Acc Dialout Auth Username"},
665 {42, ACC_ACCESS_COMMUNITY, "Acc Access Community"},
669 static value_string radius_vendor_acc_reason_code_vals[] =
671 {0, "No reason No Failure"},
672 {1, "Resource shortage"},
673 {2, "Session already open"},
674 {3, "Too many RADIUS users"},
675 {4, "No authentification server"},
676 {5, "No authentification response"},
677 {6, "No accounting server"},
678 {7, "No accounting response"},
679 {8, "Access Denied"},
680 {9, "Temporary buffer shortage"},
681 {10, "Protocol error"},
682 {11, "Invalid attribute"},
683 {12, "Invalid service type"},
684 {13, "Invalid framed protocol"},
685 {14, "Invalid attribute value"},
686 {15, "Invalid user information"},
687 {16, "Invalid IP address"},
688 {17, "Invalid integer syntax"},
689 {18, "Invalid NAS port"},
690 {19, "Requested by user"},
691 {20, "Network disconnect"},
692 {21, "Service interruption"},
693 {22, "Physical port error"},
694 {23, "Idle timeout"},
695 {24, "Session timeout"},
696 {25, "Administrative reset"},
697 {26, "NAS reload or reset"},
700 {29, "Undefined reason given"},
701 {30, "Conflicting attributes"},
702 {31, "Port limit exceeded"},
703 {32, "Facility not available"},
704 {33, "Internal config error"},
705 {34, "Bad route specification"},
706 {35, "Access Partition bind failure"},
707 {36, "Security violation"},
708 {37, "Request type conflict"},
709 {38, "Configuration disallowed"},
710 {39, "Missing attribute"},
711 {40, "Invalid request"},
712 {41, "Missing parameter"},
713 {42, "Invalid parameter"},
714 {43, "Call cleared with cause"},
715 {44, "Inopportune config request"},
716 {45, "Invalid config parameter"},
717 {46, "Missing config parameter"},
718 {47, "Incompatible service profile"},
719 {48, "Administrative reset"},
720 {49, "Administrative reload"},
721 {50, "Port unneeded"},
722 {51, "Port preempted"},
723 {52, "Port suspended"},
724 {53, "Service unavailable"},
727 {56, "Host request"},
731 static value_string radius_vendor_acc_ccp_option_vals[] =
738 static value_string radius_vendor_acc_route_policy_vals[] =
745 static value_string radius_vendor_acc_ml_mlx_admin_state_vals[] =
752 static value_string radius_vendor_acc_request_type_vals[] =
754 {1, "Ring Indication"},
756 {3, "User Authentification"},
757 {4, "Tunnel Authentification"},
761 static value_string radius_vendor_acc_bridging_support_vals[] =
768 static value_string radius_vendor_acc_apsm_oversubscribed_vals[] =
775 static value_string radius_vendor_acc_acct_on_off_reason_vals[] =
779 {2, "Configuration Reset"},
780 {3, "Configuration Reload"},
786 static value_string radius_vendor_acc_ip_compression_vals[] =
793 static value_string radius_vendor_acc_ipx_compression_vals[] =
800 static value_string radius_vendor_acc_callback_mode_vals[] =
803 {3, "User Specified E.164"},
804 {6, "CBCP Callback"},
809 static value_string radius_vendor_acc_callback_cbcp_type_vals[] =
812 {2, "CBCP User Specified"},
813 {3, "CBCP Pre Specified"},
817 static value_string radius_vendor_acc_dialout_auth_mode_vals[] =
826 static value_string radius_vendor_acc_access_community_vals[] =
835 'dictionary.cisco' file from FreeRADIUS
836 http://www.freeradius.org/radiusd/raddb/dictionary.cisco
838 http://www.cisco.com/univercd/cc/td/doc/product/access/acs_serv/vapp_dev/vsaig3.htm
840 http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fsecur_c/fappendx/fradattr/scfrdat3.pdf
841 http://www.missl.cs.umd.edu/wireless/ethereal/cisco-vsa.pdf
844 static value_value_string radius_vendor_cisco_attrib[] =
846 /* stanard attributes */
847 {1, RADIUS_STRING, "Cisco AV Pair"},
848 {2, RADIUS_STRING, "Cisco NAS Port"},
850 {3, RADIUS_STRING, "Fax Account Id Origin"},
851 {4, RADIUS_STRING, "Fax Msg Id"},
852 {5, RADIUS_STRING, "Fax Pages"},
853 {6, RADIUS_STRING, "Fax Cover Page Flag"},
854 {7, RADIUS_STRING, "Fax Modem Time"},
855 {8, RADIUS_STRING, "Fax Connect Speed"},
856 {9, RADIUS_STRING, "Fax Recipent Count"},
857 {10, RADIUS_STRING, "Fax Process Abort Flag"},
858 {11, RADIUS_STRING, "Fax DSN Address"},
859 {12, RADIUS_STRING, "Fax DSN Flag"},
860 {13, RADIUS_STRING, "Fax MDN Address"},
861 {14, RADIUS_STRING, "Fax MDN Flag"},
862 {15, RADIUS_STRING, "Fax Auth Status"},
863 {16, RADIUS_STRING, "Email Server Address"},
864 {17, RADIUS_STRING, "Email Server Ack Flag"},
865 {18, RADIUS_STRING, "Gateway Id"},
866 {19, RADIUS_STRING, "Call Type"},
867 {20, RADIUS_STRING, "Port Used"},
868 {21, RADIUS_STRING, "Abort Cause"},
870 /* H323 - Voice over IP attributes. */
871 {23, RADIUS_STRING, "H323 Remote Address"},
872 {24, RADIUS_STRING, "H323 Conf Id"},
873 {25, RADIUS_STRING, "H323 Setup Time"},
874 {26, RADIUS_STRING, "H323 Call Origin"},
875 {27, RADIUS_STRING, "H323 Call Type"},
876 {28, RADIUS_STRING, "H323 Connect Time"},
877 {29, RADIUS_STRING, "H323 Disconnect Time"},
878 {30, RADIUS_STRING, "H323 Disconnect Cause"},
879 {31, RADIUS_STRING, "H323 Voice Quality"},
881 {33, RADIUS_STRING, "H323 GW Id"},
883 {35, RADIUS_STRING, "H323 Incoming Conf Id"},
885 {101, RADIUS_STRING, "H323 Credit Amount"},
886 {102, RADIUS_STRING, "H323 Credit Time"},
887 {103, RADIUS_STRING, "H323 Return Code"},
888 {104, RADIUS_STRING, "H323 Prompt Id"},
889 {105, RADIUS_STRING, "H323 Time And Day"},
890 {106, RADIUS_STRING, "H323 Redirect Number"},
891 {107, RADIUS_STRING, "H323 Preferred Lang"},
892 {108, RADIUS_STRING, "H323 Redirect Ip Address"},
893 {109, RADIUS_STRING, "H323 Billing Model"},
894 {110, RADIUS_STRING, "H323 Currency Type"},
897 Extra attributes sent by the Cisco, if you configure
898 "radius-server vsa accounting" (requires IOS11.2+).
900 {187, RADIUS_INTEGER4, "Cisco Multilink ID"},
901 {188, RADIUS_INTEGER4, "Cisco Num In Multilink"},
903 {190, RADIUS_INTEGER4, "Cisco Pre Input Octets"},
904 {191, RADIUS_INTEGER4, "Cisco Pre Output Octets"},
905 {192, RADIUS_INTEGER4, "Cisco Pre Input Packets"},
906 {193, RADIUS_INTEGER4, "Cisco Pre Output Packets"},
907 {194, RADIUS_INTEGER4, "Cisco Maximum Time"},
908 {195, CISCO_DISCONNECT_CAUSE, "Cisco Disconnect Cause"},
910 {197, RADIUS_INTEGER4, "Cisco Data Rate"},
911 {198, RADIUS_INTEGER4, "Cisco PreSession Time"},
913 {208, RADIUS_INTEGER4, "Cisco PW Lifetime"},
914 {209, RADIUS_INTEGER4, "Cisco IP Direct"},
915 {210, RADIUS_INTEGER4, "Cisco PPP VJ Slot Comp"},
917 {212, RADIUS_INTEGER4, "Cisco PPP Async Map"},
919 {217, RADIUS_INTEGER4, "Cisco IP Pool Definition"},
920 {218, RADIUS_INTEGER4, "Cisco Asing IP Pool"},
922 {228, RADIUS_INTEGER4, "Cisco Route IP"},
924 {233, RADIUS_INTEGER4, "Cisco Link Compression"},
925 {234, RADIUS_INTEGER4, "Cisco Target Util"},
926 {235, RADIUS_INTEGER4, "Cisco Maximum Channels"},
928 {242, RADIUS_INTEGER4, "Cisco Data Filter"},
929 {243, RADIUS_INTEGER4, "Cisco Call Filter"},
930 {244, RADIUS_INTEGER4, "Cisco Idle Limit"},
931 {255, RADIUS_INTEGER4, "Cisco Xmit Rate"},
935 static value_string radius_vendor_cisco_disconnect_cause_vals[] =
938 {4, "CLID Authentication Failure"},
940 {11, "Lost Carrier"},
941 {12, "No Detected Result Codes"},
942 {20, "User Ends Session"},
943 {21, "Idle Timeout"},
944 {22, "Exit Telnet Session"},
945 {23, "No Remote IP Addr"},
946 {24, "Exit Raw TCP"},
947 {25, "Password Fail"},
948 {26, "Raw TCP Disabled"},
949 {27, "Control C Detected"},
950 {28, "EXEC Program Destroyed"},
951 {40, "Timeout PPP LCP"},
952 {41, "Failed PPP LCP Negotiation"},
953 {42, "Failed PPP PAP Auth Fail"},
954 {43, "Failed PPP CHAP Auth"},
955 {44, "Failed PPP Remote Auth"},
956 {45, "PPP Remote Terminate"},
957 {46, "PPP Closed Event"},
958 {100, "Session Timeout"},
959 {101, "Session Failed Security"},
960 {102, "Session End Callback"},
961 {120, "Invalid Protocol"},
967 'dictionary.shiva' file from FreeRADIUS
968 http://www.freeradius.org/radiusd/raddb/dictionary.shiva
970 static value_value_string radius_vendor_shiva_attrib[] =
972 {1, RADIUS_STRING, "Shiva User Attributes"},
973 {90, RADIUS_STRING, "Shiva Called Number"},
974 {91, RADIUS_STRING, "Shiva Calling Number"},
975 {92, RADIUS_STRING, "Shiva Customer Id"},
976 {93, SHIVA_TYPE_OF_SERVICE, "Shiva Type Of Service"},
977 {94, RADIUS_INTEGER4, "Shiva Link Speed"},
978 {95, RADIUS_INTEGER4, "Shiva Links In Bundle"},
979 {96, RADIUS_INTEGER4, "Shiva Compression Type"},
980 {97, SHIVA_LINK_PROTOCOL, "Shiva Link Protocol"},
981 {98, RADIUS_INTEGER4, "Shiva Network Protocols"},
982 {99, RADIUS_INTEGER4, "Shiva Session Id"},
983 {100, SHIVA_DISCONNECT_REASON,"Shiva Disconnect Reason"},
984 {101, RADIUS_IP_ADDRESS, "Shiva Acct Serv Switch"},
985 {102, RADIUS_INTEGER4, "Shiva Event Flags"},
986 {103, SHIVA_FUNCTION, "Shiva Function"},
987 {104, SHIVA_CONNECT_REASON, "Shiva Connect Reason"},
991 static value_string radius_vendor_shiva_type_of_service_vals[] =
994 {2, "Digitized Analog"},
996 {4, "Digital V.110"},
997 {5, "Digital V.120"},
998 {6, "Digital Leased Line"},
1002 static value_string radius_vendor_shiva_link_protocol_vals[] =
1013 static value_string radius_vendor_shiva_disconnect_reason_vals[] =
1017 {3, "Idle Timeout"},
1018 {4, "Session Timeout"},
1019 {5, "Admin Disconnect"},
1021 {7, "Virtual Connection"},
1022 {8, "Bandwidth On Demand"},
1023 {9, "Failed Authentication"},
1026 {12, "Tariff Management"},
1031 static value_string radius_vendor_shiva_function_vals[] =
1040 static value_string radius_vendor_shiva_connect_reason_vals[] =
1044 {3, "Virtual Connection"},
1045 {4, "Bandwidth On Demand"},
1051 'dictionary.livingston' file from FreeRADIUS
1052 http://www.freeradius.org/radiusd/raddb/dictionary.livingston
1054 static value_value_string radius_vendor_livingston_attrib[] =
1056 {2, RADIUS_STRING, "LE Terminate Detail"},
1057 {3, RADIUS_STRING, "LE Advice of Charge"},
1058 {4, RADIUS_STRING, "LE Connect Detail"},
1059 {6, RADIUS_STRING, "LE IP Pool"},
1060 {7, RADIUS_IP_ADDRESS, "LE IP Gateway"},
1061 {8, RADIUS_STRING, "LE Modem Info"},
1062 {9, LIVINGSTON_IPSEC_LOG_OPTIONS, "LE IPSec Log Options"},
1063 {10, LIVINGSTON_IPSEC_DENY_ACTION, "LE IPSec Deny Action"},
1064 {11, RADIUS_STRING, "LE IPSec Active Profile"},
1065 {12, RADIUS_STRING, "LE IPSec Outsource Profile"},
1066 {13, RADIUS_STRING, "LE IPSec Passive Profile"},
1067 {14, RADIUS_INTEGER4, "LE NAT TCP Session Timeout"},
1068 {15, RADIUS_INTEGER4, "LE NAT Other Session Timeout"},
1069 {16, LIVINGSTON_NAT_LOG_OPTIONS, "LE NAT Log Options"},
1070 {17, LIVINGSTON_NAT_SESS_DIR_FAIL_ACTION, "LE NAT Sess Dir Fail Action"},
1071 {18, RADIUS_STRING, "LE NAT Inmap"},
1072 {19, RADIUS_STRING, "LE NAT Outmap"},
1073 {20, RADIUS_STRING, "LE NAT Outsource Inmap"},
1074 {21, RADIUS_STRING, "LE NAT Outsource Outmap"},
1075 {22, RADIUS_STRING, "LE Admin Group"},
1076 {23, LIVINGSTON_MULTICAST_CLIENT, "LE Multicast Client"},
1080 static value_string radius_vendor_livingston_ipsec_log_options_vals[] =
1082 {1, "SA Success On"},
1083 {2, "SA Failure On"},
1086 {5, "SA Success Off"},
1087 {6, "SA Failure Off"},
1093 static value_string radius_vendor_livingston_ipsec_deny_action_vals[] =
1097 {3, "Pass Through"},
1101 static value_string radius_vendor_livingston_nat_log_options_vals[] =
1103 {1, "Session Success On"},
1104 {2, "Session Failure On"},
1114 static value_string radius_vendor_livingston_nat_sess_dir_fail_action_vals[] =
1118 {3, "Pass Through"},
1122 static value_string radius_vendor_livingston_multicast_client_vals[] =
1128 static value_value_string radius_vendor_microsoft_attrib[] =
1130 {1, RADIUS_BINSTRING, "MS CHAP Response"},
1131 {2, RADIUS_STRING, "MS CHAP Error"},
1132 {3, RADIUS_BINSTRING, "MS CHAP CPW 1"},
1133 {4, RADIUS_BINSTRING, "MS CHAP CPW 2"},
1134 {5, RADIUS_BINSTRING, "MS CHAP LM Enc PW"},
1135 {6, RADIUS_BINSTRING, "MS CHAP NT Enc PW"},
1136 {7, RADIUS_BINSTRING, "MS MPPE Encryption Policy"},
1137 {8, RADIUS_BINSTRING, "MS MPPE Encryption Type"},
1138 {9, RADIUS_INTEGER4, "MS RAS Vendor"},
1139 {10, RADIUS_STRING, "MS CHAP Domain"},
1140 {11, RADIUS_BINSTRING, "MS CHAP Challenge"},
1141 {12, RADIUS_BINSTRING, "MS CHAP MPPE Keys"},
1142 {13, MICROSOFT_BAP_USAGE, "MS BAP Usage"},
1143 {14, RADIUS_INTEGER4, "MS Link Utilization Threshold"},
1144 {15, RADIUS_INTEGER4, "MS Link Drop Time Limit"},
1145 {16, RADIUS_BINSTRING, "MS MPPE Send Key"},
1146 {17, RADIUS_BINSTRING, "MS MPPE Recv Key"},
1147 {18, RADIUS_STRING, "MS RAS Version"},
1148 {19, RADIUS_BINSTRING, "MS Old ARAP Password"},
1149 {20, RADIUS_BINSTRING, "MS New ARAP Password"},
1150 {21, MICROSOFT_ARAP_PW_CHANGE_REASON,"MS ARAP PW Change Reason"},
1151 {22, RADIUS_BINSTRING, "MS Filter"},
1152 {23, MICROSOFT_ACCT_AUTH_TYPE, "MS Acct Auth Type"},
1153 {24, MICROSOFT_ACCT_EAP_TYPE, "MS Acct EAP Type"},
1154 {25, RADIUS_BINSTRING, "MS CHAP2 Response"},
1155 {26, RADIUS_BINSTRING, "MS CHAP2 Success"},
1156 {27, RADIUS_BINSTRING, "MS CHAP2 CPW"},
1157 {28, RADIUS_IP_ADDRESS, "MS Primary DNS Server"},
1158 {29, RADIUS_IP_ADDRESS, "MS Secondary DNS Server"},
1159 {30, RADIUS_IP_ADDRESS, "MS Primary NBNS Server"},
1160 {31, RADIUS_IP_ADDRESS, "MS Secondary NBNS Server"},
1164 static value_string radius_vendor_microsoft_bap_usage_vals[] =
1172 static value_string radius_vendor_microsoft_arap_pw_change_reason_vals[] =
1174 {1, "Just Change Password"},
1175 {2, "Expired Password"},
1176 {3, "Admin Required Password Change"},
1177 {4, "Password Too Short"},
1181 static value_string radius_vendor_microsoft_acct_auth_type_vals[] =
1191 static value_string radius_vendor_microsoft_acct_eap_type_vals[] =
1195 {6, "Generic Token Card"},
1200 static value_value_string radius_vendor_ascend_attrib[] =
1202 {7, RADIUS_STRING, "Ascend UU Info"},
1203 {9, RADIUS_INTEGER4, "Ascend CIR Timer"},
1204 {10, RADIUS_INTEGER4, "Ascend FR 08 Mode"},
1205 {11, RADIUS_INTEGER4, "Ascend Destination Nas Port"},
1206 {12, RADIUS_STRING, "Ascend FR SVC Addr"},
1207 {13, RADIUS_INTEGER4, "Ascend NAS Port Format"},
1208 {14, RADIUS_INTEGER4, "Ascend ATM Fault Management"},
1209 {15, RADIUS_INTEGER4, "Ascend ATM Loopback Cell Loss"},
1210 {16, RADIUS_INTEGER4, "Ascend Ckt Type"},
1211 {17, RADIUS_INTEGER4, "Ascend SVC Enabled"},
1212 {18, RADIUS_INTEGER4, "Ascend Session Type"},
1213 {19, RADIUS_IP_ADDRESS, "Ascend H323 Gatekeeper"},
1214 {20, RADIUS_STRING, "Ascend Global Call Id"},
1215 {21, RADIUS_INTEGER4, "Ascend H323 Conference Id"},
1216 {22, RADIUS_IP_ADDRESS, "Ascend H323 Fegw Address"},
1217 {23, RADIUS_INTEGER4, "Ascend H323 Dialed Time"},
1218 {24, RADIUS_STRING, "Ascend Dialed Number"},
1219 {25, RADIUS_INTEGER4, "Ascend Inter Arrival Jitter"},
1220 {26, RADIUS_INTEGER4, "Ascend Dropped Octets"},
1221 {27, RADIUS_INTEGER4, "Ascend Dropped Packets"},
1222 {29, RADIUS_INTEGER4, "Ascend X25 Pad X3 Profile"},
1223 {30, RADIUS_STRING, "Ascend X25 Pad X3 Parameters"},
1224 {31, RADIUS_STRING, "Ascend Tunnel VRouter Name"},
1225 {32, RADIUS_INTEGER4, "Ascend X25 Reverse Charging"},
1226 {33, RADIUS_STRING, "Ascend X25 Nui Prompt"},
1227 {34, RADIUS_STRING, "Ascend X25 Nui Password Prompt"},
1228 {35, RADIUS_STRING, "Ascend X25 Cug"},
1229 {36, RADIUS_STRING, "Ascend X25 Pad Alias 1"},
1230 {37, RADIUS_STRING, "Ascend X25 Pad Alias 2"},
1231 {38, RADIUS_STRING, "Ascend X25 Pad Alias 3"},
1232 {39, RADIUS_STRING, "Ascend X25 X121 Address"},
1233 {40, RADIUS_STRING, "Ascend X25 Nui"},
1234 {41, RADIUS_STRING, "Ascend X25 Rpoa"},
1235 {42, RADIUS_STRING, "Ascend X25 Pad Prompt"},
1236 {43, RADIUS_STRING, "Ascend X25 Pad Banner"},
1237 {44, RADIUS_STRING, "Ascend X25 Profile Name"},
1238 {45, RADIUS_STRING, "Ascend Recv Name"},
1239 {46, RADIUS_INTEGER4, "Ascend Bi Directional Auth"},
1240 {47, RADIUS_INTEGER4, "Ascend MTU"},
1241 {48, RADIUS_INTEGER4, "Ascend Call Direction"},
1242 {49, RADIUS_INTEGER4, "Ascend Service Type"},
1243 {50, RADIUS_INTEGER4, "Ascend Filter Required"},
1244 {51, RADIUS_INTEGER4, "Ascend Traffic Shaper"},
1245 {52, RADIUS_STRING, "Ascend Access Intercept LEA"},
1246 {53, RADIUS_STRING, "Ascend Access Intercept Log"},
1247 {54, RADIUS_STRING, "Ascend Private Route Table ID"},
1248 {55, RADIUS_INTEGER4, "Ascend Private Route Required"},
1249 {56, RADIUS_INTEGER4, "Ascend Cache Refresh"},
1250 {57, RADIUS_INTEGER4, "Ascend Cache Time"},
1251 {58, RADIUS_INTEGER4, "Ascend Egress Enabled"},
1252 {59, RADIUS_STRING, "Ascend QOS Upstream"},
1253 {60, RADIUS_STRING, "Ascend QOS Downstream"},
1254 {61, RADIUS_INTEGER4, "Ascend ATM Connect Vpi"},
1255 {62, RADIUS_INTEGER4, "Ascend ATM Connect Vci"},
1256 {63, RADIUS_INTEGER4, "Ascend ATM Connect Group"},
1257 {64, RADIUS_INTEGER4, "Ascend ATM Group"},
1258 {65, RADIUS_INTEGER4, "Ascend IPX Header Compression"},
1259 {66, ASCEND_CALLING_ID_TYPE_OF_NUMBER, "Ascend Calling Id Type Of Number"},
1260 {67, ASCEND_CALLING_ID_NUMBERING_PLAN, "Ascend Calling Id Numbering Plan"},
1261 {68, ASCEND_CALLING_ID_PRESENTATION, "Ascend Calling Id Presentation"},
1262 {69, ASCEND_CALLING_ID_SCREENING, "Ascend Calling Id Screening"},
1263 {70, RADIUS_INTEGER4, "Ascend BIR Enable"},
1264 {71, RADIUS_INTEGER4, "Ascend BIR Proxy"},
1265 {72, RADIUS_INTEGER4, "Ascend BIR Bridge Group"},
1266 {73, RADIUS_STRING, "Ascend IPSEC Profile"},
1267 {74, RADIUS_INTEGER4, "Ascend PPPoE Enable"},
1268 {75, RADIUS_INTEGER4, "Ascend Bridge Non PPPoE"},
1269 {76, RADIUS_INTEGER4, "Ascend ATM Direct"},
1270 {77, RADIUS_STRING, "Ascend ATM Direct Profile"},
1271 {78, RADIUS_IP_ADDRESS, "Ascend Client Primary WINS"},
1272 {79, RADIUS_IP_ADDRESS, "Ascend Client Secondary WINS"},
1273 {80, RADIUS_INTEGER4, "Ascend Client Assign WINS"},
1274 {81, RADIUS_INTEGER4, "Ascend Auth Type"},
1275 {82, RADIUS_INTEGER4, "Ascend Port Redir Protocol"},
1276 {83, RADIUS_INTEGER4, "Ascend Port Redir Portnum"},
1277 {84, RADIUS_IP_ADDRESS, "Ascend Port Redir Server"},
1278 {85, RADIUS_INTEGER4, "Ascend IP Pool Chaining"},
1279 {86, RADIUS_IP_ADDRESS, "Ascend Owner IP Addr"},
1280 {87, RADIUS_INTEGER4, "Ascend IP TOS"},
1281 {88, RADIUS_INTEGER4, "Ascend IP TOS Precedence"},
1282 {89, RADIUS_INTEGER4, "Ascend IP TOS Apply To"},
1283 {90, RADIUS_STRING, "Ascend Filter"},
1284 {91, RADIUS_STRING, "Ascend Telnet Profile"},
1285 {92, RADIUS_INTEGER4, "Ascend Dsl Rate Type"},
1286 {93, RADIUS_STRING, "Ascend Redirect Number"},
1287 {94, RADIUS_INTEGER4, "Ascend ATM Vpi"},
1288 {95, RADIUS_INTEGER4, "Ascend ATM Vci"},
1289 {96, RADIUS_INTEGER4, "Ascend Source IP Check"},
1290 {97, RADIUS_INTEGER4, "Ascend Dsl Rate Mode"},
1291 {98, RADIUS_INTEGER4, "Ascend Dsl Upstream Limit"},
1292 {99, RADIUS_INTEGER4, "Ascend Dsl Downstream Limit"},
1293 {100, RADIUS_INTEGER4, "Ascend Dsl CIR Recv Limit"},
1294 {101, RADIUS_INTEGER4, "Ascend Dsl CIR Xmit Limit"},
1295 {102, RADIUS_STRING, "Ascend VRouter Name"},
1296 {103, RADIUS_STRING, "Ascend Source Auth"},
1297 {104, RADIUS_STRING, "Ascend Private Route"},
1298 {105, RADIUS_INTEGER4, "Ascend Numbering Plan ID"},
1299 {106, RADIUS_INTEGER4, "Ascend FR Link Status DLCI"},
1300 {107, RADIUS_STRING, "Ascend Calling Subaddress"},
1301 {108, RADIUS_INTEGER4, "Ascend Callback Delay"},
1302 {109, RADIUS_STRING, "Ascend Endpoint Disc"},
1303 {110, RADIUS_STRING, "Ascend Remote FW"},
1304 {111, RADIUS_INTEGER4, "Ascend Multicast GLeave Delay"},
1305 {112, RADIUS_INTEGER4, "Ascend CBCP Enable"},
1306 {113, RADIUS_INTEGER4, "Ascend CBCP Mode"},
1307 {114, RADIUS_INTEGER4, "Ascend CBCP Delay"},
1308 {115, RADIUS_INTEGER4, "Ascend CBCP Trunk Group"},
1309 {116, RADIUS_STRING, "Ascend Appletalk Route"},
1310 {117, RADIUS_INTEGER4, "Ascend Appletalk Peer Mode"},
1311 {118, RADIUS_INTEGER4, "Ascend Route Appletalk"},
1312 {119, RADIUS_STRING, "Ascend FCP Parameter"},
1313 {120, RADIUS_INTEGER4, "Ascend Modem Port No"},
1314 {121, RADIUS_INTEGER4, "Ascend Modem Slot No"},
1315 {122, RADIUS_INTEGER4, "Ascend Modem Shelf No"},
1316 {123, RADIUS_INTEGER4, "Ascend Call Attempt Limit"},
1317 {124, RADIUS_INTEGER4, "Ascend Call Block Duration"},
1318 {125, RADIUS_INTEGER4, "Ascend Maximum Call Duration"},
1319 {126, RADIUS_INTEGER4, "Ascend Temporary Rtes"},
1320 {127, RADIUS_INTEGER4, "Ascend Tunneling Protocol"},
1321 {128, RADIUS_INTEGER4, "Ascend Shared Profile Enable"},
1322 {129, RADIUS_STRING, "Ascend Primary Home Agent"},
1323 {130, RADIUS_STRING, "Ascend Secondary Home Agent"},
1324 {131, RADIUS_INTEGER4, "Ascend Dialout Allowed"},
1325 {132, RADIUS_IP_ADDRESS, "Ascend Client Gateway"},
1326 {133, RADIUS_INTEGER4, "Ascend BACP Enable"},
1327 {134, RADIUS_INTEGER4, "Ascend DHCP Maximum Leases"},
1328 {135, RADIUS_IP_ADDRESS, "Ascend Client Primary DNS"},
1329 {136, RADIUS_IP_ADDRESS, "Ascend Client Secondary DNS"},
1330 {137, RADIUS_INTEGER4, "Ascend Client Assign DNS"},
1331 {138, RADIUS_INTEGER4, "Ascend User Acct Type"},
1332 {139, RADIUS_IP_ADDRESS, "Ascend User Acct Host"},
1333 {140, RADIUS_INTEGER4, "Ascend User Acct Port"},
1334 {141, RADIUS_STRING, "Ascend User Acct Key"},
1335 {142, RADIUS_INTEGER4, "Ascend User Acct Base"},
1336 {143, RADIUS_INTEGER4, "Ascend User Acct Time"},
1337 {144, RADIUS_IP_ADDRESS, "Ascend Assign IP Client"},
1338 {145, RADIUS_IP_ADDRESS, "Ascend Assign IP Server"},
1339 {146, RADIUS_STRING, "Ascend Assign IP Global Pool"},
1340 {147, RADIUS_INTEGER4, "Ascend DHCP Reply"},
1341 {148, RADIUS_INTEGER4, "Ascend DHCP Pool Number"},
1342 {149, RADIUS_INTEGER4, "Ascend Expect Callback"},
1343 {150, RADIUS_INTEGER4, "Ascend Event Type"},
1344 {151, RADIUS_STRING, "Ascend Session Svr Key"},
1345 {152, RADIUS_INTEGER4, "Ascend Multicast Rate Limit"},
1346 {153, RADIUS_IP_ADDRESS, "Ascend IF Netmask"},
1347 {154, RADIUS_IP_ADDRESS, "Ascend Remote Addr"},
1348 {155, RADIUS_INTEGER4, "Ascend Multicast Client"},
1349 {156, RADIUS_STRING, "Ascend FR Circuit Name"},
1350 {157, RADIUS_INTEGER4, "Ascend FR LinkUp"},
1351 {158, RADIUS_INTEGER4, "Ascend FR Nailed Grp"},
1352 {159, RADIUS_INTEGER4, "Ascend FR Type"},
1353 {160, RADIUS_INTEGER4, "Ascend FR Link Mgt"},
1354 {161, RADIUS_INTEGER4, "Ascend FR N391"},
1355 {162, RADIUS_INTEGER4, "Ascend FR DCE N392"},
1356 {163, RADIUS_INTEGER4, "Ascend FR DTE N392"},
1357 {164, RADIUS_INTEGER4, "Ascend FR DCE N393"},
1358 {165, RADIUS_INTEGER4, "Ascend FR DTE N393"},
1359 {166, RADIUS_INTEGER4, "Ascend FR T391"},
1360 {167, RADIUS_INTEGER4, "Ascend FR T392"},
1361 {168, RADIUS_STRING, "Ascend Bridge Address"},
1362 {169, RADIUS_INTEGER4, "Ascend TS Idle Limit"},
1363 {170, RADIUS_INTEGER4, "Ascend TS Idle Mode"},
1364 {171, RADIUS_INTEGER4, "Ascend DBA Monitor"},
1365 {172, RADIUS_INTEGER4, "Ascend Base Channel Count"},
1366 {173, RADIUS_INTEGER4, "Ascend Minimum Channels"},
1367 {174, RADIUS_STRING, "Ascend IPX Route"},
1368 {175, RADIUS_INTEGER4, "Ascend FT1 Caller"},
1369 {176, RADIUS_STRING, "Ascend Backup"},
1370 {177, RADIUS_INTEGER4, "Ascend Call Type"},
1371 {178, RADIUS_STRING, "Ascend Group"},
1372 {179, RADIUS_INTEGER4, "Ascend FR DLCI"},
1373 {180, RADIUS_STRING, "Ascend FR Profile Name"},
1374 {181, RADIUS_STRING, "Ascend Ara PW"},
1375 {182, RADIUS_STRING, "Ascend IPX Node Addr"},
1376 {183, RADIUS_IP_ADDRESS, "Ascend Home Agent IP Addr"},
1377 {184, RADIUS_STRING, "Ascend Home Agent Password"},
1378 {185, RADIUS_STRING, "Ascend Home Network Name"},
1379 {186, RADIUS_INTEGER4, "Ascend Home Agent UDP Port"},
1380 {187, RADIUS_INTEGER4, "Ascend Multilink ID"},
1381 {188, RADIUS_INTEGER4, "Ascend Num In Multilink"},
1382 {189, RADIUS_IP_ADDRESS, "Ascend First Dest"},
1383 {190, RADIUS_INTEGER4, "Ascend Pre Input Octets"},
1384 {191, RADIUS_INTEGER4, "Ascend Pre Output Octets"},
1385 {192, RADIUS_INTEGER4, "Ascend Pre Input Packets"},
1386 {193, RADIUS_INTEGER4, "Ascend Pre Output Packets"},
1387 {194, RADIUS_INTEGER4, "Ascend Maximum Time"},
1388 {195, RADIUS_INTEGER4, "Ascend Disconnect Cause"},
1389 {196, RADIUS_INTEGER4, "Ascend Connect Progress"},
1390 {197, RADIUS_INTEGER4, "Ascend Data Rate"},
1391 {198, RADIUS_INTEGER4, "Ascend PreSession Time"},
1392 {199, RADIUS_INTEGER4, "Ascend Token Idle"},
1393 {200, RADIUS_INTEGER4, "Ascend Token Immediate"},
1394 {201, RADIUS_INTEGER4, "Ascend Require Auth"},
1395 {202, RADIUS_STRING, "Ascend Number Sessions"},
1396 {203, RADIUS_STRING, "Ascend Authen Alias"},
1397 {204, RADIUS_INTEGER4, "Ascend Token Expiry"},
1398 {205, RADIUS_STRING, "Ascend Menu Selector"},
1399 {206, RADIUS_STRING, "Ascend Menu Item"},
1400 {207, RADIUS_INTEGER4, "Ascend PW Warntime"},
1401 {208, RADIUS_INTEGER4, "Ascend PW Lifetime"},
1402 {209, RADIUS_IP_ADDRESS, "Ascend IP Direct"},
1403 {210, RADIUS_INTEGER4, "Ascend PPP VJ Slot Comp"},
1404 {211, RADIUS_INTEGER4, "Ascend PPP VJ 1172"},
1405 {212, RADIUS_INTEGER4, "Ascend PPP Async Map"},
1406 {213, RADIUS_STRING, "Ascend Third Prompt"},
1407 {214, RADIUS_STRING, "Ascend Send Secret"},
1408 {215, RADIUS_STRING, "Ascend Receive Secret"},
1409 {216, RADIUS_INTEGER4, "Ascend IPX Peer Mode"},
1410 {217, RADIUS_STRING, "Ascend IP Pool Definition"},
1411 {218, RADIUS_INTEGER4, "Ascend Assign IP Pool"},
1412 {219, RADIUS_INTEGER4, "Ascend FR Direct"},
1413 {220, RADIUS_STRING, "Ascend FR Direct Profile"},
1414 {221, RADIUS_INTEGER4, "Ascend FR Direct DLCI"},
1415 {222, RADIUS_INTEGER4, "Ascend Handle IPX"},
1416 {223, RADIUS_INTEGER4, "Ascend Netware timeout"},
1417 {224, RADIUS_INTEGER4, "Ascend IPX Alias"},
1418 {225, RADIUS_INTEGER4, "Ascend Metric"},
1419 {226, RADIUS_INTEGER4, "Ascend PRI Number Type"},
1420 {227, RADIUS_STRING, "Ascend Dial Number"},
1421 {228, RADIUS_INTEGER4, "Ascend Route IP"},
1422 {229, RADIUS_INTEGER4, "Ascend Route IPX"},
1423 {230, RADIUS_INTEGER4, "Ascend Bridge"},
1424 {231, RADIUS_INTEGER4, "Ascend Send Auth"},
1425 {232, RADIUS_STRING, "Ascend Send Passwd"},
1426 {233, RADIUS_INTEGER4, "Ascend Link Compression"},
1427 {234, RADIUS_INTEGER4, "Ascend Target Util"},
1428 {235, RADIUS_INTEGER4, "Ascend Maximum Channels"},
1429 {236, RADIUS_INTEGER4, "Ascend Inc Channel Count"},
1430 {237, RADIUS_INTEGER4, "Ascend Dec Channel Count"},
1431 {238, RADIUS_INTEGER4, "Ascend Seconds Of History"},
1432 {239, RADIUS_INTEGER4, "Ascend History Weigh Type"},
1433 {240, RADIUS_INTEGER4, "Ascend Add Seconds"},
1434 {241, RADIUS_INTEGER4, "Ascend Remove Seconds"},
1435 {242, RADIUS_BINSTRING, "Ascend Data Filter"},
1436 {243, RADIUS_BINSTRING, "Ascend Call Filter"},
1437 {244, RADIUS_INTEGER4, "Ascend Idle Limit"},
1438 {245, RADIUS_INTEGER4, "Ascend Preempt Limit"},
1439 {246, RADIUS_INTEGER4, "Ascend Callback"},
1440 {247, RADIUS_INTEGER4, "Ascend Data Svc"},
1441 {248, RADIUS_INTEGER4, "Ascend Force 56"},
1442 {249, RADIUS_STRING, "Ascend Billing Number"},
1443 {250, RADIUS_INTEGER4, "Ascend Call By Call"},
1444 {251, RADIUS_STRING, "Ascend Transit Number"},
1445 {252, RADIUS_STRING, "Ascend Host Info"},
1446 {253, RADIUS_IP_ADDRESS, "Ascend PPP Address"},
1447 {254, RADIUS_INTEGER4, "Ascend MPP Idle Percent"},
1448 {255, RADIUS_INTEGER4, "Ascend Xmit Rate"},
1452 static value_string radius_vendor_ascend_calling_id_type_of_number_vals[] =
1455 {1, "International Number"},
1456 {2, "National Number"},
1457 {3, "Network Specific"},
1458 {4, "Subscriber Number"},
1459 {6, "Abbreviated Number"},
1463 static value_string radius_vendor_ascend_calling_id_numbering_plan_vals[] =
1466 {1, "ISDN Telephony"},
1474 static value_string radius_vendor_ascend_calling_id_presentation_vals[] =
1478 {2, "Number Not Available"},
1482 static value_string radius_vendor_ascend_calling_id_screening_vals[] =
1484 {0, "User Not Screened"},
1485 {1, "User Provided Passed"},
1486 {2, "User Provided Failed"},
1487 {3, "Network Provided"},
1493 'dictionary.bay' file from FreeRADIUS
1494 http://www.freeradius.org/radiusd/raddb/dictionary.bay
1496 static value_value_string radius_vendor_bay_attrib[] =
1498 {28, RADIUS_STRING, "Annex Filter"},
1499 {29, RADIUS_STRING, "Annex CLI Command"},
1500 {30, RADIUS_STRING, "Annex CLI Filter"},
1501 {31, RADIUS_STRING, "Annex Host Restrict"},
1502 {32, RADIUS_STRING, "Annex Host Allow"},
1503 {33, RADIUS_STRING, "Annex Product Name"},
1504 {34, RADIUS_STRING, "Annex SW Version"},
1505 {35, RADIUS_IP_ADDRESS, "Annex Local IP Address"},
1506 {36, RADIUS_INTEGER4, "Annex Callback Portlist"},
1507 {37, RADIUS_INTEGER4, "Annex Sec Profile Index"},
1508 {38, BAY_TUNNEL_AUTHEN_TYPE, "Annex Tunnel Authen Type"},
1509 {39, BAY_TUNNEL_AUTHEN_MODE, "Annex Tunnel Authen Mode"},
1510 {40, RADIUS_STRING, "Annex Authen Servers"},
1511 {41, RADIUS_STRING, "Annex Acct Servers"},
1512 {42, BAY_USER_SERVER_LOCATION, "Annex User Server Location"},
1513 {43, RADIUS_STRING, "Annex Local Username"},
1514 {44, BAY_SYSTEM_DISC_REASON, "Annex System Disc Reason"},
1515 {45, BAY_MODEM_DISC_REASON, "Annex Modem Disc Reason"},
1516 {46, RADIUS_INTEGER4, "Annex Disconnect Reason"},
1517 {47, BAY_ADDR_RESOLUTION_PROTOCOL, "Annex Addr Resolution Protocol"},
1518 {48, RADIUS_STRING, "Annex Addr Resolution Servers"},
1519 {49, RADIUS_STRING, "Annex Domain Name"},
1520 {50, RADIUS_INTEGER4, "Annex Transmit Speed"},
1521 {51, RADIUS_INTEGER4, "Annex Receive Speed"},
1522 {52, RADIUS_STRING, "Annex Input Filter"},
1523 {53, RADIUS_STRING, "Annex Output Filter"},
1524 {54, RADIUS_IP_ADDRESS, "Annex Primary DNS Server"},
1525 {55, RADIUS_IP_ADDRESS, "Annex Secondary DNS Server"},
1526 {56, RADIUS_IP_ADDRESS, "Annex Primary NBNS Server"},
1527 {57, RADIUS_IP_ADDRESS, "Annex Secondary NBNS Server"},
1528 {58, RADIUS_INTEGER4, "Annex Syslog Tap"},
1529 {59, RADIUS_INTEGER4, "Annex Keypress Timeout"},
1530 {60, RADIUS_INTEGER4, "Annex Unauthenticated Time"},
1531 {61, RADIUS_INTEGER4, "Annex Re CHAP Timeout"},
1532 {62, RADIUS_INTEGER4, "Annex MRRU"},
1533 {63, RADIUS_STRING, "Annex EDO"},
1534 {64, RADIUS_INTEGER4, "Annex PPP Trace Level"},
1535 {65, RADIUS_INTEGER4, "Annex Pre Input Octets"},
1536 {66, RADIUS_INTEGER4, "Annex Pre Output Octets"},
1537 {67, RADIUS_INTEGER4, "Annex Pre Input Packets"},
1538 {68, RADIUS_INTEGER4, "Annex Pre Output Packets"},
1539 {69, RADIUS_INTEGER4, "Annex Connect Progress"},
1540 {73, RADIUS_INTEGER4, "Annex Multicast Rate Limit"},
1541 {74, RADIUS_INTEGER4, "Annex Maximum Call Duration"},
1542 {75, RADIUS_INTEGER4, "Annex Multilink Id"},
1543 {76, RADIUS_INTEGER4, "Annex Num In Multilink"},
1544 {81, RADIUS_INTEGER4, "Annex Logical Channel Number"},
1545 {82, RADIUS_INTEGER4, "Annex Wan Number"},
1546 {83, RADIUS_INTEGER4, "Annex Port"},
1547 {85, RADIUS_INTEGER4, "Annex Pool Id"},
1548 {86, RADIUS_STRING, "Annex Compression Protocol"},
1549 {87, RADIUS_INTEGER4, "Annex Transmitted Packets"},
1550 {88, RADIUS_INTEGER4, "Annex Retransmitted Packets"},
1551 {89, RADIUS_INTEGER4, "Annex Signal to Noise Ratio"},
1552 {90, RADIUS_INTEGER4, "Annex Retrain Requests Sent"},
1553 {91, RADIUS_INTEGER4, "Annex Retrain Requests Rcvd"},
1554 {92, RADIUS_INTEGER4, "Annex Rate Reneg Req Sent"},
1555 {93, RADIUS_INTEGER4, "Annex Rate Reneg Req Rcvd"},
1556 {94, RADIUS_INTEGER4, "Annex Begin Receive Line Level"},
1557 {95, RADIUS_INTEGER4, "Annex End Receive Line Level"},
1558 {96, RADIUS_STRING, "Annex Begin Modulation"},
1559 {97, RADIUS_STRING, "Annex Error Correction Prot"},
1560 {98, RADIUS_STRING, "Annex End Modulation"},
1561 {100, BAY_USER_LEVEL, "Annex User Level"},
1562 {101, BAY_AUDIT_LEVEL, "Annex Audit Level"},
1566 static value_string radius_vendor_bay_tunnel_authen_type_vals[] =
1573 static value_string radius_vendor_bay_tunnel_authen_mode_vals[] =
1576 {1, "prefix suffix"},
1580 static value_string radius_vendor_bay_user_server_location_vals[] =
1587 static value_string radius_vendor_bay_system_disc_reason_vals[] =
1590 {1, "Line disconnected"},
1592 {3, "WAN manager error"},
1593 {4, "Disconnect reset"},
1594 {5, "Error from adm_notify"},
1595 {6, "Modem down adm_notify"},
1596 {7, "PPP protocol disconnect"},
1597 {8, "Inactivity timer"},
1598 {9, "CLI Hangup command"},
1599 {10, "CLI last job"},
1600 {11, "Session timeout"},
1601 {12, "Slave termination"},
1602 {13, "Abnormal termination"},
1603 {14, "DCD wait failed"},
1604 {15, "CLI inactivity"},
1605 {16, "Admin port reset"},
1606 {17, "CLI auth failed"},
1607 {18, "Slave auth failed"},
1608 {19, "PAP auth failed"},
1609 {20, "CHAP auth failed"},
1610 {21, "Local modem reset"},
1612 {23, "PPP LCP failure"},
1613 {24, "PPP IPCP failure"},
1614 {25, "PPP IPXCP failure"},
1615 {26, "PPP ATCP failure"},
1616 {27, "PPP CCP failure"},
1617 {28, "PPP MP failure"},
1618 {29, "PPP IPCP timeout"},
1619 {30, "PPP IPXCP timeout"},
1620 {31, "PPP ATCP timeout"},
1621 {32, "PPP CCP timeout"},
1622 {33, "PPP MP timeout"},
1623 {34, "PPP init failure"},
1624 {35, "PPP Unknown"},
1625 {36, "PPP Dialback failed"},
1626 {37, "PPP Address In Use"},
1627 {38, "PPP No device"},
1628 {39, "PPP Modem hangup rcvd"},
1629 {40, "PPP Hangup rcvd"},
1630 {41, "PPP Termination rcvd"},
1631 {42, "PPP Kill rcvd"},
1632 {43, "PPP Time rcvd"},
1633 {44, "PPP No memory"},
1634 {45, "PPP Connection Abort"},
1635 {46, "PPP VPN LCP failure"},
1636 {47, "PPP VPN Auth failure"},
1637 {48, "PPP MP invalid port"},
1638 {49, "PPP Invalid device"},
1639 {50, "PPP MMP bundle failure"},
1640 {51, "DVS Registration failure"},
1641 {52, "DVS Home agent dereg"},
1642 {53, "DVS Tunnel no renew"},
1643 {54, "DVS Tunnel expired"},
1647 static value_string radius_vendor_bay_modem_disc_reason_vals[] =
1650 {1, "Local disconnect"},
1651 {2, "CD Timer Expired"},
1652 {4, "Remote protocol disc"},
1654 {6, "Long Space disconnect"},
1655 {7, "Carrier Lost"},
1656 {8, "Modem Retrain Timeout"},
1660 static value_string radius_vendor_bay_addr_resolution_protocol_vals[] =
1667 static value_string radius_vendor_bay_user_level_vals[] =
1675 static value_string radius_vendor_bay_audit_level_vals[] =
1685 'dictionary.versanet' file from FreeRADIUS
1686 http://www.freeradius.org/radiusd/raddb/dictionary.versanet
1688 static value_value_string radius_vendor_versanet_attrib[] =
1690 {1, VERSANET_TERMINATION_CAUSE, "Versanet Termination Cause"},
1694 static value_string radius_vendor_versanet_termination_cause_vals[] =
1696 {0, "Normal Hangup No Error Occurred"},
1697 {3, "Call Waiting Caused Disconnect"},
1698 {4, "Physical Carrier Loss"},
1699 {5, "No err correction at other end"},
1700 {6, "No resp to feature negotiation"},
1701 {7, "1st modem async only 2nd sync"},
1702 {8, "No framing technique in common"},
1703 {9, "No protocol in common"},
1704 {10, "Bad resp to feature negotiation"},
1705 {11, "No sync info from remote modem"},
1706 {12, "Normal Hangup by Remote modem"},
1707 {13, "Retransmission limit reached"},
1708 {14, "Protocol violation occurred"},
1710 {16, "Received GSTN cleardown"},
1711 {17, "Inactivity timeout"},
1712 {18, "Speed not supported"},
1713 {19, "Long space disconnect"},
1714 {20, "Key abort disconnect"},
1715 {21, "Clears previous disc reason"},
1716 {22, "No connection established"},
1717 {23, "Disconnect after three retrains"},
1723 'dictionary.redback' file from FreeRADIUS
1724 http://www.freeradius.org/radiusd/raddb/dictionary.redback
1726 static value_value_string radius_vendor_redback_attrib[] =
1728 {1, RADIUS_IP_ADDRESS, "Client DNS Pri"},
1729 {2, RADIUS_IP_ADDRESS, "Client DNS Sec"},
1730 {3, RADIUS_INTEGER4, "DHCP Max Leases"},
1731 {4, RADIUS_STRING, "Context Name"},
1732 {5, RADIUS_STRING, "Bridge Group"},
1733 {6, RADIUS_STRING, "BG Aging Time"},
1734 {7, RADIUS_STRING, "BG Path Cost"},
1735 {8, RADIUS_STRING, "BG Span Dis"},
1736 {9, RADIUS_STRING, "BG Trans BPDU"},
1737 {10, RADIUS_INTEGER4, "Rate Limit Rate"},
1738 {11, RADIUS_INTEGER4, "Rate Limit Burst"},
1739 {12, RADIUS_INTEGER4, "Police Rate"},
1740 {13, RADIUS_INTEGER4, "Police Burst"},
1741 {14, RADIUS_INTEGER4, "Source Validation"},
1742 {15, RADIUS_INTEGER4, "Tunnel Domain"},
1743 {16, RADIUS_STRING, "Tunnel Local Name"},
1744 {17, RADIUS_STRING, "Tunnel Remote Name"},
1745 {18, REDBACK_TUNNEL_FUNCTION, "Tunnel Function"},
1746 {21, RADIUS_INTEGER4, "Tunnel Max Sessions"},
1747 {22, RADIUS_INTEGER4, "Tunnel Max Tunnels"},
1748 {23, RADIUS_INTEGER4, "Tunnel Session Auth"},
1749 {24, RADIUS_INTEGER4, "Tunnel Window"},
1750 {25, RADIUS_INTEGER4, "Tunnel Retransmit"},
1751 {26, RADIUS_INTEGER4, "Tunnel Cmd Timeout"},
1752 {27, RADIUS_STRING, "PPPOE URL"},
1753 {28, RADIUS_STRING, "PPPOE MOTM"},
1754 {29, RADIUS_INTEGER4, "Tunnel Group"},
1755 {30, RADIUS_STRING, "Tunnel Context"},
1756 {31, RADIUS_INTEGER4, "Tunnel Algorithm"},
1757 {32, RADIUS_INTEGER4, "Tunnel Deadtime"},
1758 {33, REDBACK_MCAST_SEND, "Mcast Send"},
1759 {34, REDBACK_MCAST_RECEIVE, "Mcast Receive"},
1760 {35, RADIUS_INTEGER4, "Mcast MaxGroups"},
1761 {36, RADIUS_STRING, "Ip Address Pool Name"},
1762 {37, REDBACK_TUNNEL_DNIS, "Tunnel DNIS"},
1763 {38, RADIUS_INTEGER4, "Medium Type"},
1764 {39, REDBACK_PVC_ENCAPSULATION_TYPE, "PVC Encapsulation Type"},
1765 {40, RADIUS_STRING, "PVC Profile Name"},
1766 {41, REDBACK_PVC_CIRCUIT_PADDING, "PVC Circuit Padding"},
1767 {42, REDBACK_BIND_TYPE, "Bind Type"},
1768 {43, REDBACK_BIND_AUTH_PROTOCOL, "Bind Auth Protocol"},
1769 {44, RADIUS_INTEGER4, "Bind Auth Max Sessions"},
1770 {45, RADIUS_STRING, "Bind Bypass Bypass"},
1771 {46, RADIUS_STRING, "Bind Auth Context"},
1772 {47, RADIUS_STRING, "Bind Auth Service Grp"},
1773 {48, RADIUS_STRING, "Bind Bypass Context"},
1774 {49, RADIUS_STRING, "Bind Int Context"},
1775 {50, RADIUS_STRING, "Bind Tun Context"},
1776 {51, RADIUS_STRING, "Bind Ses Context"},
1777 {52, RADIUS_INTEGER4, "Bind Dot1q Slot"},
1778 {53, RADIUS_INTEGER4, "Bind Dot1q Port"},
1779 {54, RADIUS_INTEGER4, "Bind Dot1q Vlan Tag Id"},
1780 {55, RADIUS_STRING, "Bind Int Interface Name"},
1781 {56, RADIUS_STRING, "Bind L2TP Tunnel Name"},
1782 {57, RADIUS_INTEGER4, "Bind L2TP Flow Control"},
1783 {58, RADIUS_STRING, "Bind Sub User At Context"},
1784 {59, RADIUS_STRING, "Bind Sub Password"},
1785 {60, RADIUS_STRING, "Ip Host Addr"},
1786 {61, RADIUS_INTEGER4, "IP TOS Field"},
1787 {62, RADIUS_INTEGER4, "NAS Real Port"},
1788 {63, RADIUS_STRING, "Tunnel Session Auth Ctx"},
1789 {64, RADIUS_STRING, "Tunnel Session Auth Service Grp"},
1790 {65, RADIUS_INTEGER4, "Tunnel Rate Limit Rate"},
1791 {66, RADIUS_INTEGER4, "Tunnel Rate Limit Burst"},
1792 {67, RADIUS_INTEGER4, "Tunnel Police Rate"},
1793 {68, RADIUS_INTEGER4, "Tunnel Police Burst"},
1794 {69, RADIUS_STRING, "Tunnel L2F Second Password"},
1795 {128, RADIUS_INTEGER4, "Acct Input Octets 64"},
1796 {129, RADIUS_INTEGER4, "Acct Output Octets 64"},
1797 {130, RADIUS_INTEGER4, "Acct Input Packets 64"},
1798 {131, RADIUS_INTEGER4, "Acct Output Packets 64"},
1799 {132, RADIUS_IP_ADDRESS, "Assigned IP Address"},
1800 {133, RADIUS_INTEGER4, "Acct Mcast In Octets"},
1801 {134, RADIUS_INTEGER4, "Acct Mcast Out Octets"},
1802 {135, RADIUS_INTEGER4, "Acct Mcast In Packets"},
1803 {136, RADIUS_INTEGER4, "Acct Mcast Out Packets"},
1804 {137, RADIUS_INTEGER4, "LAC Port"},
1805 {138, RADIUS_INTEGER4, "LAC Real Port"},
1806 {139, REDBACK_LAC_PORT_TYPE, "LAC Port Type"},
1807 {140, REDBACK_LAC_REAL_PORT_TYPE, "LAC Real Port Type"},
1811 static value_string radius_vendor_redback_tunnel_function_vals[] =
1819 static value_string radius_vendor_redback_mcast_send_vals[] =
1823 {3, "UNSOLICITED SEND"},
1827 static value_string radius_vendor_redback_mcast_receive_vals[] =
1834 static value_string radius_vendor_redback_tunnel_dnis_vals[] =
1841 static value_string radius_vendor_redback_pvc_encapsulation_type_vals[] =
1843 {1, "AAA ENCAPS ATM RAW"},
1844 {2, "AAA ENCAPS ATM ROUTE1483"},
1845 {3, "AAA ENCAPS ATM AUTO1483"},
1846 {4, "AAA ENCAPS ATM MULTI"},
1847 {5, "AAA ENCAPS ATM BRIDGE1483"},
1848 {6, "AAA ENCAPS ATM PPP"},
1849 {7, "AAA ENCAPS ATM PPP SERIAL"},
1850 {8, "AAA ENCAPS ATM PPP NLPID"},
1851 {9, "AAA ENCAPS ATM PPP AUTO"},
1852 {10, "AAA ENCAPS ATM PPPOE"},
1853 {11, "AAA ENCAPS ATM L2TP"},
1854 {12, "AAA ENCAPS ATM PPP LLC"},
1855 {13, "AAA ENCAPS FRAME AUTO1490"},
1856 {14, "AAA ENCAPS FRAME MULTI"},
1857 {15, "AAA ENCAPS FRAME BRIDGE1490"},
1858 {16, "AAA ENCAPS FRAME PPP"},
1859 {17, "AAA ENCAPS FRAME PPP AUTO"},
1860 {18, "AAA ENCAPS FRAME PPPOE"},
1861 {19, "AAA ENCAPS FRAME ROUTE1490"},
1862 {20, "AAA ENCAPS FRAME L2TP"},
1863 {21, "AAA ENCAPS L2TP VC MUXED"},
1864 {22, "AAA ENCAPS ETH"},
1865 {23, "AAA ENCAPS ETH PPPOE"},
1866 {24, "AAA ENCAPS ETH MULTI"},
1870 static value_string radius_vendor_redback_pvc_circuit_padding_vals[] =
1872 {1, "AAA CIRCUIT PADDING"},
1873 {2, "AAA CIRCUIT NO PADDING"},
1877 static value_string radius_vendor_redback_bind_type_vals[] =
1879 {1, "AAA AUTH BIND"},
1880 {2, "AAA BYPASS BIND"},
1881 {3, "AAA INTERFACE BIND"},
1882 {4, "AAA SUBSCRIBE BIND"},
1883 {5, "AAA TUNNEL BIND"},
1884 {6, "AAA SESSION BIND"},
1885 {7, "AAA Q8021 BIND"},
1886 {8, "AAA MULTI BIND"},
1890 static value_string radius_vendor_redback_bind_auth_protocol_vals[] =
1893 {2, "AAA PPP CHAP"},
1894 {3, "AAA PPP CHAP WAIT"},
1895 {4, "AAA PPP CHAP PAP"},
1896 {5, "AAA PPP CHAP WAIT PAP"},
1900 static value_string radius_vendor_redback_lac_port_type_vals[] =
1902 {40, "NAS PORT TYPE 10BT"},
1903 {41, "NAS PORT TYPE 100BT"},
1904 {42, "NAS PORT TYPE DS3 FR"},
1905 {43, "NAS PORT TYPE DS3 ATM"},
1906 {44, "NAS PORT TYPE OC3"},
1907 {45, "NAS PORT TYPE HSSI"},
1908 {46, "NAS PORT TYPE EIA530"},
1909 {47, "NAS PORT TYPE T1"},
1910 {48, "NAS PORT TYPE CHAN T3"},
1911 {49, "NAS PORT TYPE DS1 FR"},
1912 {50, "NAS PORT TYPE E3 ATM"},
1913 {51, "NAS PORT TYPE IMA ATM"},
1914 {52, "NAS PORT TYPE DS3 ATM 2"},
1915 {53, "NAS PORT TYPE OC3 ATM 2"},
1916 {54, "NAS PORT TYPE 1000BSX"},
1917 {55, "NAS PORT TYPE E1 FR"},
1918 {56, "NAS PORT TYPE E1 ATM"},
1919 {57, "NAS PORT TYPE E3 FR"},
1920 {58, "NAS PORT TYPE OC3 POS"},
1921 {59, "NAS PORT TYPE OC12 POS"},
1922 {60, "NAS PORT TYPE PPPOE"},
1926 static value_string radius_vendor_redback_lac_real_port_type_vals[] =
1928 {40, "NAS PORT TYPE 10BT"},
1929 {41, "NAS PORT TYPE 100BT"},
1930 {42, "NAS PORT TYPE DS3 FR"},
1931 {43, "NAS PORT TYPE DS3 ATM"},
1932 {44, "NAS PORT TYPE OC3"},
1933 {45, "NAS PORT TYPE HSSI"},
1934 {46, "NAS PORT TYPE EIA530"},
1935 {47, "NAS PORT TYPE T1"},
1936 {48, "NAS PORT TYPE CHAN T3"},
1937 {49, "NAS PORT TYPE DS1 FR"},
1938 {50, "NAS PORT TYPE E3 ATM"},
1939 {51, "NAS PORT TYPE IMA ATM"},
1940 {52, "NAS PORT TYPE DS3 ATM 2"},
1941 {53, "NAS PORT TYPE OC3 ATM 2"},
1942 {54, "NAS PORT TYPE 1000BSX"},
1943 {55, "NAS PORT TYPE E1 FR"},
1944 {56, "NAS PORT TYPE E1 ATM"},
1945 {57, "NAS PORT TYPE E3 FR"},
1946 {58, "NAS PORT TYPE OC3 POS"},
1947 {59, "NAS PORT TYPE OC12 POS"},
1948 {60, "NAS PORT TYPE PPPOE"},
1954 http://www.juniper.net/techpubs/software/junos53/swconfig53-getting-started/html/sys-mgmt-authentication2.html
1956 static value_value_string radius_vendor_juniper_attrib[] =
1958 {1, RADIUS_STRING, "Juniper Local User Name"},
1959 {2, RADIUS_STRING, "Juniper Allow Commands"},
1960 {3, RADIUS_STRING, "Juniper Deny Commands"},
1964 static value_value_string radius_vendor_cosine_attrib[] =
1966 {1, RADIUS_STRING, "Connection Profile Name"},
1967 {2, RADIUS_STRING, "Enterprise ID"},
1968 {3, RADIUS_STRING, "Address Pool Name"},
1969 {4, RADIUS_INTEGER4, "DS Byte"},
1970 {5, COSINE_VPI_VCI, "VPI/VCI"},
1971 {6, RADIUS_INTEGER4, "DLCI"},
1972 {7, RADIUS_IP_ADDRESS, "LNS IP Address"},
1973 {8, RADIUS_STRING, "CLI User Permission ID"},
1979 'dictionary.shasta' file from FreeRADIUS
1980 http://www.freeradius.org/radiusd/raddb/dictionary.shasta
1982 static value_value_string radius_vendor_shasta_attrib[] =
1984 {1, SHASTA_USER_PRIVILEGE, "Shasta User Privilege"},
1985 {2, RADIUS_STRING, "Shasta Service Profile"},
1986 {3, RADIUS_STRING, "Shasta VPN Name"},
1990 static value_string radius_vendor_shasta_user_privilege_vals[] =
2000 'dictionary.nomadix' file from FreeRADIUS
2001 http://www.freeradius.org/radiusd/raddb/dictionary.nomadix
2003 static value_value_string radius_vendor_nomadix_attrib[] =
2005 {1, RADIUS_INTEGER4, "Nomadix Bw Up"},
2006 {2, RADIUS_INTEGER4, "Nomadix Bw Down"},
2012 'dictionary.erx' file from FreeRADIUS
2013 http://www.freeradius.org/radiusd/raddb/dictionary.erx
2015 static value_value_string radius_vendor_unisphere_attrib[] =
2017 {1, RADIUS_STRING, "ERX Virtual Router Name"},
2018 {2, RADIUS_STRING, "ERX Address Pool Name"},
2019 {3, RADIUS_STRING, "ERX Local Loopback Interface"},
2020 {4, RADIUS_IP_ADDRESS, "ERX Primary Dns"},
2021 {5, RADIUS_IP_ADDRESS, "ERX Primary Wins"},
2022 {6, RADIUS_IP_ADDRESS, "ERX Secondary Dns"},
2023 {7, RADIUS_IP_ADDRESS, "ERX Secondary Wins"},
2024 {8, RADIUS_STRING, "ERX Tunnel Virtual Router"},
2025 {9, RADIUS_STRING, "ERX Tunnel Password"},
2026 {10, RADIUS_STRING, "ERX Ingress Policy Name"},
2027 {11, RADIUS_STRING, "ERX Egress Policy Name"},
2028 {12, RADIUS_STRING, "ERX Ingress Statistics"},
2029 {13, RADIUS_STRING, "ERX Egress Statistics"},
2030 {14, RADIUS_STRING, "ERX Atm Service Category"},
2031 {15, RADIUS_STRING, "ERX Atm PCR"},
2032 {16, RADIUS_STRING, "ERX Atm SCR"},
2033 {17, RADIUS_STRING, "ERX Atm MBS"},
2034 {18, RADIUS_STRING, "ERX Cli Initial Access Level"},
2035 {19, RADIUS_INTEGER4, "ERX Cli Allow All VR Access"},
2036 {20, RADIUS_STRING, "ERX Alternate Cli Access Level"},
2037 {21, RADIUS_STRING, "ERX Alternate Cli Vrouter Name"},
2038 {22, RADIUS_INTEGER4, "ERX Sa Validate"},
2039 {23, RADIUS_INTEGER4, "ERX Igmp Enable"},
2043 static value_value_string radius_vendor_issanni_attrib[] =
2045 {1, RADIUS_STRING, "Softflow Template"},
2046 {2, RADIUS_STRING, "NAT Pool"},
2047 {3, RADIUS_STRING, "Virtual Routing Domain"},
2048 {4, RADIUS_STRING, "Tunnel Name"},
2049 {5, RADIUS_STRING, "IP Pool Name"},
2050 {6, RADIUS_STRING, "PPPoE URL"},
2051 {7, RADIUS_STRING, "PPPoE MOTM"},
2052 {8, RADIUS_STRING, "PPPoE Service"},
2053 {9, RADIUS_IP_ADDRESS, "Primary DNS"},
2054 {10, RADIUS_IP_ADDRESS, "Secondary DNS"},
2055 {11, RADIUS_IP_ADDRESS, "Primary NBNS"},
2056 {12, RADIUS_IP_ADDRESS, "Secondary NBNS"},
2057 {13, RADIUS_STRING, "Policing Traffic Class"},
2058 {14, RADIUS_INTEGER4, "Tunnel Type"},
2059 {15, RADIUS_INTEGER4, "NAT Type"},
2060 {16, RADIUS_STRING, "QoS Traffic Class"},
2061 {17, RADIUS_STRING, "Interface Name"},
2067 'dictionary.quintum' file from FreeRADIUS
2068 http://www.freeradius.org/radiusd/raddb/dictionary.quintum
2070 static value_value_string radius_vendor_quintum_attrib[] =
2072 {1, RADIUS_STRING, "Quintum AVPair"},
2073 {2, RADIUS_STRING, "Quintum NAS Port"},
2074 {23, RADIUS_STRING, "Quintum h323 remote address"},
2075 {24, RADIUS_STRING, "Quintum h323 conf id"},
2076 {25, RADIUS_STRING, "Quintum h323 setup time"},
2077 {26, RADIUS_STRING, "Quintum h323 call origin"},
2078 {27, RADIUS_STRING, "Quintum h323 call type"},
2079 {28, RADIUS_STRING, "Quintum h323 connect time"},
2080 {29, RADIUS_STRING, "Quintum h323 disconnect time"},
2081 {30, RADIUS_STRING, "Quintum h323 disconnect cause"},
2082 {31, RADIUS_STRING, "Quintum h323 voice quality"},
2083 {33, RADIUS_STRING, "Quintum h323 gw id"},
2084 {35, RADIUS_STRING, "Quintum h323 incoming conf id"},
2085 {101, RADIUS_STRING, "Quintum h323 credit amount"},
2086 {102, RADIUS_STRING, "Quintum h323 credit time"},
2087 {103, RADIUS_STRING, "Quintum h323 return code"},
2088 {104, RADIUS_STRING, "Quintum h323 prompt id"},
2089 {105, RADIUS_STRING, "Quintum h323 time and day"},
2090 {106, RADIUS_STRING, "Quintum h323 redirect number"},
2091 {107, RADIUS_STRING, "Quintum h323 preferred lang"},
2092 {108, RADIUS_STRING, "Quintum h323 redirect ip address"},
2093 {109, RADIUS_STRING, "Quintum h323 billing model"},
2094 {110, RADIUS_STRING, "Quintum h323 currency type"},
2098 static rd_vsa_table radius_vsa_table[] =
2100 {VENDOR_ACC, radius_vendor_acc_attrib},
2101 {VENDOR_CISCO, radius_vendor_cisco_attrib},
2102 {VENDOR_SHIVA, radius_vendor_shiva_attrib},
2103 {VENDOR_LIVINGSTON, radius_vendor_livingston_attrib},
2104 {VENDOR_MICROSOFT, radius_vendor_microsoft_attrib},
2105 {VENDOR_ASCEND, radius_vendor_ascend_attrib},
2106 {VENDOR_BAY, radius_vendor_bay_attrib},
2107 {VENDOR_VERSANET, radius_vendor_versanet_attrib},
2108 {VENDOR_REDBACK, radius_vendor_redback_attrib},
2109 {VENDOR_JUNIPER, radius_vendor_juniper_attrib},
2110 {VENDOR_COSINE, radius_vendor_cosine_attrib},
2111 {VENDOR_SHASTA, radius_vendor_shasta_attrib},
2112 {VENDOR_NOMADIX, radius_vendor_nomadix_attrib},
2113 {VENDOR_UNISPHERE, radius_vendor_unisphere_attrib},
2114 {VENDOR_ISSANNI, radius_vendor_issanni_attrib},
2115 {VENDOR_QUINTUM, radius_vendor_quintum_attrib},
2120 * XXX - should these be read from files, such as FreeRadius dictionary
2121 * files? For example, its "dictionary" file has entries such as
2123 * VALUE Service-Type Login-User 1
2125 * to handle translation of integral values to strings.
2127 static rd_valstr_table valstr_table[] =
2129 {RADIUS_SERVICE_TYPE, radius_service_type_vals},
2130 {RADIUS_FRAMED_PROTOCOL, radius_framed_protocol_vals},
2131 {RADIUS_FRAMED_ROUTING, radius_framed_routing_vals},
2132 {RADIUS_FRAMED_COMPRESSION, radius_framed_compression_vals},
2133 {RADIUS_LOGIN_SERVICE, radius_login_service_vals},
2134 {RADIUS_TERMINATING_ACTION, radius_terminating_action_vals},
2135 {RADIUS_ACCOUNTING_STATUS_TYPE, radius_accounting_status_type_vals},
2136 {RADIUS_ACCT_AUTHENTIC, radius_accounting_authentication_vals},
2137 {RADIUS_ACCT_TERMINATE_CAUSE, radius_acct_terminate_cause_vals},
2138 {RADIUS_NAS_PORT_TYPE, radius_nas_port_type_vals},
2140 {ACC_REASON_CODE, radius_vendor_acc_reason_code_vals},
2141 {ACC_CCP_OPTION, radius_vendor_acc_ccp_option_vals},
2142 {ACC_ROUTE_POLICY, radius_vendor_acc_route_policy_vals},
2143 {ACC_ML_MLX_ADMIN_STATE, radius_vendor_acc_ml_mlx_admin_state_vals},
2144 {ACC_CLEARING_CAUSE, q931_cause_code_vals},
2145 {ACC_CLEARING_LOCATION, q931_cause_location_vals},
2146 {ACC_REQUEST_TYPE, radius_vendor_acc_request_type_vals},
2147 {ACC_BRIDGING_SUPPORT, radius_vendor_acc_bridging_support_vals},
2148 {ACC_APSM_OVERSUBSCRIBED, radius_vendor_acc_apsm_oversubscribed_vals},
2149 {ACC_ACCT_ON_OFF_REASON, radius_vendor_acc_acct_on_off_reason_vals},
2150 {ACC_IP_COMPRESSION, radius_vendor_acc_ip_compression_vals},
2151 {ACC_IPX_COMPRESSION, radius_vendor_acc_ipx_compression_vals},
2152 {ACC_CALLBACK_MODE, radius_vendor_acc_callback_mode_vals},
2153 {ACC_CALLBACK_CBCP_TYPE, radius_vendor_acc_callback_cbcp_type_vals},
2154 {ACC_DIALOUT_AUTH_MODE, radius_vendor_acc_dialout_auth_mode_vals},
2155 {ACC_ACCESS_COMMUNITY, radius_vendor_acc_access_community_vals},
2157 {SHIVA_TYPE_OF_SERVICE, radius_vendor_shiva_type_of_service_vals},
2158 {SHIVA_LINK_PROTOCOL, radius_vendor_shiva_link_protocol_vals},
2159 {SHIVA_DISCONNECT_REASON, radius_vendor_shiva_disconnect_reason_vals},
2160 {SHIVA_FUNCTION, radius_vendor_shiva_function_vals},
2161 {SHIVA_CONNECT_REASON, radius_vendor_shiva_connect_reason_vals},
2163 {LIVINGSTON_IPSEC_LOG_OPTIONS, radius_vendor_livingston_ipsec_log_options_vals},
2164 {LIVINGSTON_IPSEC_DENY_ACTION, radius_vendor_livingston_ipsec_deny_action_vals},
2165 {LIVINGSTON_NAT_LOG_OPTIONS, radius_vendor_livingston_nat_log_options_vals},
2166 {LIVINGSTON_NAT_SESS_DIR_FAIL_ACTION, radius_vendor_livingston_nat_sess_dir_fail_action_vals},
2167 {LIVINGSTON_MULTICAST_CLIENT, radius_vendor_livingston_multicast_client_vals},
2169 {CISCO_DISCONNECT_CAUSE, radius_vendor_cisco_disconnect_cause_vals},
2171 {MICROSOFT_BAP_USAGE, radius_vendor_microsoft_bap_usage_vals},
2172 {MICROSOFT_ARAP_PW_CHANGE_REASON, radius_vendor_microsoft_arap_pw_change_reason_vals},
2173 {MICROSOFT_ACCT_AUTH_TYPE, radius_vendor_microsoft_acct_auth_type_vals},
2174 {MICROSOFT_ACCT_EAP_TYPE, radius_vendor_microsoft_acct_eap_type_vals},
2176 {ASCEND_CALLING_ID_TYPE_OF_NUMBER, radius_vendor_ascend_calling_id_type_of_number_vals},
2177 {ASCEND_CALLING_ID_NUMBERING_PLAN, radius_vendor_ascend_calling_id_numbering_plan_vals},
2178 {ASCEND_CALLING_ID_PRESENTATION, radius_vendor_ascend_calling_id_presentation_vals},
2179 {ASCEND_CALLING_ID_SCREENING, radius_vendor_ascend_calling_id_screening_vals},
2181 {BAY_TUNNEL_AUTHEN_TYPE, radius_vendor_bay_tunnel_authen_type_vals},
2182 {BAY_TUNNEL_AUTHEN_MODE, radius_vendor_bay_tunnel_authen_mode_vals},
2183 {BAY_USER_SERVER_LOCATION, radius_vendor_bay_user_server_location_vals},
2184 {BAY_SYSTEM_DISC_REASON, radius_vendor_bay_system_disc_reason_vals},
2185 {BAY_MODEM_DISC_REASON, radius_vendor_bay_modem_disc_reason_vals},
2186 {BAY_ADDR_RESOLUTION_PROTOCOL, radius_vendor_bay_addr_resolution_protocol_vals},
2187 {BAY_USER_LEVEL, radius_vendor_bay_user_level_vals},
2188 {BAY_AUDIT_LEVEL, radius_vendor_bay_audit_level_vals},
2190 {VERSANET_TERMINATION_CAUSE, radius_vendor_versanet_termination_cause_vals},
2192 {REDBACK_TUNNEL_FUNCTION, radius_vendor_redback_tunnel_function_vals},
2193 {REDBACK_MCAST_SEND, radius_vendor_redback_mcast_send_vals},
2194 {REDBACK_MCAST_RECEIVE, radius_vendor_redback_mcast_receive_vals},
2195 {REDBACK_TUNNEL_DNIS, radius_vendor_redback_tunnel_dnis_vals},
2196 {REDBACK_PVC_ENCAPSULATION_TYPE, radius_vendor_redback_pvc_encapsulation_type_vals},
2197 {REDBACK_PVC_CIRCUIT_PADDING, radius_vendor_redback_pvc_circuit_padding_vals},
2198 {REDBACK_BIND_TYPE, radius_vendor_redback_bind_type_vals},
2199 {REDBACK_BIND_AUTH_PROTOCOL, radius_vendor_redback_bind_auth_protocol_vals},
2200 {REDBACK_LAC_PORT_TYPE, radius_vendor_redback_lac_port_type_vals},
2201 {REDBACK_LAC_REAL_PORT_TYPE, radius_vendor_redback_lac_real_port_type_vals},
2203 {SHASTA_USER_PRIVILEGE, radius_vendor_shasta_user_privilege_vals},
2208 static rd_vsa_table *get_vsa_table(guint32 vendor)
2212 for (i = 0; radius_vsa_table[i].vendor; i++)
2213 if (radius_vsa_table[i].vendor == vendor)
2214 return(&radius_vsa_table[i]);
2219 static guint32 match_numval(guint32 val, const value_value_string *vvs)
2223 for (i = 0; vvs && vvs[i].val1; i++)
2224 if (vvs[i].val1 == val)
2225 return(vvs[i].val2);
2230 static gchar textbuffer[TEXTBUFFER];
2231 static rd_vsa_buffer vsabuffer[VSABUFFER];
2234 rdconvertbufftostr(gchar *dest, tvbuff_t *tvb, int offset, int length)
2236 /*converts the raw buffer into printable text */
2239 const guint8 *pd = tvb_get_ptr(tvb, offset, length);
2244 for (i=0; i < (guint32)length; i++)
2246 if( isalnum((int)pd[i])||ispunct((int)pd[i])
2247 ||((int)pd[i]==' ')) {
2248 dest[totlen]=(gchar)pd[i];
2253 sprintf(&(dest[totlen]), "\\%03o", pd[i]);
2254 totlen=totlen+strlen(&(dest[totlen]));
2262 rdconvertbufftobinstr(gchar *dest, tvbuff_t *tvb, int offset, int length)
2264 /*converts the raw buffer into printable text */
2267 const guint8 *pd = tvb_get_ptr(tvb, offset, length);
2268 static const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
2269 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
2271 for (i=0; i < (guint32)length; i++)
2273 dest[totlen] = hex[pd[i] >> 4];
2275 dest[totlen] = hex[pd[i] & 0xF];
2281 static gchar *rd_match_strval(guint32 val, const value_string *vs) {
2282 return val_to_str(val, vs, "Undefined");
2285 static gchar *rd_match_strval_attrib(guint32 val, const value_value_string *vvs)
2289 for (i = 0; vvs[i].val1; i++)
2290 if (vvs[i].val1 == val)
2293 return("Unknown Type");
2296 static gchar *rdconvertinttostr(gchar *dest, int print_type, guint32 val)
2299 const value_string *vs = NULL;
2301 for (i = 0; valstr_table[i].print_type; i++)
2303 if (valstr_table[i].print_type == print_type)
2305 vs = valstr_table[i].valstr;
2309 sprintf(dest, "%s(%u)", (vs ? rd_match_strval(val, vs) : "Undefined"), val);
2314 static gchar *rd_value_to_str_2(gchar *dest, e_avphdr *avph, tvbuff_t *tvb,
2315 int offset, const value_value_string *vvs)
2319 value_string *valstrarr;
2324 extern char *tzname[2];
2329 rd_vsa_table *vsa_rvt;
2332 /* prints the values of the attribute value pairs into a text buffer */
2333 print_type = match_numval(avph->avp_type, vvs);
2336 strcpy(dest, "Value:");
2337 cont=&dest[strlen(dest)];
2340 case( RADIUS_STRING ):
2341 rdconvertbufftostr(cont,tvb,offset+2,avph->avp_length-2);
2343 case( RADIUS_BINSTRING ):
2344 rdconvertbufftobinstr(cont,tvb,offset+2,avph->avp_length-2);
2346 case( RADIUS_INTEGER4 ):
2347 sprintf(cont,"%u", tvb_get_ntohl(tvb,offset+2));
2349 case( RADIUS_IP_ADDRESS ):
2350 ip_to_str_buf(tvb_get_ptr(tvb,offset+2,4),cont);
2352 case( RADIUS_IPX_ADDRESS ):
2353 pd = tvb_get_ptr(tvb,offset+2,4);
2354 sprintf(cont,"%u:%u:%u:%u",(guint8)pd[offset+2],
2355 (guint8)pd[offset+3],(guint8)pd[offset+4],
2356 (guint8)pd[offset+5]);
2357 case( RADIUS_TUNNEL_TYPE ):
2358 valstrarr=radius_tunnel_type_vals;
2360 intval = tvb_get_ntohl(tvb,offset+2);
2362 sprintf(dest, "Tag:%u, Value:%s(%u)",
2364 rd_match_strval(intval & 0xffffff,valstrarr),
2368 sprintf(cont, "%s(%u)", rd_match_strval(intval,valstrarr), intval);
2370 case( RADIUS_TUNNEL_MEDIUM_TYPE ):
2371 valstrarr=radius_tunnel_medium_type_vals;
2372 intval = tvb_get_ntohl(tvb,offset+2);
2375 sprintf(dest, "Tag:%u, Value:%s(%u)",
2377 rd_match_strval(intval & 0xffffff,valstrarr),
2381 sprintf(cont, "%s(%u)", rd_match_strval(intval,valstrarr), intval);
2383 case( RADIUS_STRING_TAGGED ):
2385 tag = tvb_get_guint8(tvb,offset+2);
2387 sprintf(dest, "Tag:%u, Value:",
2389 cont=&cont[strlen(cont)];
2390 rdconvertbufftostr(cont,tvb,offset+3,avph->avp_length-3);
2393 rdconvertbufftostr(cont,tvb,offset+2,avph->avp_length-2);
2395 case ( RADIUS_VENDOR_SPECIFIC ):
2396 valstrarr = radius_vendor_specific_vendors;
2397 intval = tvb_get_ntohl(tvb,offset+2);
2398 sprintf(dest, "Vendor:%s(%u)", rd_match_strval(intval,valstrarr), intval);
2399 cont = &dest[strlen(dest)];
2400 vsa_length = avph->avp_length;
2403 vsa_rvt = get_vsa_table(intval);
2406 vsa_avph = (e_avphdr*)tvb_get_ptr(tvb, offset+vsa_len, avph->avp_length-vsa_len);
2407 cont = &cont[strlen(cont)+1];
2408 vsabuffer[vsa_index].str = cont;
2409 vsabuffer[vsa_index].offset = offset+vsa_len;
2410 vsabuffer[vsa_index].length = vsa_avph->avp_length;
2411 sprintf(cont, "t:%s(%u) l:%u, ",
2412 (vsa_rvt ? rd_match_strval_attrib(vsa_avph->avp_type, vsa_rvt->attrib) : "Unknown Type"),
2413 vsa_avph->avp_type, vsa_avph->avp_length);
2414 cont = &cont[strlen(cont)];
2415 rd_value_to_str_2(cont, vsa_avph, tvb, offset+vsa_len,
2416 (vsa_rvt ? vsa_rvt->attrib : NULL));
2417 vsa_len += vsa_avph->avp_length;
2419 } while (vsa_length > vsa_len && vsa_index < VSABUFFER);
2421 case( RADIUS_SERVICE_TYPE ):
2422 case( RADIUS_FRAMED_PROTOCOL ):
2423 case( RADIUS_FRAMED_ROUTING ):
2424 case( RADIUS_FRAMED_COMPRESSION ):
2425 case( RADIUS_LOGIN_SERVICE ):
2426 case( RADIUS_TERMINATING_ACTION ):
2427 case( RADIUS_ACCOUNTING_STATUS_TYPE ):
2428 case( RADIUS_ACCT_AUTHENTIC ):
2429 case( RADIUS_ACCT_TERMINATE_CAUSE ):
2430 case( RADIUS_NAS_PORT_TYPE ):
2431 case( ASCEND_CALLING_ID_TYPE_OF_NUMBER ):
2432 case( ASCEND_CALLING_ID_NUMBERING_PLAN ):
2433 case( ASCEND_CALLING_ID_PRESENTATION ):
2434 case( ASCEND_CALLING_ID_SCREENING ):
2435 rdconvertinttostr(cont, print_type,tvb_get_ntohl(tvb,offset+2));
2437 case( COSINE_VPI_VCI ):
2438 sprintf(cont,"%u/%u",
2439 tvb_get_ntohs(tvb,offset+2),
2440 tvb_get_ntohs(tvb,offset+4));
2442 case( RADIUS_TIMESTAMP ):
2443 intval=tvb_get_ntohl(tvb,offset+2);
2444 rtimestamp=ctime((time_t*)&intval);
2445 rtimestamp[strlen(rtimestamp)-1]=0;
2446 sprintf(cont,"%d (%s %s)", tvb_get_ntohl(tvb,offset+2), rtimestamp, *tzname);
2448 case( RADIUS_INTEGER4_TAGGED ):
2449 intval = tvb_get_ntohl(tvb,offset+2);
2452 sprintf(cont, "Tag:%u, Value:%u",
2457 sprintf(cont,"%u", intval);
2459 case( RADIUS_UNKNOWN ):
2461 strcpy(cont,"Unknown Value Type");
2464 cont=&cont[strlen(cont)];
2466 strcpy(cont,"Unknown Value");
2471 static gchar *rd_value_to_str(e_avphdr *avph, tvbuff_t *tvb, int offset)
2473 vsabuffer[0].str = NULL;
2474 rd_value_to_str_2(textbuffer, avph, tvb, offset, radius_attrib);
2479 dissect_attribute_value_pairs(tvbuff_t *tvb, int offset,proto_tree *tree,
2480 int avplength,packet_info *pinfo)
2482 /* adds the attribute value pairs to the tree */
2486 guint8 *reassembled_data = NULL;
2487 int reassembled_data_len = 0;
2488 int data_needed = 0;
2493 proto_tree_add_text(tree, tvb,offset,0,"No Attribute Value Pairs Found");
2498 * In case we throw an exception, clean up whatever stuff we've
2499 * allocated (if any).
2501 CLEANUP_PUSH(g_free, reassembled_data);
2503 while (avplength > 0)
2505 tvb_memcpy(tvb,(guint8 *)&avph,offset,sizeof(e_avphdr));
2506 avptpstrval = rd_match_strval_attrib(avph.avp_type, radius_attrib);
2507 if (avph.avp_length < 2) {
2509 * This AVP is bogus - the length includes the type and length
2510 * fields, so it must be >= 2.
2513 proto_tree_add_text(tree, tvb, offset, avph.avp_length,
2514 "t:%s(%u) l:%u (length not >= 2)",
2515 avptpstrval, avph.avp_type, avph.avp_length);
2520 if (avph.avp_type == 79) { /* EAP Message */
2522 proto_tree *eap_tree = NULL;
2529 ti = proto_tree_add_text(tree, tvb, offset, avph.avp_length,
2531 avptpstrval, avph.avp_type, avph.avp_length);
2532 eap_tree = proto_item_add_subtree(ti, ett_radius_eap);
2534 tvb_len = tvb_length_remaining(tvb, offset+2);
2535 data_len = avph.avp_length-2;
2536 if (data_len < tvb_len)
2538 next_tvb = tvb_new_subset(tvb, offset+2, tvb_len, data_len);
2541 * Set the columns non-writable, so that the packet list
2542 * shows this as an RADIUS packet, not as an EAP packet.
2544 col_set_writable(pinfo->cinfo, FALSE);
2547 * RFC 2869 says, in section 5.13, describing the EAP-Message
2550 * The String field contains EAP packets, as defined in [3]. If
2551 * multiple EAP-Message attributes are present in a packet their
2552 * values should be concatenated; this allows EAP packets longer than
2553 * 253 octets to be passed by RADIUS.
2555 * Do reassembly of EAP-Message attributes.
2558 /* Are we in the process of reassembling? */
2559 if (reassembled_data != NULL) {
2560 /* Yes - show this as an EAP fragment. */
2562 proto_tree_add_text(eap_tree, next_tvb, 0, -1, "EAP fragment");
2565 * Do we have all of the data in this fragment?
2567 if (tvb_len >= data_len) {
2569 * Yes - add it to the reassembled data.
2571 tvb_memcpy(next_tvb, reassembled_data + reassembled_data_len,
2573 reassembled_data_len += data_len;
2574 data_needed -= data_len;
2575 if (data_needed <= 0) {
2577 * We got at least as much data as we needed; we're done
2579 * XXX - what if we got more?
2583 * Allocate a new tvbuff, referring to the reassembled payload.
2585 next_tvb = tvb_new_real_data(reassembled_data, reassembled_data_len,
2586 reassembled_data_len);
2589 * We have a tvbuff that refers to this data, so we shouldn't
2590 * free this data if we throw an exception; clear
2591 * "reassembled_data", so the cleanup handler won't free it.
2593 reassembled_data = NULL;
2594 reassembled_data_len = 0;
2598 * Arrange that the allocated packet data copy be freed when the
2601 tvb_set_free_cb(next_tvb, g_free);
2604 * Add the tvbuff to the list of tvbuffs to which the tvbuff we
2605 * were handed refers, so it'll get cleaned up when that tvbuff
2608 tvb_set_child_real_data_tvbuff(tvb, next_tvb);
2610 /* Add the defragmented data to the data source list. */
2611 add_new_data_source(pinfo->fd, next_tvb, "Reassembled EAP");
2613 /* Now dissect it. */
2614 call_dissector(eap_fragment_handle, next_tvb, pinfo, eap_tree);
2619 * No - hand it to the dissector.
2621 result = call_dissector(eap_fragment_handle, next_tvb, pinfo, eap_tree);
2623 /* This is only part of the full EAP packet; start reassembly. */
2624 proto_tree_add_text(eap_tree, next_tvb, 0, -1, "EAP fragment");
2625 reassembled_data_len = data_len;
2626 data_needed = -result;
2627 reassembled_data = g_malloc(reassembled_data_len + data_needed);
2628 tvb_memcpy(next_tvb, reassembled_data, 0, reassembled_data_len);
2634 proto_tree *vsa_tree = NULL;
2636 valstr = rd_value_to_str(&avph, tvb, offset);
2637 ti = proto_tree_add_text(tree, tvb, offset, avph.avp_length,
2638 "t:%s(%u) l:%u, %s",
2639 avptpstrval, avph.avp_type, avph.avp_length,
2641 vsa_tree = proto_item_add_subtree(ti, ett_radius_vsa);
2642 for (i = 0; vsabuffer[i].str && i < VSABUFFER; i++)
2643 proto_tree_add_text(vsa_tree, tvb, vsabuffer[i].offset, vsabuffer[i].length,
2644 "%s", vsabuffer[i].str);
2648 offset = offset+avph.avp_length;
2649 avplength = avplength-avph.avp_length;
2653 * Call the cleanup handler to free any reassembled data we haven't
2654 * attached to a tvbuff, and pop the handler.
2656 CLEANUP_CALL_AND_POP;
2659 static void dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2661 proto_tree *radius_tree = NULL, *avptree = NULL;
2662 proto_item *ti,*avptf;
2666 int avplength,hdrlength;
2671 if (check_col(pinfo->cinfo, COL_PROTOCOL))
2672 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RADIUS");
2673 if (check_col(pinfo->cinfo, COL_INFO))
2674 col_clear(pinfo->cinfo, COL_INFO);
2676 tvb_memcpy(tvb,(guint8 *)&rh,0,sizeof(e_radiushdr));
2678 rhcode= (int)rh.rh_code;
2679 rhident= (int)rh.rh_ident;
2680 rhlength= (int)ntohs(rh.rh_pktlength);
2681 codestrval= match_strval(rhcode,radius_vals);
2682 if (codestrval==NULL)
2684 codestrval="Unknown Packet";
2686 if (check_col(pinfo->cinfo, COL_INFO))
2688 col_add_fstr(pinfo->cinfo,COL_INFO,"%s(%d) (id=%d, l=%d)",
2689 codestrval, rhcode, rhident, rhlength);
2694 ti = proto_tree_add_item(tree,proto_radius, tvb, 0, rhlength, FALSE);
2696 radius_tree = proto_item_add_subtree(ti, ett_radius);
2698 proto_tree_add_uint(radius_tree,hf_radius_code, tvb, 0, 1,
2700 proto_tree_add_uint_format(radius_tree,hf_radius_id, tvb, 1, 1,
2701 rh.rh_ident, "Packet identifier: 0x%01x (%d)",
2704 proto_tree_add_uint(radius_tree, hf_radius_length, tvb,
2706 proto_tree_add_text(radius_tree, tvb, 4,
2707 AUTHENTICATOR_LENGTH,
2711 hdrlength=RD_HDR_LENGTH+AUTHENTICATOR_LENGTH;
2712 avplength= rhlength -hdrlength;
2714 if (avplength > 0) {
2715 /* list the attribute value pairs */
2719 avptf = proto_tree_add_text(radius_tree,
2720 tvb,hdrlength,avplength,
2721 "Attribute value pairs");
2722 avptree = proto_item_add_subtree(avptf, ett_radius_avp);
2725 dissect_attribute_value_pairs(tvb, hdrlength, avptree, avplength, pinfo);
2728 /* registration with the filtering engine */
2730 proto_register_radius(void)
2732 static hf_register_info hf[] = {
2734 { "Code","radius.code", FT_UINT8, BASE_DEC, VALS(radius_vals), 0x0,
2738 { "Identifier", "radius.id", FT_UINT8, BASE_DEC, NULL, 0x0,
2741 { &hf_radius_length,
2742 { "Length","radius.length", FT_UINT16, BASE_DEC, NULL, 0x0,
2745 static gint *ett[] = {
2752 proto_radius = proto_register_protocol("Radius Protocol", "RADIUS",
2754 proto_register_field_array(proto_radius, hf, array_length(hf));
2755 proto_register_subtree_array(ett, array_length(ett));
2759 proto_reg_handoff_radius(void)
2761 dissector_handle_t radius_handle;
2764 * Get a handle for the EAP fragment dissector.
2766 eap_fragment_handle = find_dissector("eap_fragment");
2768 radius_handle = create_dissector_handle(dissect_radius, proto_radius);
2769 dissector_add("udp.port", UDP_PORT_RADIUS, radius_handle);
2770 dissector_add("udp.port", UDP_PORT_RADIUS_NEW, radius_handle);
2771 dissector_add("udp.port", UDP_PORT_RADACCT, radius_handle);
2772 dissector_add("udp.port", UDP_PORT_RADACCT_NEW, radius_handle);