1 /* packet-diameter_3gpp.c
2 * Routines for dissecting 3GPP OctetSting AVP:s
3 * Copyright 2008, Anders Broman <anders.broman[at]ericsson.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 /* This dissector registers a dissector table for 3GPP Vendor specific
25 * AVP:s which will be called from the Diameter dissector to dissect
26 * the content of AVP:s of the OctetString type(or similar).
33 #include <epan/packet.h>
34 #include <epan/asn1.h>
36 #include "packet-diameter.h"
37 #include "packet-gsm_map.h"
38 #include "packet-gsm_a_common.h"
39 #include "packet-e164.h"
40 #include "packet-e212.h"
41 #include "packet-ntp.h"
43 void proto_register_diameter_3gpp(void);
44 void proto_reg_handoff_diameter_3gpp(void);
46 /* Initialize the protocol and registered fields */
47 static int proto_diameter_3gpp = -1;
49 static int hf_diameter_3gpp_visited_nw_id = -1;
50 static int hf_diameter_3gpp_msisdn = -1;
51 static int hf_diameter_3gpp_path = -1;
52 static int hf_diameter_3gpp_contact = -1;
53 /* static int hf_diameter_3gpp_user_data = -1; */
54 static int hf_diameter_3gpp_ipaddr = -1;
55 static int hf_diameter_3gpp_mbms_required_qos_prio = -1;
56 static int hf_diameter_3gpp_tmgi = -1;
57 static int hf_diameter_3gpp_service_ind = -1;
58 static int hf_diameter_mbms_service_id = -1;
59 static int hf_diameter_address_digits = -1;
60 static int hf_diameter_3gpp_spare_bits = -1;
61 static int hf_diameter_3gpp_uar_flags_flags = -1;
62 static int hf_diameter_3gpp_uar_flags_flags_bit0 = -1;
63 static int hf_diameter_3gpp_feature_list_flags = -1;
64 static int hf_diameter_3gpp_feature_list_flags_bit0 = -1;
65 static int hf_diameter_3gpp_feature_list_flags_bit1 = -1;
66 static int hf_diameter_3gpp_feature_list_flags_bit2 = -1;
67 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit0 = -1;
68 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit1 = -1;
69 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit2 = -1;
70 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit3 = -1;
71 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit4 = -1;
72 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit5 = -1;
73 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit6 = -1;
74 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit7 = -1;
75 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit8 = -1;
76 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit9 = -1;
77 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit10 = -1;
78 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit11 = -1;
79 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit12 = -1;
80 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit13 = -1;
81 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit14 = -1;
82 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit15 = -1;
83 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit16 = -1;
84 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit17 = -1;
85 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit18 = -1;
86 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit19 = -1;
87 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit20 = -1;
88 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit21 = -1;
89 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit22 = -1;
90 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit23 = -1;
91 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit24 = -1;
92 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit25 = -1;
93 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit26 = -1;
94 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit27 = -1;
95 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit28 = -1;
96 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit29 = -1;
97 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit30 = -1;
98 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit31 = -1;
99 static int hf_diameter_3gpp_feature_list2_s6a_flags_bit0 = -1;
100 static int hf_diameter_3gpp_feature_list2_s6a_flags_bit1 = -1;
101 static int hf_diameter_3gpp_feature_list_gx_flags_bit0 = -1;
102 static int hf_diameter_3gpp_feature_list_gx_flags_bit1 = -1;
103 static int hf_diameter_3gpp_feature_list_gx_flags_bit2 = -1;
104 static int hf_diameter_3gpp_feature_list_gx_flags_bit3 = -1;
105 static int hf_diameter_3gpp_feature_list_gx_flags_bit4 = -1;
106 static int hf_diameter_3gpp_feature_list_gx_flags_bit5 = -1;
107 static int hf_diameter_3gpp_feature_list_gx_flags_bit6 = -1;
108 static int hf_diameter_3gpp_feature_list_gx_flags_bit7 = -1;
109 static int hf_diameter_3gpp_feature_list_gx_flags_bit8 = -1;
110 static int hf_diameter_3gpp_feature_list_gx_flags_bit9 = -1;
111 static int hf_diameter_3gpp_feature_list_gx_flags_bit10 = -1;
112 static int hf_diameter_3gpp_feature_list_gx_flags_bit11 = -1;
113 static int hf_diameter_3gpp_feature_list_gx_flags_bit12 = -1;
114 static int hf_diameter_3gpp_ulr_flags = -1;
115 static int hf_diameter_3gpp_ulr_flags_bit0 = -1;
116 static int hf_diameter_3gpp_ulr_flags_bit1 = -1;
117 static int hf_diameter_3gpp_ulr_flags_bit2 = -1;
118 static int hf_diameter_3gpp_ulr_flags_bit3 = -1;
119 static int hf_diameter_3gpp_ulr_flags_bit4 = -1;
120 static int hf_diameter_3gpp_ulr_flags_bit5 = -1;
121 static int hf_diameter_3gpp_ulr_flags_bit6 = -1;
122 static int hf_diameter_3gpp_ulr_flags_bit7 = -1;
123 static int hf_diameter_3gpp_ula_flags = -1;
124 static int hf_diameter_3gpp_ula_flags_bit0 = -1;
125 static int hf_diameter_3gpp_dsr_flags = -1;
126 static int hf_diameter_3gpp_dsr_flags_bit0 = -1;
127 static int hf_diameter_3gpp_dsr_flags_bit1 = -1;
128 static int hf_diameter_3gpp_dsr_flags_bit2 = -1;
129 static int hf_diameter_3gpp_dsr_flags_bit3 = -1;
130 static int hf_diameter_3gpp_dsr_flags_bit4 = -1;
131 static int hf_diameter_3gpp_dsr_flags_bit5 = -1;
132 static int hf_diameter_3gpp_dsr_flags_bit6 = -1;
133 static int hf_diameter_3gpp_dsr_flags_bit7 = -1;
134 static int hf_diameter_3gpp_dsr_flags_bit8 = -1;
135 static int hf_diameter_3gpp_dsr_flags_bit9 = -1;
136 static int hf_diameter_3gpp_dsr_flags_bit10 = -1;
137 static int hf_diameter_3gpp_dsr_flags_bit11 = -1;
138 static int hf_diameter_3gpp_dsr_flags_bit12 = -1;
139 static int hf_diameter_3gpp_dsr_flags_bit13 = -1;
140 static int hf_diameter_3gpp_dsr_flags_bit14 = -1;
141 static int hf_diameter_3gpp_dsr_flags_bit15 = -1;
142 static int hf_diameter_3gpp_dsr_flags_bit16 = -1;
143 static int hf_diameter_3gpp_dsa_flags = -1;
144 static int hf_diameter_3gpp_dsa_flags_bit0 = -1;
145 static int hf_diameter_3gpp_ida_flags = -1;
146 static int hf_diameter_3gpp_ida_flags_bit0 = -1;
147 static int hf_diameter_3gpp_pua_flags = -1;
148 static int hf_diameter_3gpp_pua_flags_bit0 = -1;
149 static int hf_diameter_3gpp_pua_flags_bit1 = -1;
150 static int hf_diameter_3gpp_nor_flags = -1;
151 static int hf_diameter_3gpp_nor_flags_bit0 = -1;
152 static int hf_diameter_3gpp_nor_flags_bit1 = -1;
153 static int hf_diameter_3gpp_nor_flags_bit2 = -1;
154 static int hf_diameter_3gpp_nor_flags_bit3 = -1;
155 static int hf_diameter_3gpp_nor_flags_bit4 = -1;
156 static int hf_diameter_3gpp_nor_flags_bit5 = -1;
157 static int hf_diameter_3gpp_nor_flags_bit6 = -1;
158 static int hf_diameter_3gpp_idr_flags = -1;
159 static int hf_diameter_3gpp_idr_flags_bit0 = -1;
160 static int hf_diameter_3gpp_idr_flags_bit1 = -1;
161 static int hf_diameter_3gpp_idr_flags_bit2 = -1;
162 static int hf_diameter_3gpp_idr_flags_bit3 = -1;
163 static int hf_diameter_3gpp_idr_flags_bit4 = -1;
164 static int hf_diameter_3gpp_idr_flags_bit5 = -1;
165 static int hf_diameter_3gpp_idr_flags_bit6 = -1;
166 static int hf_diameter_3gpp_ipv6addr = -1;
167 static int hf_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer = -1;
168 static int hf_diameter_3gpp_udp_port = -1;
169 static gint diameter_3gpp_path_ett = -1;
170 static gint diameter_3gpp_msisdn_ett = -1;
171 static gint diameter_3gpp_feature_list_ett = -1;
172 static gint diameter_3gpp_uar_flags_ett = -1;
173 static gint diameter_3gpp_tmgi_ett = -1;
174 static gint diameter_3gpp_ulr_flags_ett = -1;
175 static gint diameter_3gpp_ula_flags_ett = -1;
176 static gint diameter_3gpp_dsr_flags_ett = -1;
177 static gint diameter_3gpp_dsa_flags_ett = -1;
178 static gint diameter_3gpp_ida_flags_ett = -1;
179 static gint diameter_3gpp_pua_flags_ett = -1;
180 static gint diameter_3gpp_nor_flags_ett = -1;
181 static gint diameter_3gpp_idr_flags_ett = -1;
183 /* Dissector handles */
184 static dissector_handle_t xml_handle;
186 /* AVP Code: 23 3GPP-MS-TimeZone
189 static const value_string daylight_saving_time_vals[] = {
190 {0, "No adjustment"},
191 {1, "+1 hour adjustment for Daylight Saving Time"},
192 {2, "+2 hours adjustment for Daylight Saving Time"},
198 dissect_diameter_3gpp_ms_timezone(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
201 guint8 oct, hours, minutes;
203 diam_sub_dis_t *diam_sub_dis = (diam_sub_dis_t*)data;
205 /* 3GPP TS 23.040 version 6.6.0 Release 6
206 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
208 * The Time Zone indicates the difference, expressed in quarters of an hour,
209 * between the local time and GMT. In the first of the two semi-octets,
210 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
211 * represents the algebraic sign of this difference (0: positive, 1: negative).
214 oct = tvb_get_guint8(tvb, offset);
215 sign = (oct & 0x08) ? '-' : '+';
216 oct = (oct >> 4) + (oct & 0x07) * 10;
218 minutes = oct % 4 * 15;
220 proto_tree_add_text(tree, tvb, offset, 1, "Timezone: GMT %c %d hours %d minutes", sign, hours, minutes);
223 oct = tvb_get_guint8(tvb, offset) & 0x3;
224 proto_tree_add_text(tree, tvb, offset, 1, "%s", val_to_str_const(oct, daylight_saving_time_vals, "Unknown"));
227 diam_sub_dis->avp_str = wmem_strdup_printf(wmem_packet_scope(), "Timezone: GMT %c %d hours %d minutes %s",
231 val_to_str_const(oct, daylight_saving_time_vals, "Unknown"));
236 /* AVP Code: 917 MBMS-GGSN-IPv6-Address */
238 dissect_diameter_3gpp_ipv6addr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
242 proto_tree_add_item(tree, hf_diameter_3gpp_ipv6addr, tvb, offset, 16, ENC_NA);
249 /* AVP Code: 15 3GPP-SGSN-IPv6-Address */
251 dissect_diameter_3gpp_sgsn_ipv6_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
253 /* 3GPP AVP code 15 has a conflict between imscxdx.xml (where the AVP
254 * contains an Unsigned32 enum) and TGPPGmb.xml (where the AVP contains
255 * an OctetString IPv6 address). This function decodes the latter; we
256 * (silently) abort dissection if the length is 4 on the assumption that
257 * the old IMS AVP is what we're decoding.
259 if (tvb_reported_length(tvb) == 4)
262 return dissect_diameter_3gpp_ipv6addr(tvb, pinfo, tree, data);
266 /* AVP Code: 600 Visited-Network-Identifier
268 * 6.3.1 Visited-Network-Identifier AVP
269 * The Visited-Network-Identifier AVP is of type OctetString. This AVP contains an identifier that helps the home
270 * network to identify the visited network (e.g. the visited network domain name).
274 dissect_diameter_3gpp_visited_nw_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
278 int length = tvb_length(tvb);
280 for(i = 0; i < length; i++)
281 if(!g_ascii_isprint(tvb_get_guint8(tvb, i)))
284 item = proto_tree_add_item(tree, hf_diameter_3gpp_visited_nw_id, tvb, offset, length, ENC_ASCII|ENC_NA);
285 PROTO_ITEM_SET_GENERATED(item);
291 /* AVP Code: 629 Feature-List-id
292 * Feature list Id is neede to dissect Feature list in S6a/S6d application
297 dissect_diameter_3gpp_feature_list_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void *data)
299 diam_sub_dis_t *diam_sub_dis_inf = (diam_sub_dis_t*)data;
301 if(diam_sub_dis_inf){
302 diam_sub_dis_inf->feature_list_id = tvb_get_ntohl(tvb,0);
308 /* AVP Code: 637 UAR-Flags
310 * IMS Cx Dx AVPS 3GPP TS 29.229
314 dissect_diameter_3gpp_uar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
317 proto_tree *sub_tree;
321 item = proto_tree_add_item(tree, hf_diameter_3gpp_uar_flags_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
322 sub_tree = proto_item_add_subtree(item, diameter_3gpp_uar_flags_ett);
325 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
327 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_uar_flags_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
330 offset = bit_offset>>3;
335 /* AVP Code: 630 Feature-List
336 * Interpretation depends on Application Id
338 * IMS Cx Dx AVPS 3GPP TS 29.229
342 dissect_diameter_3gpp_feature_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data) {
345 proto_tree *sub_tree;
347 guint32 bit_offset, application_id = 0, feature_list_id = 0;
348 diam_sub_dis_t *diam_sub_dis_inf = (diam_sub_dis_t*)data;
350 item = proto_tree_add_item(tree, hf_diameter_3gpp_feature_list_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
351 sub_tree = proto_item_add_subtree(item, diameter_3gpp_feature_list_ett);
353 if(diam_sub_dis_inf){
354 application_id = diam_sub_dis_inf->application_id;
355 feature_list_id = diam_sub_dis_inf->feature_list_id;
358 if(application_id == 16777216){
359 /* ApplicationId: 3GPP Cx (16777216) */
360 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 29, ENC_BIG_ENDIAN);
362 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
364 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
366 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
369 /*offset = bit_offset>>3;*/
370 }else if(application_id == 16777251){
371 /* ApplicationId: 3GPP S6a/S6d */
372 if(feature_list_id == 1){
373 /* 3GPP TS 29.272 Table 7.3.10/1: Features of Feature-List-ID 1 used in S6a/S6d */
374 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit31, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
376 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit30, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
378 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit29, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
380 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit28, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
382 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit27, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
384 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit26, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
386 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit25, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
388 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit24, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
390 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit23, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
392 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit22, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
394 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit21, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
396 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit20, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
398 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit19, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
400 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit18, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
402 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit17, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
404 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit16, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
406 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit15, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
408 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit14, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
410 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit13, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
412 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit12, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
414 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit11, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
416 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit10, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
418 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit9, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
420 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit8, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
422 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit7, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
424 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
426 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
428 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
430 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
432 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
434 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
436 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
437 }else if(feature_list_id == 2){
438 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 30, ENC_BIG_ENDIAN);
440 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list2_s6a_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
442 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list2_s6a_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
444 }else if(application_id == 16777238){
445 /* ApplicationId: 3GPP Gx */
446 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 19, ENC_BIG_ENDIAN);
448 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit12, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
450 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit11, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
452 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit10, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
454 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit9, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
456 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit8, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
458 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit7, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
460 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
462 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
464 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
466 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
468 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
470 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
472 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_gx_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
479 /* AVP Code: 640 Path
481 * IMS Cx Dx AVPS 3GPP TS 29.229
483 * The Path AVP is of type OctetString and it contains a comma separated list of SIP proxies in the Path header as defined
484 * in IETF RFC 3327 [17].
487 dissect_diameter_3gpp_path(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
490 proto_tree *sub_tree;
491 int offset = 0, comma_offset;
492 int end_offset = tvb_length(tvb) - 1;
494 item = proto_tree_add_text(tree, tvb, offset, -1,"Paths");
495 sub_tree = proto_item_add_subtree(item,diameter_3gpp_path_ett);
497 while (offset < end_offset){
498 comma_offset = tvb_find_guint8(tvb, offset, -1, ',');
499 if(comma_offset == -1){
500 proto_tree_add_item(sub_tree, hf_diameter_3gpp_path, tvb, offset, comma_offset, ENC_ASCII|ENC_NA);
503 proto_tree_add_item(sub_tree, hf_diameter_3gpp_path, tvb, offset, comma_offset, ENC_ASCII|ENC_NA);
504 offset = comma_offset+1;
508 return tvb_length(tvb);
511 /* AVP Code: 641 Contact
513 * IMS Cx Dx AVPS 3GPP TS 29.229
515 * The Contact AVP is of type OctetString and it contains the Contact Addresses and Parameters in the Contact header as
516 * defined in IETF RFC 3261.
519 dissect_diameter_3gpp_contact(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
524 item = proto_tree_add_item(tree, hf_diameter_3gpp_contact, tvb, offset, -1, ENC_ASCII|ENC_NA);
525 PROTO_ITEM_SET_GENERATED(item);
527 return tvb_length(tvb);
530 /* AVP Code: 701 MSISDN */
532 dissect_diameter_3gpp_msisdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
535 proto_tree *sub_tree;
537 const char *digit_str;
538 int length = tvb_length(tvb);
540 item = proto_tree_add_item(tree, hf_diameter_3gpp_msisdn, tvb, offset, length, ENC_NA);
541 sub_tree = proto_item_add_subtree(item,diameter_3gpp_msisdn_ett);
543 dissect_e164_cc(tvb, sub_tree, offset, TRUE);
545 digit_str = unpack_digits(tvb, 1);
546 proto_tree_add_string(sub_tree, hf_diameter_address_digits, tvb, 1, -1, digit_str);
548 return tvb_length(tvb);
552 /* AVP Code: 702 User-Data
554 * The AVP codes from 709 to799 are reserved for TS 29.329
556 /* AVP Code: 606 User-Data
558 * IMS Cx Dx AVPS 3GPP TS 29.229
561 dissect_diameter_3gpp_user_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
563 int length = tvb_length(tvb);
565 /* If there is less than 38 characters this is not XML
566 * <?xml version="1.0" encoding="UTF-8"?>
571 if (tvb_strncaseeql(tvb, 0, "<?xml", 5) == 0){
572 call_dissector(xml_handle, tvb, pinfo, tree);
580 * AVP Code: 704 Service-Indication
583 dissect_diameter_3gpp_service_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
587 int length = tvb_length(tvb);
589 for(i = 0; i < length; i++)
590 if(!g_ascii_isprint(tvb_get_guint8(tvb, i)))
593 item = proto_tree_add_item(tree, hf_diameter_3gpp_service_ind, tvb, offset, length, ENC_ASCII|ENC_NA);
594 PROTO_ITEM_SET_GENERATED(item);
599 /* AVP Code: 900 TMGI */
601 dissect_diameter_3gpp_tmgi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
604 proto_tree *sub_tree;
607 item = proto_tree_add_item(tree, hf_diameter_3gpp_tmgi, tvb, offset, 6, ENC_NA);
608 sub_tree = proto_item_add_subtree(item,diameter_3gpp_tmgi_ett);
610 /* MBMS Service ID consisting of three octets. MBMS Service ID consists of a 6-digit
611 * fixed-length hexadecimal number between 000000 and FFFFFF.
612 * MBMS Service ID uniquely identifies an MBMS bearer service within a PLMN.
615 proto_tree_add_item(sub_tree, hf_diameter_mbms_service_id, tvb, offset, 3, ENC_BIG_ENDIAN);
617 offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, offset, TRUE);
623 /* AVP Code: 903 MBMS-Service-Area */
625 /* AVP Code: 918 MBMS-BMSC-SSM-IP-Address */
627 dissect_diameter_3gpp_ipaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
631 proto_tree_add_item(tree, hf_diameter_3gpp_ipaddr, tvb, offset, 4, ENC_BIG_ENDIAN);
638 /* AVP Code: 903 RAI AVP
640 * The RAI AVP (AVP Code 909) is of type UTF8String, and contains the Routing Area Identity of the SGSN where the
641 * UE is registered. RAI use and structure is specified in 3GPP TS 23.003 [40].
642 * Its value shall be encoded as a UTF-8 string on either 11 (if the MNC contains two digits) or 12 (if the MNC contains
643 * three digits) octets as follows:
644 * - The MCC shall be encoded first using three UTF-8 characters on three octets, each character representing a
645 * decimal digit starting with the first MCC digit.
646 * - Then, the MNC shall be encoded as either two or three UTF-8 characters on two or three octets, each character
647 * representing a decimal digit starting with the first MNC digit.
648 * - The Location Area Code (LAC) is encoded next using four UTF-8 characters on four octets, each character
649 * representing a hexadecimal digit of the LAC which is two binary octets long.
650 * - The Routing Area Code (RAC) is encoded last using two UTF-8 characters on two octets, each character
651 * representing a hexadecimal digit of the RAC which is one binary octet long.
652 * NOTE: As an example, a RAI with the following information: MCC=123, MNC=45, LAC=41655(0xA2C1) and
653 * RAC=10(0x0A) is encoded within the RAI AVP as a UTF-8 string of "12345A2C10A".
657 dissect_diameter_3gpp_rai(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void *data) {
659 diam_sub_dis_t *diam_sub_dis = (diam_sub_dis_t*)data;
663 length = tvb_length(tvb);
666 diam_sub_dis->avp_str = wmem_strdup_printf(wmem_packet_scope(), "MNC %s, MCC %s, LAC 0x%s, RAC 0x%s",
667 tvb_get_string_enc(wmem_packet_scope(), tvb, 0, 3, ENC_UTF_8|ENC_NA), /* MNC 3 digits */
668 tvb_get_string_enc(wmem_packet_scope(), tvb, 3, 3, ENC_UTF_8|ENC_NA), /* MCC 3 digits */
669 tvb_get_string_enc(wmem_packet_scope(), tvb, 6, 4, ENC_UTF_8|ENC_NA), /* LCC 4 digits */
670 tvb_get_string_enc(wmem_packet_scope(), tvb, 10, 2, ENC_UTF_8|ENC_NA) /* RAC 2 digits */
673 diam_sub_dis->avp_str = wmem_strdup_printf(wmem_packet_scope(), "MNC %s, MCC %s, LAC 0x%s, RAC 0x%s",
674 tvb_get_string_enc(wmem_packet_scope(), tvb, 0, 3, ENC_UTF_8|ENC_NA), /* MNC 3 digits */
675 tvb_get_string_enc(wmem_packet_scope(), tvb, 3, 2, ENC_UTF_8|ENC_NA), /* MCC 2 digits */
676 tvb_get_string_enc(wmem_packet_scope(), tvb, 5, 4, ENC_UTF_8|ENC_NA), /* LCC 4 digits */
677 tvb_get_string_enc(wmem_packet_scope(), tvb, 9, 2, ENC_UTF_8|ENC_NA) /* RAC 2 digits */
684 /* AVP Code: 913 MBMS-Required-QoS */
686 dissect_diameter_3gpp_mbms_required_qos(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) {
692 * 1 Allocation/Retention Priority as specified in 3GPP TS 23.107.
693 * This octet encodes each priority level defined in 3GPP TS 23.107
694 * as the binary value of the priority level. It specifies the relative
695 * importance of the actual MBMS bearer service compared to other MBMS
696 * and non-MBMS bearer services for allocation and retention of the
697 * MBMS bearer service.
698 * 2-N QoS Profile as specified by the Quality-of-Service information element,
699 * from octet 3 onwards, in 3GPP TS 24.008
701 proto_tree_add_item(tree, hf_diameter_3gpp_mbms_required_qos_prio, tvb, offset, 1, ENC_BIG_ENDIAN);
703 length = tvb_length(tvb) - 1;
704 de_sm_qos(tvb, tree, pinfo, offset,length, NULL, 0);
705 return offset+length;
709 /* AVP Code: 926 MBMS-BMSC-SSM-UDP-Port */
710 /* AVP Code: 927 MBMS-GW-UDP-Port */
712 dissect_diameter_3gpp_udp_port(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
716 proto_tree_add_item(tree, hf_diameter_3gpp_udp_port, tvb, offset, 1, ENC_BIG_ENDIAN);
723 /* AVP Code: 929 MBMS-Data-Transfer-Start */
724 /* AVP Code: 930 MBMS-Data-Transfer-Stop */
726 dissect_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
729 const gchar *time_str;
731 time_str = tvb_ntp_fmt_ts(tvb, offset);
732 proto_tree_add_string(tree, hf_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer, tvb, offset, 8, time_str);
740 * AVP Code: 1405 ULR-Flags
743 dissect_diameter_3gpp_ulr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
746 proto_tree *sub_tree;
750 item = proto_tree_add_item(tree, hf_diameter_3gpp_ulr_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
751 sub_tree = proto_item_add_subtree(item, diameter_3gpp_ulr_flags_ett);
753 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 24, ENC_BIG_ENDIAN);
755 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit7, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
757 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
759 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
761 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
763 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
765 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
767 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
769 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
772 offset = bit_offset>>3;
777 /* AVP Code: 1406 ULA-Flags */
779 dissect_diameter_3gpp_ula_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
782 proto_tree *sub_tree;
786 item = proto_tree_add_item(tree, hf_diameter_3gpp_ula_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
787 sub_tree = proto_item_add_subtree(item, diameter_3gpp_ula_flags_ett);
789 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
791 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ula_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
794 offset = bit_offset>>3;
802 * AVP Code: 1421 DSR-Flags
805 dissect_diameter_3gpp_dsr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
808 proto_tree *sub_tree;
812 item = proto_tree_add_item(tree, hf_diameter_3gpp_dsr_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
813 sub_tree = proto_item_add_subtree(item, diameter_3gpp_dsr_flags_ett);
815 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 15, ENC_BIG_ENDIAN);
817 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit16, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
819 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit15, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
821 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit14, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
823 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit13, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
825 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit12, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
827 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit11, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
829 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit10, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
831 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit9, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
833 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit8, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
835 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit7, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
837 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
839 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
841 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
843 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
845 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
847 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
849 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
852 offset = bit_offset>>3;
857 /* AVP Code: 1422 DSA-Flags */
859 dissect_diameter_3gpp_dsa_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
862 proto_tree *sub_tree;
866 item = proto_tree_add_item(tree, hf_diameter_3gpp_dsa_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
867 sub_tree = proto_item_add_subtree(item, diameter_3gpp_dsa_flags_ett);
869 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
871 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsa_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
874 offset = bit_offset>>3;
879 /* AVP Code: 1441 IDA-Flags */
881 dissect_diameter_3gpp_ida_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
884 proto_tree *sub_tree;
888 item = proto_tree_add_item(tree, hf_diameter_3gpp_ida_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
889 sub_tree = proto_item_add_subtree(item, diameter_3gpp_ida_flags_ett);
891 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
893 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ida_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
896 offset = bit_offset>>3;
901 /* AVP Code: 1442 PUA-Flags */
903 dissect_diameter_3gpp_pua_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
906 proto_tree *sub_tree;
910 item = proto_tree_add_item(tree, hf_diameter_3gpp_pua_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
911 sub_tree = proto_item_add_subtree(item, diameter_3gpp_pua_flags_ett);
913 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 30, ENC_BIG_ENDIAN);
915 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_pua_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
917 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_pua_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
920 offset = bit_offset>>3;
926 /* AVP Code: 1443 NOR-Flags */
928 dissect_diameter_3gpp_nor_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
931 proto_tree *sub_tree;
935 item = proto_tree_add_item(tree, hf_diameter_3gpp_nor_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
936 sub_tree = proto_item_add_subtree(item, diameter_3gpp_nor_flags_ett);
938 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 25, ENC_BIG_ENDIAN);
940 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
942 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
944 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
946 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
948 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
950 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
952 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
955 offset = bit_offset>>3;
960 /* AVP Code: 1490 IDR-Flags */
962 dissect_diameter_3gpp_idr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
965 proto_tree *sub_tree;
969 item = proto_tree_add_item(tree, hf_diameter_3gpp_idr_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
970 sub_tree = proto_item_add_subtree(item, diameter_3gpp_idr_flags_ett);
972 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 25, ENC_BIG_ENDIAN);
974 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
976 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
978 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
980 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
982 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
984 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
986 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
989 offset = bit_offset>>3;
995 proto_reg_handoff_diameter_3gpp(void)
998 /* AVP Code: 5 3GPP-GPRS Negotiated QoS profile */
999 /* Registered by packet-gtp.c */
1001 /* AVP Code: 15 3GPP-SGSN-IPv6-Address */
1002 dissector_add_uint("diameter.3gpp", 15, new_create_dissector_handle(dissect_diameter_3gpp_sgsn_ipv6_address, proto_diameter_3gpp));
1004 /* AVP Code: 22 3GPP-User-Location-Info
1005 * Registered by packet-gtpv2.c
1008 /* AVP Code: 23 3GPP-MS-TimeZone */
1009 dissector_add_uint("diameter.3gpp", 23, new_create_dissector_handle(dissect_diameter_3gpp_ms_timezone, proto_diameter_3gpp));
1011 /* AVP Code: 600 Visited-Network-Identifier */
1012 dissector_add_uint("diameter.3gpp", 600, new_create_dissector_handle(dissect_diameter_3gpp_visited_nw_id, proto_diameter_3gpp));
1014 /* AVP Code: 606 User-Data */
1015 dissector_add_uint("diameter.3gpp", 606, new_create_dissector_handle(dissect_diameter_3gpp_user_data, proto_diameter_3gpp));
1017 /* AVP Code: 629 Feature-List */
1018 dissector_add_uint("diameter.3gpp", 629, new_create_dissector_handle(dissect_diameter_3gpp_feature_list_id, proto_diameter_3gpp));
1020 /* AVP Code: 630 Feature-List */
1021 dissector_add_uint("diameter.3gpp", 630, new_create_dissector_handle(dissect_diameter_3gpp_feature_list, proto_diameter_3gpp));
1023 /* AVP Code: 637 UAR-Flags */
1024 dissector_add_uint("diameter.3gpp", 637, new_create_dissector_handle(dissect_diameter_3gpp_uar_flags, proto_diameter_3gpp));
1026 /* AVP Code: 640 Path */
1027 dissector_add_uint("diameter.3gpp", 640, new_create_dissector_handle(dissect_diameter_3gpp_path, proto_diameter_3gpp));
1029 /* AVP Code: 641 Contact */
1030 dissector_add_uint("diameter.3gpp", 641, new_create_dissector_handle(dissect_diameter_3gpp_contact, proto_diameter_3gpp));
1032 /* AVP Code: 701 MSISDN */
1033 dissector_add_uint("diameter.3gpp", 701, new_create_dissector_handle(dissect_diameter_3gpp_msisdn, proto_diameter_3gpp));
1035 /* AVP Code: 702 User-Data */
1036 dissector_add_uint("diameter.3gpp", 702, new_create_dissector_handle(dissect_diameter_3gpp_user_data, proto_diameter_3gpp));
1038 /* AVP Code: 704 Service-Indication */
1039 dissector_add_uint("diameter.3gpp", 704, new_create_dissector_handle(dissect_diameter_3gpp_service_ind, proto_diameter_3gpp));
1041 /* AVP Code: 900 TMGI */
1042 dissector_add_uint("diameter.3gpp", 900, new_create_dissector_handle(dissect_diameter_3gpp_tmgi, proto_diameter_3gpp));
1044 /* AVP Code: 904 MBMS-Session-Duration Registered by packet-gtp.c */
1045 /* AVP Code: 903 MBMS-Service-Area Registered by packet-gtp.c */
1047 /* AVP Code: 909 RAI */
1048 dissector_add_uint("diameter.3gpp", 909, new_create_dissector_handle(dissect_diameter_3gpp_rai, proto_diameter_3gpp));
1050 /* AVP Code: 911 MBMS-Time-To-Data-Transfer Registered by packet-gtp.c */
1051 /* Registered by packet-gtp.c */
1053 /* AVP Code: 913 MBMS-Required-QoS */
1054 dissector_add_uint("diameter.3gpp", 913, new_create_dissector_handle(dissect_diameter_3gpp_mbms_required_qos, proto_diameter_3gpp));
1056 /* AVP Code: 917 MBMS-GGSN-IPv6-Address */
1057 dissector_add_uint("diameter.3gpp", 917, new_create_dissector_handle(dissect_diameter_3gpp_ipv6addr, proto_diameter_3gpp));
1059 /* AVP Code: 918 MBMS-BMSC-SSM-IP-Address */
1060 dissector_add_uint("diameter.3gpp", 918, new_create_dissector_handle(dissect_diameter_3gpp_ipaddr, proto_diameter_3gpp));
1062 /* AVP Code: 926 MBMS-BMSC-SSM-UDP-Port */
1063 /* AVP Code: 927 MBMS-GW-UDP-Port */
1064 dissector_add_uint("diameter.3gpp", 926, new_create_dissector_handle(dissect_diameter_3gpp_udp_port, proto_diameter_3gpp));
1065 dissector_add_uint("diameter.3gpp", 927, new_create_dissector_handle(dissect_diameter_3gpp_udp_port, proto_diameter_3gpp));
1067 /* AVP Code: 929 MBMS-Data-Transfer-Start */
1068 dissector_add_uint("diameter.3gpp", 929, new_create_dissector_handle(dissect_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer, proto_diameter_3gpp));
1070 /* AVP Code: 930 MBMS-Data-Transfer-Stop */
1071 dissector_add_uint("diameter.3gpp", 930, new_create_dissector_handle(dissect_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer, proto_diameter_3gpp));
1073 /* AVP Code: 1405 ULR-Flags */
1074 dissector_add_uint("diameter.3gpp", 1405, new_create_dissector_handle(dissect_diameter_3gpp_ulr_flags, proto_diameter_3gpp));
1076 /* AVP Code: 1406 ULA-Flags */
1077 dissector_add_uint("diameter.3gpp", 1406, new_create_dissector_handle(dissect_diameter_3gpp_ula_flags, proto_diameter_3gpp));
1079 /* AVP Code: 1421 DSR-Flags */
1080 dissector_add_uint("diameter.3gpp", 1421, new_create_dissector_handle(dissect_diameter_3gpp_dsr_flags, proto_diameter_3gpp));
1082 /* AVP Code: 1422 DSA-Flags */
1083 dissector_add_uint("diameter.3gpp", 1422, new_create_dissector_handle(dissect_diameter_3gpp_dsa_flags, proto_diameter_3gpp));
1085 /* AVP Code: 1441 IDA-Flags */
1086 dissector_add_uint("diameter.3gpp", 1441, new_create_dissector_handle(dissect_diameter_3gpp_ida_flags, proto_diameter_3gpp));
1088 /* AVP Code: 1442 PUA-Flags */
1089 dissector_add_uint("diameter.3gpp", 1442, new_create_dissector_handle(dissect_diameter_3gpp_pua_flags, proto_diameter_3gpp));
1091 /* AVP Code: 1443 NOR-Flags */
1092 dissector_add_uint("diameter.3gpp", 1443, new_create_dissector_handle(dissect_diameter_3gpp_nor_flags, proto_diameter_3gpp));
1094 /* AVP Code: 1490 IDR-Flags */
1095 dissector_add_uint("diameter.3gpp", 1490, new_create_dissector_handle(dissect_diameter_3gpp_idr_flags, proto_diameter_3gpp));
1097 xml_handle = find_dissector("xml");
1101 proto_register_diameter_3gpp(void)
1104 /* Setup list of header fields See Section 1.6.1 for details*/
1105 static hf_register_info hf[] = {
1106 { &hf_diameter_3gpp_path,
1107 { "Path", "diameter.3gpp.path",
1108 FT_STRING, BASE_NONE, NULL, 0x0,
1111 { &hf_diameter_3gpp_contact,
1112 { "Contact", "diameter.3gpp.contact",
1113 FT_STRING, BASE_NONE, NULL, 0x0,
1116 { &hf_diameter_3gpp_visited_nw_id,
1117 { "Visited-Network-Identifier", "diameter.3gpp.visited_nw_id",
1118 FT_STRING, BASE_NONE, NULL, 0x0,
1121 { &hf_diameter_3gpp_msisdn,
1122 { "MSISDN", "diameter.3gpp.msisdn",
1123 FT_BYTES, BASE_NONE, NULL, 0x0,
1127 { &hf_diameter_3gpp_user_data,
1128 { "User data", "diameter.3gpp.user_data",
1129 FT_STRING, BASE_NONE, NULL, 0x0,
1133 { &hf_diameter_3gpp_ipaddr,
1134 { "IPv4 Address", "diameter.3gpp.ipaddr",
1135 FT_IPv4, BASE_NONE, NULL, 0x0,
1138 { &hf_diameter_3gpp_mbms_required_qos_prio,
1139 { "Allocation/Retention Priority", "diameter.3gpp.mbms_required_qos_prio",
1140 FT_UINT8, BASE_DEC, NULL, 0x0,
1143 { &hf_diameter_3gpp_tmgi,
1144 { "TMGI", "diameter.3gpp.tmgi",
1145 FT_BYTES, BASE_NONE, NULL, 0x0,
1148 { &hf_diameter_3gpp_service_ind,
1149 { "Service-Indication", "diameter.3gpp.service_ind",
1150 FT_STRING, BASE_NONE, NULL, 0x0,
1153 { &hf_diameter_mbms_service_id,
1154 { "MBMS Service ID", "diameter.3gpp.mbms_service_id",
1155 FT_UINT24, BASE_HEX, NULL, 0x0,
1158 { &hf_diameter_address_digits,
1159 { "Address digits", "diameter.3gpp.address_digits",
1160 FT_STRING, BASE_NONE, NULL, 0x0,
1163 { &hf_diameter_3gpp_spare_bits,
1164 { "Spare bit(s)", "diameter.3gpp.spare_bits",
1165 FT_UINT32, BASE_HEX, NULL, 0x0,
1168 { &hf_diameter_3gpp_uar_flags_flags,
1169 { "Flags", "diameter.3gpp.uar_flags_flags",
1170 FT_UINT32, BASE_HEX, NULL, 0x0,
1173 { &hf_diameter_3gpp_uar_flags_flags_bit0,
1174 { "Emergency registration", "diameter.3gpp.uar_flags_flags_bit0",
1175 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1178 { &hf_diameter_3gpp_feature_list_flags,
1179 { "Feature-List Flags", "diameter.3gpp.feature_list_flags",
1180 FT_UINT32, BASE_HEX, NULL, 0x0,
1183 { &hf_diameter_3gpp_feature_list_flags_bit0,
1184 { "Shared IFC Sets", "diameter.3gpp.feature_list_flags_bit0",
1185 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1188 { &hf_diameter_3gpp_feature_list_flags_bit1,
1189 { "Alias Indication", "diameter.3gpp.feature_list_flags_bit1",
1190 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1193 { &hf_diameter_3gpp_feature_list_flags_bit2,
1194 { "IMS Restoration Indication", "diameter.3gpp.feature_list_flags_bit2",
1195 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1198 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit0,
1199 { "Operator Determined Barring of all Packet Oriented Services", "diameter.3gpp.feature_list1_s6a_flags_bit0",
1200 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1203 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit1,
1204 { "Operator Determined Barring of Packet Oriented Services from access points that are within the HPLMN whilst the subscriber is roaming in a VPLMN", "diameter.3gpp.feature_list1_s6a_flags_bit1",
1205 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1208 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit2,
1209 { "Operator Determined Barring of Packet Oriented Services from access points that are within the roamed to VPLMN", "diameter.3gpp.feature_list1_s6a_flags_bit2",
1210 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1213 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit3,
1214 { "Operator Determined Barring of all outgoing calls", "diameter.3gpp.feature_list1_s6a_flags_bit3",
1215 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1218 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit4,
1219 { "Operator Determined Barring of all outgoing international calls", "diameter.3gpp.feature_list1_s6a_flags_bit4",
1220 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1223 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit5,
1224 { "Operator Determined Barring of all outgoing international calls except those directed to the home PLMN country", "diameter.3gpp.feature_list1_s6a_flags_bit5",
1225 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1228 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit6,
1229 { "Operator Determined Barring of all outgoing inter-zonal calls", "diameter.3gpp.feature_list1_s6a_flags_bit6",
1230 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1233 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit7,
1234 { "Operator Determined Barring of all outgoing inter-zonal calls except those directed to the home PLMN country", "diameter.3gpp.feature_list1_s6a_flags_bit7",
1235 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1238 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit8,
1239 { "Operator Determined Barring of all outgoing international calls except those directed to the home PLMN country and Barring of all outgoing inter-zonal calls", "diameter.3gpp.feature_list1_s6a_flags_bit8",
1240 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1243 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit9,
1244 { "Regional Subscription", "diameter.3gpp.feature_list1_s6a_flags_bit9",
1245 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1249 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit10,
1250 { "Trace Function", "diameter.3gpp.feature_list1_s6a_flags_bit10",
1251 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1254 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit11,
1255 { "All LCS Privacy Exception Classes", "diameter.3gpp.feature_list1_s6a_flags_bit11",
1256 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1259 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit12,
1260 { "Allow location by any LCS client", "diameter.3gpp.feature_list1_s6a_flags_bit12",
1261 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1264 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit13,
1265 { "Allow location by any value added LCS client to which a call/session is established from the target UE", "diameter.3gpp.feature_list1_s6a_flags_bit13",
1266 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1269 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit14,
1270 { "Allow location by designated external value added LCS clients", "diameter.3gpp.feature_list1_s6a_flags_bit14",
1271 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1274 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit15,
1275 { "Allow location by designated PLMN operator LCS clients", "diameter.3gpp.feature_list1_s6a_flags_bit15",
1276 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1279 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit16,
1280 { "Allow location by LCS clients of a designated LCS service type", "diameter.3gpp.feature_list1_s6a_flags_bit16",
1281 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1284 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit17,
1285 { "All Mobile Originating Location Request Classes", "diameter.3gpp.feature_list1_s6a_flags_bit17",
1286 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1289 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit18,
1290 { "Allow an MS to request its own location", "diameter.3gpp.feature_list1_s6a_flags_bit18",
1291 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1294 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit19,
1295 { "Allow an MS to perform self location without interaction with the PLMN", "diameter.3gpp.feature_list1_s6a_flags_bit19",
1296 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1299 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit20,
1300 { "Allow an MS to request transfer of its location to another LCS client", "diameter.3gpp.feature_list1_s6a_flags_bit20",
1301 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1304 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit21,
1305 { "Short Message MO-PP", "diameter.3gpp.feature_list1_s6a_flags_bit21",
1306 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1309 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit22,
1310 { "Barring of Outgoing Calls", "diameter.3gpp.feature_list1_s6a_flags_bit22",
1311 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1314 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit23,
1315 { "Barring of all outgoing calls", "diameter.3gpp.feature_list1_s6a_flags_bit23",
1316 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1319 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit24,
1320 { "Barring of outgoing international calls", "diameter.3gpp.feature_list1_s6a_flags_bit24",
1321 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1324 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit25,
1325 { "Barring of outgoing international calls except those directed to the home PLMN Country", "diameter.3gpp.feature_list1_s6a_flags_bit25",
1326 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1329 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit26,
1330 { "UE Reachability Notifcation", "diameter.3gpp.feature_list1_s6a_flags_bit26",
1331 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1334 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit27,
1335 { "Terminating Access Domain Selection Data Retrieval", "diameter.3gpp.feature_list1_s6a_flags_bit27",
1336 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1339 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit28,
1340 { "State/Location Information Retrieval", "diameter.3gpp.feature_list1_s6a_flags_bit28",
1341 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1344 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit29,
1345 { "Partial Purge from a Combined MME/SGSN", "diameter.3gpp.feature_list1_s6a_flags_bit29",
1346 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1349 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit30,
1350 { "UE Time Zone Retrieval", "diameter.3gpp.feature_list1_s6a_flags1_bit30",
1351 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1354 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit31,
1355 { "Additional MSISDN", "diameter.3gpp.feature_list1_s6a_flags_bit31",
1356 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1359 { &hf_diameter_3gpp_feature_list2_s6a_flags_bit0,
1360 { "SMS in MME", "diameter.3gpp.feature_list2_s6a_flags_bit0",
1361 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1364 { &hf_diameter_3gpp_feature_list2_s6a_flags_bit1,
1365 { "SMS in SGSN", "diameter.3gpp.feature_list2_s6a_flags_bit1",
1366 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1369 { &hf_diameter_3gpp_feature_list_gx_flags_bit0,
1370 { "Rel-8 Gx", "diameter.3gpp.feature_list_gx_flags_bit0",
1371 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1374 { &hf_diameter_3gpp_feature_list_gx_flags_bit1,
1375 { "Rel-9 Gx", "diameter.3gpp.feature_list_gx_flags_bit1",
1376 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1379 { &hf_diameter_3gpp_feature_list_gx_flags_bit2,
1380 { "Provisioning AF Signaling IP Flow Information",
1381 "diameter.3gpp.feature_list_gx_flags_bit2",
1382 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1385 { &hf_diameter_3gpp_feature_list_gx_flags_bit3,
1386 { "Rel-10 Gx", "diameter.3gpp.feature_list_gx_flags_bit3",
1387 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1390 { &hf_diameter_3gpp_feature_list_gx_flags_bit4,
1391 { "Sponsored Data Connectivity",
1392 "diameter.3gpp.feature_list_gx_flags_bit4",
1393 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1396 { &hf_diameter_3gpp_feature_list_gx_flags_bit5,
1397 { "IP Flow Mobility", "diameter.3gpp.feature_list_gx_flags_bit5",
1398 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1401 { &hf_diameter_3gpp_feature_list_gx_flags_bit6,
1402 { "ADC", "diameter.3gpp.feature_list_gx_flags_bit6",
1403 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1406 { &hf_diameter_3gpp_feature_list_gx_flags_bit7,
1407 { "vSRVCC", "diameter.3gpp.feature_list_gx_flags_bit7",
1408 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1411 { &hf_diameter_3gpp_feature_list_gx_flags_bit8,
1412 { "EPC-routed", "diameter.3gpp.feature_list_gx_flags_bit8",
1413 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1416 { &hf_diameter_3gpp_feature_list_gx_flags_bit9,
1417 { "rSRVCC", "diameter.3gpp.feature_list_gx_flags_bit9",
1418 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1421 { &hf_diameter_3gpp_feature_list_gx_flags_bit10,
1422 { "NetLoc", "diameter.3gpp.feature_list_gx_flags_bit10",
1423 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1426 { &hf_diameter_3gpp_feature_list_gx_flags_bit11,
1427 { "Usage Monitoring Congestion Handling",
1428 "diameter.3gpp.feature_list_gx_flags_bit11",
1429 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1432 { &hf_diameter_3gpp_feature_list_gx_flags_bit12,
1433 { "Extended Filter", "diameter.3gpp.feature_list_gx_flags_bit12",
1434 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1437 { &hf_diameter_3gpp_ulr_flags,
1438 { "ULR Flags", "diameter.3gpp.ulr_flags",
1439 FT_UINT32, BASE_HEX, NULL, 0x0,
1442 { &hf_diameter_3gpp_ulr_flags_bit0,
1443 { "Single-Registration-Indication", "diameter.3gpp.ulr_flags_bit0",
1444 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1447 { &hf_diameter_3gpp_ulr_flags_bit1,
1448 { "S6a/S6d-Indicator", "diameter.3gpp.ulr_flags_bit1",
1449 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1452 { &hf_diameter_3gpp_ulr_flags_bit2,
1453 { "Skip-Subscriber-Data", "diameter.3gpp.ulr_flags_bit2",
1454 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1457 { &hf_diameter_3gpp_ulr_flags_bit3,
1458 { "GPRS-Subscription-Data-Indicator", "diameter.3gpp.ulr_flags_bit3",
1459 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1462 { &hf_diameter_3gpp_ulr_flags_bit4,
1463 { "Node-Type-Indicator", "diameter.3gpp.ulr_flags_bit4",
1464 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1467 { &hf_diameter_3gpp_ulr_flags_bit5,
1468 { "Initial-Attach-Indicator", "diameter.3gpp.ulr_flags_bit5",
1469 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1472 { &hf_diameter_3gpp_ulr_flags_bit6,
1473 { "PS-LCS-Not-Supported-By-UE", "diameter.3gpp.ulr_flags_bit6",
1474 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1477 { &hf_diameter_3gpp_ulr_flags_bit7,
1478 { "SMS-Only-Indication", "diameter.3gpp.ulr_flags_bit7",
1479 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1482 { &hf_diameter_3gpp_ula_flags,
1483 { "ULA Flags", "diameter.3gpp.ula_flags",
1484 FT_UINT32, BASE_HEX, NULL, 0x0,
1487 { &hf_diameter_3gpp_ula_flags_bit0,
1488 { "Separation Indication", "diameter.3gpp.ula_flags_bit0",
1489 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1492 { &hf_diameter_3gpp_dsr_flags,
1493 { "DSR Flags", "diameter.3gpp.dsr_flags",
1494 FT_UINT32, BASE_HEX, NULL, 0x0,
1497 { &hf_diameter_3gpp_dsr_flags_bit0,
1498 { "Regional Subscription Withdrawal", "diameter.3gpp.dsr_flags_bit0",
1499 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1502 { &hf_diameter_3gpp_dsr_flags_bit1,
1503 { "Complete APN Configuration Profile Withdrawal", "diameter.3gpp.dsr_flags_bit1",
1504 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1507 { &hf_diameter_3gpp_dsr_flags_bit2,
1508 { "Subscribed Charging Characteristics Withdrawal", "diameter.3gpp.dsr_flags_bit2",
1509 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1512 { &hf_diameter_3gpp_dsr_flags_bit3,
1513 { "PDN subscription contexts Withdrawal", "diameter.3gpp.dsr_flags_bit3",
1514 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1517 { &hf_diameter_3gpp_dsr_flags_bit4,
1518 { "STN-SR", "diameter.3gpp.dsr_flags_bit4",
1519 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1522 { &hf_diameter_3gpp_dsr_flags_bit5,
1523 { "Complete PDP context list Withdrawal", "diameter.3gpp.dsr_flags_bit5",
1524 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1527 { &hf_diameter_3gpp_dsr_flags_bit6,
1528 { "PDP contexts Withdrawal", "diameter.3gpp.dsr_flags_bit6",
1529 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1532 { &hf_diameter_3gpp_dsr_flags_bit7,
1533 { "Roaming Restricted due to unsupported feature", "diameter.3gpp.dsr_flags_bit7",
1534 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1537 { &hf_diameter_3gpp_dsr_flags_bit8,
1538 { "Trace Data Withdrawal", "diameter.3gpp.dsr_flags_bit8",
1539 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1542 { &hf_diameter_3gpp_dsr_flags_bit9,
1543 { "CSG Deleted", "diameter.3gpp.dsr_flags_bit9",
1544 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1547 { &hf_diameter_3gpp_dsr_flags_bit10,
1548 { "APN-OI-Replacement", "diameter.3gpp.dsr_flags_bit10",
1549 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1552 { &hf_diameter_3gpp_dsr_flags_bit11,
1553 { "GMLC List Withdrawal", "diameter.3gpp.dsr_flags_bit11",
1554 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1557 { &hf_diameter_3gpp_dsr_flags_bit12,
1558 { "LCS Withdrawal", "diameter.3gpp.dsr_flags_bit12",
1559 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1562 { &hf_diameter_3gpp_dsr_flags_bit13,
1563 { "SMS Withdrawal", "diameter.3gpp.dsr_flags_bit13",
1564 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1567 { &hf_diameter_3gpp_dsr_flags_bit14,
1568 { "Subscribed periodic RAU-TAU Timer Withdrawal", "diameter.3gpp.dsr_flags_bit14",
1569 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1572 { &hf_diameter_3gpp_dsr_flags_bit15,
1573 { "Subscribed VSRVCC Withdrawal", "diameter.3gpp.dsr_flags_bit15",
1574 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1577 { &hf_diameter_3gpp_dsr_flags_bit16,
1578 { "A-MSISDN Withdrawal", "diameter.3gpp.dsr_flags_bit16",
1579 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1582 { &hf_diameter_3gpp_dsa_flags,
1583 { "DSA Flags", "diameter.3gpp.dsa_flags",
1584 FT_UINT32, BASE_HEX, NULL, 0x0,
1587 { &hf_diameter_3gpp_dsa_flags_bit0,
1588 { "Network Node area restricted", "diameter.3gpp.dsa_flags_bit0",
1589 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1592 { &hf_diameter_3gpp_ida_flags,
1593 { "IDA Flags", "diameter.3gpp.ida_flags",
1594 FT_UINT32, BASE_HEX, NULL, 0x0,
1597 { &hf_diameter_3gpp_ida_flags_bit0,
1598 { "Network Node area restricted", "diameter.3gpp.ida_flags_bit0",
1599 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1602 { &hf_diameter_3gpp_pua_flags,
1603 { "PUA Flags", "diameter.3gpp.pua_flags",
1604 FT_UINT32, BASE_HEX, NULL, 0x0,
1607 { &hf_diameter_3gpp_pua_flags_bit0,
1608 { "Freeze M-TMSI", "diameter.3gpp.pua_flags_bit0",
1609 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1612 { &hf_diameter_3gpp_pua_flags_bit1,
1613 { "Freeze P-TMSI", "diameter.3gpp.pua_flags_bit1",
1614 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1617 { &hf_diameter_3gpp_nor_flags,
1618 { "NOR Flags", "diameter.3gpp.nor_flags",
1619 FT_UINT32, BASE_HEX, NULL, 0x0,
1622 { &hf_diameter_3gpp_nor_flags_bit0,
1623 { "Single-Registration-Indication", "diameter.3gpp.nor_flags_bit0",
1624 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1627 { &hf_diameter_3gpp_nor_flags_bit1,
1628 { "SGSN area restricted", "diameter.3gpp.nor_flags_bit1",
1629 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1632 { &hf_diameter_3gpp_nor_flags_bit2,
1633 { "Ready for SM", "diameter.3gpp.nor_flags_bit2",
1634 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1637 { &hf_diameter_3gpp_nor_flags_bit3,
1638 { "UE Reachable", "diameter.3gpp.nor_flags_bit3",
1639 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1642 { &hf_diameter_3gpp_nor_flags_bit4,
1643 { "Delete all APN and PDN GW identity pairs", "diameter.3gpp.nor_flags_bit4",
1644 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1647 { &hf_diameter_3gpp_nor_flags_bit5,
1648 { "UE Reachable from SGSN", "diameter.3gpp.nor_flags_bit5",
1649 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1652 { &hf_diameter_3gpp_nor_flags_bit6,
1653 { "Ready for SM from MME", "diameter.3gpp.nor_flags_bit6",
1654 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1657 { &hf_diameter_3gpp_idr_flags,
1658 { "IDR Flags", "diameter.3gpp.idr_flags",
1659 FT_UINT32, BASE_HEX, NULL, 0x0,
1662 { &hf_diameter_3gpp_idr_flags_bit0,
1663 { "UE Reachability Request", "diameter.3gpp.idr_flags_bit0",
1664 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1667 { &hf_diameter_3gpp_idr_flags_bit1,
1668 { "T-ADS Data Request", "diameter.3gpp.idr_flags_bit1",
1669 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1672 { &hf_diameter_3gpp_idr_flags_bit2,
1673 { "EPS User State Request", "diameter.3gpp.idr_flags_bit2",
1674 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1677 { &hf_diameter_3gpp_idr_flags_bit3,
1678 { "EPS Location Information Request", "diameter.3gpp.idr_flags_bit3",
1679 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1682 { &hf_diameter_3gpp_idr_flags_bit4,
1683 { "Current Location Request", "diameter.3gpp.idr_flags_bit4",
1684 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1687 { &hf_diameter_3gpp_idr_flags_bit5,
1688 { "Local Time Zone Request", "diameter.3gpp.idr_flags_bit5",
1689 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1692 { &hf_diameter_3gpp_idr_flags_bit6,
1693 { "Remove SMS Registration", "diameter.3gpp.idr_flags_bit6",
1694 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1697 { &hf_diameter_3gpp_ipv6addr,
1698 { "IPv6 Address", "diameter.3gpp.ipv6addr",
1699 FT_IPv6, BASE_NONE, NULL, 0x0,
1702 { &hf_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer,
1703 { "Absolute Time of MBMS Data Transfer", "diameter.3gpp.mbms_abs_time_ofmbms_data_tfer",
1704 FT_STRING, BASE_NONE, NULL, 0x0,
1707 { &hf_diameter_3gpp_udp_port ,
1708 { "UDP Port", "diameter.3gpp.udp_port",
1709 FT_UINT8, BASE_DEC, NULL, 0x0,
1714 /* Setup protocol subtree array */
1715 static gint *ett[] = {
1716 &diameter_3gpp_path_ett,
1717 &diameter_3gpp_msisdn_ett,
1718 &diameter_3gpp_uar_flags_ett,
1719 &diameter_3gpp_feature_list_ett,
1720 &diameter_3gpp_tmgi_ett,
1721 &diameter_3gpp_ulr_flags_ett,
1722 &diameter_3gpp_ula_flags_ett,
1723 &diameter_3gpp_dsr_flags_ett,
1724 &diameter_3gpp_dsa_flags_ett,
1725 &diameter_3gpp_ida_flags_ett,
1726 &diameter_3gpp_pua_flags_ett,
1727 &diameter_3gpp_nor_flags_ett,
1728 &diameter_3gpp_idr_flags_ett,
1731 /* Required function calls to register the header fields and subtrees used */
1732 proto_diameter_3gpp = proto_register_protocol("Diameter 3GPP","Diameter3GPP", "diameter.3gpp");
1733 proto_register_field_array(proto_diameter_3gpp, hf, array_length(hf));
1734 proto_register_subtree_array(ett, array_length(ett));