HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-diameter_3gpp.c
blob5bdbbe183f0ecfc30f2b8b7e39c398c78553be28
1 /* packet-diameter_3gpp.c
2 * Routines for dissecting 3GPP OctetSting AVP:s
3 * Copyright 2008, Anders Broman <anders.broman[at]ericsson.com>
5 * $Id$
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 /* This dissector registers a dissector table for 3GPP Vendor specific
27 * AVP:s which will be called from the Diameter dissector to dissect
28 * the content of AVP:s of the OctetString type(or similar).
31 #include "config.h"
33 #include <glib.h>
35 #include <epan/packet.h>
36 #include <epan/asn1.h>
38 #include "packet-diameter.h"
39 #include "packet-gsm_map.h"
40 #include "packet-gsm_a_common.h"
41 #include "packet-e164.h"
42 #include "packet-e212.h"
43 #include "packet-ntp.h"
45 void proto_register_diameter_3gpp(void);
46 void proto_reg_handoff_diameter_3gpp(void);
48 /* Initialize the protocol and registered fields */
49 static int proto_diameter_3gpp = -1;
51 static int hf_diameter_3gpp_visited_nw_id = -1;
52 static int hf_diameter_3gpp_msisdn = -1;
53 static int hf_diameter_3gpp_path = -1;
54 static int hf_diameter_3gpp_contact = -1;
55 /* static int hf_diameter_3gpp_user_data = -1; */
56 static int hf_diameter_3gpp_ipaddr = -1;
57 static int hf_diameter_3gpp_mbms_required_qos_prio = -1;
58 static int hf_diameter_3gpp_tmgi = -1;
59 static int hf_diameter_3gpp_service_ind = -1;
60 static int hf_diameter_mbms_service_id = -1;
61 static int hf_diameter_address_digits = -1;
62 static int hf_diameter_3gpp_spare_bits = -1;
63 static int hf_diameter_3gpp_uar_flags_flags = -1;
64 static int hf_diameter_3gpp_uar_flags_flags_bit0 = -1;
65 static int hf_diameter_3gpp_feature_list_flags = -1;
66 static int hf_diameter_3gpp_feature_list_flags_bit0 = -1;
67 static int hf_diameter_3gpp_feature_list_flags_bit1 = -1;
68 static int hf_diameter_3gpp_feature_list_flags_bit2 = -1;
69 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit0 = -1;
70 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit1 = -1;
71 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit2 = -1;
72 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit3 = -1;
73 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit4 = -1;
74 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit5 = -1;
75 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit6 = -1;
76 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit7 = -1;
77 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit8 = -1;
78 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit9 = -1;
79 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit10 = -1;
80 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit11 = -1;
81 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit12 = -1;
82 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit13 = -1;
83 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit14 = -1;
84 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit15 = -1;
85 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit16 = -1;
86 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit17 = -1;
87 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit18 = -1;
88 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit19 = -1;
89 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit20 = -1;
90 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit21 = -1;
91 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit22 = -1;
92 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit23 = -1;
93 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit24 = -1;
94 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit25 = -1;
95 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit26 = -1;
96 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit27 = -1;
97 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit28 = -1;
98 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit29 = -1;
99 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit30 = -1;
100 static int hf_diameter_3gpp_feature_list1_s6a_flags_bit31 = -1;
101 static int hf_diameter_3gpp_feature_list2_s6a_flags_bit0 = -1;
102 static int hf_diameter_3gpp_feature_list2_s6a_flags_bit1 = -1;
103 static int hf_diameter_3gpp_ulr_flags = -1;
104 static int hf_diameter_3gpp_ulr_flags_bit0 = -1;
105 static int hf_diameter_3gpp_ulr_flags_bit1 = -1;
106 static int hf_diameter_3gpp_ulr_flags_bit2 = -1;
107 static int hf_diameter_3gpp_ulr_flags_bit3 = -1;
108 static int hf_diameter_3gpp_ulr_flags_bit4 = -1;
109 static int hf_diameter_3gpp_ulr_flags_bit5 = -1;
110 static int hf_diameter_3gpp_ulr_flags_bit6 = -1;
111 static int hf_diameter_3gpp_ulr_flags_bit7 = -1;
112 static int hf_diameter_3gpp_ula_flags = -1;
113 static int hf_diameter_3gpp_ula_flags_bit0 = -1;
114 static int hf_diameter_3gpp_dsr_flags = -1;
115 static int hf_diameter_3gpp_dsr_flags_bit0 = -1;
116 static int hf_diameter_3gpp_dsr_flags_bit1 = -1;
117 static int hf_diameter_3gpp_dsr_flags_bit2 = -1;
118 static int hf_diameter_3gpp_dsr_flags_bit3 = -1;
119 static int hf_diameter_3gpp_dsr_flags_bit4 = -1;
120 static int hf_diameter_3gpp_dsr_flags_bit5 = -1;
121 static int hf_diameter_3gpp_dsr_flags_bit6 = -1;
122 static int hf_diameter_3gpp_dsr_flags_bit7 = -1;
123 static int hf_diameter_3gpp_dsr_flags_bit8 = -1;
124 static int hf_diameter_3gpp_dsr_flags_bit9 = -1;
125 static int hf_diameter_3gpp_dsr_flags_bit10 = -1;
126 static int hf_diameter_3gpp_dsr_flags_bit11 = -1;
127 static int hf_diameter_3gpp_dsr_flags_bit12 = -1;
128 static int hf_diameter_3gpp_dsr_flags_bit13 = -1;
129 static int hf_diameter_3gpp_dsr_flags_bit14 = -1;
130 static int hf_diameter_3gpp_dsr_flags_bit15 = -1;
131 static int hf_diameter_3gpp_dsr_flags_bit16 = -1;
132 static int hf_diameter_3gpp_dsa_flags = -1;
133 static int hf_diameter_3gpp_dsa_flags_bit0 = -1;
134 static int hf_diameter_3gpp_ida_flags = -1;
135 static int hf_diameter_3gpp_ida_flags_bit0 = -1;
136 static int hf_diameter_3gpp_pua_flags = -1;
137 static int hf_diameter_3gpp_pua_flags_bit0 = -1;
138 static int hf_diameter_3gpp_pua_flags_bit1 = -1;
139 static int hf_diameter_3gpp_nor_flags = -1;
140 static int hf_diameter_3gpp_nor_flags_bit0 = -1;
141 static int hf_diameter_3gpp_nor_flags_bit1 = -1;
142 static int hf_diameter_3gpp_nor_flags_bit2 = -1;
143 static int hf_diameter_3gpp_nor_flags_bit3 = -1;
144 static int hf_diameter_3gpp_nor_flags_bit4 = -1;
145 static int hf_diameter_3gpp_nor_flags_bit5 = -1;
146 static int hf_diameter_3gpp_nor_flags_bit6 = -1;
147 static int hf_diameter_3gpp_idr_flags = -1;
148 static int hf_diameter_3gpp_idr_flags_bit0 = -1;
149 static int hf_diameter_3gpp_idr_flags_bit1 = -1;
150 static int hf_diameter_3gpp_idr_flags_bit2 = -1;
151 static int hf_diameter_3gpp_idr_flags_bit3 = -1;
152 static int hf_diameter_3gpp_idr_flags_bit4 = -1;
153 static int hf_diameter_3gpp_idr_flags_bit5 = -1;
154 static int hf_diameter_3gpp_idr_flags_bit6 = -1;
155 static int hf_diameter_3gpp_ipv6addr = -1;
156 static int hf_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer = -1;
157 static int hf_diameter_3gpp_udp_port = -1;
158 static gint diameter_3gpp_path_ett = -1;
159 static gint diameter_3gpp_msisdn_ett = -1;
160 static gint diameter_3gpp_feature_list_ett = -1;
161 static gint diameter_3gpp_uar_flags_ett = -1;
162 static gint diameter_3gpp_tmgi_ett = -1;
163 static gint diameter_3gpp_ulr_flags_ett = -1;
164 static gint diameter_3gpp_ula_flags_ett = -1;
165 static gint diameter_3gpp_dsr_flags_ett = -1;
166 static gint diameter_3gpp_dsa_flags_ett = -1;
167 static gint diameter_3gpp_ida_flags_ett = -1;
168 static gint diameter_3gpp_pua_flags_ett = -1;
169 static gint diameter_3gpp_nor_flags_ett = -1;
170 static gint diameter_3gpp_idr_flags_ett = -1;
172 /* Dissector handles */
173 static dissector_handle_t xml_handle;
175 /* AVP Code: 23 3GPP-MS-TimeZone
176 * 3GPP TS 29.061
178 static const value_string daylight_saving_time_vals[] = {
179 {0, "No adjustment"},
180 {1, "+1 hour adjustment for Daylight Saving Time"},
181 {2, "+2 hours adjustment for Daylight Saving Time"},
182 {3, "Reserved"},
183 {0, NULL}
186 static int
187 dissect_diameter_3gpp_ms_timezone(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
189 int offset = 0;
190 guint8 oct;
191 char sign;
193 /* 3GPP TS 23.040 version 6.6.0 Release 6
194 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
196 * The Time Zone indicates the difference, expressed in quarters of an hour,
197 * between the local time and GMT. In the first of the two semi-octets,
198 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
199 * represents the algebraic sign of this difference (0: positive, 1: negative).
202 oct = tvb_get_guint8(tvb, offset);
203 sign = (oct & 0x08) ? '-' : '+';
204 oct = (oct >> 4) + (oct & 0x07) * 10;
206 proto_tree_add_text(tree, tvb, offset, 1, "Timezone: GMT %c %d hours %d minutes", sign, oct / 4, oct % 4 * 15);
207 offset++;
209 oct = tvb_get_guint8(tvb, offset) & 0x3;
210 proto_tree_add_text(tree, tvb, offset, 1, "%s", val_to_str_const(oct, daylight_saving_time_vals, "Unknown"));
211 offset++;
213 return offset;
216 /* AVP Code: 917 MBMS-GGSN-IPv6-Address */
217 static int
218 dissect_diameter_3gpp_ipv6addr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
220 int offset = 0;
222 proto_tree_add_item(tree, hf_diameter_3gpp_ipv6addr, tvb, offset, 16, ENC_NA);
224 offset += 16;
226 return offset;
229 /* AVP Code: 15 3GPP-SGSN-IPv6-Address */
230 static int
231 dissect_diameter_3gpp_sgsn_ipv6_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
233 /* 3GPP AVP code 15 has a conflict between imscxdx.xml (where the AVP
234 * contains an Unsigned32 enum) and TGPPGmb.xml (where the AVP contains
235 * an OctetString IPv6 address). This function decodes the latter; we
236 * (silently) abort dissection if the length is 4 on the assumption that
237 * the old IMS AVP is what we're decoding.
239 if (tvb_reported_length(tvb) == 4)
240 return 4;
242 return dissect_diameter_3gpp_ipv6addr(tvb, pinfo, tree, data);
246 /* AVP Code: 600 Visited-Network-Identifier
247 * imscxdx.xml
248 * 6.3.1 Visited-Network-Identifier AVP
249 * The Visited-Network-Identifier AVP is of type OctetString. This AVP contains an identifier that helps the home
250 * network to identify the visited network (e.g. the visited network domain name).
253 static int
254 dissect_diameter_3gpp_visited_nw_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
256 proto_item* item;
257 int offset = 0, i;
258 int length = tvb_length(tvb);
260 for(i = 0; i < length; i++)
261 if(!g_ascii_isprint(tvb_get_guint8(tvb, i)))
262 return length;
264 item = proto_tree_add_item(tree, hf_diameter_3gpp_visited_nw_id, tvb, offset, length, ENC_ASCII|ENC_NA);
265 PROTO_ITEM_SET_GENERATED(item);
268 return length;
271 /* AVP Code: 629 Feature-List-id
272 * Feature list Id is neede to dissect Feature list in S6a/S6d application
273 * Ref 3GPP TS 29.272
276 static int
277 dissect_diameter_3gpp_feature_list_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void *data)
279 diam_sub_dis_t *diam_sub_dis_inf = (diam_sub_dis_t*)data;
281 if(diam_sub_dis_inf){
282 diam_sub_dis_inf->feature_list_id = tvb_get_ntohl(tvb,0);
285 return 4;
288 /* AVP Code: 637 UAR-Flags
289 * imscxdx.xml
290 * IMS Cx Dx AVPS 3GPP TS 29.229
293 static int
294 dissect_diameter_3gpp_uar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
296 proto_item* item;
297 proto_tree *sub_tree;
298 int offset = 0;
299 guint32 bit_offset;
301 item = proto_tree_add_item(tree, hf_diameter_3gpp_uar_flags_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
302 sub_tree = proto_item_add_subtree(item, diameter_3gpp_uar_flags_ett);
304 bit_offset = 0;
305 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
306 bit_offset+=31;
307 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_uar_flags_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
308 bit_offset++;
310 offset = bit_offset>>3;
312 return offset;
315 /* AVP Code: 630 Feature-List
316 * Interpretation depends on Application Id
317 * imscxdx.xml
318 * IMS Cx Dx AVPS 3GPP TS 29.229
321 static int
322 dissect_diameter_3gpp_feature_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data) {
324 proto_item* item;
325 proto_tree *sub_tree;
326 int offset = 0;
327 guint32 bit_offset, application_id = 0, feature_list_id = 0;
328 diam_sub_dis_t *diam_sub_dis_inf = (diam_sub_dis_t*)data;
330 item = proto_tree_add_item(tree, hf_diameter_3gpp_feature_list_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
331 sub_tree = proto_item_add_subtree(item, diameter_3gpp_feature_list_ett);
333 if(diam_sub_dis_inf){
334 application_id = diam_sub_dis_inf->application_id;
335 feature_list_id = diam_sub_dis_inf->feature_list_id;
337 bit_offset = 0;
338 if(application_id == 16777216){
339 /* ApplicationId: 3GPP Cx (16777216) */
340 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 29, ENC_BIG_ENDIAN);
341 bit_offset+=29;
342 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
343 bit_offset++;
344 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
345 bit_offset++;
346 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
347 bit_offset++;
349 /*offset = bit_offset>>3;*/
350 }else if(application_id == 16777251){
351 /* ApplicationId: 3GPP S6a/S6d */
352 if(feature_list_id == 1){
353 /* 3GPP TS 29.272 Table 7.3.10/1: Features of Feature-List-ID 1 used in S6a/S6d */
354 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit31, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
355 bit_offset++;
356 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit30, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
357 bit_offset++;
358 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit29, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
359 bit_offset++;
360 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit28, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
361 bit_offset++;
362 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit27, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
363 bit_offset++;
364 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit26, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
365 bit_offset++;
366 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit25, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
367 bit_offset++;
368 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit24, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
369 bit_offset++;
370 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit23, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
371 bit_offset++;
372 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit22, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
373 bit_offset++;
374 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit21, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
375 bit_offset++;
376 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit20, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
377 bit_offset++;
378 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit19, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
379 bit_offset++;
380 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit18, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
381 bit_offset++;
382 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit17, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
383 bit_offset++;
384 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit16, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
385 bit_offset++;
386 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit15, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
387 bit_offset++;
388 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit14, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
389 bit_offset++;
390 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit13, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
391 bit_offset++;
392 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit12, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
393 bit_offset++;
394 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit11, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
395 bit_offset++;
396 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit10, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
397 bit_offset++;
398 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit9, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
399 bit_offset++;
400 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit8, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
401 bit_offset++;
402 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit7, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
403 bit_offset++;
404 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
405 bit_offset++;
406 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
407 bit_offset++;
408 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
409 bit_offset++;
410 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
411 bit_offset++;
412 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
413 bit_offset++;
414 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
415 bit_offset++;
416 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list1_s6a_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
417 }else if(feature_list_id == 2){
418 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 30, ENC_BIG_ENDIAN);
419 bit_offset+=30;
420 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list2_s6a_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
421 bit_offset++;
422 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_feature_list2_s6a_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
425 return 4;
429 /* AVP Code: 640 Path
430 * imscxdx.xml
431 * IMS Cx Dx AVPS 3GPP TS 29.229
432 * 6.3.47 Path AVP
433 * The Path AVP is of type OctetString and it contains a comma separated list of SIP proxies in the Path header as defined
434 * in IETF RFC 3327 [17].
436 static int
437 dissect_diameter_3gpp_path(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
439 proto_item* item;
440 proto_tree *sub_tree;
441 int offset = 0, comma_offset;
442 int end_offset = tvb_length(tvb) - 1;
444 item = proto_tree_add_text(tree, tvb, offset, -1,"Paths");
445 sub_tree = proto_item_add_subtree(item,diameter_3gpp_path_ett);
447 while (offset < end_offset){
448 comma_offset = tvb_find_guint8(tvb, offset, -1, ',');
449 if(comma_offset == -1){
450 proto_tree_add_item(sub_tree, hf_diameter_3gpp_path, tvb, offset, comma_offset, ENC_ASCII|ENC_NA);
451 return end_offset;
453 proto_tree_add_item(sub_tree, hf_diameter_3gpp_path, tvb, offset, comma_offset, ENC_ASCII|ENC_NA);
454 offset = comma_offset+1;
458 return tvb_length(tvb);
461 /* AVP Code: 641 Contact
462 * imscxdx.xml
463 * IMS Cx Dx AVPS 3GPP TS 29.229
464 * 6.3.48 Contact AVP
465 * The Contact AVP is of type OctetString and it contains the Contact Addresses and Parameters in the Contact header as
466 * defined in IETF RFC 3261.
468 static int
469 dissect_diameter_3gpp_contact(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
471 proto_item* item;
472 int offset = 0;
474 item = proto_tree_add_item(tree, hf_diameter_3gpp_contact, tvb, offset, -1, ENC_ASCII|ENC_NA);
475 PROTO_ITEM_SET_GENERATED(item);
477 return tvb_length(tvb);
480 /* AVP Code: 701 MSISDN */
481 static int
482 dissect_diameter_3gpp_msisdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
484 proto_item* item;
485 proto_tree *sub_tree;
486 int offset = 0;
487 const char *digit_str;
488 int length = tvb_length(tvb);
490 item = proto_tree_add_item(tree, hf_diameter_3gpp_msisdn, tvb, offset, length, ENC_NA);
491 sub_tree = proto_item_add_subtree(item,diameter_3gpp_msisdn_ett);
493 dissect_e164_cc(tvb, sub_tree, offset, TRUE);
495 digit_str = unpack_digits(tvb, 1);
496 proto_tree_add_string(sub_tree, hf_diameter_address_digits, tvb, 1, -1, digit_str);
498 return tvb_length(tvb);
502 /* AVP Code: 702 User-Data
503 * TGPPSh.xml
504 * The AVP codes from 709 to799 are reserved for TS 29.329
506 /* AVP Code: 606 User-Data
507 * imscxdx.xml
508 * IMS Cx Dx AVPS 3GPP TS 29.229
510 static int
511 dissect_diameter_3gpp_user_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
513 guint8 word[6];
514 int length = tvb_length(tvb);
516 /* If there is less than 38 characters this is not XML
517 * <?xml version="1.0" encoding="UTF-8"?>
519 if(length < 38)
520 return length;
522 tvb_get_nstringz0(tvb, 0, sizeof(word),word);
523 if (g_ascii_strncasecmp(word, "<?xml", 5) == 0){
524 call_dissector(xml_handle, tvb, pinfo, tree);
527 return length;
532 * AVP Code: 704 Service-Indication
534 static int
535 dissect_diameter_3gpp_service_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
537 proto_item* item;
538 int offset = 0, i;
539 int length = tvb_length(tvb);
541 for(i = 0; i < length; i++)
542 if(!g_ascii_isprint(tvb_get_guint8(tvb, i)))
543 return length;
545 item = proto_tree_add_item(tree, hf_diameter_3gpp_service_ind, tvb, offset, length, ENC_ASCII|ENC_NA);
546 PROTO_ITEM_SET_GENERATED(item);
548 return length;
551 /* AVP Code: 900 TMGI */
552 static int
553 dissect_diameter_3gpp_tmgi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
555 proto_item* item;
556 proto_tree *sub_tree;
557 int offset = 0;
559 item = proto_tree_add_item(tree, hf_diameter_3gpp_tmgi, tvb, offset, 6, ENC_NA);
560 sub_tree = proto_item_add_subtree(item,diameter_3gpp_tmgi_ett);
562 /* MBMS Service ID consisting of three octets. MBMS Service ID consists of a 6-digit
563 * fixed-length hexadecimal number between 000000 and FFFFFF.
564 * MBMS Service ID uniquely identifies an MBMS bearer service within a PLMN.
567 proto_tree_add_item(sub_tree, hf_diameter_mbms_service_id, tvb, offset, 3, ENC_BIG_ENDIAN);
568 offset = offset+3;
569 offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, offset, TRUE);
571 return offset;
575 /* AVP Code: 903 MBMS-Service-Area */
577 /* AVP Code: 918 MBMS-BMSC-SSM-IP-Address */
578 static int
579 dissect_diameter_3gpp_ipaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
581 int offset = 0;
583 proto_tree_add_item(tree, hf_diameter_3gpp_ipaddr, tvb, offset, 4, ENC_BIG_ENDIAN);
584 offset += 4;
586 return offset;
590 /* AVP Code: 913 MBMS-Required-QoS */
591 static int
592 dissect_diameter_3gpp_mbms_required_qos(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) {
594 int offset = 0;
595 guint length;
597 /* Octet
598 * 1 Allocation/Retention Priority as specified in 3GPP TS 23.107.
599 * This octet encodes each priority level defined in 3GPP TS 23.107
600 * as the binary value of the priority level. It specifies the relative
601 * importance of the actual MBMS bearer service compared to other MBMS
602 * and non-MBMS bearer services for allocation and retention of the
603 * MBMS bearer service.
604 * 2-N QoS Profile as specified by the Quality-of-Service information element,
605 * from octet 3 onwards, in 3GPP TS 24.008
607 proto_tree_add_item(tree, hf_diameter_3gpp_mbms_required_qos_prio, tvb, offset, 1, ENC_BIG_ENDIAN);
608 offset++;
609 length = tvb_length(tvb) - 1;
610 de_sm_qos(tvb, tree, pinfo, offset,length, NULL, 0);
611 return offset+length;
615 /* AVP Code: 926 MBMS-BMSC-SSM-UDP-Port */
616 /* AVP Code: 927 MBMS-GW-UDP-Port */
617 static int
618 dissect_diameter_3gpp_udp_port(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
620 int offset = 0;
622 proto_tree_add_item(tree, hf_diameter_3gpp_udp_port, tvb, offset, 1, ENC_BIG_ENDIAN);
624 offset += 1;
626 return offset;
629 /* AVP Code: 929 MBMS-Data-Transfer-Start */
630 /* AVP Code: 930 MBMS-Data-Transfer-Stop */
631 static int
632 dissect_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
634 int offset = 0;
635 const gchar *time_str;
637 time_str = tvb_ntp_fmt_ts(tvb, offset);
638 proto_tree_add_string(tree, hf_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer, tvb, offset, 8, time_str);
639 offset+=8;
641 return offset;
644 /* 3GPP TS 29.272
645 * 7.3.7 ULR-Flags
646 * AVP Code: 1405 ULR-Flags
648 static int
649 dissect_diameter_3gpp_ulr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
651 proto_item* item;
652 proto_tree *sub_tree;
653 int offset = 0;
654 guint32 bit_offset;
656 item = proto_tree_add_item(tree, hf_diameter_3gpp_ulr_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
657 sub_tree = proto_item_add_subtree(item, diameter_3gpp_ulr_flags_ett);
658 bit_offset = 0;
659 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 24, ENC_BIG_ENDIAN);
660 bit_offset+=24;
661 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit7, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
662 bit_offset++;
663 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
664 bit_offset++;
665 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
666 bit_offset++;
667 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
668 bit_offset++;
669 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
670 bit_offset++;
671 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
672 bit_offset++;
673 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
674 bit_offset++;
675 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ulr_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
676 bit_offset++;
678 offset = bit_offset>>3;
679 return offset;
683 /* AVP Code: 1406 ULA-Flags */
684 static int
685 dissect_diameter_3gpp_ula_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
687 proto_item* item;
688 proto_tree *sub_tree;
689 int offset = 0;
690 guint32 bit_offset;
692 item = proto_tree_add_item(tree, hf_diameter_3gpp_ula_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
693 sub_tree = proto_item_add_subtree(item, diameter_3gpp_ula_flags_ett);
694 bit_offset = 0;
695 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
696 bit_offset+=31;
697 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ula_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
698 bit_offset++;
700 offset = bit_offset>>3;
701 return offset;
706 * 3GPP TS 29.272
707 * 7.3.25 DSR-Flags
708 * AVP Code: 1421 DSR-Flags
710 static int
711 dissect_diameter_3gpp_dsr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
713 proto_item* item;
714 proto_tree *sub_tree;
715 int offset = 0;
716 guint32 bit_offset;
718 item = proto_tree_add_item(tree, hf_diameter_3gpp_dsr_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
719 sub_tree = proto_item_add_subtree(item, diameter_3gpp_dsr_flags_ett);
720 bit_offset = 0;
721 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 15, ENC_BIG_ENDIAN);
722 bit_offset+=15;
723 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit16, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
724 bit_offset++;
725 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit15, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
726 bit_offset++;
727 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit14, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
728 bit_offset++;
729 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit13, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
730 bit_offset++;
731 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit12, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
732 bit_offset++;
733 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit11, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
734 bit_offset++;
735 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit10, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
736 bit_offset++;
737 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit9, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
738 bit_offset++;
739 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit8, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
740 bit_offset++;
741 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit7, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
742 bit_offset++;
743 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
744 bit_offset++;
745 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
746 bit_offset++;
747 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
748 bit_offset++;
749 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
750 bit_offset++;
751 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
752 bit_offset++;
753 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
754 bit_offset++;
755 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsr_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
756 bit_offset++;
758 offset = bit_offset>>3;
759 return offset;
763 /* AVP Code: 1422 DSA-Flags */
764 static int
765 dissect_diameter_3gpp_dsa_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
767 proto_item* item;
768 proto_tree *sub_tree;
769 int offset = 0;
770 guint32 bit_offset;
772 item = proto_tree_add_item(tree, hf_diameter_3gpp_dsa_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
773 sub_tree = proto_item_add_subtree(item, diameter_3gpp_dsa_flags_ett);
774 bit_offset = 0;
775 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
776 bit_offset+=31;
777 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_dsa_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
778 bit_offset++;
780 offset = bit_offset>>3;
781 return offset;
785 /* AVP Code: 1441 IDA-Flags */
786 static int
787 dissect_diameter_3gpp_ida_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
789 proto_item* item;
790 proto_tree *sub_tree;
791 int offset = 0;
792 guint32 bit_offset;
794 item = proto_tree_add_item(tree, hf_diameter_3gpp_ida_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
795 sub_tree = proto_item_add_subtree(item, diameter_3gpp_ida_flags_ett);
796 bit_offset = 0;
797 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 31, ENC_BIG_ENDIAN);
798 bit_offset+=31;
799 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_ida_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
800 bit_offset++;
802 offset = bit_offset>>3;
803 return offset;
807 /* AVP Code: 1442 PUA-Flags */
808 static int
809 dissect_diameter_3gpp_pua_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
811 proto_item* item;
812 proto_tree *sub_tree;
813 int offset = 0;
814 guint32 bit_offset;
816 item = proto_tree_add_item(tree, hf_diameter_3gpp_pua_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
817 sub_tree = proto_item_add_subtree(item, diameter_3gpp_pua_flags_ett);
818 bit_offset = 0;
819 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 30, ENC_BIG_ENDIAN);
820 bit_offset+=30;
821 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_pua_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
822 bit_offset++;
823 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_pua_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
824 bit_offset++;
826 offset = bit_offset>>3;
827 return offset;
832 /* AVP Code: 1443 NOR-Flags */
833 static int
834 dissect_diameter_3gpp_nor_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
836 proto_item* item;
837 proto_tree *sub_tree;
838 int offset = 0;
839 guint32 bit_offset;
841 item = proto_tree_add_item(tree, hf_diameter_3gpp_nor_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
842 sub_tree = proto_item_add_subtree(item, diameter_3gpp_nor_flags_ett);
843 bit_offset = 0;
844 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 25, ENC_BIG_ENDIAN);
845 bit_offset+=25;
846 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
847 bit_offset++;
848 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
849 bit_offset++;
850 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
851 bit_offset++;
852 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
853 bit_offset++;
854 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
855 bit_offset++;
856 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
857 bit_offset++;
858 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_nor_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
859 bit_offset++;
861 offset = bit_offset>>3;
862 return offset;
866 /* AVP Code: 1490 IDR-Flags */
867 static int
868 dissect_diameter_3gpp_idr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) {
870 proto_item* item;
871 proto_tree *sub_tree;
872 int offset = 0;
873 guint32 bit_offset;
875 item = proto_tree_add_item(tree, hf_diameter_3gpp_idr_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
876 sub_tree = proto_item_add_subtree(item, diameter_3gpp_idr_flags_ett);
877 bit_offset = 0;
878 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_spare_bits, tvb, bit_offset, 25, ENC_BIG_ENDIAN);
879 bit_offset+=25;
880 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit6, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
881 bit_offset++;
882 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit5, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
883 bit_offset++;
884 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit4, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
885 bit_offset++;
886 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit3, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
887 bit_offset++;
888 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
889 bit_offset++;
890 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit1, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
891 bit_offset++;
892 proto_tree_add_bits_item(sub_tree, hf_diameter_3gpp_idr_flags_bit0, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
893 bit_offset++;
895 offset = bit_offset>>3;
896 return offset;
900 void
901 proto_reg_handoff_diameter_3gpp(void)
904 /* AVP Code: 5 3GPP-GPRS Negotiated QoS profile */
905 /* Registered by packet-gtp.c */
907 /* AVP Code: 15 3GPP-SGSN-IPv6-Address */
908 dissector_add_uint("diameter.3gpp", 15, new_create_dissector_handle(dissect_diameter_3gpp_sgsn_ipv6_address, proto_diameter_3gpp));
910 /* AVP Code: 22 3GPP-User-Location-Info
911 * Registered by packet-gtpv2.c
914 /* AVP Code: 23 3GPP-MS-TimeZone */
915 dissector_add_uint("diameter.3gpp", 23, new_create_dissector_handle(dissect_diameter_3gpp_ms_timezone, proto_diameter_3gpp));
917 /* AVP Code: 600 Visited-Network-Identifier */
918 dissector_add_uint("diameter.3gpp", 600, new_create_dissector_handle(dissect_diameter_3gpp_visited_nw_id, proto_diameter_3gpp));
920 /* AVP Code: 606 User-Data */
921 dissector_add_uint("diameter.3gpp", 606, new_create_dissector_handle(dissect_diameter_3gpp_user_data, proto_diameter_3gpp));
923 /* AVP Code: 629 Feature-List */
924 dissector_add_uint("diameter.3gpp", 629, new_create_dissector_handle(dissect_diameter_3gpp_feature_list_id, proto_diameter_3gpp));
926 /* AVP Code: 630 Feature-List */
927 dissector_add_uint("diameter.3gpp", 630, new_create_dissector_handle(dissect_diameter_3gpp_feature_list, proto_diameter_3gpp));
929 /* AVP Code: 637 UAR-Flags */
930 dissector_add_uint("diameter.3gpp", 637, new_create_dissector_handle(dissect_diameter_3gpp_uar_flags, proto_diameter_3gpp));
932 /* AVP Code: 640 Path */
933 dissector_add_uint("diameter.3gpp", 640, new_create_dissector_handle(dissect_diameter_3gpp_path, proto_diameter_3gpp));
935 /* AVP Code: 641 Contact */
936 dissector_add_uint("diameter.3gpp", 641, new_create_dissector_handle(dissect_diameter_3gpp_contact, proto_diameter_3gpp));
938 /* AVP Code: 701 MSISDN */
939 dissector_add_uint("diameter.3gpp", 701, new_create_dissector_handle(dissect_diameter_3gpp_msisdn, proto_diameter_3gpp));
941 /* AVP Code: 702 User-Data */
942 dissector_add_uint("diameter.3gpp", 702, new_create_dissector_handle(dissect_diameter_3gpp_user_data, proto_diameter_3gpp));
944 /* AVP Code: 704 Service-Indication */
945 dissector_add_uint("diameter.3gpp", 704, new_create_dissector_handle(dissect_diameter_3gpp_service_ind, proto_diameter_3gpp));
947 /* AVP Code: 900 TMGI */
948 dissector_add_uint("diameter.3gpp", 900, new_create_dissector_handle(dissect_diameter_3gpp_tmgi, proto_diameter_3gpp));
950 /* AVP Code: 904 MBMS-Session-Duration Registered by packet-gtp.c */
951 /* AVP Code: 903 MBMS-Service-Area Registered by packet-gtp.c */
953 /* AVP Code: 911 MBMS-Time-To-Data-Transfer Registered by packet-gtp.c */
954 /* Registered by packet-gtp.c */
956 /* AVP Code: 913 MBMS-Required-QoS */
957 dissector_add_uint("diameter.3gpp", 913, new_create_dissector_handle(dissect_diameter_3gpp_mbms_required_qos, proto_diameter_3gpp));
959 /* AVP Code: 917 MBMS-GGSN-IPv6-Address */
960 dissector_add_uint("diameter.3gpp", 917, new_create_dissector_handle(dissect_diameter_3gpp_ipv6addr, proto_diameter_3gpp));
962 /* AVP Code: 918 MBMS-BMSC-SSM-IP-Address */
963 dissector_add_uint("diameter.3gpp", 918, new_create_dissector_handle(dissect_diameter_3gpp_ipaddr, proto_diameter_3gpp));
965 /* AVP Code: 926 MBMS-BMSC-SSM-UDP-Port */
966 /* AVP Code: 927 MBMS-GW-UDP-Port */
967 dissector_add_uint("diameter.3gpp", 926, new_create_dissector_handle(dissect_diameter_3gpp_udp_port, proto_diameter_3gpp));
968 dissector_add_uint("diameter.3gpp", 927, new_create_dissector_handle(dissect_diameter_3gpp_udp_port, proto_diameter_3gpp));
970 /* AVP Code: 929 MBMS-Data-Transfer-Start */
971 dissector_add_uint("diameter.3gpp", 929, new_create_dissector_handle(dissect_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer, proto_diameter_3gpp));
973 /* AVP Code: 930 MBMS-Data-Transfer-Stop */
974 dissector_add_uint("diameter.3gpp", 930, new_create_dissector_handle(dissect_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer, proto_diameter_3gpp));
976 /* AVP Code: 1405 ULR-Flags */
977 dissector_add_uint("diameter.3gpp", 1405, new_create_dissector_handle(dissect_diameter_3gpp_ulr_flags, proto_diameter_3gpp));
979 /* AVP Code: 1406 ULA-Flags */
980 dissector_add_uint("diameter.3gpp", 1406, new_create_dissector_handle(dissect_diameter_3gpp_ula_flags, proto_diameter_3gpp));
982 /* AVP Code: 1421 DSR-Flags */
983 dissector_add_uint("diameter.3gpp", 1421, new_create_dissector_handle(dissect_diameter_3gpp_dsr_flags, proto_diameter_3gpp));
985 /* AVP Code: 1422 DSA-Flags */
986 dissector_add_uint("diameter.3gpp", 1422, new_create_dissector_handle(dissect_diameter_3gpp_dsa_flags, proto_diameter_3gpp));
988 /* AVP Code: 1441 IDA-Flags */
989 dissector_add_uint("diameter.3gpp", 1441, new_create_dissector_handle(dissect_diameter_3gpp_ida_flags, proto_diameter_3gpp));
991 /* AVP Code: 1442 PUA-Flags */
992 dissector_add_uint("diameter.3gpp", 1442, new_create_dissector_handle(dissect_diameter_3gpp_pua_flags, proto_diameter_3gpp));
994 /* AVP Code: 1443 NOR-Flags */
995 dissector_add_uint("diameter.3gpp", 1443, new_create_dissector_handle(dissect_diameter_3gpp_nor_flags, proto_diameter_3gpp));
997 /* AVP Code: 1490 IDR-Flags */
998 dissector_add_uint("diameter.3gpp", 1490, new_create_dissector_handle(dissect_diameter_3gpp_idr_flags, proto_diameter_3gpp));
1000 xml_handle = find_dissector("xml");
1003 void
1004 proto_register_diameter_3gpp(void)
1007 /* Setup list of header fields See Section 1.6.1 for details*/
1008 static hf_register_info hf[] = {
1009 { &hf_diameter_3gpp_path,
1010 { "Path", "diameter.3gpp.path",
1011 FT_STRING, BASE_NONE, NULL, 0x0,
1012 NULL, HFILL }
1014 { &hf_diameter_3gpp_contact,
1015 { "Contact", "diameter.3gpp.contact",
1016 FT_STRING, BASE_NONE, NULL, 0x0,
1017 NULL, HFILL }
1019 { &hf_diameter_3gpp_visited_nw_id,
1020 { "Visited-Network-Identifier", "diameter.3gpp.visited_nw_id",
1021 FT_STRING, BASE_NONE, NULL, 0x0,
1022 NULL, HFILL }
1024 { &hf_diameter_3gpp_msisdn,
1025 { "MSISDN", "diameter.3gpp.msisdn",
1026 FT_BYTES, BASE_NONE, NULL, 0x0,
1027 NULL, HFILL }
1029 #if 0
1030 { &hf_diameter_3gpp_user_data,
1031 { "User data", "diameter.3gpp.user_data",
1032 FT_STRING, BASE_NONE, NULL, 0x0,
1033 NULL, HFILL }
1035 #endif
1036 { &hf_diameter_3gpp_ipaddr,
1037 { "IPv4 Address", "diameter.3gpp.ipaddr",
1038 FT_IPv4, BASE_NONE, NULL, 0x0,
1039 NULL, HFILL }
1041 { &hf_diameter_3gpp_mbms_required_qos_prio,
1042 { "Allocation/Retention Priority", "diameter.3gpp.mbms_required_qos_prio",
1043 FT_UINT8, BASE_DEC, NULL, 0x0,
1044 NULL, HFILL }
1046 { &hf_diameter_3gpp_tmgi,
1047 { "TMGI", "diameter.3gpp.tmgi",
1048 FT_BYTES, BASE_NONE, NULL, 0x0,
1049 NULL, HFILL }
1051 { &hf_diameter_3gpp_service_ind,
1052 { "Service-Indication", "diameter.3gpp.service_ind",
1053 FT_STRING, BASE_NONE, NULL, 0x0,
1054 NULL, HFILL }
1056 { &hf_diameter_mbms_service_id,
1057 { "MBMS Service ID", "diameter.3gpp.mbms_service_id",
1058 FT_UINT24, BASE_HEX, NULL, 0x0,
1059 NULL, HFILL }
1061 { &hf_diameter_address_digits,
1062 { "Address digits", "diameter.3gpp.address_digits",
1063 FT_STRING, BASE_NONE, NULL, 0x0,
1064 NULL, HFILL }
1066 { &hf_diameter_3gpp_spare_bits,
1067 { "Spare bit(s)", "diameter.3gpp.spare_bits",
1068 FT_UINT32, BASE_HEX, NULL, 0x0,
1069 NULL, HFILL }
1071 { &hf_diameter_3gpp_uar_flags_flags,
1072 { "Flags", "diameter.3gpp.uar_flags_flags",
1073 FT_UINT32, BASE_HEX, NULL, 0x0,
1074 NULL, HFILL }
1076 { &hf_diameter_3gpp_uar_flags_flags_bit0,
1077 { "Emergency registration", "diameter.3gpp.uar_flags_flags_bit0",
1078 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1079 NULL, HFILL }
1081 { &hf_diameter_3gpp_feature_list_flags,
1082 { "Feature-List Flags", "diameter.3gpp.feature_list_flags",
1083 FT_UINT32, BASE_HEX, NULL, 0x0,
1084 NULL, HFILL }
1086 { &hf_diameter_3gpp_feature_list_flags_bit0,
1087 { "Shared IFC Sets", "diameter.3gpp.feature_list_flags_bit0",
1088 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1089 NULL, HFILL }
1091 { &hf_diameter_3gpp_feature_list_flags_bit1,
1092 { "Alias Indication", "diameter.3gpp.feature_list_flags_bit1",
1093 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1094 NULL, HFILL }
1096 { &hf_diameter_3gpp_feature_list_flags_bit2,
1097 { "IMS Restoration Indication", "diameter.3gpp.feature_list_flags_bit2",
1098 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1099 NULL, HFILL }
1101 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit0,
1102 { "Operator Determined Barring of all Packet Oriented Services", "diameter.3gpp.feature_list1_s6a_flags_bit0",
1103 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1104 NULL, HFILL }
1106 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit1,
1107 { "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",
1108 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1109 NULL, HFILL }
1111 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit2,
1112 { "Operator Determined Barring of Packet Oriented Services from access points that are within the roamed to VPLMN", "diameter.3gpp.feature_list1_s6a_flags_bit2",
1113 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1114 NULL, HFILL }
1116 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit3,
1117 { "Operator Determined Barring of all outgoing calls", "diameter.3gpp.feature_list1_s6a_flags_bit3",
1118 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1119 NULL, HFILL }
1121 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit4,
1122 { "Operator Determined Barring of all outgoing international calls", "diameter.3gpp.feature_list1_s6a_flags_bit4",
1123 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1124 NULL, HFILL }
1126 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit5,
1127 { "Operator Determined Barring of all outgoing international calls except those directed to the home PLMN country", "diameter.3gpp.feature_list1_s6a_flags_bit5",
1128 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1129 NULL, HFILL }
1131 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit6,
1132 { "Operator Determined Barring of all outgoing inter-zonal calls", "diameter.3gpp.feature_list1_s6a_flags_bit6",
1133 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1134 NULL, HFILL }
1136 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit7,
1137 { "Operator Determined Barring of all outgoing inter-zonal calls except those directed to the home PLMN country", "diameter.3gpp.feature_list1_s6a_flags_bit7",
1138 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1139 NULL, HFILL }
1141 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit8,
1142 { "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",
1143 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1144 NULL, HFILL }
1146 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit9,
1147 { "Regional Subscription", "diameter.3gpp.feature_list1_s6a_flags_bit9",
1148 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1149 NULL, HFILL }
1152 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit10,
1153 { "Trace Function", "diameter.3gpp.feature_list1_s6a_flags_bit10",
1154 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1155 NULL, HFILL }
1157 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit11,
1158 { "All LCS Privacy Exception Classes", "diameter.3gpp.feature_list1_s6a_flags_bit11",
1159 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1160 NULL, HFILL }
1162 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit12,
1163 { "Allow location by any LCS client", "diameter.3gpp.feature_list1_s6a_flags_bit12",
1164 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1165 NULL, HFILL }
1167 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit13,
1168 { "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",
1169 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1170 NULL, HFILL }
1172 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit14,
1173 { "Allow location by designated external value added LCS clients", "diameter.3gpp.feature_list1_s6a_flags_bit14",
1174 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1175 NULL, HFILL }
1177 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit15,
1178 { "Allow location by designated PLMN operator LCS clients", "diameter.3gpp.feature_list1_s6a_flags_bit15",
1179 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1180 NULL, HFILL }
1182 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit16,
1183 { "Allow location by LCS clients of a designated LCS service type", "diameter.3gpp.feature_list1_s6a_flags_bit16",
1184 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1185 NULL, HFILL }
1187 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit17,
1188 { "All Mobile Originating Location Request Classes", "diameter.3gpp.feature_list1_s6a_flags_bit17",
1189 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1190 NULL, HFILL }
1192 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit18,
1193 { "Allow an MS to request its own location", "diameter.3gpp.feature_list1_s6a_flags_bit18",
1194 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1195 NULL, HFILL }
1197 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit19,
1198 { "Allow an MS to perform self location without interaction with the PLMN", "diameter.3gpp.feature_list1_s6a_flags_bit19",
1199 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1200 NULL, HFILL }
1202 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit20,
1203 { "Allow an MS to request transfer of its location to another LCS client", "diameter.3gpp.feature_list1_s6a_flags_bit20",
1204 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1205 NULL, HFILL }
1207 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit21,
1208 { "Short Message MO-PP", "diameter.3gpp.feature_list1_s6a_flags_bit21",
1209 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1210 NULL, HFILL }
1212 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit22,
1213 { "Barring of Outgoing Calls", "diameter.3gpp.feature_list1_s6a_flags_bit22",
1214 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1215 NULL, HFILL }
1217 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit23,
1218 { "Barring of all outgoing calls", "diameter.3gpp.feature_list1_s6a_flags_bit23",
1219 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1220 NULL, HFILL }
1222 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit24,
1223 { "Barring of outgoing international calls", "diameter.3gpp.feature_list1_s6a_flags_bit24",
1224 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1225 NULL, HFILL }
1227 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit25,
1228 { "Barring of outgoing international calls except those directed to the home PLMN Country", "diameter.3gpp.feature_list1_s6a_flags_bit25",
1229 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1230 NULL, HFILL }
1232 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit26,
1233 { "UE Reachability Notifcation", "diameter.3gpp.feature_list1_s6a_flags_bit26",
1234 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1235 NULL, HFILL }
1237 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit27,
1238 { "Terminating Access Domain Selection Data Retrieval", "diameter.3gpp.feature_list1_s6a_flags_bit27",
1239 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1240 NULL, HFILL }
1242 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit28,
1243 { "State/Location Information Retrieval", "diameter.3gpp.feature_list1_s6a_flags_bit28",
1244 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1245 NULL, HFILL }
1247 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit29,
1248 { "Partial Purge from a Combined MME/SGSN", "diameter.3gpp.feature_list1_s6a_flags_bit29",
1249 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1250 NULL, HFILL }
1252 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit30,
1253 { "UE Time Zone Retrieval", "diameter.3gpp.feature_list1_s6a_flags1_bit30",
1254 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1255 NULL, HFILL }
1257 { &hf_diameter_3gpp_feature_list1_s6a_flags_bit31,
1258 { "Additional MSISDN", "diameter.3gpp.feature_list1_s6a_flags_bit31",
1259 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1260 NULL, HFILL }
1262 { &hf_diameter_3gpp_feature_list2_s6a_flags_bit0,
1263 { "SMS in MME", "diameter.3gpp.feature_list2_s6a_flags_bit0",
1264 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1265 NULL, HFILL }
1267 { &hf_diameter_3gpp_feature_list2_s6a_flags_bit1,
1268 { "SMS in SGSN", "diameter.3gpp.feature_list2_s6a_flags_bit1",
1269 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
1270 NULL, HFILL }
1272 { &hf_diameter_3gpp_ulr_flags,
1273 { "ULR Flags", "diameter.3gpp.ulr_flags",
1274 FT_UINT32, BASE_HEX, NULL, 0x0,
1275 NULL, HFILL }
1277 { &hf_diameter_3gpp_ulr_flags_bit0,
1278 { "Single-Registration-Indication", "diameter.3gpp.ulr_flags_bit0",
1279 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1280 NULL, HFILL }
1282 { &hf_diameter_3gpp_ulr_flags_bit1,
1283 { "S6a/S6d-Indicator", "diameter.3gpp.ulr_flags_bit1",
1284 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1285 NULL, HFILL }
1287 { &hf_diameter_3gpp_ulr_flags_bit2,
1288 { "Skip-Subscriber-Data", "diameter.3gpp.ulr_flags_bit2",
1289 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1290 NULL, HFILL }
1292 { &hf_diameter_3gpp_ulr_flags_bit3,
1293 { "GPRS-Subscription-Data-Indicator", "diameter.3gpp.ulr_flags_bit3",
1294 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1295 NULL, HFILL }
1297 { &hf_diameter_3gpp_ulr_flags_bit4,
1298 { "Node-Type-Indicator", "diameter.3gpp.ulr_flags_bit4",
1299 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1300 NULL, HFILL }
1302 { &hf_diameter_3gpp_ulr_flags_bit5,
1303 { "Initial-Attach-Indicator", "diameter.3gpp.ulr_flags_bit5",
1304 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1305 NULL, HFILL }
1307 { &hf_diameter_3gpp_ulr_flags_bit6,
1308 { "PS-LCS-Not-Supported-By-UE", "diameter.3gpp.ulr_flags_bit6",
1309 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1310 NULL, HFILL }
1312 { &hf_diameter_3gpp_ulr_flags_bit7,
1313 { "SMS-Only-Indication", "diameter.3gpp.ulr_flags_bit7",
1314 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1315 NULL, HFILL }
1317 { &hf_diameter_3gpp_ula_flags,
1318 { "ULA Flags", "diameter.3gpp.ula_flags",
1319 FT_UINT32, BASE_HEX, NULL, 0x0,
1320 NULL, HFILL }
1322 { &hf_diameter_3gpp_ula_flags_bit0,
1323 { "Separation Indication", "diameter.3gpp.ula_flags_bit0",
1324 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1325 NULL, HFILL }
1327 { &hf_diameter_3gpp_dsr_flags,
1328 { "DSR Flags", "diameter.3gpp.dsr_flags",
1329 FT_UINT32, BASE_HEX, NULL, 0x0,
1330 NULL, HFILL }
1332 { &hf_diameter_3gpp_dsr_flags_bit0,
1333 { "Regional Subscription Withdrawal", "diameter.3gpp.dsr_flags_bit0",
1334 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1335 NULL, HFILL }
1337 { &hf_diameter_3gpp_dsr_flags_bit1,
1338 { "Complete APN Configuration Profile Withdrawal", "diameter.3gpp.dsr_flags_bit1",
1339 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1340 NULL, HFILL }
1342 { &hf_diameter_3gpp_dsr_flags_bit2,
1343 { "Subscribed Charging Characteristics Withdrawal", "diameter.3gpp.dsr_flags_bit2",
1344 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1345 NULL, HFILL }
1347 { &hf_diameter_3gpp_dsr_flags_bit3,
1348 { "PDN subscription contexts Withdrawal", "diameter.3gpp.dsr_flags_bit3",
1349 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1350 NULL, HFILL }
1352 { &hf_diameter_3gpp_dsr_flags_bit4,
1353 { "STN-SR", "diameter.3gpp.dsr_flags_bit4",
1354 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1355 NULL, HFILL }
1357 { &hf_diameter_3gpp_dsr_flags_bit5,
1358 { "Complete PDP context list Withdrawal", "diameter.3gpp.dsr_flags_bit5",
1359 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1360 NULL, HFILL }
1362 { &hf_diameter_3gpp_dsr_flags_bit6,
1363 { "PDP contexts Withdrawal", "diameter.3gpp.dsr_flags_bit6",
1364 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1365 NULL, HFILL }
1367 { &hf_diameter_3gpp_dsr_flags_bit7,
1368 { "Roaming Restricted due to unsupported feature", "diameter.3gpp.dsr_flags_bit7",
1369 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1370 NULL, HFILL }
1372 { &hf_diameter_3gpp_dsr_flags_bit8,
1373 { "Trace Data Withdrawal", "diameter.3gpp.dsr_flags_bit8",
1374 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1375 NULL, HFILL }
1377 { &hf_diameter_3gpp_dsr_flags_bit9,
1378 { "CSG Deleted", "diameter.3gpp.dsr_flags_bit9",
1379 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1380 NULL, HFILL }
1382 { &hf_diameter_3gpp_dsr_flags_bit10,
1383 { "APN-OI-Replacement", "diameter.3gpp.dsr_flags_bit10",
1384 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1385 NULL, HFILL }
1387 { &hf_diameter_3gpp_dsr_flags_bit11,
1388 { "GMLC List Withdrawal", "diameter.3gpp.dsr_flags_bit11",
1389 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1390 NULL, HFILL }
1392 { &hf_diameter_3gpp_dsr_flags_bit12,
1393 { "LCS Withdrawal", "diameter.3gpp.dsr_flags_bit12",
1394 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1395 NULL, HFILL }
1397 { &hf_diameter_3gpp_dsr_flags_bit13,
1398 { "SMS Withdrawal", "diameter.3gpp.dsr_flags_bit13",
1399 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1400 NULL, HFILL }
1402 { &hf_diameter_3gpp_dsr_flags_bit14,
1403 { "Subscribed periodic RAU-TAU Timer Withdrawal", "diameter.3gpp.dsr_flags_bit14",
1404 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1405 NULL, HFILL }
1407 { &hf_diameter_3gpp_dsr_flags_bit15,
1408 { "Subscribed VSRVCC Withdrawal", "diameter.3gpp.dsr_flags_bit15",
1409 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1410 NULL, HFILL }
1412 { &hf_diameter_3gpp_dsr_flags_bit16,
1413 { "A-MSISDN Withdrawal", "diameter.3gpp.dsr_flags_bit16",
1414 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1415 NULL, HFILL }
1417 { &hf_diameter_3gpp_dsa_flags,
1418 { "DSA Flags", "diameter.3gpp.dsa_flags",
1419 FT_UINT32, BASE_HEX, NULL, 0x0,
1420 NULL, HFILL }
1422 { &hf_diameter_3gpp_dsa_flags_bit0,
1423 { "Network Node area restricted", "diameter.3gpp.dsa_flags_bit0",
1424 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1425 NULL, HFILL }
1427 { &hf_diameter_3gpp_ida_flags,
1428 { "IDA Flags", "diameter.3gpp.ida_flags",
1429 FT_UINT32, BASE_HEX, NULL, 0x0,
1430 NULL, HFILL }
1432 { &hf_diameter_3gpp_ida_flags_bit0,
1433 { "Network Node area restricted", "diameter.3gpp.ida_flags_bit0",
1434 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1435 NULL, HFILL }
1437 { &hf_diameter_3gpp_pua_flags,
1438 { "PUA Flags", "diameter.3gpp.pua_flags",
1439 FT_UINT32, BASE_HEX, NULL, 0x0,
1440 NULL, HFILL }
1442 { &hf_diameter_3gpp_pua_flags_bit0,
1443 { "Freeze M-TMSI", "diameter.3gpp.pua_flags_bit0",
1444 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1445 NULL, HFILL }
1447 { &hf_diameter_3gpp_pua_flags_bit1,
1448 { "Freeze P-TMSI", "diameter.3gpp.pua_flags_bit1",
1449 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1450 NULL, HFILL }
1452 { &hf_diameter_3gpp_nor_flags,
1453 { "NOR Flags", "diameter.3gpp.nor_flags",
1454 FT_UINT32, BASE_HEX, NULL, 0x0,
1455 NULL, HFILL }
1457 { &hf_diameter_3gpp_nor_flags_bit0,
1458 { "Single-Registration-Indication", "diameter.3gpp.nor_flags_bit0",
1459 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1460 NULL, HFILL }
1462 { &hf_diameter_3gpp_nor_flags_bit1,
1463 { "SGSN area restricted", "diameter.3gpp.nor_flags_bit1",
1464 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1465 NULL, HFILL }
1467 { &hf_diameter_3gpp_nor_flags_bit2,
1468 { "Ready for SM", "diameter.3gpp.nor_flags_bit2",
1469 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1470 NULL, HFILL }
1472 { &hf_diameter_3gpp_nor_flags_bit3,
1473 { "UE Reachable", "diameter.3gpp.nor_flags_bit3",
1474 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1475 NULL, HFILL }
1477 { &hf_diameter_3gpp_nor_flags_bit4,
1478 { "Delete all APN and PDN GW identity pairs", "diameter.3gpp.nor_flags_bit4",
1479 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1480 NULL, HFILL }
1482 { &hf_diameter_3gpp_nor_flags_bit5,
1483 { "UE Reachable from SGSN", "diameter.3gpp.nor_flags_bit5",
1484 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1485 NULL, HFILL }
1487 { &hf_diameter_3gpp_nor_flags_bit6,
1488 { "Ready for SM from MME", "diameter.3gpp.nor_flags_bit6",
1489 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1490 NULL, HFILL }
1492 { &hf_diameter_3gpp_idr_flags,
1493 { "IDR Flags", "diameter.3gpp.idr_flags",
1494 FT_UINT32, BASE_HEX, NULL, 0x0,
1495 NULL, HFILL }
1497 { &hf_diameter_3gpp_idr_flags_bit0,
1498 { "UE Reachability Request", "diameter.3gpp.idr_flags_bit0",
1499 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1500 NULL, HFILL }
1502 { &hf_diameter_3gpp_idr_flags_bit1,
1503 { "T-ADS Data Request", "diameter.3gpp.idr_flags_bit1",
1504 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1505 NULL, HFILL }
1507 { &hf_diameter_3gpp_idr_flags_bit2,
1508 { "EPS User State Request", "diameter.3gpp.idr_flags_bit2",
1509 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1510 NULL, HFILL }
1512 { &hf_diameter_3gpp_idr_flags_bit3,
1513 { "EPS Location Information Request", "diameter.3gpp.idr_flags_bit3",
1514 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1515 NULL, HFILL }
1517 { &hf_diameter_3gpp_idr_flags_bit4,
1518 { "Current Location Request", "diameter.3gpp.idr_flags_bit4",
1519 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1520 NULL, HFILL }
1522 { &hf_diameter_3gpp_idr_flags_bit5,
1523 { "Local Time Zone Request", "diameter.3gpp.idr_flags_bit5",
1524 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1525 NULL, HFILL }
1527 { &hf_diameter_3gpp_idr_flags_bit6,
1528 { "Remove SMS Registration", "diameter.3gpp.idr_flags_bit6",
1529 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0x0,
1530 NULL, HFILL }
1532 { &hf_diameter_3gpp_ipv6addr,
1533 { "IPv6 Address", "diameter.3gpp.ipv6addr",
1534 FT_IPv6, BASE_NONE, NULL, 0x0,
1535 NULL, HFILL }
1537 { &hf_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer,
1538 { "Absolute Time of MBMS Data Transfer", "diameter.3gpp.mbms_abs_time_ofmbms_data_tfer",
1539 FT_STRING, BASE_NONE, NULL, 0x0,
1540 NULL, HFILL }
1542 { &hf_diameter_3gpp_udp_port ,
1543 { "UDP Port", "diameter.3gpp.udp_port",
1544 FT_UINT8, BASE_DEC, NULL, 0x0,
1545 NULL, HFILL }
1549 /* Setup protocol subtree array */
1550 static gint *ett[] = {
1551 &diameter_3gpp_path_ett,
1552 &diameter_3gpp_msisdn_ett,
1553 &diameter_3gpp_uar_flags_ett,
1554 &diameter_3gpp_feature_list_ett,
1555 &diameter_3gpp_tmgi_ett,
1556 &diameter_3gpp_ulr_flags_ett,
1557 &diameter_3gpp_ula_flags_ett,
1558 &diameter_3gpp_dsr_flags_ett,
1559 &diameter_3gpp_dsa_flags_ett,
1560 &diameter_3gpp_ida_flags_ett,
1561 &diameter_3gpp_pua_flags_ett,
1562 &diameter_3gpp_nor_flags_ett,
1563 &diameter_3gpp_idr_flags_ett,
1566 /* Required function calls to register the header fields and subtrees used */
1567 proto_diameter_3gpp = proto_register_protocol("Diameter 3GPP","Diameter3GPP", "diameter.3gpp");
1568 proto_register_field_array(proto_diameter_3gpp, hf, array_length(hf));
1569 proto_register_subtree_array(ett, array_length(ett));