3 * Routines for RADIUS packet disassembly
4 * Copyright 1999 Johan Feyaerts
5 * Changed 03/12/2003 Rui Carmo (http://the.taoofmac.com - added all 3GPP VSAs, some parsing)
7 * RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
9 * $Id: packet-radius.c,v 1.86 2003/12/17 02:24:53 guy Exp $
11 * Ethereal - Network traffic analyzer
12 * By Gerald Combs <gerald@ethereal.com>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #include <epan/packet.h>
41 #include <epan/resolv.h>
43 #include "packet-q931.h"
44 #include "packet-gtp.h"
46 #include "crypt-md5.h"
48 static int proto_radius = -1;
49 static int hf_radius_length = -1;
50 static int hf_radius_code = -1;
51 static int hf_radius_id =-1;
52 static char *shared_secret = NULL;
53 static gpointer authenticator = NULL;
55 static gint ett_radius = -1;
56 static gint ett_radius_avp = -1;
57 static gint ett_radius_eap = -1;
58 static gint ett_radius_vsa = -1;
60 static dissector_handle_t eap_fragment_handle;
62 #define UDP_PORT_RADIUS 1645
63 #define UDP_PORT_RADIUS_NEW 1812
64 #define UDP_PORT_RADACCT 1646
65 #define UDP_PORT_RADACCT_NEW 1813
67 #define TEXTBUFFER 2000
70 typedef struct _e_radiushdr {
76 typedef struct _e_avphdr {
81 typedef struct _radius_attr_info {
85 const value_string *vs;
88 typedef struct _rd_vsa_table {
90 const radius_attr_info *attrib;
93 typedef struct _rd_vsa_buffer {
99 #define AUTHENTICATOR_LENGTH 16
100 #define RD_HDR_LENGTH 4
102 #define RADIUS_ACCESS_REQUEST 1
103 #define RADIUS_ACCESS_ACCEPT 2
104 #define RADIUS_ACCESS_REJECT 3
105 #define RADIUS_ACCOUNTING_REQUEST 4
106 #define RADIUS_ACCOUNTING_RESPONSE 5
107 #define RADIUS_ACCOUNTING_STATUS 6
108 #define RADIUS_ACCESS_PASSWORD_REQUEST 7
109 #define RADIUS_ACCESS_PASSWORD_ACK 8
110 #define RADIUS_ACCESS_PASSWORD_REJECT 9
111 #define RADIUS_ACCOUNTING_MESSAGE 10
112 #define RADIUS_ACCESS_CHALLENGE 11
113 #define RADIUS_STATUS_SERVER 12
114 #define RADIUS_STATUS_CLIENT 13
116 #define RADIUS_VENDOR_SPECIFIC_CODE 26
117 #define RADIUS_ASCEND_ACCESS_NEXT_CODE 29
118 #define RADIUS_ASCEND_ACCESS_NEW_PIN 30
119 #define RADIUS_ASCEND_PASSWORD_EXPIRED 32
120 #define RADIUS_ASCEND_ACCESS_EVENT_REQUEST 33
121 #define RADIUS_ASCEND_ACCESS_EVENT_RESPONSE 34
122 #define RADIUS_DISCONNECT_REQUEST 40
123 #define RADIUS_DISCONNECT_REQUEST_ACK 41
124 #define RADIUS_DISCONNECT_REQUEST_NAK 42
125 #define RADIUS_CHANGE_FILTER_REQUEST 43
126 #define RADIUS_CHANGE_FILTER_REQUEST_ACK 44
127 #define RADIUS_CHANGE_FILTER_REQUEST_NAK 45
128 #define RADIUS_RESERVED 255
131 * List of types for RADIUS attributes. "Type" refers to how it's
132 * formatted for display in Ethereal.
134 * Not every RADIUS attribute gets its own type. If an attribute is
135 * an integer or a tagged integer, but happens to have particular strings
136 * associated with particular values, it doesn't get its own type -
137 * you just put a pointer to the appropriate value_string table in
138 * the entry for that attribute in the appropriate radius_attr_info
139 * table. Only if it has to get formatted in some non-standard fashion
140 * (as is the case for the CoSine VPI/VCI attribute) does it get a type
151 RADIUS_STRING_TAGGED,
152 RADIUS_VENDOR_SPECIFIC,
154 RADIUS_INTEGER4_TAGGED,
161 THE3GPP_IMSI_MCC_MNC,
162 THE3GPP_GGSN_MCC_MNC,
164 THE3GPP_SESSION_STOP_INDICATOR,
165 THE3GPP_SELECTION_MODE,
166 THE3GPP_CHARGING_CHARACTERISTICS,
167 THE3GPP_IPV6_DNS_SERVERS,
171 static const value_string radius_vals[] =
173 {RADIUS_ACCESS_REQUEST, "Access Request"},
174 {RADIUS_ACCESS_ACCEPT, "Access Accept"},
175 {RADIUS_ACCESS_REJECT, "Access Reject"},
176 {RADIUS_ACCOUNTING_REQUEST, "Accounting Request"},
177 {RADIUS_ACCOUNTING_RESPONSE, "Accounting Response"},
178 {RADIUS_ACCOUNTING_STATUS, "Accounting Status"},
179 {RADIUS_ACCESS_PASSWORD_REQUEST, "Access Password Request"},
180 {RADIUS_ACCESS_PASSWORD_ACK, "Access Password Ack"},
181 {RADIUS_ACCESS_PASSWORD_REJECT, "Access Password Reject"},
182 {RADIUS_ACCOUNTING_MESSAGE, "Accounting Message"},
183 {RADIUS_ACCESS_CHALLENGE, "Access challenge"},
184 {RADIUS_STATUS_SERVER, "StatusServer"},
185 {RADIUS_STATUS_CLIENT, "StatusClient"},
186 {RADIUS_VENDOR_SPECIFIC_CODE, "Vendor Specific"},
187 {RADIUS_ASCEND_ACCESS_NEXT_CODE, "Ascend Access Next Code"},
188 {RADIUS_ASCEND_ACCESS_NEW_PIN, "Ascend Access New Pin"},
189 {RADIUS_ASCEND_PASSWORD_EXPIRED, "Ascend Password Expired"},
190 {RADIUS_ASCEND_ACCESS_EVENT_REQUEST, "Ascend Access Event Request"},
191 {RADIUS_ASCEND_ACCESS_EVENT_RESPONSE, "Ascend Access Event Response"},
192 {RADIUS_DISCONNECT_REQUEST, "Disconnect Request"},
193 {RADIUS_DISCONNECT_REQUEST_ACK, "Disconnect Request ACK"},
194 {RADIUS_DISCONNECT_REQUEST_NAK, "Disconnect Request NAK"},
195 {RADIUS_CHANGE_FILTER_REQUEST, "Change Filter Request"},
196 {RADIUS_CHANGE_FILTER_REQUEST_ACK, "Change Filter Request ACK"},
197 {RADIUS_CHANGE_FILTER_REQUEST_NAK, "Change Filter Request NAK"},
198 {RADIUS_RESERVED, "Reserved"},
203 * These are SMI Network Management Private Enterprise Codes for
206 * http://www.isi.edu/in-notes/iana/assignments/enterprise-numbers
210 * XXX - these also appear in FreeRadius dictionary files, with items such
216 #define VENDOR_CISCO 9
217 #define VENDOR_SHIVA 166
218 #define VENDOR_LIVINGSTON 307
219 #define VENDOR_MICROSOFT 311
220 #define VENDOR_3COM 429
221 #define VENDOR_ASCEND 529
222 #define VENDOR_BAY 1584
223 #define VENDOR_FOUNDRY 1991
224 #define VENDOR_VERSANET 2180
225 #define VENDOR_REDBACK 2352
226 #define VENDOR_JUNIPER 2636
227 #define VENDOR_APTIS 2637
228 #define VENDOR_COSINE 3085
229 #define VENDOR_SHASTA 3199
230 #define VENDOR_NOMADIX 3309
231 #define VENDOR_UNISPHERE 4874
232 #define VENDOR_ISSANNI 5948
233 #define VENDOR_QUINTUM 6618
234 #define VENDOR_COLUBRIS 8744
235 #define VENDOR_COLUMBIA_UNIVERSITY 11862
236 #define VENDOR_THE3GPP 10415
238 static const value_string radius_vendor_specific_vendors[] =
241 {VENDOR_CISCO, "Cisco"},
242 {VENDOR_SHIVA, "Shiva"},
243 {VENDOR_MICROSOFT, "Microsoft"},
244 {VENDOR_LIVINGSTON, "Livingston"},
245 {VENDOR_3COM, "3Com"},
246 {VENDOR_ASCEND, "Ascend"},
247 {VENDOR_BAY, "Bay Networks"},
248 {VENDOR_FOUNDRY, "Foundry"},
249 {VENDOR_VERSANET, "Versanet"},
250 {VENDOR_REDBACK, "Redback"},
251 {VENDOR_JUNIPER, "Juniper Networks"},
252 {VENDOR_APTIS, "Aptis"},
253 {VENDOR_COSINE, "CoSine Communications"},
254 {VENDOR_SHASTA, "Shasta"},
255 {VENDOR_NOMADIX, "Nomadix"},
256 {VENDOR_UNISPHERE, "Unisphere Networks"},
257 {VENDOR_ISSANNI, "Issanni Communications"},
258 {VENDOR_QUINTUM, "Quintum"},
259 {VENDOR_COLUBRIS, "Colubris"},
260 {VENDOR_COLUMBIA_UNIVERSITY, "Columbia University"},
261 {VENDOR_THE3GPP, "3GPP"},
266 * XXX - should we construct these tables in Ethereal at start-up time by
267 * reading files such as FreeRadius dictionary files? For example,
268 * the FreeRadius "dictionary" file has
270 * ATTRIBUTE User-Name 1 string
272 * for the attribute that's
274 * {1, RADIUS_STRING, "User Name"},
278 * "string" -> RADIUS_STRING
279 * "octets" -> RADIUS_BINSTRING
280 * "integer" -> RADIUS_INTEGER4
281 * "ipaddr" -> RADIUS_IP_ADDRESS
283 * In addition, it has entries such as
285 * VALUE Service-Type Login-User 1
287 * to handle translation of integral values to strings, which we'd use to
288 * construct value_string tables.
290 static const value_string radius_service_type_vals[] =
294 {3, "Callback Login"},
295 {4, "Callback Framed"},
297 {6, "Administrative"},
299 {8, "Authenticate Only"},
300 {9, "Callback NAS Prompt"},
305 static const value_string radius_framed_protocol_vals[] =
309 {3, "Appletalk Remote Access Protocol (ARAP)"},
310 {4, "Gandalf proprietary Singlelink/Multilink Protocol"},
311 {5, "Xylogics proprietary IPX/SLIP"},
312 {6, "X.75 Synchronous"},
315 {257, "Ascend EURAW"},
316 {258, "Ascend EUUI"},
318 {260, "Ascend COMB"},
321 {263, "Ascend FR-CIR"},
322 {264, "Ascend ATM-1483"},
323 {265, "Ascend ATM-FR-CIR"},
327 static const value_string radius_framed_routing_vals[] =
329 {1, "Send Routing Packets"},
330 {2, "Listen for routing packets"},
331 {3, "Send and Listen"},
336 static const value_string radius_framed_compression_vals[] =
338 {1, "VJ TCP/IP Header Compression"},
339 {2, "IPX Header Compression"},
340 {3, "Stac-LZS compression"},
345 static const value_string radius_login_service_vals[] =
353 {8, "TCP Clear Quit"},
358 static const value_string radius_terminating_action_vals[] =
360 {1, "RADIUS Request"},
365 static const value_string radius_accounting_status_type_vals[] =
369 {3, "Interim Update"},
370 {7, "Accounting On"},
371 {8, "Accounting Off"},
372 {9, "Tunnel Start"}, /* Tunnel accounting */
373 {10, "Tunnel Stop"}, /* Tunnel accounting */
374 {11, "Tunnel Reject"}, /* Tunnel accounting */
375 {12, "Tunnel Link Start"}, /* Tunnel accounting */
376 {13, "Tunnel Link Stop"}, /* Tunnel accounting */
377 {14, "Tunnel Link Reject"}, /* Tunnel accounting */
381 static const value_string radius_accounting_authentication_vals[] =
386 /* RFC 2866 says 3 is Remote. Is 7 a mistake? */
391 static const value_string radius_acct_terminate_cause_vals[] =
397 {5, "Session Timeout"},
404 {12, "Port Unneeded"},
405 {13, "Port Preempted"},
406 {14, "Port Suspended"},
407 {15, "Service Unavailable"},
410 {18, "Host Request"},
414 static const value_string radius_tunnel_type_vals[] =
431 static const value_string radius_tunnel_medium_type_vals[] =
451 static const value_string radius_nas_port_type_vals[] =
456 {3, "ISDN Async V.120"},
457 {4, "ISDN Async V.110"},
460 {7, "HDLC Clear Channel"},
471 {18, "Wireless Other"},
472 {19, "Wireless IEEE 802.11"},
476 static const radius_attr_info radius_attrib[] =
478 {1, RADIUS_STRING, "User Name", NULL},
479 {2, RADIUS_STRING, "User Password", NULL},
480 {3, RADIUS_BINSTRING, "CHAP Password", NULL},
481 {4, RADIUS_IP_ADDRESS, "NAS IP Address", NULL},
482 {5, RADIUS_INTEGER4, "NAS Port", NULL},
483 {6, RADIUS_INTEGER4, "Service Type", radius_service_type_vals},
484 {7, RADIUS_INTEGER4, "Framed Protocol", radius_framed_protocol_vals},
485 {8, RADIUS_IP_ADDRESS, "Framed IP Address", NULL},
486 {9, RADIUS_IP_ADDRESS, "Framed IP Netmask", NULL},
487 {10, RADIUS_INTEGER4, "Framed Routing", radius_framed_routing_vals},
488 {11, RADIUS_STRING, "Filter Id", NULL},
489 {12, RADIUS_INTEGER4, "Framed MTU", NULL},
490 {13, RADIUS_INTEGER4, "Framed Compression", radius_framed_compression_vals},
491 {14, RADIUS_IP_ADDRESS, "Login IP Host", NULL},
492 {15, RADIUS_INTEGER4, "Login Service", radius_login_service_vals},
493 {16, RADIUS_INTEGER4, "Login TCP Port", NULL},
494 {17, RADIUS_UNKNOWN, "Unassigned", NULL},
495 {18, RADIUS_STRING, "Reply Message", NULL},
496 {19, RADIUS_STRING, "Callback Number", NULL},
497 {20, RADIUS_STRING, "Callback Id", NULL},
498 {21, RADIUS_UNKNOWN, "Unassigned", NULL},
499 {22, RADIUS_STRING, "Framed Route", NULL},
500 {23, RADIUS_IPX_ADDRESS, "Framed IPX network", NULL},
501 {24, RADIUS_BINSTRING, "State", NULL},
502 {25, RADIUS_BINSTRING, "Class", NULL},
503 {26, RADIUS_VENDOR_SPECIFIC, "Vendor Specific", NULL},
504 {27, RADIUS_INTEGER4, "Session Timeout", NULL},
505 {28, RADIUS_INTEGER4, "Idle Timeout", NULL},
506 {29, RADIUS_INTEGER4, "Terminating Action", radius_terminating_action_vals},
507 {30, RADIUS_STRING, "Called Station Id", NULL},
508 {31, RADIUS_STRING, "Calling Station Id", NULL},
509 {32, RADIUS_STRING, "NAS identifier", NULL},
510 {33, RADIUS_BINSTRING, "Proxy State", NULL},
511 {34, RADIUS_STRING, "Login LAT Service", NULL},
512 {35, RADIUS_STRING, "Login LAT Node", NULL},
513 {36, RADIUS_BINSTRING, "Login LAT Group", NULL},
514 {37, RADIUS_INTEGER4, "Framed AppleTalk Link", NULL},
515 {38, RADIUS_INTEGER4, "Framed AppleTalk Network", NULL},
516 {39, RADIUS_STRING, "Framed AppleTalk Zone", NULL},
517 {40, RADIUS_INTEGER4, "Acct Status Type", radius_accounting_status_type_vals},
518 {41, RADIUS_INTEGER4, "Acct Delay Time", NULL},
519 {42, RADIUS_INTEGER4, "Acct Input Octets", NULL},
520 {43, RADIUS_INTEGER4, "Acct Output Octets", NULL},
521 {44, RADIUS_STRING, "Acct Session Id", NULL},
522 {45, RADIUS_INTEGER4, "Acct Authentic", radius_accounting_authentication_vals},
523 {46, RADIUS_INTEGER4, "Acct Session Time", NULL},
524 {47, RADIUS_INTEGER4, "Acct Input Packets", NULL},
525 {48, RADIUS_INTEGER4, "Acct Output Packets", NULL},
526 {49, RADIUS_INTEGER4, "Acct Terminate Cause", radius_acct_terminate_cause_vals},
527 {50, RADIUS_STRING, "Acct Multi Session Id", NULL},
528 {51, RADIUS_INTEGER4, "Acct Link Count", NULL},
529 {52, RADIUS_INTEGER4, "Acct Input Gigawords", NULL},
530 {53, RADIUS_INTEGER4, "Acct Output Gigawords", NULL},
532 {55, RADIUS_TIMESTAMP, "Event Timestamp", NULL},
534 {60, RADIUS_BINSTRING, "CHAP Challenge", NULL},
535 {61, RADIUS_INTEGER4, "NAS Port Type", radius_nas_port_type_vals},
536 {62, RADIUS_INTEGER4, "Port Limit", NULL},
537 {63, RADIUS_BINSTRING, "Login LAT Port", NULL},
538 {64, RADIUS_INTEGER4_TAGGED, "Tunnel Type", radius_tunnel_type_vals},
539 {65, RADIUS_INTEGER4_TAGGED, "Tunnel Medium Type", radius_tunnel_medium_type_vals},
540 {66, RADIUS_STRING_TAGGED, "Tunnel Client Endpoint", NULL},
541 {67, RADIUS_STRING_TAGGED, "Tunnel Server Endpoint", NULL},
542 {68, RADIUS_STRING, "Tunnel Connection", NULL},
543 {69, RADIUS_STRING_TAGGED, "Tunnel Password", NULL},
544 {70, RADIUS_STRING, "ARAP Password", NULL},
545 {71, RADIUS_STRING, "ARAP Features", NULL},
546 {72, RADIUS_INTEGER4, "ARAP Zone-Access", NULL},
547 {73, RADIUS_INTEGER4, "ARAP Security", NULL},
548 {74, RADIUS_STRING, "ARAP Security Data", NULL},
549 {75, RADIUS_INTEGER4, "Password Retry", NULL},
550 {76, RADIUS_INTEGER4, "Prompt", NULL},
551 {77, RADIUS_STRING, "Connect Info", NULL},
552 {78, RADIUS_STRING, "Configuration Token", NULL},
553 {79, RADIUS_EAP_MESSAGE, "EAP Message", NULL},
554 {80, RADIUS_BINSTRING, "Message Authenticator", NULL},
555 {81, RADIUS_STRING_TAGGED, "Tunnel Private Group ID", NULL},
556 {82, RADIUS_STRING_TAGGED, "Tunnel Assignment ID", NULL},
557 {83, RADIUS_INTEGER4_TAGGED, "Tunnel Preference", NULL},
558 {84, RADIUS_STRING, "ARAP Challenge Response", NULL},
559 {85, RADIUS_INTEGER4, "Acct Interim Interval", NULL},
560 {86, RADIUS_INTEGER4, "Tunnel Packets Lost", NULL},
561 {87, RADIUS_STRING, "NAS Port ID", NULL},
562 {88, RADIUS_STRING, "Framed Pool", NULL},
563 {90, RADIUS_STRING_TAGGED, "Tunnel Client Auth ID", NULL},
564 {91, RADIUS_STRING_TAGGED, "Tunnel Server Auth ID", NULL},
565 {120, RADIUS_INTEGER4, "Ascend Modem Port No", NULL},
566 {121, RADIUS_INTEGER4, "Ascend Modem Slot No", NULL},
567 {187, RADIUS_INTEGER4, "Ascend Multilink ID", NULL},
568 {188, RADIUS_INTEGER4, "Ascend Num In Multilink", NULL},
569 {189, RADIUS_IP_ADDRESS, "Ascend First Dest", NULL},
570 {190, RADIUS_INTEGER4, "Ascend Pre Input Octets", NULL},
571 {191, RADIUS_INTEGER4, "Ascend Pre Output Octets", NULL},
572 {192, RADIUS_INTEGER4, "Ascend Pre Input Packets", NULL},
573 {193, RADIUS_INTEGER4, "Ascend Pre Output Packets", NULL},
574 {194, RADIUS_INTEGER4, "Ascend Maximum Time", NULL},
575 {195, RADIUS_INTEGER4, "Ascend Disconnect Cause", NULL},
576 {196, RADIUS_INTEGER4, "Ascend Connect Progress", NULL},
577 {197, RADIUS_INTEGER4, "Ascend Data Rate", NULL},
578 {198, RADIUS_INTEGER4, "Ascend PreSession Time", NULL},
579 {218, RADIUS_INTEGER4, "Ascend Assign IP Pool", NULL},
580 {255, RADIUS_INTEGER4, "Ascend Xmit Rate", NULL},
586 'dictionary.acc' file from FreeRADIUS
587 http://www.freeradius.org/radiusd/raddb/dictionary.acc
589 static const value_string radius_vendor_acc_reason_code_vals[] =
591 {0, "No reason No Failure"},
592 {1, "Resource shortage"},
593 {2, "Session already open"},
594 {3, "Too many RADIUS users"},
595 {4, "No authentification server"},
596 {5, "No authentification response"},
597 {6, "No accounting server"},
598 {7, "No accounting response"},
599 {8, "Access Denied"},
600 {9, "Temporary buffer shortage"},
601 {10, "Protocol error"},
602 {11, "Invalid attribute"},
603 {12, "Invalid service type"},
604 {13, "Invalid framed protocol"},
605 {14, "Invalid attribute value"},
606 {15, "Invalid user information"},
607 {16, "Invalid IP address"},
608 {17, "Invalid integer syntax"},
609 {18, "Invalid NAS port"},
610 {19, "Requested by user"},
611 {20, "Network disconnect"},
612 {21, "Service interruption"},
613 {22, "Physical port error"},
614 {23, "Idle timeout"},
615 {24, "Session timeout"},
616 {25, "Administrative reset"},
617 {26, "NAS reload or reset"},
620 {29, "Undefined reason given"},
621 {30, "Conflicting attributes"},
622 {31, "Port limit exceeded"},
623 {32, "Facility not available"},
624 {33, "Internal config error"},
625 {34, "Bad route specification"},
626 {35, "Access Partition bind failure"},
627 {36, "Security violation"},
628 {37, "Request type conflict"},
629 {38, "Configuration disallowed"},
630 {39, "Missing attribute"},
631 {40, "Invalid request"},
632 {41, "Missing parameter"},
633 {42, "Invalid parameter"},
634 {43, "Call cleared with cause"},
635 {44, "Inopportune config request"},
636 {45, "Invalid config parameter"},
637 {46, "Missing config parameter"},
638 {47, "Incompatible service profile"},
639 {48, "Administrative reset"},
640 {49, "Administrative reload"},
641 {50, "Port unneeded"},
642 {51, "Port preempted"},
643 {52, "Port suspended"},
644 {53, "Service unavailable"},
647 {56, "Host request"},
651 static const value_string radius_vendor_acc_ccp_option_vals[] =
658 static const value_string radius_vendor_acc_route_policy_vals[] =
665 static const value_string radius_vendor_acc_ml_mlx_admin_state_vals[] =
672 static const value_string radius_vendor_acc_request_type_vals[] =
674 {1, "Ring Indication"},
676 {3, "User Authentification"},
677 {4, "Tunnel Authentification"},
681 static const value_string radius_vendor_acc_bridging_support_vals[] =
688 static const value_string radius_vendor_acc_apsm_oversubscribed_vals[] =
695 static const value_string radius_vendor_acc_acct_on_off_reason_vals[] =
699 {2, "Configuration Reset"},
700 {3, "Configuration Reload"},
706 static const value_string radius_vendor_acc_ip_compression_vals[] =
713 static const value_string radius_vendor_acc_ipx_compression_vals[] =
720 static const value_string radius_vendor_acc_callback_mode_vals[] =
723 {3, "User Specified E.164"},
724 {6, "CBCP Callback"},
729 static const value_string radius_vendor_acc_callback_cbcp_type_vals[] =
732 {2, "CBCP User Specified"},
733 {3, "CBCP Pre Specified"},
737 static const value_string radius_vendor_acc_dialout_auth_mode_vals[] =
746 static const value_string radius_vendor_acc_access_community_vals[] =
753 static const radius_attr_info radius_vendor_acc_attrib[] =
755 {1, RADIUS_INTEGER4, "Acc Reason Code", radius_vendor_acc_reason_code_vals},
756 {2, RADIUS_INTEGER4, "Acc Ccp Option", radius_vendor_acc_ccp_option_vals},
757 {3, RADIUS_INTEGER4, "Acc Input Errors", NULL},
758 {4, RADIUS_INTEGER4, "Acc Output Errors", NULL},
759 {5, RADIUS_STRING, "Acc Access Partition", NULL},
760 {6, RADIUS_STRING, "Acc Customer Id", NULL},
761 {7, RADIUS_IP_ADDRESS, "Acc Ip Gateway Pri", NULL},
762 {8, RADIUS_IP_ADDRESS, "Acc Ip Gateway Sec", NULL},
763 {9, RADIUS_INTEGER4, "Acc Route Policy", radius_vendor_acc_route_policy_vals},
764 {10, RADIUS_INTEGER4, "Acc ML MLX Admin State", radius_vendor_acc_ml_mlx_admin_state_vals},
765 {11, RADIUS_INTEGER4, "Acc ML Call Threshold", NULL},
766 {12, RADIUS_INTEGER4, "Acc ML Clear Threshold", NULL},
767 {13, RADIUS_INTEGER4, "Acc ML Damping Factor", NULL},
768 {14, RADIUS_STRING, "Acc Tunnel Secret", NULL},
769 {15, RADIUS_INTEGER4, "Acc Clearing Cause", q931_cause_code_vals},
770 {16, RADIUS_INTEGER4, "Acc Clearing Location", q931_cause_location_vals},
771 {17, RADIUS_STRING, "Acc Service Profile", NULL},
772 {18, RADIUS_INTEGER4, "Acc Request Type", radius_vendor_acc_request_type_vals},
773 {19, RADIUS_INTEGER4, "Acc Bridging Support", radius_vendor_acc_bridging_support_vals},
774 {20, RADIUS_INTEGER4, "Acc Apsm Oversubscribed", radius_vendor_acc_apsm_oversubscribed_vals},
775 {21, RADIUS_INTEGER4, "Acc Acct On Off Reason", radius_vendor_acc_acct_on_off_reason_vals},
776 {22, RADIUS_INTEGER4, "Acc Tunnel Port", NULL},
777 {23, RADIUS_IP_ADDRESS, "Acc Dns Server Pri", NULL},
778 {24, RADIUS_IP_ADDRESS, "Acc Dns Server Sec", NULL},
779 {25, RADIUS_IP_ADDRESS, "Acc Nbns Server Pri", NULL},
780 {26, RADIUS_IP_ADDRESS, "Acc Nbns Server Sec", NULL},
781 {27, RADIUS_INTEGER4, "Acc Dial Port Index", NULL},
782 {28, RADIUS_INTEGER4, "Acc Ip Compression", radius_vendor_acc_ip_compression_vals},
783 {29, RADIUS_INTEGER4, "Acc Ipx Compression", radius_vendor_acc_ipx_compression_vals},
784 {30, RADIUS_INTEGER4, "Acc Connect Tx Speed", NULL},
785 {31, RADIUS_INTEGER4, "Acc Connect Rx Speed", NULL},
786 {32, RADIUS_STRING, "Acc Modem Modulation Type", NULL},
787 {33, RADIUS_STRING, "Acc Modem Error Protocol", NULL},
788 {34, RADIUS_INTEGER4, "Acc Callback Delay", NULL},
789 {35, RADIUS_STRING, "Acc Callback Num Valid", NULL},
790 {36, RADIUS_INTEGER4, "Acc Callback Mode", radius_vendor_acc_callback_mode_vals},
791 {37, RADIUS_INTEGER4, "Acc Callback CBCP Type", radius_vendor_acc_callback_cbcp_type_vals},
792 {38, RADIUS_INTEGER4, "Acc Dialout Auth Mode", radius_vendor_acc_dialout_auth_mode_vals},
793 {39, RADIUS_STRING, "Acc Dialout Auth Password", NULL},
794 {40, RADIUS_STRING, "Acc Dialout Auth Username", NULL},
795 {42, RADIUS_INTEGER4, "Acc Access Community", radius_vendor_acc_access_community_vals},
801 'dictionary.cisco' file from FreeRADIUS
802 http://www.freeradius.org/radiusd/raddb/dictionary.cisco
804 http://www.cisco.com/univercd/cc/td/doc/product/access/acs_serv/vapp_dev/vsaig3.htm
806 http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fsecur_c/fappendx/fradattr/scfrdat3.pdf
807 http://www.missl.cs.umd.edu/wireless/ethereal/cisco-vsa.pdf
810 static const value_string radius_vendor_cisco_disconnect_cause_vals[] =
813 {4, "CLID Authentication Failure"},
815 {11, "Lost Carrier"},
816 {12, "No Detected Result Codes"},
817 {20, "User Ends Session"},
818 {21, "Idle Timeout"},
819 {22, "Exit Telnet Session"},
820 {23, "No Remote IP Addr"},
821 {24, "Exit Raw TCP"},
822 {25, "Password Fail"},
823 {26, "Raw TCP Disabled"},
824 {27, "Control C Detected"},
825 {28, "EXEC Program Destroyed"},
826 {40, "Timeout PPP LCP"},
827 {41, "Failed PPP LCP Negotiation"},
828 {42, "Failed PPP PAP Auth Fail"},
829 {43, "Failed PPP CHAP Auth"},
830 {44, "Failed PPP Remote Auth"},
831 {45, "PPP Remote Terminate"},
832 {46, "PPP Closed Event"},
833 {100, "Session Timeout"},
834 {101, "Session Failed Security"},
835 {102, "Session End Callback"},
836 {120, "Invalid Protocol"},
840 static const radius_attr_info radius_vendor_cisco_attrib[] =
842 /* stanard attributes */
843 {1, RADIUS_STRING, "Cisco AV Pair", NULL},
844 {2, RADIUS_STRING, "Cisco NAS Port", NULL},
846 {3, RADIUS_STRING, "Fax Account Id Origin", NULL},
847 {4, RADIUS_STRING, "Fax Msg Id", NULL},
848 {5, RADIUS_STRING, "Fax Pages", NULL},
849 {6, RADIUS_STRING, "Fax Cover Page Flag", NULL},
850 {7, RADIUS_STRING, "Fax Modem Time", NULL},
851 {8, RADIUS_STRING, "Fax Connect Speed", NULL},
852 {9, RADIUS_STRING, "Fax Recipent Count", NULL},
853 {10, RADIUS_STRING, "Fax Process Abort Flag", NULL},
854 {11, RADIUS_STRING, "Fax DSN Address", NULL},
855 {12, RADIUS_STRING, "Fax DSN Flag", NULL},
856 {13, RADIUS_STRING, "Fax MDN Address", NULL},
857 {14, RADIUS_STRING, "Fax MDN Flag", NULL},
858 {15, RADIUS_STRING, "Fax Auth Status", NULL},
859 {16, RADIUS_STRING, "Email Server Address", NULL},
860 {17, RADIUS_STRING, "Email Server Ack Flag", NULL},
861 {18, RADIUS_STRING, "Gateway Id", NULL},
862 {19, RADIUS_STRING, "Call Type", NULL},
863 {20, RADIUS_STRING, "Port Used", NULL},
864 {21, RADIUS_STRING, "Abort Cause", NULL},
866 /* H323 - Voice over IP attributes. */
867 {23, RADIUS_STRING, "H323 Remote Address", NULL},
868 {24, RADIUS_STRING, "H323 Conf Id", NULL},
869 {25, RADIUS_STRING, "H323 Setup Time", NULL},
870 {26, RADIUS_STRING, "H323 Call Origin", NULL},
871 {27, RADIUS_STRING, "H323 Call Type", NULL},
872 {28, RADIUS_STRING, "H323 Connect Time", NULL},
873 {29, RADIUS_STRING, "H323 Disconnect Time", NULL},
874 {30, RADIUS_STRING, "H323 Disconnect Cause", NULL},
875 {31, RADIUS_STRING, "H323 Voice Quality", NULL},
877 {33, RADIUS_STRING, "H323 GW Id", NULL},
879 {35, RADIUS_STRING, "H323 Incoming Conf Id", NULL},
881 {101, RADIUS_STRING, "H323 Credit Amount", NULL},
882 {102, RADIUS_STRING, "H323 Credit Time", NULL},
883 {103, RADIUS_STRING, "H323 Return Code", NULL},
884 {104, RADIUS_STRING, "H323 Prompt Id", NULL},
885 {105, RADIUS_STRING, "H323 Time And Day", NULL},
886 {106, RADIUS_STRING, "H323 Redirect Number", NULL},
887 {107, RADIUS_STRING, "H323 Preferred Lang", NULL},
888 {108, RADIUS_STRING, "H323 Redirect Ip Address", NULL},
889 {109, RADIUS_STRING, "H323 Billing Model", NULL},
890 {110, RADIUS_STRING, "H323 Currency Type", NULL},
893 Extra attributes sent by the Cisco, if you configure
894 "radius-server vsa accounting" (requires IOS11.2+).
896 {187, RADIUS_INTEGER4, "Cisco Multilink ID", NULL},
897 {188, RADIUS_INTEGER4, "Cisco Num In Multilink", NULL},
899 {190, RADIUS_INTEGER4, "Cisco Pre Input Octets", NULL},
900 {191, RADIUS_INTEGER4, "Cisco Pre Output Octets", NULL},
901 {192, RADIUS_INTEGER4, "Cisco Pre Input Packets", NULL},
902 {193, RADIUS_INTEGER4, "Cisco Pre Output Packets", NULL},
903 {194, RADIUS_INTEGER4, "Cisco Maximum Time", NULL},
904 {195, RADIUS_INTEGER4, "Cisco Disconnect Cause", radius_vendor_cisco_disconnect_cause_vals},
906 {197, RADIUS_INTEGER4, "Cisco Data Rate", NULL},
907 {198, RADIUS_INTEGER4, "Cisco PreSession Time", NULL},
909 {208, RADIUS_INTEGER4, "Cisco PW Lifetime", NULL},
910 {209, RADIUS_INTEGER4, "Cisco IP Direct", NULL},
911 {210, RADIUS_INTEGER4, "Cisco PPP VJ Slot Comp", NULL},
913 {212, RADIUS_INTEGER4, "Cisco PPP Async Map", NULL},
915 {217, RADIUS_INTEGER4, "Cisco IP Pool Definition", NULL},
916 {218, RADIUS_INTEGER4, "Cisco Asing IP Pool", NULL},
918 {228, RADIUS_INTEGER4, "Cisco Route IP", NULL},
920 {233, RADIUS_INTEGER4, "Cisco Link Compression", NULL},
921 {234, RADIUS_INTEGER4, "Cisco Target Util", NULL},
922 {235, RADIUS_INTEGER4, "Cisco Maximum Channels", NULL},
924 {242, RADIUS_INTEGER4, "Cisco Data Filter", NULL},
925 {243, RADIUS_INTEGER4, "Cisco Call Filter", NULL},
926 {244, RADIUS_INTEGER4, "Cisco Idle Limit", NULL},
927 /* Cisco SSG Service Selection Gateway Attributes */
928 {250, RADIUS_STRING, "Cisco Account Info", NULL},
929 {251, RADIUS_STRING, "Cisco Service Info", NULL},
930 {252, RADIUS_BINSTRING, "Cisco Command Info", NULL},
931 {253, RADIUS_STRING, "Cisco Control Info", NULL},
932 {255, RADIUS_INTEGER4, "Cisco Xmit Rate", NULL},
938 'dictionary.shiva' file from FreeRADIUS
939 http://www.freeradius.org/radiusd/raddb/dictionary.shiva
941 static const value_string radius_vendor_shiva_type_of_service_vals[] =
944 {2, "Digitized Analog"},
946 {4, "Digital V.110"},
947 {5, "Digital V.120"},
948 {6, "Digital Leased Line"},
952 static const value_string radius_vendor_shiva_link_protocol_vals[] =
963 static const value_string radius_vendor_shiva_disconnect_reason_vals[] =
968 {4, "Session Timeout"},
969 {5, "Admin Disconnect"},
971 {7, "Virtual Connection"},
972 {8, "Bandwidth On Demand"},
973 {9, "Failed Authentication"},
976 {12, "Tariff Management"},
981 static const value_string radius_vendor_shiva_function_vals[] =
990 static const value_string radius_vendor_shiva_connect_reason_vals[] =
994 {3, "Virtual Connection"},
995 {4, "Bandwidth On Demand"},
999 static const radius_attr_info radius_vendor_shiva_attrib[] =
1001 {1, RADIUS_STRING, "Shiva User Attributes", NULL},
1002 {90, RADIUS_STRING, "Shiva Called Number", NULL},
1003 {91, RADIUS_STRING, "Shiva Calling Number", NULL},
1004 {92, RADIUS_STRING, "Shiva Customer Id", NULL},
1005 {93, RADIUS_INTEGER4, "Shiva Type Of Service", radius_vendor_shiva_type_of_service_vals},
1006 {94, RADIUS_INTEGER4, "Shiva Link Speed", NULL},
1007 {95, RADIUS_INTEGER4, "Shiva Links In Bundle", NULL},
1008 {96, RADIUS_INTEGER4, "Shiva Compression Type", NULL},
1009 {97, RADIUS_INTEGER4, "Shiva Link Protocol", radius_vendor_shiva_link_protocol_vals},
1010 {98, RADIUS_INTEGER4, "Shiva Network Protocols", NULL},
1011 {99, RADIUS_INTEGER4, "Shiva Session Id", NULL},
1012 {100, RADIUS_INTEGER4, "Shiva Disconnect Reason", radius_vendor_shiva_disconnect_reason_vals},
1013 {101, RADIUS_IP_ADDRESS, "Shiva Acct Serv Switch", NULL},
1014 {102, RADIUS_INTEGER4, "Shiva Event Flags", NULL},
1015 {103, RADIUS_INTEGER4, "Shiva Function", radius_vendor_shiva_function_vals},
1016 {104, RADIUS_INTEGER4, "Shiva Connect Reason", radius_vendor_shiva_connect_reason_vals},
1022 'dictionary.livingston' file from FreeRADIUS
1023 http://www.freeradius.org/radiusd/raddb/dictionary.livingston
1025 static const value_string radius_vendor_livingston_ipsec_log_options_vals[] =
1027 {1, "SA Success On"},
1028 {2, "SA Failure On"},
1031 {5, "SA Success Off"},
1032 {6, "SA Failure Off"},
1038 static const value_string radius_vendor_livingston_ipsec_deny_action_vals[] =
1042 {3, "Pass Through"},
1046 static const value_string radius_vendor_livingston_nat_log_options_vals[] =
1048 {1, "Session Success On"},
1049 {2, "Session Failure On"},
1059 static const value_string radius_vendor_livingston_nat_sess_dir_fail_action_vals[] =
1063 {3, "Pass Through"},
1067 static const value_string radius_vendor_livingston_multicast_client_vals[] =
1073 static const radius_attr_info radius_vendor_livingston_attrib[] =
1075 {2, RADIUS_STRING, "LE Terminate Detail", NULL},
1076 {3, RADIUS_STRING, "LE Advice of Charge", NULL},
1077 {4, RADIUS_STRING, "LE Connect Detail", NULL},
1078 {6, RADIUS_STRING, "LE IP Pool", NULL},
1079 {7, RADIUS_IP_ADDRESS, "LE IP Gateway", NULL},
1080 {8, RADIUS_STRING, "LE Modem Info", NULL},
1081 {9, RADIUS_INTEGER4, "LE IPSec Log Options", radius_vendor_livingston_ipsec_log_options_vals},
1082 {10, RADIUS_INTEGER4, "LE IPSec Deny Action", radius_vendor_livingston_ipsec_deny_action_vals},
1083 {11, RADIUS_STRING, "LE IPSec Active Profile", NULL},
1084 {12, RADIUS_STRING, "LE IPSec Outsource Profile", NULL},
1085 {13, RADIUS_STRING, "LE IPSec Passive Profile", NULL},
1086 {14, RADIUS_INTEGER4, "LE NAT TCP Session Timeout", NULL},
1087 {15, RADIUS_INTEGER4, "LE NAT Other Session Timeout", NULL},
1088 {16, RADIUS_INTEGER4, "LE NAT Log Options", radius_vendor_livingston_nat_log_options_vals},
1089 {17, RADIUS_INTEGER4, "LE NAT Sess Dir Fail Action", radius_vendor_livingston_nat_sess_dir_fail_action_vals},
1090 {18, RADIUS_STRING, "LE NAT Inmap", NULL},
1091 {19, RADIUS_STRING, "LE NAT Outmap", NULL},
1092 {20, RADIUS_STRING, "LE NAT Outsource Inmap", NULL},
1093 {21, RADIUS_STRING, "LE NAT Outsource Outmap", NULL},
1094 {22, RADIUS_STRING, "LE Admin Group", NULL},
1095 {23, RADIUS_INTEGER4, "LE Multicast Client", radius_vendor_livingston_multicast_client_vals},
1099 static const value_string radius_vendor_microsoft_bap_usage_vals[] =
1107 static const value_string radius_vendor_microsoft_arap_pw_change_reason_vals[] =
1109 {1, "Just Change Password"},
1110 {2, "Expired Password"},
1111 {3, "Admin Required Password Change"},
1112 {4, "Password Too Short"},
1116 static const value_string radius_vendor_microsoft_acct_auth_type_vals[] =
1126 static const value_string radius_vendor_microsoft_acct_eap_type_vals[] =
1130 {6, "Generic Token Card"},
1135 static const radius_attr_info radius_vendor_microsoft_attrib[] =
1137 {1, RADIUS_BINSTRING, "MS CHAP Response", NULL},
1138 {2, RADIUS_STRING, "MS CHAP Error", NULL},
1139 {3, RADIUS_BINSTRING, "MS CHAP CPW 1", NULL},
1140 {4, RADIUS_BINSTRING, "MS CHAP CPW 2", NULL},
1141 {5, RADIUS_BINSTRING, "MS CHAP LM Enc PW", NULL},
1142 {6, RADIUS_BINSTRING, "MS CHAP NT Enc PW", NULL},
1143 {7, RADIUS_BINSTRING, "MS MPPE Encryption Policy", NULL},
1144 {8, RADIUS_BINSTRING, "MS MPPE Encryption Type", NULL},
1145 {9, RADIUS_INTEGER4, "MS RAS Vendor", NULL},
1146 {10, RADIUS_STRING, "MS CHAP Domain", NULL},
1147 {11, RADIUS_BINSTRING, "MS CHAP Challenge", NULL},
1148 {12, RADIUS_BINSTRING, "MS CHAP MPPE Keys", NULL},
1149 {13, RADIUS_INTEGER4, "MS BAP Usage", radius_vendor_microsoft_bap_usage_vals},
1150 {14, RADIUS_INTEGER4, "MS Link Utilization Threshold", NULL},
1151 {15, RADIUS_INTEGER4, "MS Link Drop Time Limit", NULL},
1152 {16, RADIUS_BINSTRING, "MS MPPE Send Key", NULL},
1153 {17, RADIUS_BINSTRING, "MS MPPE Recv Key", NULL},
1154 {18, RADIUS_STRING, "MS RAS Version", NULL},
1155 {19, RADIUS_BINSTRING, "MS Old ARAP Password", NULL},
1156 {20, RADIUS_BINSTRING, "MS New ARAP Password", NULL},
1157 {21, RADIUS_INTEGER4, "MS ARAP PW Change Reason", radius_vendor_microsoft_arap_pw_change_reason_vals},
1158 {22, RADIUS_BINSTRING, "MS Filter", NULL},
1159 {23, RADIUS_INTEGER4, "MS Acct Auth Type", radius_vendor_microsoft_acct_auth_type_vals},
1160 {24, RADIUS_INTEGER4, "MS Acct EAP Type", radius_vendor_microsoft_acct_eap_type_vals},
1161 {25, RADIUS_BINSTRING, "MS CHAP2 Response", NULL},
1162 {26, RADIUS_BINSTRING, "MS CHAP2 Success", NULL},
1163 {27, RADIUS_BINSTRING, "MS CHAP2 CPW", NULL},
1164 {28, RADIUS_IP_ADDRESS, "MS Primary DNS Server", NULL},
1165 {29, RADIUS_IP_ADDRESS, "MS Secondary DNS Server", NULL},
1166 {30, RADIUS_IP_ADDRESS, "MS Primary NBNS Server", NULL},
1167 {31, RADIUS_IP_ADDRESS, "MS Secondary NBNS Server", NULL},
1171 static const value_string radius_vendor_ascend_calling_id_type_of_number_vals[] =
1174 {1, "International Number"},
1175 {2, "National Number"},
1176 {3, "Network Specific"},
1177 {4, "Subscriber Number"},
1178 {6, "Abbreviated Number"},
1182 static const value_string radius_vendor_ascend_calling_id_numbering_plan_vals[] =
1185 {1, "ISDN Telephony"},
1193 static const value_string radius_vendor_ascend_calling_id_presentation_vals[] =
1197 {2, "Number Not Available"},
1201 static const value_string radius_vendor_ascend_calling_id_screening_vals[] =
1203 {0, "User Not Screened"},
1204 {1, "User Provided Passed"},
1205 {2, "User Provided Failed"},
1206 {3, "Network Provided"},
1210 static const radius_attr_info radius_vendor_ascend_attrib[] =
1212 {7, RADIUS_STRING, "Ascend UU Info", NULL},
1213 {9, RADIUS_INTEGER4, "Ascend CIR Timer", NULL},
1214 {10, RADIUS_INTEGER4, "Ascend FR 08 Mode", NULL},
1215 {11, RADIUS_INTEGER4, "Ascend Destination Nas Port", NULL},
1216 {12, RADIUS_STRING, "Ascend FR SVC Addr", NULL},
1217 {13, RADIUS_INTEGER4, "Ascend NAS Port Format", NULL},
1218 {14, RADIUS_INTEGER4, "Ascend ATM Fault Management", NULL},
1219 {15, RADIUS_INTEGER4, "Ascend ATM Loopback Cell Loss", NULL},
1220 {16, RADIUS_INTEGER4, "Ascend Ckt Type", NULL},
1221 {17, RADIUS_INTEGER4, "Ascend SVC Enabled", NULL},
1222 {18, RADIUS_INTEGER4, "Ascend Session Type", NULL},
1223 {19, RADIUS_IP_ADDRESS, "Ascend H323 Gatekeeper", NULL},
1224 {20, RADIUS_STRING, "Ascend Global Call Id", NULL},
1225 {21, RADIUS_INTEGER4, "Ascend H323 Conference Id", NULL},
1226 {22, RADIUS_IP_ADDRESS, "Ascend H323 Fegw Address", NULL},
1227 {23, RADIUS_INTEGER4, "Ascend H323 Dialed Time", NULL},
1228 {24, RADIUS_STRING, "Ascend Dialed Number", NULL},
1229 {25, RADIUS_INTEGER4, "Ascend Inter Arrival Jitter", NULL},
1230 {26, RADIUS_INTEGER4, "Ascend Dropped Octets", NULL},
1231 {27, RADIUS_INTEGER4, "Ascend Dropped Packets", NULL},
1232 {29, RADIUS_INTEGER4, "Ascend X25 Pad X3 Profile", NULL},
1233 {30, RADIUS_STRING, "Ascend X25 Pad X3 Parameters", NULL},
1234 {31, RADIUS_STRING, "Ascend Tunnel VRouter Name", NULL},
1235 {32, RADIUS_INTEGER4, "Ascend X25 Reverse Charging", NULL},
1236 {33, RADIUS_STRING, "Ascend X25 Nui Prompt", NULL},
1237 {34, RADIUS_STRING, "Ascend X25 Nui Password Prompt", NULL},
1238 {35, RADIUS_STRING, "Ascend X25 Cug", NULL},
1239 {36, RADIUS_STRING, "Ascend X25 Pad Alias 1", NULL},
1240 {37, RADIUS_STRING, "Ascend X25 Pad Alias 2", NULL},
1241 {38, RADIUS_STRING, "Ascend X25 Pad Alias 3", NULL},
1242 {39, RADIUS_STRING, "Ascend X25 X121 Address", NULL},
1243 {40, RADIUS_STRING, "Ascend X25 Nui", NULL},
1244 {41, RADIUS_STRING, "Ascend X25 Rpoa", NULL},
1245 {42, RADIUS_STRING, "Ascend X25 Pad Prompt", NULL},
1246 {43, RADIUS_STRING, "Ascend X25 Pad Banner", NULL},
1247 {44, RADIUS_STRING, "Ascend X25 Profile Name", NULL},
1248 {45, RADIUS_STRING, "Ascend Recv Name", NULL},
1249 {46, RADIUS_INTEGER4, "Ascend Bi Directional Auth", NULL},
1250 {47, RADIUS_INTEGER4, "Ascend MTU", NULL},
1251 {48, RADIUS_INTEGER4, "Ascend Call Direction", NULL},
1252 {49, RADIUS_INTEGER4, "Ascend Service Type", NULL},
1253 {50, RADIUS_INTEGER4, "Ascend Filter Required", NULL},
1254 {51, RADIUS_INTEGER4, "Ascend Traffic Shaper", NULL},
1255 {52, RADIUS_STRING, "Ascend Access Intercept LEA", NULL},
1256 {53, RADIUS_STRING, "Ascend Access Intercept Log", NULL},
1257 {54, RADIUS_STRING, "Ascend Private Route Table ID", NULL},
1258 {55, RADIUS_INTEGER4, "Ascend Private Route Required", NULL},
1259 {56, RADIUS_INTEGER4, "Ascend Cache Refresh", NULL},
1260 {57, RADIUS_INTEGER4, "Ascend Cache Time", NULL},
1261 {58, RADIUS_INTEGER4, "Ascend Egress Enabled", NULL},
1262 {59, RADIUS_STRING, "Ascend QOS Upstream", NULL},
1263 {60, RADIUS_STRING, "Ascend QOS Downstream", NULL},
1264 {61, RADIUS_INTEGER4, "Ascend ATM Connect Vpi", NULL},
1265 {62, RADIUS_INTEGER4, "Ascend ATM Connect Vci", NULL},
1266 {63, RADIUS_INTEGER4, "Ascend ATM Connect Group", NULL},
1267 {64, RADIUS_INTEGER4, "Ascend ATM Group", NULL},
1268 {65, RADIUS_INTEGER4, "Ascend IPX Header Compression", NULL},
1269 {66, RADIUS_INTEGER4, "Ascend Calling Id Type Of Number", radius_vendor_ascend_calling_id_type_of_number_vals},
1270 {67, RADIUS_INTEGER4, "Ascend Calling Id Numbering Plan", radius_vendor_ascend_calling_id_numbering_plan_vals},
1271 {68, RADIUS_INTEGER4, "Ascend Calling Id Presentation", radius_vendor_ascend_calling_id_presentation_vals},
1272 {69, RADIUS_INTEGER4, "Ascend Calling Id Screening", radius_vendor_ascend_calling_id_screening_vals},
1273 {70, RADIUS_INTEGER4, "Ascend BIR Enable", NULL},
1274 {71, RADIUS_INTEGER4, "Ascend BIR Proxy", NULL},
1275 {72, RADIUS_INTEGER4, "Ascend BIR Bridge Group", NULL},
1276 {73, RADIUS_STRING, "Ascend IPSEC Profile", NULL},
1277 {74, RADIUS_INTEGER4, "Ascend PPPoE Enable", NULL},
1278 {75, RADIUS_INTEGER4, "Ascend Bridge Non PPPoE", NULL},
1279 {76, RADIUS_INTEGER4, "Ascend ATM Direct", NULL},
1280 {77, RADIUS_STRING, "Ascend ATM Direct Profile", NULL},
1281 {78, RADIUS_IP_ADDRESS, "Ascend Client Primary WINS", NULL},
1282 {79, RADIUS_IP_ADDRESS, "Ascend Client Secondary WINS", NULL},
1283 {80, RADIUS_INTEGER4, "Ascend Client Assign WINS", NULL},
1284 {81, RADIUS_INTEGER4, "Ascend Auth Type", NULL},
1285 {82, RADIUS_INTEGER4, "Ascend Port Redir Protocol", NULL},
1286 {83, RADIUS_INTEGER4, "Ascend Port Redir Portnum", NULL},
1287 {84, RADIUS_IP_ADDRESS, "Ascend Port Redir Server", NULL},
1288 {85, RADIUS_INTEGER4, "Ascend IP Pool Chaining", NULL},
1289 {86, RADIUS_IP_ADDRESS, "Ascend Owner IP Addr", NULL},
1290 {87, RADIUS_INTEGER4, "Ascend IP TOS", NULL},
1291 {88, RADIUS_INTEGER4, "Ascend IP TOS Precedence", NULL},
1292 {89, RADIUS_INTEGER4, "Ascend IP TOS Apply To", NULL},
1293 {90, RADIUS_STRING, "Ascend Filter", NULL},
1294 {91, RADIUS_STRING, "Ascend Telnet Profile", NULL},
1295 {92, RADIUS_INTEGER4, "Ascend Dsl Rate Type", NULL},
1296 {93, RADIUS_STRING, "Ascend Redirect Number", NULL},
1297 {94, RADIUS_INTEGER4, "Ascend ATM Vpi", NULL},
1298 {95, RADIUS_INTEGER4, "Ascend ATM Vci", NULL},
1299 {96, RADIUS_INTEGER4, "Ascend Source IP Check", NULL},
1300 {97, RADIUS_INTEGER4, "Ascend Dsl Rate Mode", NULL},
1301 {98, RADIUS_INTEGER4, "Ascend Dsl Upstream Limit", NULL},
1302 {99, RADIUS_INTEGER4, "Ascend Dsl Downstream Limit", NULL},
1303 {100, RADIUS_INTEGER4, "Ascend Dsl CIR Recv Limit", NULL},
1304 {101, RADIUS_INTEGER4, "Ascend Dsl CIR Xmit Limit", NULL},
1305 {102, RADIUS_STRING, "Ascend VRouter Name", NULL},
1306 {103, RADIUS_STRING, "Ascend Source Auth", NULL},
1307 {104, RADIUS_STRING, "Ascend Private Route", NULL},
1308 {105, RADIUS_INTEGER4, "Ascend Numbering Plan ID", NULL},
1309 {106, RADIUS_INTEGER4, "Ascend FR Link Status DLCI", NULL},
1310 {107, RADIUS_STRING, "Ascend Calling Subaddress", NULL},
1311 {108, RADIUS_INTEGER4, "Ascend Callback Delay", NULL},
1312 {109, RADIUS_STRING, "Ascend Endpoint Disc", NULL},
1313 {110, RADIUS_STRING, "Ascend Remote FW", NULL},
1314 {111, RADIUS_INTEGER4, "Ascend Multicast GLeave Delay", NULL},
1315 {112, RADIUS_INTEGER4, "Ascend CBCP Enable", NULL},
1316 {113, RADIUS_INTEGER4, "Ascend CBCP Mode", NULL},
1317 {114, RADIUS_INTEGER4, "Ascend CBCP Delay", NULL},
1318 {115, RADIUS_INTEGER4, "Ascend CBCP Trunk Group", NULL},
1319 {116, RADIUS_STRING, "Ascend Appletalk Route", NULL},
1320 {117, RADIUS_INTEGER4, "Ascend Appletalk Peer Mode", NULL},
1321 {118, RADIUS_INTEGER4, "Ascend Route Appletalk", NULL},
1322 {119, RADIUS_STRING, "Ascend FCP Parameter", NULL},
1323 {120, RADIUS_INTEGER4, "Ascend Modem Port No", NULL},
1324 {121, RADIUS_INTEGER4, "Ascend Modem Slot No", NULL},
1325 {122, RADIUS_INTEGER4, "Ascend Modem Shelf No", NULL},
1326 {123, RADIUS_INTEGER4, "Ascend Call Attempt Limit", NULL},
1327 {124, RADIUS_INTEGER4, "Ascend Call Block Duration", NULL},
1328 {125, RADIUS_INTEGER4, "Ascend Maximum Call Duration", NULL},
1329 {126, RADIUS_INTEGER4, "Ascend Temporary Rtes", NULL},
1330 {127, RADIUS_INTEGER4, "Ascend Tunneling Protocol", NULL},
1331 {128, RADIUS_INTEGER4, "Ascend Shared Profile Enable", NULL},
1332 {129, RADIUS_STRING, "Ascend Primary Home Agent", NULL},
1333 {130, RADIUS_STRING, "Ascend Secondary Home Agent", NULL},
1334 {131, RADIUS_INTEGER4, "Ascend Dialout Allowed", NULL},
1335 {132, RADIUS_IP_ADDRESS, "Ascend Client Gateway", NULL},
1336 {133, RADIUS_INTEGER4, "Ascend BACP Enable", NULL},
1337 {134, RADIUS_INTEGER4, "Ascend DHCP Maximum Leases", NULL},
1338 {135, RADIUS_IP_ADDRESS, "Ascend Client Primary DNS", NULL},
1339 {136, RADIUS_IP_ADDRESS, "Ascend Client Secondary DNS", NULL},
1340 {137, RADIUS_INTEGER4, "Ascend Client Assign DNS", NULL},
1341 {138, RADIUS_INTEGER4, "Ascend User Acct Type", NULL},
1342 {139, RADIUS_IP_ADDRESS, "Ascend User Acct Host", NULL},
1343 {140, RADIUS_INTEGER4, "Ascend User Acct Port", NULL},
1344 {141, RADIUS_STRING, "Ascend User Acct Key", NULL},
1345 {142, RADIUS_INTEGER4, "Ascend User Acct Base", NULL},
1346 {143, RADIUS_INTEGER4, "Ascend User Acct Time", NULL},
1347 {144, RADIUS_IP_ADDRESS, "Ascend Assign IP Client", NULL},
1348 {145, RADIUS_IP_ADDRESS, "Ascend Assign IP Server", NULL},
1349 {146, RADIUS_STRING, "Ascend Assign IP Global Pool", NULL},
1350 {147, RADIUS_INTEGER4, "Ascend DHCP Reply", NULL},
1351 {148, RADIUS_INTEGER4, "Ascend DHCP Pool Number", NULL},
1352 {149, RADIUS_INTEGER4, "Ascend Expect Callback", NULL},
1353 {150, RADIUS_INTEGER4, "Ascend Event Type", NULL},
1354 {151, RADIUS_STRING, "Ascend Session Svr Key", NULL},
1355 {152, RADIUS_INTEGER4, "Ascend Multicast Rate Limit", NULL},
1356 {153, RADIUS_IP_ADDRESS, "Ascend IF Netmask", NULL},
1357 {154, RADIUS_IP_ADDRESS, "Ascend Remote Addr", NULL},
1358 {155, RADIUS_INTEGER4, "Ascend Multicast Client", NULL},
1359 {156, RADIUS_STRING, "Ascend FR Circuit Name", NULL},
1360 {157, RADIUS_INTEGER4, "Ascend FR LinkUp", NULL},
1361 {158, RADIUS_INTEGER4, "Ascend FR Nailed Grp", NULL},
1362 {159, RADIUS_INTEGER4, "Ascend FR Type", NULL},
1363 {160, RADIUS_INTEGER4, "Ascend FR Link Mgt", NULL},
1364 {161, RADIUS_INTEGER4, "Ascend FR N391", NULL},
1365 {162, RADIUS_INTEGER4, "Ascend FR DCE N392", NULL},
1366 {163, RADIUS_INTEGER4, "Ascend FR DTE N392", NULL},
1367 {164, RADIUS_INTEGER4, "Ascend FR DCE N393", NULL},
1368 {165, RADIUS_INTEGER4, "Ascend FR DTE N393", NULL},
1369 {166, RADIUS_INTEGER4, "Ascend FR T391", NULL},
1370 {167, RADIUS_INTEGER4, "Ascend FR T392", NULL},
1371 {168, RADIUS_STRING, "Ascend Bridge Address", NULL},
1372 {169, RADIUS_INTEGER4, "Ascend TS Idle Limit", NULL},
1373 {170, RADIUS_INTEGER4, "Ascend TS Idle Mode", NULL},
1374 {171, RADIUS_INTEGER4, "Ascend DBA Monitor", NULL},
1375 {172, RADIUS_INTEGER4, "Ascend Base Channel Count", NULL},
1376 {173, RADIUS_INTEGER4, "Ascend Minimum Channels", NULL},
1377 {174, RADIUS_STRING, "Ascend IPX Route", NULL},
1378 {175, RADIUS_INTEGER4, "Ascend FT1 Caller", NULL},
1379 {176, RADIUS_STRING, "Ascend Backup", NULL},
1380 {177, RADIUS_INTEGER4, "Ascend Call Type", NULL},
1381 {178, RADIUS_STRING, "Ascend Group", NULL},
1382 {179, RADIUS_INTEGER4, "Ascend FR DLCI", NULL},
1383 {180, RADIUS_STRING, "Ascend FR Profile Name", NULL},
1384 {181, RADIUS_STRING, "Ascend Ara PW", NULL},
1385 {182, RADIUS_STRING, "Ascend IPX Node Addr", NULL},
1386 {183, RADIUS_IP_ADDRESS, "Ascend Home Agent IP Addr", NULL},
1387 {184, RADIUS_STRING, "Ascend Home Agent Password", NULL},
1388 {185, RADIUS_STRING, "Ascend Home Network Name", NULL},
1389 {186, RADIUS_INTEGER4, "Ascend Home Agent UDP Port", NULL},
1390 {187, RADIUS_INTEGER4, "Ascend Multilink ID", NULL},
1391 {188, RADIUS_INTEGER4, "Ascend Num In Multilink", NULL},
1392 {189, RADIUS_IP_ADDRESS, "Ascend First Dest", NULL},
1393 {190, RADIUS_INTEGER4, "Ascend Pre Input Octets", NULL},
1394 {191, RADIUS_INTEGER4, "Ascend Pre Output Octets", NULL},
1395 {192, RADIUS_INTEGER4, "Ascend Pre Input Packets", NULL},
1396 {193, RADIUS_INTEGER4, "Ascend Pre Output Packets", NULL},
1397 {194, RADIUS_INTEGER4, "Ascend Maximum Time", NULL},
1398 {195, RADIUS_INTEGER4, "Ascend Disconnect Cause", NULL},
1399 {196, RADIUS_INTEGER4, "Ascend Connect Progress", NULL},
1400 {197, RADIUS_INTEGER4, "Ascend Data Rate", NULL},
1401 {198, RADIUS_INTEGER4, "Ascend PreSession Time", NULL},
1402 {199, RADIUS_INTEGER4, "Ascend Token Idle", NULL},
1403 {200, RADIUS_INTEGER4, "Ascend Token Immediate", NULL},
1404 {201, RADIUS_INTEGER4, "Ascend Require Auth", NULL},
1405 {202, RADIUS_STRING, "Ascend Number Sessions", NULL},
1406 {203, RADIUS_STRING, "Ascend Authen Alias", NULL},
1407 {204, RADIUS_INTEGER4, "Ascend Token Expiry", NULL},
1408 {205, RADIUS_STRING, "Ascend Menu Selector", NULL},
1409 {206, RADIUS_STRING, "Ascend Menu Item", NULL},
1410 {207, RADIUS_INTEGER4, "Ascend PW Warntime", NULL},
1411 {208, RADIUS_INTEGER4, "Ascend PW Lifetime", NULL},
1412 {209, RADIUS_IP_ADDRESS, "Ascend IP Direct", NULL},
1413 {210, RADIUS_INTEGER4, "Ascend PPP VJ Slot Comp", NULL},
1414 {211, RADIUS_INTEGER4, "Ascend PPP VJ 1172", NULL},
1415 {212, RADIUS_INTEGER4, "Ascend PPP Async Map", NULL},
1416 {213, RADIUS_STRING, "Ascend Third Prompt", NULL},
1417 {214, RADIUS_STRING, "Ascend Send Secret", NULL},
1418 {215, RADIUS_STRING, "Ascend Receive Secret", NULL},
1419 {216, RADIUS_INTEGER4, "Ascend IPX Peer Mode", NULL},
1420 {217, RADIUS_STRING, "Ascend IP Pool Definition", NULL},
1421 {218, RADIUS_INTEGER4, "Ascend Assign IP Pool", NULL},
1422 {219, RADIUS_INTEGER4, "Ascend FR Direct", NULL},
1423 {220, RADIUS_STRING, "Ascend FR Direct Profile", NULL},
1424 {221, RADIUS_INTEGER4, "Ascend FR Direct DLCI", NULL},
1425 {222, RADIUS_INTEGER4, "Ascend Handle IPX", NULL},
1426 {223, RADIUS_INTEGER4, "Ascend Netware timeout", NULL},
1427 {224, RADIUS_INTEGER4, "Ascend IPX Alias", NULL},
1428 {225, RADIUS_INTEGER4, "Ascend Metric", NULL},
1429 {226, RADIUS_INTEGER4, "Ascend PRI Number Type", NULL},
1430 {227, RADIUS_STRING, "Ascend Dial Number", NULL},
1431 {228, RADIUS_INTEGER4, "Ascend Route IP", NULL},
1432 {229, RADIUS_INTEGER4, "Ascend Route IPX", NULL},
1433 {230, RADIUS_INTEGER4, "Ascend Bridge", NULL},
1434 {231, RADIUS_INTEGER4, "Ascend Send Auth", NULL},
1435 {232, RADIUS_STRING, "Ascend Send Passwd", NULL},
1436 {233, RADIUS_INTEGER4, "Ascend Link Compression", NULL},
1437 {234, RADIUS_INTEGER4, "Ascend Target Util", NULL},
1438 {235, RADIUS_INTEGER4, "Ascend Maximum Channels", NULL},
1439 {236, RADIUS_INTEGER4, "Ascend Inc Channel Count", NULL},
1440 {237, RADIUS_INTEGER4, "Ascend Dec Channel Count", NULL},
1441 {238, RADIUS_INTEGER4, "Ascend Seconds Of History", NULL},
1442 {239, RADIUS_INTEGER4, "Ascend History Weigh Type", NULL},
1443 {240, RADIUS_INTEGER4, "Ascend Add Seconds", NULL},
1444 {241, RADIUS_INTEGER4, "Ascend Remove Seconds", NULL},
1445 {242, RADIUS_BINSTRING, "Ascend Data Filter", NULL},
1446 {243, RADIUS_BINSTRING, "Ascend Call Filter", NULL},
1447 {244, RADIUS_INTEGER4, "Ascend Idle Limit", NULL},
1448 {245, RADIUS_INTEGER4, "Ascend Preempt Limit", NULL},
1449 {246, RADIUS_INTEGER4, "Ascend Callback", NULL},
1450 {247, RADIUS_INTEGER4, "Ascend Data Svc", NULL},
1451 {248, RADIUS_INTEGER4, "Ascend Force 56", NULL},
1452 {249, RADIUS_STRING, "Ascend Billing Number", NULL},
1453 {250, RADIUS_INTEGER4, "Ascend Call By Call", NULL},
1454 {251, RADIUS_STRING, "Ascend Transit Number", NULL},
1455 {252, RADIUS_STRING, "Ascend Host Info", NULL},
1456 {253, RADIUS_IP_ADDRESS, "Ascend PPP Address", NULL},
1457 {254, RADIUS_INTEGER4, "Ascend MPP Idle Percent", NULL},
1458 {255, RADIUS_INTEGER4, "Ascend Xmit Rate", NULL},
1464 'dictionary.bay' file from FreeRADIUS
1465 http://www.freeradius.org/radiusd/raddb/dictionary.bay
1467 static const value_string radius_vendor_bay_tunnel_authen_type_vals[] =
1474 static const value_string radius_vendor_bay_tunnel_authen_mode_vals[] =
1477 {1, "prefix suffix"},
1481 static const value_string radius_vendor_bay_user_server_location_vals[] =
1488 static const value_string radius_vendor_bay_system_disc_reason_vals[] =
1491 {1, "Line disconnected"},
1493 {3, "WAN manager error"},
1494 {4, "Disconnect reset"},
1495 {5, "Error from adm_notify"},
1496 {6, "Modem down adm_notify"},
1497 {7, "PPP protocol disconnect"},
1498 {8, "Inactivity timer"},
1499 {9, "CLI Hangup command"},
1500 {10, "CLI last job"},
1501 {11, "Session timeout"},
1502 {12, "Slave termination"},
1503 {13, "Abnormal termination"},
1504 {14, "DCD wait failed"},
1505 {15, "CLI inactivity"},
1506 {16, "Admin port reset"},
1507 {17, "CLI auth failed"},
1508 {18, "Slave auth failed"},
1509 {19, "PAP auth failed"},
1510 {20, "CHAP auth failed"},
1511 {21, "Local modem reset"},
1513 {23, "PPP LCP failure"},
1514 {24, "PPP IPCP failure"},
1515 {25, "PPP IPXCP failure"},
1516 {26, "PPP ATCP failure"},
1517 {27, "PPP CCP failure"},
1518 {28, "PPP MP failure"},
1519 {29, "PPP IPCP timeout"},
1520 {30, "PPP IPXCP timeout"},
1521 {31, "PPP ATCP timeout"},
1522 {32, "PPP CCP timeout"},
1523 {33, "PPP MP timeout"},
1524 {34, "PPP init failure"},
1525 {35, "PPP Unknown"},
1526 {36, "PPP Dialback failed"},
1527 {37, "PPP Address In Use"},
1528 {38, "PPP No device"},
1529 {39, "PPP Modem hangup rcvd"},
1530 {40, "PPP Hangup rcvd"},
1531 {41, "PPP Termination rcvd"},
1532 {42, "PPP Kill rcvd"},
1533 {43, "PPP Time rcvd"},
1534 {44, "PPP No memory"},
1535 {45, "PPP Connection Abort"},
1536 {46, "PPP VPN LCP failure"},
1537 {47, "PPP VPN Auth failure"},
1538 {48, "PPP MP invalid port"},
1539 {49, "PPP Invalid device"},
1540 {50, "PPP MMP bundle failure"},
1541 {51, "DVS Registration failure"},
1542 {52, "DVS Home agent dereg"},
1543 {53, "DVS Tunnel no renew"},
1544 {54, "DVS Tunnel expired"},
1548 static const value_string radius_vendor_bay_modem_disc_reason_vals[] =
1551 {1, "Local disconnect"},
1552 {2, "CD Timer Expired"},
1553 {4, "Remote protocol disc"},
1555 {6, "Long Space disconnect"},
1556 {7, "Carrier Lost"},
1557 {8, "Modem Retrain Timeout"},
1561 static const value_string radius_vendor_bay_addr_resolution_protocol_vals[] =
1568 static const value_string radius_vendor_bay_user_level_vals[] =
1576 static const value_string radius_vendor_bay_audit_level_vals[] =
1584 static const radius_attr_info radius_vendor_bay_attrib[] =
1586 {28, RADIUS_STRING, "Annex Filter", NULL},
1587 {29, RADIUS_STRING, "Annex CLI Command", NULL},
1588 {30, RADIUS_STRING, "Annex CLI Filter", NULL},
1589 {31, RADIUS_STRING, "Annex Host Restrict", NULL},
1590 {32, RADIUS_STRING, "Annex Host Allow", NULL},
1591 {33, RADIUS_STRING, "Annex Product Name", NULL},
1592 {34, RADIUS_STRING, "Annex SW Version", NULL},
1593 {35, RADIUS_IP_ADDRESS, "Annex Local IP Address", NULL},
1594 {36, RADIUS_INTEGER4, "Annex Callback Portlist", NULL},
1595 {37, RADIUS_INTEGER4, "Annex Sec Profile Index", NULL},
1596 {38, RADIUS_INTEGER4, "Annex Tunnel Authen Type", radius_vendor_bay_tunnel_authen_type_vals},
1597 {39, RADIUS_INTEGER4, "Annex Tunnel Authen Mode", radius_vendor_bay_tunnel_authen_mode_vals},
1598 {40, RADIUS_STRING, "Annex Authen Servers", NULL},
1599 {41, RADIUS_STRING, "Annex Acct Servers", NULL},
1600 {42, RADIUS_INTEGER4, "Annex User Server Location", radius_vendor_bay_user_server_location_vals},
1601 {43, RADIUS_STRING, "Annex Local Username", NULL},
1602 {44, RADIUS_INTEGER4, "Annex System Disc Reason", radius_vendor_bay_system_disc_reason_vals},
1603 {45, RADIUS_INTEGER4, "Annex Modem Disc Reason", radius_vendor_bay_modem_disc_reason_vals},
1604 {46, RADIUS_INTEGER4, "Annex Disconnect Reason", NULL},
1605 {47, RADIUS_INTEGER4, "Annex Addr Resolution Protocol", radius_vendor_bay_addr_resolution_protocol_vals},
1606 {48, RADIUS_STRING, "Annex Addr Resolution Servers", NULL},
1607 {49, RADIUS_STRING, "Annex Domain Name", NULL},
1608 {50, RADIUS_INTEGER4, "Annex Transmit Speed", NULL},
1609 {51, RADIUS_INTEGER4, "Annex Receive Speed", NULL},
1610 {52, RADIUS_STRING, "Annex Input Filter", NULL},
1611 {53, RADIUS_STRING, "Annex Output Filter", NULL},
1612 {54, RADIUS_IP_ADDRESS, "Annex Primary DNS Server", NULL},
1613 {55, RADIUS_IP_ADDRESS, "Annex Secondary DNS Server", NULL},
1614 {56, RADIUS_IP_ADDRESS, "Annex Primary NBNS Server", NULL},
1615 {57, RADIUS_IP_ADDRESS, "Annex Secondary NBNS Server", NULL},
1616 {58, RADIUS_INTEGER4, "Annex Syslog Tap", NULL},
1617 {59, RADIUS_INTEGER4, "Annex Keypress Timeout", NULL},
1618 {60, RADIUS_INTEGER4, "Annex Unauthenticated Time", NULL},
1619 {61, RADIUS_INTEGER4, "Annex Re CHAP Timeout", NULL},
1620 {62, RADIUS_INTEGER4, "Annex MRRU", NULL},
1621 {63, RADIUS_STRING, "Annex EDO", NULL},
1622 {64, RADIUS_INTEGER4, "Annex PPP Trace Level", NULL},
1623 {65, RADIUS_INTEGER4, "Annex Pre Input Octets", NULL},
1624 {66, RADIUS_INTEGER4, "Annex Pre Output Octets", NULL},
1625 {67, RADIUS_INTEGER4, "Annex Pre Input Packets", NULL},
1626 {68, RADIUS_INTEGER4, "Annex Pre Output Packets", NULL},
1627 {69, RADIUS_INTEGER4, "Annex Connect Progress", NULL},
1628 {73, RADIUS_INTEGER4, "Annex Multicast Rate Limit", NULL},
1629 {74, RADIUS_INTEGER4, "Annex Maximum Call Duration", NULL},
1630 {75, RADIUS_INTEGER4, "Annex Multilink Id", NULL},
1631 {76, RADIUS_INTEGER4, "Annex Num In Multilink", NULL},
1632 {81, RADIUS_INTEGER4, "Annex Logical Channel Number", NULL},
1633 {82, RADIUS_INTEGER4, "Annex Wan Number", NULL},
1634 {83, RADIUS_INTEGER4, "Annex Port", NULL},
1635 {85, RADIUS_INTEGER4, "Annex Pool Id", NULL},
1636 {86, RADIUS_STRING, "Annex Compression Protocol", NULL},
1637 {87, RADIUS_INTEGER4, "Annex Transmitted Packets", NULL},
1638 {88, RADIUS_INTEGER4, "Annex Retransmitted Packets", NULL},
1639 {89, RADIUS_INTEGER4, "Annex Signal to Noise Ratio", NULL},
1640 {90, RADIUS_INTEGER4, "Annex Retrain Requests Sent", NULL},
1641 {91, RADIUS_INTEGER4, "Annex Retrain Requests Rcvd", NULL},
1642 {92, RADIUS_INTEGER4, "Annex Rate Reneg Req Sent", NULL},
1643 {93, RADIUS_INTEGER4, "Annex Rate Reneg Req Rcvd", NULL},
1644 {94, RADIUS_INTEGER4, "Annex Begin Receive Line Level", NULL},
1645 {95, RADIUS_INTEGER4, "Annex End Receive Line Level", NULL},
1646 {96, RADIUS_STRING, "Annex Begin Modulation", NULL},
1647 {97, RADIUS_STRING, "Annex Error Correction Prot", NULL},
1648 {98, RADIUS_STRING, "Annex End Modulation", NULL},
1649 {100, RADIUS_INTEGER4, "Annex User Level", radius_vendor_bay_user_level_vals},
1650 {101, RADIUS_INTEGER4, "Annex Audit Level", radius_vendor_bay_audit_level_vals},
1656 'dictionary.foundry' file from FreeRADIUS
1657 http://www.freeradius.org/radiusd/raddb/dictionary.foundry
1659 static const radius_attr_info radius_vendor_foundry_attrib[] =
1661 {1, RADIUS_INTEGER4, "Foundry Privilege Level", NULL},
1662 {2, RADIUS_STRING, "Foundry Command String", NULL},
1663 {3, RADIUS_INTEGER4, "Foundry Command Exception Flag", NULL},
1669 'dictionary.versanet' file from FreeRADIUS
1670 http://www.freeradius.org/radiusd/raddb/dictionary.versanet
1672 static const value_string radius_vendor_versanet_termination_cause_vals[] =
1674 {0, "Normal Hangup No Error Occurred"},
1675 {3, "Call Waiting Caused Disconnect"},
1676 {4, "Physical Carrier Loss"},
1677 {5, "No err correction at other end"},
1678 {6, "No resp to feature negotiation"},
1679 {7, "1st modem async only 2nd sync"},
1680 {8, "No framing technique in common"},
1681 {9, "No protocol in common"},
1682 {10, "Bad resp to feature negotiation"},
1683 {11, "No sync info from remote modem"},
1684 {12, "Normal Hangup by Remote modem"},
1685 {13, "Retransmission limit reached"},
1686 {14, "Protocol violation occurred"},
1688 {16, "Received GSTN cleardown"},
1689 {17, "Inactivity timeout"},
1690 {18, "Speed not supported"},
1691 {19, "Long space disconnect"},
1692 {20, "Key abort disconnect"},
1693 {21, "Clears previous disc reason"},
1694 {22, "No connection established"},
1695 {23, "Disconnect after three retrains"},
1699 static const radius_attr_info radius_vendor_versanet_attrib[] =
1701 {1, RADIUS_INTEGER4, "Versanet Termination Cause", radius_vendor_versanet_termination_cause_vals},
1707 'dictionary.redback' file from FreeRADIUS
1708 http://www.freeradius.org/radiusd/raddb/dictionary.redback
1710 static const value_string radius_vendor_redback_tunnel_function_vals[] =
1718 static const value_string radius_vendor_redback_mcast_send_vals[] =
1722 {3, "UNSOLICITED SEND"},
1726 static const value_string radius_vendor_redback_mcast_receive_vals[] =
1733 static const value_string radius_vendor_redback_tunnel_dnis_vals[] =
1740 static const value_string radius_vendor_redback_pvc_encapsulation_type_vals[] =
1742 {1, "AAA ENCAPS ATM RAW"},
1743 {2, "AAA ENCAPS ATM ROUTE1483"},
1744 {3, "AAA ENCAPS ATM AUTO1483"},
1745 {4, "AAA ENCAPS ATM MULTI"},
1746 {5, "AAA ENCAPS ATM BRIDGE1483"},
1747 {6, "AAA ENCAPS ATM PPP"},
1748 {7, "AAA ENCAPS ATM PPP SERIAL"},
1749 {8, "AAA ENCAPS ATM PPP NLPID"},
1750 {9, "AAA ENCAPS ATM PPP AUTO"},
1751 {10, "AAA ENCAPS ATM PPPOE"},
1752 {11, "AAA ENCAPS ATM L2TP"},
1753 {12, "AAA ENCAPS ATM PPP LLC"},
1754 {13, "AAA ENCAPS FRAME AUTO1490"},
1755 {14, "AAA ENCAPS FRAME MULTI"},
1756 {15, "AAA ENCAPS FRAME BRIDGE1490"},
1757 {16, "AAA ENCAPS FRAME PPP"},
1758 {17, "AAA ENCAPS FRAME PPP AUTO"},
1759 {18, "AAA ENCAPS FRAME PPPOE"},
1760 {19, "AAA ENCAPS FRAME ROUTE1490"},
1761 {20, "AAA ENCAPS FRAME L2TP"},
1762 {21, "AAA ENCAPS L2TP VC MUXED"},
1763 {22, "AAA ENCAPS ETH"},
1764 {23, "AAA ENCAPS ETH PPPOE"},
1765 {24, "AAA ENCAPS ETH MULTI"},
1769 static const value_string radius_vendor_redback_pvc_circuit_padding_vals[] =
1771 {1, "AAA CIRCUIT PADDING"},
1772 {2, "AAA CIRCUIT NO PADDING"},
1776 static const value_string radius_vendor_redback_bind_type_vals[] =
1778 {1, "AAA AUTH BIND"},
1779 {2, "AAA BYPASS BIND"},
1780 {3, "AAA INTERFACE BIND"},
1781 {4, "AAA SUBSCRIBE BIND"},
1782 {5, "AAA TUNNEL BIND"},
1783 {6, "AAA SESSION BIND"},
1784 {7, "AAA Q8021 BIND"},
1785 {8, "AAA MULTI BIND"},
1789 static const value_string radius_vendor_redback_bind_auth_protocol_vals[] =
1792 {2, "AAA PPP CHAP"},
1793 {3, "AAA PPP CHAP WAIT"},
1794 {4, "AAA PPP CHAP PAP"},
1795 {5, "AAA PPP CHAP WAIT PAP"},
1799 static const value_string radius_vendor_redback_lac_port_type_vals[] =
1801 {40, "NAS PORT TYPE 10BT"},
1802 {41, "NAS PORT TYPE 100BT"},
1803 {42, "NAS PORT TYPE DS3 FR"},
1804 {43, "NAS PORT TYPE DS3 ATM"},
1805 {44, "NAS PORT TYPE OC3"},
1806 {45, "NAS PORT TYPE HSSI"},
1807 {46, "NAS PORT TYPE EIA530"},
1808 {47, "NAS PORT TYPE T1"},
1809 {48, "NAS PORT TYPE CHAN T3"},
1810 {49, "NAS PORT TYPE DS1 FR"},
1811 {50, "NAS PORT TYPE E3 ATM"},
1812 {51, "NAS PORT TYPE IMA ATM"},
1813 {52, "NAS PORT TYPE DS3 ATM 2"},
1814 {53, "NAS PORT TYPE OC3 ATM 2"},
1815 {54, "NAS PORT TYPE 1000BSX"},
1816 {55, "NAS PORT TYPE E1 FR"},
1817 {56, "NAS PORT TYPE E1 ATM"},
1818 {57, "NAS PORT TYPE E3 FR"},
1819 {58, "NAS PORT TYPE OC3 POS"},
1820 {59, "NAS PORT TYPE OC12 POS"},
1821 {60, "NAS PORT TYPE PPPOE"},
1825 static const value_string radius_vendor_redback_lac_real_port_type_vals[] =
1827 {40, "NAS PORT TYPE 10BT"},
1828 {41, "NAS PORT TYPE 100BT"},
1829 {42, "NAS PORT TYPE DS3 FR"},
1830 {43, "NAS PORT TYPE DS3 ATM"},
1831 {44, "NAS PORT TYPE OC3"},
1832 {45, "NAS PORT TYPE HSSI"},
1833 {46, "NAS PORT TYPE EIA530"},
1834 {47, "NAS PORT TYPE T1"},
1835 {48, "NAS PORT TYPE CHAN T3"},
1836 {49, "NAS PORT TYPE DS1 FR"},
1837 {50, "NAS PORT TYPE E3 ATM"},
1838 {51, "NAS PORT TYPE IMA ATM"},
1839 {52, "NAS PORT TYPE DS3 ATM 2"},
1840 {53, "NAS PORT TYPE OC3 ATM 2"},
1841 {54, "NAS PORT TYPE 1000BSX"},
1842 {55, "NAS PORT TYPE E1 FR"},
1843 {56, "NAS PORT TYPE E1 ATM"},
1844 {57, "NAS PORT TYPE E3 FR"},
1845 {58, "NAS PORT TYPE OC3 POS"},
1846 {59, "NAS PORT TYPE OC12 POS"},
1847 {60, "NAS PORT TYPE PPPOE"},
1851 static const radius_attr_info radius_vendor_redback_attrib[] =
1853 {1, RADIUS_IP_ADDRESS, "Client DNS Pri", NULL},
1854 {2, RADIUS_IP_ADDRESS, "Client DNS Sec", NULL},
1855 {3, RADIUS_INTEGER4, "DHCP Max Leases", NULL},
1856 {4, RADIUS_STRING, "Context Name", NULL},
1857 {5, RADIUS_STRING, "Bridge Group", NULL},
1858 {6, RADIUS_STRING, "BG Aging Time", NULL},
1859 {7, RADIUS_STRING, "BG Path Cost", NULL},
1860 {8, RADIUS_STRING, "BG Span Dis", NULL},
1861 {9, RADIUS_STRING, "BG Trans BPDU", NULL},
1862 {10, RADIUS_INTEGER4, "Rate Limit Rate", NULL},
1863 {11, RADIUS_INTEGER4, "Rate Limit Burst", NULL},
1864 {12, RADIUS_INTEGER4, "Police Rate", NULL},
1865 {13, RADIUS_INTEGER4, "Police Burst", NULL},
1866 {14, RADIUS_INTEGER4, "Source Validation", NULL},
1867 {15, RADIUS_INTEGER4, "Tunnel Domain", NULL},
1868 {16, RADIUS_STRING, "Tunnel Local Name", NULL},
1869 {17, RADIUS_STRING, "Tunnel Remote Name", NULL},
1870 {18, RADIUS_INTEGER4, "Tunnel Function", radius_vendor_redback_tunnel_function_vals},
1871 {21, RADIUS_INTEGER4, "Tunnel Max Sessions", NULL},
1872 {22, RADIUS_INTEGER4, "Tunnel Max Tunnels", NULL},
1873 {23, RADIUS_INTEGER4, "Tunnel Session Auth", NULL},
1874 {24, RADIUS_INTEGER4, "Tunnel Window", NULL},
1875 {25, RADIUS_INTEGER4, "Tunnel Retransmit", NULL},
1876 {26, RADIUS_INTEGER4, "Tunnel Cmd Timeout", NULL},
1877 {27, RADIUS_STRING, "PPPOE URL", NULL},
1878 {28, RADIUS_STRING, "PPPOE MOTM", NULL},
1879 {29, RADIUS_INTEGER4, "Tunnel Group", NULL},
1880 {30, RADIUS_STRING, "Tunnel Context", NULL},
1881 {31, RADIUS_INTEGER4, "Tunnel Algorithm", NULL},
1882 {32, RADIUS_INTEGER4, "Tunnel Deadtime", NULL},
1883 {33, RADIUS_INTEGER4, "Mcast Send", radius_vendor_redback_mcast_send_vals},
1884 {34, RADIUS_INTEGER4, "Mcast Receive", radius_vendor_redback_mcast_receive_vals},
1885 {35, RADIUS_INTEGER4, "Mcast MaxGroups", NULL},
1886 {36, RADIUS_STRING, "Ip Address Pool Name", NULL},
1887 {37, RADIUS_INTEGER4, "Tunnel DNIS", radius_vendor_redback_tunnel_dnis_vals},
1888 {38, RADIUS_INTEGER4, "Medium Type", NULL},
1889 {39, RADIUS_INTEGER4, "PVC Encapsulation Type", radius_vendor_redback_pvc_encapsulation_type_vals},
1890 {40, RADIUS_STRING, "PVC Profile Name", NULL},
1891 {41, RADIUS_INTEGER4, "PVC Circuit Padding", radius_vendor_redback_pvc_circuit_padding_vals},
1892 {42, RADIUS_INTEGER4, "Bind Type", radius_vendor_redback_bind_type_vals},
1893 {43, RADIUS_INTEGER4, "Bind Auth Protocol", radius_vendor_redback_bind_auth_protocol_vals},
1894 {44, RADIUS_INTEGER4, "Bind Auth Max Sessions", NULL},
1895 {45, RADIUS_STRING, "Bind Bypass Bypass", NULL},
1896 {46, RADIUS_STRING, "Bind Auth Context", NULL},
1897 {47, RADIUS_STRING, "Bind Auth Service Grp", NULL},
1898 {48, RADIUS_STRING, "Bind Bypass Context", NULL},
1899 {49, RADIUS_STRING, "Bind Int Context", NULL},
1900 {50, RADIUS_STRING, "Bind Tun Context", NULL},
1901 {51, RADIUS_STRING, "Bind Ses Context", NULL},
1902 {52, RADIUS_INTEGER4, "Bind Dot1q Slot", NULL},
1903 {53, RADIUS_INTEGER4, "Bind Dot1q Port", NULL},
1904 {54, RADIUS_INTEGER4, "Bind Dot1q Vlan Tag Id", NULL},
1905 {55, RADIUS_STRING, "Bind Int Interface Name", NULL},
1906 {56, RADIUS_STRING, "Bind L2TP Tunnel Name", NULL},
1907 {57, RADIUS_INTEGER4, "Bind L2TP Flow Control", NULL},
1908 {58, RADIUS_STRING, "Bind Sub User At Context", NULL},
1909 {59, RADIUS_STRING, "Bind Sub Password", NULL},
1910 {60, RADIUS_STRING, "Ip Host Addr", NULL},
1911 {61, RADIUS_INTEGER4, "IP TOS Field", NULL},
1912 {62, RADIUS_INTEGER4, "NAS Real Port", NULL},
1913 {63, RADIUS_STRING, "Tunnel Session Auth Ctx", NULL},
1914 {64, RADIUS_STRING, "Tunnel Session Auth Service Grp", NULL},
1915 {65, RADIUS_INTEGER4, "Tunnel Rate Limit Rate", NULL},
1916 {66, RADIUS_INTEGER4, "Tunnel Rate Limit Burst", NULL},
1917 {67, RADIUS_INTEGER4, "Tunnel Police Rate", NULL},
1918 {68, RADIUS_INTEGER4, "Tunnel Police Burst", NULL},
1919 {69, RADIUS_STRING, "Tunnel L2F Second Password", NULL},
1920 {128, RADIUS_INTEGER4, "Acct Input Octets 64", NULL},
1921 {129, RADIUS_INTEGER4, "Acct Output Octets 64", NULL},
1922 {130, RADIUS_INTEGER4, "Acct Input Packets 64", NULL},
1923 {131, RADIUS_INTEGER4, "Acct Output Packets 64", NULL},
1924 {132, RADIUS_IP_ADDRESS, "Assigned IP Address", NULL},
1925 {133, RADIUS_INTEGER4, "Acct Mcast In Octets", NULL},
1926 {134, RADIUS_INTEGER4, "Acct Mcast Out Octets", NULL},
1927 {135, RADIUS_INTEGER4, "Acct Mcast In Packets", NULL},
1928 {136, RADIUS_INTEGER4, "Acct Mcast Out Packets", NULL},
1929 {137, RADIUS_INTEGER4, "LAC Port", NULL},
1930 {138, RADIUS_INTEGER4, "LAC Real Port", NULL},
1931 {139, RADIUS_INTEGER4, "LAC Port Type", radius_vendor_redback_lac_port_type_vals},
1932 {140, RADIUS_INTEGER4, "LAC Real Port Type", radius_vendor_redback_lac_real_port_type_vals},
1933 {141, RADIUS_STRING, "Acct Dyn Ac Ent", NULL},
1934 {142, RADIUS_INTEGER4, "Session Error Code", NULL},
1935 {143, RADIUS_STRING, "Session Error Msg", NULL},
1941 http://www.juniper.net/techpubs/software/junos53/swconfig53-getting-started/html/sys-mgmt-authentication2.html
1943 static const radius_attr_info radius_vendor_juniper_attrib[] =
1945 {1, RADIUS_STRING, "Juniper Local User Name", NULL},
1946 {2, RADIUS_STRING, "Juniper Allow Commands", NULL},
1947 {3, RADIUS_STRING, "Juniper Deny Commands", NULL},
1953 'dictionary.aptis' file from FreeRADIUS
1954 http://www.freeradius.org/radiusd/raddb/dictionary.aptis
1956 static const radius_attr_info radius_vendor_aptis_attrib[] =
1958 {1, RADIUS_STRING, "CVX Identification", NULL},
1959 {2, RADIUS_INTEGER4, "CVX VPOP ID", NULL},
1960 {3, RADIUS_INTEGER4, "CVX SS7 Session ID Type", NULL},
1961 {4, RADIUS_INTEGER4, "CVX Radius Redirect", NULL},
1962 {5, RADIUS_INTEGER4, "CVX IPSVC AZNLVL", NULL},
1963 {6, RADIUS_INTEGER4, "CVX IPSVC Mask", NULL},
1964 {7, RADIUS_INTEGER4, "CVX Multilink Match Info", NULL},
1965 {8, RADIUS_INTEGER4, "CVX Multilink Group Number", NULL},
1966 {9, RADIUS_INTEGER4, "CVX PPP Log Mask", NULL},
1967 {10, RADIUS_STRING, "CVX Modem Begin Modulation", NULL},
1968 {11, RADIUS_STRING, "CVX Modem End Modulation", NULL},
1969 {12, RADIUS_STRING, "CVX Modem Error Correction", NULL},
1970 {13, RADIUS_STRING, "CVX Modem Data Compression", NULL},
1971 {14, RADIUS_INTEGER4, "CVX Modem Tx Packets", NULL},
1972 {15, RADIUS_INTEGER4, "CVX Modem ReTx Packets", NULL},
1973 {16, RADIUS_INTEGER4, "CVX Modem SNR", NULL},
1974 {17, RADIUS_INTEGER4, "CVX Modem Local Retrains", NULL},
1975 {18, RADIUS_INTEGER4, "CVX Modem Remote Retrains", NULL},
1976 {19, RADIUS_INTEGER4, "CVX Modem Local Rate Negs", NULL},
1977 {20, RADIUS_INTEGER4, "CVX Modem Remote Rate Negs", NULL},
1978 {21, RADIUS_INTEGER4, "CVX Modem Begin Recv Line Lvl", NULL},
1979 {22, RADIUS_INTEGER4, "CVX Modem End Recv Line Lvl", NULL},
1983 static const radius_attr_info radius_vendor_cosine_attrib[] =
1985 {1, RADIUS_STRING, "Connection Profile Name", NULL},
1986 {2, RADIUS_STRING, "Enterprise ID", NULL},
1987 {3, RADIUS_STRING, "Address Pool Name", NULL},
1988 {4, RADIUS_INTEGER4, "DS Byte", NULL},
1989 {5, COSINE_VPI_VCI, "VPI/VCI", NULL},
1990 {6, RADIUS_INTEGER4, "DLCI", NULL},
1991 {7, RADIUS_IP_ADDRESS, "LNS IP Address", NULL},
1992 {8, RADIUS_STRING, "CLI User Permission ID", NULL},
1998 'dictionary.shasta' file from FreeRADIUS
1999 http://www.freeradius.org/radiusd/raddb/dictionary.shasta
2001 static const value_string radius_vendor_shasta_user_privilege_vals[] =
2009 static const radius_attr_info radius_vendor_shasta_attrib[] =
2011 {1, RADIUS_INTEGER4, "Shasta User Privilege", radius_vendor_shasta_user_privilege_vals},
2012 {2, RADIUS_STRING, "Shasta Service Profile", NULL},
2013 {3, RADIUS_STRING, "Shasta VPN Name", NULL},
2019 'dictionary.nomadix' file from FreeRADIUS
2020 http://www.freeradius.org/radiusd/raddb/dictionary.nomadix
2022 static const radius_attr_info radius_vendor_nomadix_attrib[] =
2024 {1, RADIUS_INTEGER4, "Nomadix Bw Up", NULL},
2025 {2, RADIUS_INTEGER4, "Nomadix Bw Down", NULL},
2031 'dictionary.erx' file from FreeRADIUS
2032 http://www.freeradius.org/radiusd/raddb/dictionary.erx
2034 static const radius_attr_info radius_vendor_unisphere_attrib[] =
2036 {1, RADIUS_STRING, "ERX Virtual Router Name", NULL},
2037 {2, RADIUS_STRING, "ERX Address Pool Name", NULL},
2038 {3, RADIUS_STRING, "ERX Local Loopback Interface", NULL},
2039 {4, RADIUS_IP_ADDRESS, "ERX Primary Dns", NULL},
2040 {5, RADIUS_IP_ADDRESS, "ERX Primary Wins", NULL},
2041 {6, RADIUS_IP_ADDRESS, "ERX Secondary Dns", NULL},
2042 {7, RADIUS_IP_ADDRESS, "ERX Secondary Wins", NULL},
2043 {8, RADIUS_STRING, "ERX Tunnel Virtual Router", NULL},
2044 {9, RADIUS_STRING, "ERX Tunnel Password", NULL},
2045 {10, RADIUS_STRING, "ERX Ingress Policy Name", NULL},
2046 {11, RADIUS_STRING, "ERX Egress Policy Name", NULL},
2047 {12, RADIUS_STRING, "ERX Ingress Statistics", NULL},
2048 {13, RADIUS_STRING, "ERX Egress Statistics", NULL},
2049 {14, RADIUS_STRING, "ERX Atm Service Category", NULL},
2050 {15, RADIUS_STRING, "ERX Atm PCR", NULL},
2051 {16, RADIUS_STRING, "ERX Atm SCR", NULL},
2052 {17, RADIUS_STRING, "ERX Atm MBS", NULL},
2053 {18, RADIUS_STRING, "ERX Cli Initial Access Level", NULL},
2054 {19, RADIUS_INTEGER4, "ERX Cli Allow All VR Access", NULL},
2055 {20, RADIUS_STRING, "ERX Alternate Cli Access Level", NULL},
2056 {21, RADIUS_STRING, "ERX Alternate Cli Vrouter Name", NULL},
2057 {22, RADIUS_INTEGER4, "ERX Sa Validate", NULL},
2058 {23, RADIUS_INTEGER4, "ERX Igmp Enable", NULL},
2062 static const radius_attr_info radius_vendor_issanni_attrib[] =
2064 {1, RADIUS_STRING, "Softflow Template", NULL},
2065 {2, RADIUS_STRING, "NAT Pool", NULL},
2066 {3, RADIUS_STRING, "Virtual Routing Domain", NULL},
2067 {4, RADIUS_STRING, "Tunnel Name", NULL},
2068 {5, RADIUS_STRING, "IP Pool Name", NULL},
2069 {6, RADIUS_STRING, "PPPoE URL", NULL},
2070 {7, RADIUS_STRING, "PPPoE MOTM", NULL},
2071 {8, RADIUS_STRING, "PPPoE Service", NULL},
2072 {9, RADIUS_IP_ADDRESS, "Primary DNS", NULL},
2073 {10, RADIUS_IP_ADDRESS, "Secondary DNS", NULL},
2074 {11, RADIUS_IP_ADDRESS, "Primary NBNS", NULL},
2075 {12, RADIUS_IP_ADDRESS, "Secondary NBNS", NULL},
2076 {13, RADIUS_STRING, "Policing Traffic Class", NULL},
2077 {14, RADIUS_INTEGER4, "Tunnel Type", NULL},
2078 {15, RADIUS_INTEGER4, "NAT Type", NULL},
2079 {16, RADIUS_STRING, "QoS Traffic Class", NULL},
2080 {17, RADIUS_STRING, "Interface Name", NULL},
2086 'dictionary.quintum' file from FreeRADIUS
2087 http://www.freeradius.org/radiusd/raddb/dictionary.quintum
2089 static const radius_attr_info radius_vendor_quintum_attrib[] =
2091 {1, RADIUS_STRING, "Quintum AVPair", NULL},
2092 {2, RADIUS_STRING, "Quintum NAS Port", NULL},
2093 {23, RADIUS_STRING, "Quintum h323 remote address", NULL},
2094 {24, RADIUS_STRING, "Quintum h323 conf id", NULL},
2095 {25, RADIUS_STRING, "Quintum h323 setup time", NULL},
2096 {26, RADIUS_STRING, "Quintum h323 call origin", NULL},
2097 {27, RADIUS_STRING, "Quintum h323 call type", NULL},
2098 {28, RADIUS_STRING, "Quintum h323 connect time", NULL},
2099 {29, RADIUS_STRING, "Quintum h323 disconnect time", NULL},
2100 {30, RADIUS_STRING, "Quintum h323 disconnect cause", NULL},
2101 {31, RADIUS_STRING, "Quintum h323 voice quality", NULL},
2102 {33, RADIUS_STRING, "Quintum h323 gw id", NULL},
2103 {35, RADIUS_STRING, "Quintum h323 incoming conf id", NULL},
2104 {101, RADIUS_STRING, "Quintum h323 credit amount", NULL},
2105 {102, RADIUS_STRING, "Quintum h323 credit time", NULL},
2106 {103, RADIUS_STRING, "Quintum h323 return code", NULL},
2107 {104, RADIUS_STRING, "Quintum h323 prompt id", NULL},
2108 {105, RADIUS_STRING, "Quintum h323 time and day", NULL},
2109 {106, RADIUS_STRING, "Quintum h323 redirect number", NULL},
2110 {107, RADIUS_STRING, "Quintum h323 preferred lang", NULL},
2111 {108, RADIUS_STRING, "Quintum h323 redirect ip address", NULL},
2112 {109, RADIUS_STRING, "Quintum h323 billing model", NULL},
2113 {110, RADIUS_STRING, "Quintum h323 currency type", NULL},
2119 http://download.colubris.com/library/product_doc/CN3500_AdminGuide.pdf
2121 static const radius_attr_info radius_vendor_colubris_attrib[] =
2123 {0, RADIUS_STRING, "Colubris AV Pair", NULL},
2129 'dictionary.columbia_university' file from FreeRADIUS
2130 http://www.freeradius.org/radiusd/raddb/dictionary.columbia_university
2132 static const value_string radius_vendor_columbia_university_sip_method_vals[] =
2141 static const radius_attr_info radius_vendor_columbia_university_attrib[] =
2143 {0, RADIUS_INTEGER4, "SIP Method", radius_vendor_columbia_university_sip_method_vals},
2144 {1, RADIUS_STRING, "SIP From", NULL},
2145 {2, RADIUS_STRING, "SIP To", NULL},
2146 {4, RADIUS_STRING, "SIP Translated Request URI", NULL},
2150 static const value_string the3gpp_pdp_type_vals[] = {
2157 static const radius_attr_info radius_vendor_3gpp_attrib[] =
2159 /* According to 3GPP TS 29.061 V4.8.0 (2003-06) */
2160 {1, THE3GPP_IMSI, "IMSI", NULL},
2161 {2, RADIUS_INTEGER4, "Charging ID", NULL},
2162 {3, RADIUS_INTEGER4, "PDP Type", the3gpp_pdp_type_vals},
2163 {4, RADIUS_IP_ADDRESS, "Charging Gateway Address", NULL},
2164 {5, THE3GPP_QOS, "QoS Profile", NULL},
2165 {6, RADIUS_IP_ADDRESS, "SGSN Address", NULL},
2166 {7, RADIUS_IP_ADDRESS, "GGSN Address", NULL},
2167 {8, THE3GPP_IMSI_MCC_MNC, "IMSI MCC-MNC", NULL},
2168 {9, THE3GPP_GGSN_MCC_MNC, "GGSN MCC-MNC", NULL},
2169 {10, THE3GPP_NSAPI, "NSAPI", NULL},
2170 {11, THE3GPP_SESSION_STOP_INDICATOR, "Session Stop Indicator", NULL},
2171 {12, THE3GPP_SELECTION_MODE, "Selection Mode", NULL},
2172 {13, THE3GPP_CHARGING_CHARACTERISTICS, "Charging Characteristics", NULL},
2173 {14, RADIUS_IP6_ADDRESS, "Charging Gateway IPv6 Address", NULL},
2174 {15, RADIUS_IP6_ADDRESS, "SGSN IPv6 Address", NULL},
2175 {16, RADIUS_IP6_ADDRESS, "GGSN IPv6 Address", NULL},
2176 {17, THE3GPP_IPV6_DNS_SERVERS, "IPv6 DNS Servers", NULL},
2177 {18, THE3GPP_SGSN_MCC_MNC, "SGSN MCC-MNC", NULL},
2181 static rd_vsa_table radius_vsa_table[] =
2183 {VENDOR_ACC, radius_vendor_acc_attrib},
2184 {VENDOR_CISCO, radius_vendor_cisco_attrib},
2185 {VENDOR_SHIVA, radius_vendor_shiva_attrib},
2186 {VENDOR_LIVINGSTON, radius_vendor_livingston_attrib},
2187 {VENDOR_MICROSOFT, radius_vendor_microsoft_attrib},
2188 {VENDOR_ASCEND, radius_vendor_ascend_attrib},
2189 {VENDOR_BAY, radius_vendor_bay_attrib},
2190 {VENDOR_FOUNDRY, radius_vendor_foundry_attrib},
2191 {VENDOR_VERSANET, radius_vendor_versanet_attrib},
2192 {VENDOR_REDBACK, radius_vendor_redback_attrib},
2193 {VENDOR_JUNIPER, radius_vendor_juniper_attrib},
2194 {VENDOR_APTIS, radius_vendor_aptis_attrib},
2195 {VENDOR_COSINE, radius_vendor_cosine_attrib},
2196 {VENDOR_SHASTA, radius_vendor_shasta_attrib},
2197 {VENDOR_NOMADIX, radius_vendor_nomadix_attrib},
2198 {VENDOR_UNISPHERE, radius_vendor_unisphere_attrib},
2199 {VENDOR_ISSANNI, radius_vendor_issanni_attrib},
2200 {VENDOR_QUINTUM, radius_vendor_quintum_attrib},
2201 {VENDOR_COLUBRIS, radius_vendor_colubris_attrib},
2202 {VENDOR_COLUMBIA_UNIVERSITY, radius_vendor_columbia_university_attrib},
2203 {VENDOR_THE3GPP, radius_vendor_3gpp_attrib},
2207 static const radius_attr_info *get_attr_info_table(guint32 vendor)
2211 for (i = 0; radius_vsa_table[i].vendor; i++)
2212 if (radius_vsa_table[i].vendor == vendor)
2213 return(radius_vsa_table[i].attrib);
2218 static const radius_attr_info *
2219 find_radius_attr_info(guint32 attr_type, const radius_attr_info *table)
2223 for (i = 0; table[i].str; i++)
2224 if (table[i].attr_type == attr_type)
2231 rdconvertbufftostr(gchar *dest, tvbuff_t *tvb, int offset, int length)
2233 /*converts the raw buffer into printable text */
2236 const guint8 *pd = tvb_get_ptr(tvb, offset, length);
2241 for (i=0; i < (guint32)length; i++)
2243 if( isalnum((int)pd[i])||ispunct((int)pd[i])
2244 ||((int)pd[i]==' ')) {
2245 dest[totlen]=(gchar)pd[i];
2250 sprintf(&(dest[totlen]), "\\%03o", pd[i]);
2251 totlen=totlen+strlen(&(dest[totlen]));
2259 rddecryptpass(gchar *dest,tvbuff_t *tvb,int offset,int length)
2262 md5_byte_t digest[16];
2268 if (shared_secret[0] == '\0' || !authenticator ) {
2269 rdconvertbufftostr(dest,tvb,offset,length);
2278 md5_append(&md_ctx,shared_secret,strlen(shared_secret));
2279 md5_append(&md_ctx,authenticator,16);
2280 md5_finish(&md_ctx,digest);
2282 pd = tvb_get_ptr(tvb,offset,length);
2283 for( i = 0 ; i < 16 && i < (guint32)length ; i++ ) {
2284 c = pd[i] ^ digest[i];
2287 * XXX - "isprint()" can return "true" for non-ASCII characters, but
2288 * those don't work with GTK+ on Windows, as GTK+ on Windows assumes
2289 * UTF-8 strings. Until we fix up Ethereal to properly handle
2290 * non-ASCII characters in all output (both GUI displays and text
2291 * printouts) on all platforms including Windows, we work around
2292 * the problem by escaping all characters that aren't printable ASCII.
2294 if ( c >= 0x20 && c <= 0x7f) {
2301 sprintf(&(dest[totlen]),"\\%03o",c);
2302 totlen += strlen(&(dest[totlen]));
2305 while(i<(guint32)length) {
2308 * XXX - "isprint()" can return "true" for non-ASCII characters, but
2309 * those don't work with GTK+ on Windows, as GTK+ on Windows assumes
2310 * UTF-8 strings. Until we fix up Ethereal to properly handle
2311 * non-ASCII characters in all output (both GUI displays and text
2312 * printouts) on all platforms including Windows, we work around
2313 * the problem by escaping all characters that aren't printable ASCII.
2315 if ( pd[i] >= 0x20 && pd[i] <= 0x7f) {
2317 if ( isprint(pd[i]) ) {
2319 dest[totlen] = (gchar)pd[i];
2322 sprintf(&(dest[totlen]), "\\%03o", pd[i]);
2323 totlen=totlen+strlen(&(dest[totlen]));
2328 dest[totlen+1] = '\0';
2332 rdconvertbufftobinstr(gchar *dest, tvbuff_t *tvb, int offset, int length)
2334 /*converts the raw buffer into printable text */
2337 const guint8 *pd = tvb_get_ptr(tvb, offset, length);
2338 static const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
2339 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
2341 for (i=0; i < (guint32)length; i++)
2343 dest[totlen] = hex[pd[i] >> 4];
2345 dest[totlen] = hex[pd[i] & 0xF];
2351 static gchar *rd_match_strval(guint32 val, const value_string *vs) {
2352 return val_to_str(val, vs, "Undefined");
2355 /* NOTE: This function's signature has been changed with the addition of the
2356 * tree parameter at the end.
2358 * The function behaves EXACTLY AS BEFORE for parameters which do not
2359 * imply THE3GPP_QOS; I had to change the signature because the function
2360 * decode_qos_umts() wants to write on the protocol tree :)
2362 * If you think it is better to DUPLICATE the code copying decode_qos_umts
2363 * here, and adapting it, feel free; only keep in mind that changes will have
2364 * to be doubled if any bug is found.
2366 * At last, forgive me if I've messed up some indentation...
2368 static void rd_value_to_str(gchar *dest, rd_vsa_buffer (*vsabuffer)[VSABUFFER],
2369 const e_avphdr *avph, tvbuff_t *tvb,
2370 int offset, const radius_attr_info *vvs,
2373 const radius_attr_info *attr_info;
2375 /* Variable to peek which will be the next print_type for VENDOR-SPECIFIC
2378 const radius_attr_info *next_attr_info;
2380 /* Temporary variable to perform some trick on the cont variable; again, this
2381 * is needed only when THE3GPP_QOS in involved.
2394 const radius_attr_info *vsa_attr_info_table;
2395 const e_avphdr *vsa_avph;
2397 /* prints the values of the attribute value pairs into a text buffer */
2398 attr_info = find_radius_attr_info(avph->avp_type, vvs);
2401 strcpy(dest, "Value:");
2402 cont=&dest[strlen(dest)];
2403 switch(attr_info->value_type)
2405 case( RADIUS_STRING ):
2406 /* User Password, but only, if not inside vsa */
2407 if ( avph->avp_type == 2 && (*vsabuffer)[0].str == 0 ) {
2408 rddecryptpass(cont,tvb,offset+2,avph->avp_length-2);
2410 rdconvertbufftostr(cont,tvb,offset+2,avph->avp_length-2);
2414 case( RADIUS_BINSTRING ):
2415 rdconvertbufftobinstr(cont,tvb,offset+2,avph->avp_length-2);
2418 case( RADIUS_INTEGER4 ):
2419 intval = tvb_get_ntohl(tvb,offset+2);
2420 if (attr_info->vs != NULL)
2421 sprintf(cont, "%s(%u)", rd_match_strval(intval, attr_info->vs), intval);
2423 sprintf(cont,"%u", intval);
2426 case( RADIUS_IP_ADDRESS ):
2427 ip_to_str_buf(tvb_get_ptr(tvb,offset+2,4),cont);
2430 case( RADIUS_IP6_ADDRESS ):
2431 ip6_to_str_buf((const struct e_in6_addr *)tvb_get_ptr(tvb,offset+2,16),cont);
2434 case( RADIUS_IPX_ADDRESS ):
2435 pd = tvb_get_ptr(tvb,offset+2,4);
2436 sprintf(cont,"%u:%u:%u:%u",pd[0],pd[1],pd[2],pd[3]);
2439 case( RADIUS_STRING_TAGGED ):
2441 tag = tvb_get_guint8(tvb,offset+2);
2442 if (tag > 0 && tag <= 0x1f) {
2443 sprintf(dest, "Tag:%u, Value:",
2445 cont=&cont[strlen(cont)];
2446 rdconvertbufftostr(cont,tvb,offset+3,avph->avp_length-3);
2449 rdconvertbufftostr(cont,tvb,offset+2,avph->avp_length-2);
2452 case ( RADIUS_VENDOR_SPECIFIC ):
2453 intval = tvb_get_ntohl(tvb,offset+2);
2454 sprintf(dest, "Vendor:%s(%u)", rd_match_strval(intval,radius_vendor_specific_vendors), intval);
2455 cont = &dest[strlen(dest)];
2456 vsa_length = avph->avp_length;
2459 vsa_attr_info_table = get_attr_info_table(intval);
2462 vsa_avph = (const e_avphdr*)tvb_get_ptr(tvb, offset+vsa_len,
2463 avph->avp_length-vsa_len);
2464 if (vsa_attr_info_table)
2465 next_attr_info = find_radius_attr_info(vsa_avph->avp_type,
2466 vsa_attr_info_table);
2468 next_attr_info = NULL;
2469 cont = &cont[strlen(cont)+1];
2471 (*vsabuffer)[vsa_index].str = cont;
2472 (*vsabuffer)[vsa_index].offset = offset+vsa_len;
2473 (*vsabuffer)[vsa_index].length = vsa_avph->avp_length;
2474 sprintf(cont, "t:%s(%u) l:%u, ",
2476 ? next_attr_info->str
2478 vsa_avph->avp_type, vsa_avph->avp_length);
2479 cont = &cont[strlen(cont)];
2480 rd_value_to_str(cont, vsabuffer, vsa_avph, tvb,
2481 offset+vsa_len, vsa_attr_info_table,
2484 vsa_len += vsa_avph->avp_length;
2485 if (next_attr_info != NULL &&
2486 next_attr_info->value_type == THE3GPP_QOS )
2490 (*vsabuffer)[vsa_index].str = 0;
2492 } while (vsa_length > vsa_len && vsa_index < VSABUFFER);
2495 case( COSINE_VPI_VCI ):
2496 sprintf(cont,"%u/%u",
2497 tvb_get_ntohs(tvb,offset+2),
2498 tvb_get_ntohs(tvb,offset+4));
2501 case( THE3GPP_IMSI ):
2502 case( THE3GPP_IMSI_MCC_MNC ):
2503 case( THE3GPP_GGSN_MCC_MNC ):
2504 case( THE3GPP_SGSN_MCC_MNC ):
2505 case( THE3GPP_SELECTION_MODE ):
2506 case( THE3GPP_CHARGING_CHARACTERISTICS ):
2507 sprintf(cont,"(encoded in UTF-8 format)");
2510 case( THE3GPP_NSAPI ):
2511 case( THE3GPP_SESSION_STOP_INDICATOR ):
2512 case( THE3GPP_IPV6_DNS_SERVERS ):
2513 sprintf(cont,"(not parsed)");
2516 case( THE3GPP_QOS ):
2517 /* Find the ponter to the already-built label
2519 tmp_punt = dest - 2;
2524 /* Call decode_qos_umts from packet-gtp package
2526 decode_qos_umts(tvb, offset + 1, tree, tmp_punt, 3);
2529 case( RADIUS_TIMESTAMP ):
2530 timeval=tvb_get_ntohl(tvb,offset+2);
2531 sprintf(cont,"%d (%s)", timeval, abs_time_secs_to_str(timeval));
2534 case( RADIUS_INTEGER4_TAGGED ):
2535 tag = tvb_get_guint8(tvb,offset+2);
2536 intval = tvb_get_ntoh24(tvb,offset+3);
2539 if (attr_info->vs != NULL) {
2540 sprintf(dest, "Tag:%u, Value:%s(%u)",
2542 rd_match_strval(intval, attr_info->vs),
2545 sprintf(dest, "Tag:%u, Value:%u",
2549 if (attr_info->vs != NULL)
2550 sprintf(cont, "%s(%u)",
2551 rd_match_strval(intval, attr_info->vs),
2554 sprintf(cont,"%u", intval);
2558 case( RADIUS_UNKNOWN ):
2560 strcpy(cont,"Unknown Value Type");
2563 cont=&cont[strlen(cont)];
2565 strcpy(cont,"Unknown Value");
2570 dissect_attribute_value_pairs(tvbuff_t *tvb, int offset,proto_tree *tree,
2571 int avplength,packet_info *pinfo)
2573 /* adds the attribute value pairs to the tree */
2575 const radius_attr_info *attr_info;
2576 guint8 *reassembled_data = NULL;
2577 int reassembled_data_len = 0;
2578 int data_needed = 0;
2583 proto_tree_add_text(tree, tvb,offset,0,"No Attribute Value Pairs Found");
2588 * In case we throw an exception, clean up whatever stuff we've
2589 * allocated (if any).
2591 CLEANUP_PUSH(g_free, reassembled_data);
2593 while (avplength > 0)
2595 tvb_memcpy(tvb,(guint8 *)&avph,offset,sizeof(e_avphdr));
2596 attr_info = find_radius_attr_info(avph.avp_type, radius_attrib);
2597 if (avph.avp_length < 2) {
2599 * This AVP is bogus - the length includes the type and length
2600 * fields, so it must be >= 2.
2603 proto_tree_add_text(tree, tvb, offset, avph.avp_length,
2604 "t:%s(%u) l:%u (length not >= 2)",
2605 attr_info->str, avph.avp_type, avph.avp_length);
2610 if (attr_info->value_type == RADIUS_EAP_MESSAGE) { /* EAP Message */
2612 proto_tree *eap_tree = NULL;
2619 ti = proto_tree_add_text(tree, tvb, offset, avph.avp_length,
2621 attr_info->str, avph.avp_type, avph.avp_length);
2622 eap_tree = proto_item_add_subtree(ti, ett_radius_eap);
2624 tvb_len = tvb_length_remaining(tvb, offset+2);
2625 data_len = avph.avp_length-2;
2626 if (data_len < tvb_len)
2628 next_tvb = tvb_new_subset(tvb, offset+2, tvb_len, data_len);
2631 * Set the columns non-writable, so that the packet list
2632 * shows this as an RADIUS packet, not as an EAP packet.
2634 col_set_writable(pinfo->cinfo, FALSE);
2637 * RFC 2869 says, in section 5.13, describing the EAP-Message
2640 * The String field contains EAP packets, as defined in [3]. If
2641 * multiple EAP-Message attributes are present in a packet their
2642 * values should be concatenated; this allows EAP packets longer than
2643 * 253 octets to be passed by RADIUS.
2645 * Do reassembly of EAP-Message attributes.
2648 /* Are we in the process of reassembling? */
2649 if (reassembled_data != NULL) {
2650 /* Yes - show this as an EAP fragment. */
2652 proto_tree_add_text(eap_tree, next_tvb, 0, -1, "EAP fragment");
2655 * Do we have all of the data in this fragment?
2657 if (tvb_len >= data_len) {
2659 * Yes - add it to the reassembled data.
2661 tvb_memcpy(next_tvb, reassembled_data + reassembled_data_len,
2663 reassembled_data_len += data_len;
2664 data_needed -= data_len;
2665 if (data_needed <= 0) {
2667 * We got at least as much data as we needed; we're done
2669 * XXX - what if we got more?
2673 * Allocate a new tvbuff, referring to the reassembled payload.
2675 next_tvb = tvb_new_real_data(reassembled_data, reassembled_data_len,
2676 reassembled_data_len);
2679 * We have a tvbuff that refers to this data, so we shouldn't
2680 * free this data if we throw an exception; clear
2681 * "reassembled_data", so the cleanup handler won't free it.
2683 reassembled_data = NULL;
2684 reassembled_data_len = 0;
2688 * Arrange that the allocated packet data copy be freed when the
2691 tvb_set_free_cb(next_tvb, g_free);
2694 * Add the tvbuff to the list of tvbuffs to which the tvbuff we
2695 * were handed refers, so it'll get cleaned up when that tvbuff
2698 tvb_set_child_real_data_tvbuff(tvb, next_tvb);
2700 /* Add the defragmented data to the data source list. */
2701 add_new_data_source(pinfo, next_tvb, "Reassembled EAP");
2703 /* Now dissect it. */
2704 call_dissector(eap_fragment_handle, next_tvb, pinfo, eap_tree);
2709 * No - hand it to the dissector.
2711 result = call_dissector(eap_fragment_handle, next_tvb, pinfo, eap_tree);
2713 /* This is only part of the full EAP packet; start reassembly. */
2714 proto_tree_add_text(eap_tree, next_tvb, 0, -1, "EAP fragment");
2715 reassembled_data_len = data_len;
2716 data_needed = -result;
2717 reassembled_data = g_malloc(reassembled_data_len + data_needed);
2718 tvb_memcpy(next_tvb, reassembled_data, 0, reassembled_data_len);
2724 proto_tree *vsa_tree = NULL;
2726 gchar textbuffer[TEXTBUFFER];
2727 rd_vsa_buffer vsabuffer[VSABUFFER];
2729 /* We pre-add a text and a subtree to allow 3GPP QoS decoding
2730 * to access the protocol tree.
2732 ti = proto_tree_add_text(tree, tvb, offset, avph.avp_length,
2734 attr_info->str, avph.avp_type, avph.avp_length);
2735 vsa_tree = proto_item_add_subtree(ti, ett_radius_vsa);
2736 for (i = 0; i < VSABUFFER; i++)
2737 vsabuffer[i].str = NULL;
2738 rd_value_to_str(textbuffer, &vsabuffer, &avph, tvb, offset,
2739 radius_attrib, vsa_tree);
2740 proto_item_append_text(ti, ", %s", textbuffer);
2741 for (i = 0; vsabuffer[i].str && i < VSABUFFER; i++)
2742 proto_tree_add_text(vsa_tree, tvb, vsabuffer[i].offset,
2743 vsabuffer[i].length, "%s", vsabuffer[i].str);
2747 offset = offset+avph.avp_length;
2748 avplength = avplength-avph.avp_length;
2752 * Call the cleanup handler to free any reassembled data we haven't
2753 * attached to a tvbuff, and pop the handler.
2755 CLEANUP_CALL_AND_POP;
2758 static void dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2760 proto_tree *radius_tree = NULL, *avptree = NULL;
2761 proto_item *ti,*avptf;
2765 guint avplength,hdrlength;
2770 if (check_col(pinfo->cinfo, COL_PROTOCOL))
2771 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RADIUS");
2772 if (check_col(pinfo->cinfo, COL_INFO))
2773 col_clear(pinfo->cinfo, COL_INFO);
2775 tvb_memcpy(tvb,(guint8 *)&rh,0,sizeof(e_radiushdr));
2778 rhident= rh.rh_ident;
2779 rhlength= g_ntohs(rh.rh_pktlength);
2780 codestrval= match_strval(rhcode,radius_vals);
2781 if (codestrval==NULL)
2783 codestrval="Unknown Packet";
2785 /* XXX Check for valid length value:
2788 * The Length field is two octets. It indicates the length of the
2789 * packet including the Code, Identifier, Length, Authenticator and
2790 * Attribute fields. Octets outside the range of the Length field
2791 * MUST be treated as padding and ignored on reception. If the
2792 * packet is shorter than the Length field indicates, it MUST be
2793 * silently discarded. The minimum length is 20 and maximum length
2797 if (check_col(pinfo->cinfo, COL_INFO))
2799 col_add_fstr(pinfo->cinfo,COL_INFO,"%s(%d) (id=%d, l=%d)",
2800 codestrval, rhcode, rhident, rhlength);
2805 ti = proto_tree_add_item(tree,proto_radius, tvb, 0, rhlength, FALSE);
2807 radius_tree = proto_item_add_subtree(ti, ett_radius);
2809 proto_tree_add_uint(radius_tree,hf_radius_code, tvb, 0, 1,
2811 proto_tree_add_uint_format(radius_tree,hf_radius_id, tvb, 1, 1,
2812 rh.rh_ident, "Packet identifier: 0x%01x (%d)",
2815 proto_tree_add_uint(radius_tree, hf_radius_length, tvb,
2817 if ( authenticator ) {
2818 g_free(authenticator);
2820 authenticator = g_malloc(AUTHENTICATOR_LENGTH);
2821 if ( authenticator ) {
2822 memcpy(authenticator,tvb_get_ptr(tvb,4,AUTHENTICATOR_LENGTH),AUTHENTICATOR_LENGTH);
2824 proto_tree_add_text(radius_tree, tvb, 4,
2825 AUTHENTICATOR_LENGTH,
2829 hdrlength=RD_HDR_LENGTH+AUTHENTICATOR_LENGTH;
2830 avplength= rhlength -hdrlength;
2832 if (avplength > 0) {
2833 /* list the attribute value pairs */
2837 avptf = proto_tree_add_text(radius_tree,
2838 tvb,hdrlength,avplength,
2839 "Attribute value pairs");
2840 avptree = proto_item_add_subtree(avptf, ett_radius_avp);
2843 dissect_attribute_value_pairs(tvb, hdrlength, avptree, avplength, pinfo);
2847 /* registration with the filtering engine */
2849 proto_register_radius(void)
2851 static hf_register_info hf[] = {
2853 { "Code","radius.code", FT_UINT8, BASE_DEC, VALS(radius_vals), 0x0,
2857 { "Identifier", "radius.id", FT_UINT8, BASE_DEC, NULL, 0x0,
2860 { &hf_radius_length,
2861 { "Length","radius.length", FT_UINT16, BASE_DEC, NULL, 0x0,
2864 static gint *ett[] = {
2871 module_t *radius_module;
2873 proto_radius = proto_register_protocol("Radius Protocol", "RADIUS",
2875 proto_register_field_array(proto_radius, hf, array_length(hf));
2876 proto_register_subtree_array(ett, array_length(ett));
2878 radius_module = prefs_register_protocol(proto_radius,NULL);
2879 prefs_register_string_preference(radius_module,"shared_secret","Shared Secret",
2880 "Shared secret used to decode User Passwords",
2885 proto_reg_handoff_radius(void)
2887 dissector_handle_t radius_handle;
2890 * Get a handle for the EAP fragment dissector.
2892 eap_fragment_handle = find_dissector("eap_fragment");
2894 radius_handle = create_dissector_handle(dissect_radius, proto_radius);
2895 dissector_add("udp.port", UDP_PORT_RADIUS, radius_handle);
2896 dissector_add("udp.port", UDP_PORT_RADIUS_NEW, radius_handle);
2897 dissector_add("udp.port", UDP_PORT_RADACCT, radius_handle);
2898 dissector_add("udp.port", UDP_PORT_RADACCT_NEW, radius_handle);