Diameter: Prettify subdissection of bitfields.

Change-Id: I818e00fc3e8e2ff3da50f2075f6e7f9ec085ca2d
Reviewed-on: https://code.wireshark.org/review/32876
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Anders Broman 2019-04-17 10:58:35 +02:00 committed by Anders Broman
parent df2ccf09e5
commit da8ad825d3
3 changed files with 236 additions and 40 deletions

View File

@ -1037,7 +1037,7 @@ integer64_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb, diam_sub_dis_t *diam_
}
static const char *
unsigned32_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb, diam_sub_dis_t *diam_sub_dis_inf _U_)
unsigned32_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb, diam_sub_dis_t *diam_sub_dis_inf)
{
char *label = NULL;
proto_item *pi;
@ -1046,7 +1046,7 @@ unsigned32_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb, diam_sub_dis_t *diam
gint length = tvb_reported_length(tvb);
if (length == 4) {
if (c->tree) {
pi= proto_tree_add_item(c->tree, a->hf_value, tvb, 0, length, ENC_BIG_ENDIAN);
diam_sub_dis_inf->item = pi = proto_tree_add_item(c->tree, a->hf_value, tvb, 0, length, ENC_BIG_ENDIAN);
label = (char *)wmem_alloc(wmem_packet_scope(), ITEM_LABEL_LENGTH+1);
proto_item_fill_label(PITEM_FINFO(pi), label);
label = strstr(label,": ")+2;

View File

@ -9,6 +9,9 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __PACKET_DIAMETER_H__
#define __PACKET_DIAMETER_H__
/* Request-Answer Pair */
typedef struct _diameter_req_ans_pair_t
{
@ -32,6 +35,7 @@ typedef struct _diam_sub_dis_t {
gboolean dis_gouped; /**< Set during dissection of grouped AVP */
guint32 vendor_id;
char *avp_str;
proto_item* item; /**< The item created for this AVP*/
} diam_sub_dis_t;
#define DIAM_APPID_3GPP_CX 16777216
@ -43,3 +47,6 @@ typedef struct _diam_sub_dis_t {
#define DIAM_APPID_3GPP_SLH 16777291
#define DIAM_APPID_3GPP_SD 16777303
#define DIAM_APPID_3GPP_S7A 16777308
#define DIAM_APPID_3GPP_S6T 16777345
#endif /* __PACKET_DIAMETER_H__ */

View File

@ -813,7 +813,7 @@ dissect_diameter_3gpp_feature_list_id(tvbuff_t *tvb, packet_info *pinfo _U_, pro
*/
static int
dissect_diameter_3gpp_uar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_uar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
const int *flags[] = {
&hf_diameter_3gpp_uar_flags_flags_spare_bits,
@ -821,6 +821,11 @@ dissect_diameter_3gpp_uar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_uar_flags_flags, diameter_3gpp_uar_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -868,6 +873,9 @@ dissect_diameter_3gpp_feature_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
feature_list_id = diam_sub_dis_inf->feature_list_id;
}
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
switch (application_id) {
case DIAM_APPID_3GPP_CX:
proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_diameter_3gpp_cx_feature_list_flags,
@ -1072,6 +1080,8 @@ dissect_diameter_3gpp_feature_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
diameter_3gpp_feature_list_ett, diameter_3gpp_sd_feature_list_fields, ENC_BIG_ENDIAN, BMT_NO_APPEND);
break;
default:
/* In case we end up here */
proto_item_set_visible(diam_sub_dis_inf->item);
break;
}
@ -1151,8 +1161,14 @@ static const int *diameter_3gpp_sar_fields[] = {
};
static int
dissect_diameter_3gpp_sar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_sar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_sar_flags,
diameter_3gpp_sar_flags_ett, diameter_3gpp_sar_fields, ENC_BIG_ENDIAN, BMT_NO_APPEND);
@ -1763,7 +1779,7 @@ dissect_diameter_3ggp_qos_susbscribed(tvbuff_t *tvb, packet_info *pinfo _U_, pro
* AVP Code: 1405 ULR-Flags
*/
static int
dissect_diameter_3gpp_ulr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_ulr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_ulr_flags_spare_bits,
@ -1778,13 +1794,18 @@ dissect_diameter_3gpp_ulr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_ulr_flags, diameter_3gpp_ulr_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1406 ULA-Flags */
static int
dissect_diameter_3gpp_ula_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_ula_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_ula_flags_spare_bits,
@ -1793,6 +1814,11 @@ dissect_diameter_3gpp_ula_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_ula_flags, diameter_3gpp_ula_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -1818,7 +1844,7 @@ dissect_diameter_3gpp_visited_plmn_id(tvbuff_t *tvb, packet_info *pinfo, proto_t
* AVP Code: 1421 DSR-Flags
*/
static int
dissect_diameter_3gpp_dsr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_dsr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_dsr_flags_spare_bits,
@ -1856,13 +1882,18 @@ dissect_diameter_3gpp_dsr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_dsr_flags, diameter_3gpp_dsr_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1422 DSA-Flags */
static int
dissect_diameter_3gpp_dsa_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_dsa_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_dsa_flags_spare_bits,
@ -1870,13 +1901,18 @@ dissect_diameter_3gpp_dsa_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_dsa_flags, diameter_3gpp_dsa_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1426 Access-Restriction-Data */
static int
dissect_diameter_3gpp_acc_res_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_acc_res_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_acc_res_dat_flags_spare_bits,
@ -1892,6 +1928,11 @@ dissect_diameter_3gpp_acc_res_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_acc_res_dat_flags, diameter_3gpp_dsa_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -1913,7 +1954,7 @@ dissect_diameter_3gpp_ida_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
/* AVP Code: 1442 PUA-Flags */
static int
dissect_diameter_3gpp_pua_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_pua_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_pua_flags_spare_bits,
@ -1922,13 +1963,18 @@ dissect_diameter_3gpp_pua_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_pua_flags, diameter_3gpp_pua_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1443 NOR-Flags */
static int
dissect_diameter_3gpp_nor_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_nor_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_nor_flags_spare_bits,
@ -1945,13 +1991,19 @@ dissect_diameter_3gpp_nor_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_nor_flags, diameter_3gpp_nor_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1490 IDR-Flags */
static int
dissect_diameter_3gpp_idr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_idr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_idr_flags_spare_bits,
@ -1967,13 +2019,18 @@ dissect_diameter_3gpp_idr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_idr_flags, diameter_3gpp_idr_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1508 PPR-Flags */
static int
dissect_diameter_3gpp_ppr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_ppr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_ppr_flags_spare_bits,
@ -1984,6 +2041,11 @@ dissect_diameter_3gpp_ppr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_ppr_flags, diameter_3gpp_ppr_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -1991,7 +2053,7 @@ dissect_diameter_3gpp_ppr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
/* AVP Code: 1518 AAA-Failure-Indication */
/* TGPP TS 29.273, v14.0.0 */
static int
dissect_diameter_3gpp_aaa_fail_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_aaa_fail_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_aaa_fail_flags_spare_bits,
@ -1999,6 +2061,11 @@ dissect_diameter_3gpp_aaa_fail_flags(tvbuff_t *tvb, packet_info *pinfo _U_, prot
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_aaa_fail_flags, diameter_3gpp_aaa_fail_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
@ -2006,7 +2073,7 @@ dissect_diameter_3gpp_aaa_fail_flags(tvbuff_t *tvb, packet_info *pinfo _U_, prot
/* AVP Code: 1520 DER-Flags */
static int
dissect_diameter_3gpp_der_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_der_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_der_flags_spare_bits,
@ -2015,13 +2082,18 @@ dissect_diameter_3gpp_der_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_der_flags, diameter_3gpp_der_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1521 DEA-Flags */
static int
dissect_diameter_3gpp_dea_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_dea_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_dea_flags_spare_bits,
@ -2030,13 +2102,18 @@ dissect_diameter_3gpp_dea_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_dea_flags, diameter_3gpp_dea_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1522 RAR-Flags */
static int
dissect_diameter_3gpp_rar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_rar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_rar_flags_spare_bits,
@ -2045,13 +2122,18 @@ dissect_diameter_3gpp_rar_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_rar_flags, diameter_3gpp_rar_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1523 DER-S6b-Flags */
static int
dissect_diameter_3gpp_der_s6b_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_der_s6b_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_der_s6b_flags_spare_bits,
@ -2059,13 +2141,19 @@ dissect_diameter_3gpp_der_s6b_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_der_s6b_flags, diameter_3gpp_der_s6b_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 1538 Emergency-Services */
static int
dissect_diameter_3gpp_emergency_services(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_emergency_services(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_emergency_services_flags_spare_bits,
@ -2073,6 +2161,11 @@ dissect_diameter_3gpp_emergency_services(tvbuff_t *tvb, packet_info *pinfo _U_,
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_emergency_services_flags, diameter_3gpp_emergency_services_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
@ -2083,7 +2176,7 @@ dissect_diameter_3gpp_emergency_services(tvbuff_t *tvb, packet_info *pinfo _U_,
* AVP Code: 1635 PUR-Flags
*/
static int
dissect_diameter_3gpp_pur_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_pur_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_pur_flags_spare_bits,
@ -2092,6 +2185,12 @@ dissect_diameter_3gpp_pur_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_pur_flags, diameter_3gpp_pur_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2101,7 +2200,7 @@ dissect_diameter_3gpp_pur_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
* AVP Code: 1638 CLR-Flag
*/
static int
dissect_diameter_3gpp_clr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_clr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_clr_flags_spare_bits,
@ -2110,6 +2209,11 @@ dissect_diameter_3gpp_clr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_clr_flags, diameter_3gpp_clr_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2119,7 +2223,7 @@ dissect_diameter_3gpp_clr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
* AVP Code: 1639 UVR-Flags
*/
static int
dissect_diameter_3gpp_uvr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_uvr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_uvr_flags_spare_bits,
@ -2127,6 +2231,11 @@ dissect_diameter_3gpp_uvr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_uvr_flags, diameter_3gpp_uvr_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2136,7 +2245,7 @@ dissect_diameter_3gpp_uvr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
* AVP Code: 1640 UVA-Flags
*/
static int
dissect_diameter_3gpp_uva_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_uva_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_uva_flags_spare_bits,
@ -2144,6 +2253,11 @@ dissect_diameter_3gpp_uva_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_uva_flags, diameter_3gpp_uva_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2153,7 +2267,7 @@ dissect_diameter_3gpp_uva_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
* AVP Code: 1654 Subscription-Data-Flags
*/
static int
dissect_diameter_3gpp_subscription_data_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_subscription_data_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_subscription_data_flags_spare_bits,
@ -2164,6 +2278,11 @@ dissect_diameter_3gpp_subscription_data_flags(tvbuff_t *tvb, packet_info *pinfo
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_subscription_data_flags, diameter_3gpp_subscription_data_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2173,7 +2292,7 @@ dissect_diameter_3gpp_subscription_data_flags(tvbuff_t *tvb, packet_info *pinfo
* AVP Code: 1668 WLAN-offloadability-EUTRAN
*/
static int
dissect_diameter_3gpp_wlan_offloadability_eutran(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_wlan_offloadability_eutran(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_wlan_offloadability_eutran_spare_bits,
@ -2181,6 +2300,11 @@ dissect_diameter_3gpp_wlan_offloadability_eutran(tvbuff_t *tvb, packet_info *pin
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_wlan_offloadability_eutran, diameter_3gpp_wlan_offloadability_eutran_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2190,7 +2314,7 @@ dissect_diameter_3gpp_wlan_offloadability_eutran(tvbuff_t *tvb, packet_info *pin
* AVP Code: 1669 WLAN-offloadability-EUTRAN
*/
static int
dissect_diameter_3gpp_wlan_offloadability_utran(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_wlan_offloadability_utran(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_wlan_offloadability_utran_spare_bits,
@ -2198,6 +2322,11 @@ dissect_diameter_3gpp_wlan_offloadability_utran(tvbuff_t *tvb, packet_info *pinf
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_wlan_offloadability_utran, diameter_3gpp_wlan_offloadability_utran_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2227,7 +2356,7 @@ dissect_diameter_3gpp_group_plmn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tre
* AVP Code: 1679 AIR-Flags
*/
static int
dissect_diameter_3gpp_air_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_air_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_air_flags_spare_bits,
@ -2235,6 +2364,11 @@ dissect_diameter_3gpp_air_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_air_flags, diameter_3gpp_air_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2244,7 +2378,7 @@ dissect_diameter_3gpp_air_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
* AVP Code: 1686 Preferred-Data-Mode
*/
static int
dissect_diameter_3gpp_preferred_data_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_preferred_data_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_preferred_data_mode_spare_bits,
@ -2253,6 +2387,11 @@ dissect_diameter_3gpp_preferred_data_mode(tvbuff_t *tvb, packet_info *pinfo _U_,
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_preferred_data_mode, diameter_3gpp_preferred_data_mode_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2262,7 +2401,7 @@ dissect_diameter_3gpp_preferred_data_mode(tvbuff_t *tvb, packet_info *pinfo _U_,
* AVP Code: 1689 V2X-Permission
*/
static int
dissect_diameter_3gpp_v2x_permission(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_v2x_permission(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_v2x_permission_spare_bits,
@ -2271,6 +2410,11 @@ dissect_diameter_3gpp_v2x_permission(tvbuff_t *tvb, packet_info *pinfo _U_, prot
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_v2x_permission, diameter_3gpp_v2x_permission_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2280,7 +2424,7 @@ dissect_diameter_3gpp_v2x_permission(tvbuff_t *tvb, packet_info *pinfo _U_, prot
* AVP Code: 1704 Core-Network-Restrictions
*/
static int
dissect_diameter_3gpp_core_network_restrictions(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_core_network_restrictions(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_core_network_restrictions_spare_bits,
@ -2289,6 +2433,11 @@ dissect_diameter_3gpp_core_network_restrictions(tvbuff_t *tvb, packet_info *pinf
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_core_network_restrictions, diameter_3gpp_core_network_restrictions_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2302,7 +2451,7 @@ dissect_diameter_3gpp_eutran_positioning_data(tvbuff_t *tvb, packet_info *pinfo,
/* AVP Code: 2532 Deferred-Location-Type */
static int
dissect_diameter_3gpp_deferred_location_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_deferred_location_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_deferred_location_type_spare_bits,
@ -2317,13 +2466,19 @@ dissect_diameter_3gpp_deferred_location_type(tvbuff_t *tvb, packet_info *pinfo _
NULL
};
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_deferred_location_type, diameter_3gpp_deferred_location_type_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_deferred_location_type, diameter_3gpp_deferred_location_type_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 2545 PLR-Flags */
static int
dissect_diameter_3gpp_plr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_plr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_plr_flags_spare_bits,
@ -2333,13 +2488,18 @@ dissect_diameter_3gpp_plr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_plr_flags, diameter_3gpp_plr_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 2546 PLA-Flags */
static int
dissect_diameter_3gpp_pla_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_pla_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_pla_flags_spare_bits,
@ -2350,6 +2510,11 @@ dissect_diameter_3gpp_pla_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_pla_flags, diameter_3gpp_pla_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2452,7 +2617,7 @@ dissect_diameter_3gpp_ran_nas_release_cause(tvbuff_t *tvb, packet_info *pinfo _U
/* AVP Code: 3167 RIR-Flags */
static int
dissect_diameter_3gpp_rir_flags(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, void* data _U_)
dissect_diameter_3gpp_rir_flags(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, void* data)
{
static const int* flags[] = {
&hf_diameter_3gpp_rir_spare_b31_b4,
@ -2463,6 +2628,10 @@ dissect_diameter_3gpp_rir_flags(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tre
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_rir_flags, diameter_3gpp_rir_flags_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
@ -2512,7 +2681,7 @@ dissect_diameter_3gpp_sm_rp_ui(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* AVP Code: 3502 MBMS-Bearer-Event */
static int
dissect_diameter_3gpp_mbms_bearer_event(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_mbms_bearer_event(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_mbms_bearer_event_spare_bits,
@ -2520,13 +2689,18 @@ dissect_diameter_3gpp_mbms_bearer_event(tvbuff_t *tvb, packet_info *pinfo _U_, p
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_mbms_bearer_event, diameter_3gpp_mbms_bearer_event_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 3506 MBMS-Bearer-Result */
static int
dissect_diameter_3gpp_mbms_bearer_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_mbms_bearer_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_mbms_bearer_result_spare_bits,
@ -2545,13 +2719,18 @@ dissect_diameter_3gpp_mbms_bearer_result(tvbuff_t *tvb, packet_info *pinfo _U_,
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_mbms_bearer_result, diameter_3gpp_mbms_bearer_result_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 3511 TMGI-Allocation-Result */
static int
dissect_diameter_3gpp_tmgi_allocation_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_tmgi_allocation_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_tmgi_allocation_result_spare_bits,
@ -2563,13 +2742,18 @@ dissect_diameter_3gpp_tmgi_allocation_result(tvbuff_t *tvb, packet_info *pinfo _
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_tmgi_allocation_result, diameter_3gpp_tmgi_allocation_result_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}
/* AVP Code: 3514 TMGI-Deallocation-Result */
static int
dissect_diameter_3gpp_tmgi_deallocation_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
dissect_diameter_3gpp_tmgi_deallocation_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
{
static const int *flags[] = {
&hf_diameter_3gpp_tmgi_deallocation_result_spare_bits,
@ -2579,6 +2763,11 @@ dissect_diameter_3gpp_tmgi_deallocation_result(tvbuff_t *tvb, packet_info *pinfo
NULL
};
diam_sub_dis_t* diam_sub_dis_inf = (diam_sub_dis_t*)data;
/* Hide the item created in packet-diameter.c and only show the one created here */
proto_item_set_hidden(diam_sub_dis_inf->item);
proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_tmgi_deallocation_result, diameter_3gpp_tmgi_deallocation_result_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND);
return 4;
}