4 * Definitions for RADIUS packet disassembly
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #define RADIUS_ACCESS_REQUEST 1
27 #define RADIUS_ACCESS_ACCEPT 2
28 #define RADIUS_ACCESS_REJECT 3
29 #define RADIUS_ACCOUNTING_REQUEST 4
30 #define RADIUS_ACCOUNTING_RESPONSE 5
31 #define RADIUS_ACCOUNTING_STATUS 6
32 #define RADIUS_ACCESS_PASSWORD_REQUEST 7
33 #define RADIUS_ACCESS_PASSWORD_ACK 8
34 #define RADIUS_ACCESS_PASSWORD_REJECT 9
35 #define RADIUS_ACCOUNTING_MESSAGE 10
36 #define RADIUS_ACCESS_CHALLENGE 11
37 #define RADIUS_STATUS_SERVER 12
38 #define RADIUS_STATUS_CLIENT 13
40 #define RADIUS_VENDOR_SPECIFIC_CODE 26
41 #define RADIUS_ASCEND_ACCESS_NEXT_CODE 29
42 #define RADIUS_ASCEND_ACCESS_NEW_PIN 30
43 #define RADIUS_ASCEND_PASSWORD_EXPIRED 32
44 #define RADIUS_ASCEND_ACCESS_EVENT_REQUEST 33
45 #define RADIUS_ASCEND_ACCESS_EVENT_RESPONSE 34
46 #define RADIUS_DISCONNECT_REQUEST 40
47 #define RADIUS_DISCONNECT_REQUEST_ACK 41
48 #define RADIUS_DISCONNECT_REQUEST_NAK 42
49 #define RADIUS_CHANGE_FILTER_REQUEST 43
50 #define RADIUS_CHANGE_FILTER_REQUEST_ACK 44
51 #define RADIUS_CHANGE_FILTER_REQUEST_NAK 45
52 #define RADIUS_EAP_MESSAGE_CODE 79
53 #define RADIUS_MESSAGE_AUTHENTICATOR 80
54 #define RADIUS_RESERVED 255
56 typedef struct _radius_vendor_info_t {
59 GHashTable* attrs_by_id;
64 } radius_vendor_info_t;
66 typedef struct _radius_attr_info_t radius_attr_info_t;
67 typedef void (radius_attr_dissector_t)(radius_attr_info_t*, proto_tree*, packet_info*, tvbuff_t*, int, int, proto_item* );
69 typedef const gchar* (radius_avp_dissector_t)(proto_tree*,tvbuff_t*, packet_info*);
71 struct _radius_attr_info_t {
74 gboolean encrypt; /* True if attribute has "encrypt=1" option */
76 radius_attr_dissector_t* type;
77 radius_avp_dissector_t* dissector;
78 const value_string *vs;
84 GHashTable* tlvs_by_id;
87 typedef struct _radius_dictionary_t {
88 GHashTable* attrs_by_id;
89 GHashTable* attrs_by_name;
90 GHashTable* vendors_by_id;
91 GHashTable* vendors_by_name;
92 GHashTable* tlvs_by_name;
93 } radius_dictionary_t;
95 radius_attr_dissector_t radius_integer;
96 radius_attr_dissector_t radius_string;
97 radius_attr_dissector_t radius_octets;
98 radius_attr_dissector_t radius_ipaddr;
99 radius_attr_dissector_t radius_ipv6addr;
100 radius_attr_dissector_t radius_ipv6prefix;
101 radius_attr_dissector_t radius_ipxnet;
102 radius_attr_dissector_t radius_date;
103 radius_attr_dissector_t radius_abinary;
104 radius_attr_dissector_t radius_ether;
105 radius_attr_dissector_t radius_ifid;
106 radius_attr_dissector_t radius_byte;
107 radius_attr_dissector_t radius_short;
108 radius_attr_dissector_t radius_signed;
109 radius_attr_dissector_t radius_combo_ip;
110 radius_attr_dissector_t radius_tlv;
112 extern void radius_register_avp_dissector(guint32 vendor_id, guint32 attribute_id, radius_avp_dissector_t dissector);
114 /* from radius_dict.l */
115 gboolean radius_load_dictionary (radius_dictionary_t* dict, gchar* directory, const gchar* filename, gchar** err_str);
117 /* Item of request list */
118 typedef struct _radius_call_t
123 guint32 req_num; /* frame number request seen */
124 guint32 rsp_num; /* frame number response seen */
130 /* Container for tapping relevant data */
131 typedef struct _radius_info_t
136 gboolean is_duplicate;
137 gboolean request_available;
138 guint32 req_num; /* frame number request seen */