From 6487885b9300e53d08618c046c452ee73d23832b Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Tue, 21 Feb 2023 12:07:42 +0100 Subject: [PATCH] Diameter 3GPP: update some Rx related AVPs --- epan/dissectors/packet-diameter_3gpp.c | 138 +++++++++++++++++++++++-- resources/protocols/diameter/TGPP.xml | 4 + 2 files changed, 135 insertions(+), 7 deletions(-) diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c index c680ee0f4e..5a07976031 100644 --- a/epan/dissectors/packet-diameter_3gpp.c +++ b/epan/dissectors/packet-diameter_3gpp.c @@ -313,6 +313,8 @@ static int hf_diameter_3gpp_mbms_abs_time_ofmbms_data_tfer = -1; static int hf_diameter_3gpp_udp_port = -1; static int hf_diameter_3gpp_codec_data_dir = -1; static int hf_diameter_3gpp_codec_sdp_type = -1; +static int hf_diameter_3gpp_af_requested_data_flags = -1; +static int hf_diameter_3gpp_af_requested_data_flags_bit0 = -1; static int hf_diameter_3gpp_mbms_bearer_event = -1; static int hf_diameter_3gpp_mbms_bearer_event_bit0 = -1; static int hf_diameter_3gpp_mbms_bearer_event_bit1 = -1; @@ -534,7 +536,8 @@ static gint diameter_3gpp_plr_flags_ett = -1; static gint diameter_3gpp_pla_flags_ett = -1; static gint diameter_3gpp_deferred_location_type_ett = -1; static gint diameter_3gpp_rir_flags_ett = -1; -static guint ett_diameter_3gpp_supported_monitoring_events = -1; +static gint diameter_3gpp_supported_monitoring_events_ett = -1; +static gint diameter_3gpp_af_requested_data_flags_ett = -1; static int hf_diameter_3gpp_feature_list1_rx_flags_bit0 = -1; static int hf_diameter_3gpp_feature_list1_rx_flags_bit1 = -1; @@ -566,6 +569,17 @@ static int hf_diameter_3gpp_feature_list2_rx_flags_bit1 = -1; static int hf_diameter_3gpp_feature_list2_rx_flags_bit2 = -1; static int hf_diameter_3gpp_feature_list2_rx_flags_bit3 = -1; static int hf_diameter_3gpp_feature_list2_rx_flags_bit4 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit5 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit6 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit7 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit8 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit9 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit10 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit11 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit12 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit13 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit14 = -1; +static int hf_diameter_3gpp_feature_list2_rx_flags_bit15 = -1; static int hf_diameter_3gpp_feature_list2_rx_flags_spare_bits = -1; static int hf_diameter_3gpp_ran_nas_protocol_type = -1; @@ -647,9 +661,15 @@ static const value_string diameter_3gpp_rat_type_vals[] = { { 6, "EUTRAN (WB-E-UTRAN)" }, { 7, "Virtual" }, { 8, "EUTRAN-NB-IoT" }, - { 9, "LTE-MT" }, - { 10, "NR" }, - { 51, "NG-RAN" }, + { 9, "LTE-M" }, + { 51, "NR" }, + { 52, "NR in unlicensed bands" }, + { 53, "Trusted WLAN" }, + { 54, "Trusted Non-3GPP access" }, + { 55, "Wireline access" }, + { 56, "Wireline Cable access" }, + { 57, "Wireline BBF access" }, + { 58, "NR RedCap" }, { 101, "IEEE 802.16e" }, { 102, "3GPP2 eHRPD" }, { 103, "3GPP2 HRPD" }, @@ -783,6 +803,30 @@ dissect_diameter_3gpp_codec_data(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tr return tvb_reported_length(tvb); } +/* + * AVP Code: 551 AF-Requested-Data + */ +static int * const diameter_3gpp_af_requested_data_flags[] = { + &hf_diameter_3gpp_af_requested_data_flags_bit0, + NULL +}; + +static int +dissect_diameter_3gpp_af_requested_data(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, void* data _U_) +{ + 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_af_requested_data_flags, + diameter_3gpp_af_requested_data_flags_ett, + diameter_3gpp_af_requested_data_flags, ENC_BIG_ENDIAN, BMT_NO_APPEND); + + return 4; + +} + /* AVP Code: 601 Public-Identity * TGPP.xml * 6.3.2 Public-Identity AVP @@ -931,6 +975,17 @@ dissect_diameter_3gpp_feature_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ else if (feature_list_id == 2) { static int * const flags[] = { &hf_diameter_3gpp_feature_list2_rx_flags_spare_bits, + &hf_diameter_3gpp_feature_list2_rx_flags_bit15, + &hf_diameter_3gpp_feature_list2_rx_flags_bit14, + &hf_diameter_3gpp_feature_list2_rx_flags_bit13, + &hf_diameter_3gpp_feature_list2_rx_flags_bit12, + &hf_diameter_3gpp_feature_list2_rx_flags_bit11, + &hf_diameter_3gpp_feature_list2_rx_flags_bit10, + &hf_diameter_3gpp_feature_list2_rx_flags_bit9, + &hf_diameter_3gpp_feature_list2_rx_flags_bit8, + &hf_diameter_3gpp_feature_list2_rx_flags_bit7, + &hf_diameter_3gpp_feature_list2_rx_flags_bit6, + &hf_diameter_3gpp_feature_list2_rx_flags_bit5, &hf_diameter_3gpp_feature_list2_rx_flags_bit4, &hf_diameter_3gpp_feature_list2_rx_flags_bit3, &hf_diameter_3gpp_feature_list2_rx_flags_bit2, @@ -2715,7 +2770,7 @@ dissect_diameter_3gpp_supported_monitoring_events(tvbuff_t* tvb, packet_info* pi /* 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_supported_monitoring_events, ett_diameter_3gpp_supported_monitoring_events, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND); + proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_diameter_3gpp_supported_monitoring_events, diameter_3gpp_supported_monitoring_events_ett, flags, ENC_BIG_ENDIAN, BMT_NO_APPEND); return 8; } @@ -2918,6 +2973,9 @@ proto_reg_handoff_diameter_3gpp(void) /* AVP Code: 524 Codec-Data */ dissector_add_uint("diameter.3gpp", 524, create_dissector_handle(dissect_diameter_3gpp_codec_data, proto_diameter_3gpp)); + /* AVP Code: 551 AF-Requested-Data */ + dissector_add_uint("diameter.3gpp", 551, create_dissector_handle(dissect_diameter_3gpp_af_requested_data, proto_diameter_3gpp)); + /* AVP Code: 601 Public-Identity */ dissector_add_uint("diameter.3gpp", 601, create_dissector_handle(dissect_diameter_3gpp_public_identity, proto_diameter_3gpp)); @@ -4775,6 +4833,16 @@ proto_register_diameter_3gpp(void) FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_diameter_3gpp_af_requested_data_flags, + { "AF-Requested-Data Flags", "diameter.3gpp.af_requested_data_flags", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_diameter_3gpp_af_requested_data_flags_bit0, + { "EPC-level identities", "diameter.3gpp.af_requested_data_flags.bit0", + FT_BOOLEAN, 32, TFS(&tfs_required_not_required), 0x00000001, + NULL, HFILL } + }, { &hf_diameter_3gpp_mbms_bearer_event, { "MBMS-Bearer-Event", "diameter.3gpp.mbms_bearer_event", FT_UINT32, BASE_HEX, NULL, 0x0, @@ -5087,9 +5155,64 @@ proto_register_diameter_3gpp(void) FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010, NULL, HFILL } }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit5, + { "CHEM", "diameter.3gpp.feature_list2_rx_flags_bit5", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit6, + { "VBCLTE", "diameter.3gpp.feature_list2_rx_flags_bit6", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit7, + { "FLUS", "diameter.3gpp.feature_list2_rx_flags_bit7", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000080, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit8, + { "EPSFallbackReport", "diameter.3gpp.feature_list2_rx_flags_bit8", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000100, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit9, + { "ATSSS", "diameter.3gpp.feature_list2_rx_flags_bit9", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000200, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit10, + { "QoSHint", "diameter.3gpp.feature_list2_rx_flags_bit10", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000400, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit11, + { "ReallocationOfCredit", "diameter.3gpp.feature_list2_rx_flags_bit11", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000800, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit12, + { "Netloc-Trusted-N3GA", "diameter.3gpp.feature_list2_rx_flags_bit12", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00001000, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit13, + { "NetLoc-Wireline", "diameter.3gpp.feature_list2_rx_flags_bit13", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00002000, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit14, + { "MPSforDTS", "diameter.3gpp.feature_list2_rx_flags_bit14", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00004000, + NULL, HFILL } + }, + { &hf_diameter_3gpp_feature_list2_rx_flags_bit15, + { "User-Equipment-Info-Extension", "diameter.3gpp.feature_list2_rx_flags_bit15", + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00008000, + NULL, HFILL } + }, { &hf_diameter_3gpp_feature_list2_rx_flags_spare_bits, { "Spare", "diameter.3gpp.feature_list2_rx_flags_spare", - FT_UINT32, BASE_HEX, NULL, 0xFFFFFFE0, + FT_UINT32, BASE_HEX, NULL, 0xFFFF0000, NULL, HFILL } }, { &hf_diameter_3gpp_feature_list_sd_flags, @@ -5784,7 +5907,8 @@ proto_register_diameter_3gpp(void) &diameter_3gpp_pla_flags_ett, &diameter_3gpp_deferred_location_type_ett, &diameter_3gpp_rir_flags_ett, - &ett_diameter_3gpp_supported_monitoring_events + &diameter_3gpp_supported_monitoring_events_ett, + &diameter_3gpp_af_requested_data_flags_ett }; expert_module_t *expert_diameter_3gpp; diff --git a/resources/protocols/diameter/TGPP.xml b/resources/protocols/diameter/TGPP.xml index 101d5479c4..2da1e162d4 100644 --- a/resources/protocols/diameter/TGPP.xml +++ b/resources/protocols/diameter/TGPP.xml @@ -440,6 +440,10 @@ + + + +