diff options
author | Joakim Karlsson <oakimk@gmail.com> | 2018-12-13 17:46:27 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-12-13 18:27:23 +0000 |
commit | c3eb293048ad1a4c012dc9386a0a9dfb55206a26 (patch) | |
tree | 1ea69c2ce0498fcae4dbc6cea2fca9652fa1be3a | |
parent | 2d589df127c37c523374349c54b66df1bec1542b (diff) |
diameter: Added Secondary-RAT-Type
Group RAN-Secondary-RAT-Usage-Report and decoding of Secondary-RAT-Type
Change-Id: I33c1a0e21be64b5b5b4b9a4a40e9e718d89c9943
Reviewed-on: https://code.wireshark.org/review/31036
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | diameter/dictionary.xml | 19 | ||||
-rw-r--r-- | epan/dissectors/packet-diameter_3gpp.c | 31 |
2 files changed, 50 insertions, 0 deletions
diff --git a/diameter/dictionary.xml b/diameter/dictionary.xml index c6893afce8..2ac8cb95e0 100644 --- a/diameter/dictionary.xml +++ b/diameter/dictionary.xml @@ -4951,6 +4951,25 @@ </avp> <!-- Note: The AVP codes from 1289 to 1399 are reserved for TS 32.299 --> + <avp name="RAN-End-Timestamp" code="1301" vendor-bit="must" vendor-id="TGPP"> + <type type-name="Time"/> + </avp> + <avp name="RAN-Secondary-RAT-Usage-Report" code="1302" vendor-bit="must" vendor-id="TGPP"> + <grouped> + <gavp name="Secondary-RAT-Type"/> + <gavp name="RAN-Start-Timestamp"/> + <gavp name="RAN-End-Timestamp"/> + <gavp name="Accounting-Input-Octets"/> + <gavp name="Accounting-Output-Octets"/> + <gavp name="3GPP-Charging-Id"/> + </grouped> + </avp> + <avp name="RAN-Start-Timestamp" code="1303" vendor-bit="must" vendor-id="TGPP"> + <type type-name="Time"/> + </avp> + <avp name="Secondary-RAT-Type" code="1304" vendor-bit="must" vendor-id="TGPP"> + <type type-name="OctetString"/> + </avp> <!-- 3GPP TS 29.272 V9.1.0 (2009-12 --> <avp name="Subscription-Data" code="1400" mandatory="must" vendor-bit="must" may-encrypt="no" vendor-id="TGPP"> diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c index cc233af2f2..5a19d306f2 100644 --- a/epan/dissectors/packet-diameter_3gpp.c +++ b/epan/dissectors/packet-diameter_3gpp.c @@ -422,6 +422,9 @@ static gint diameter_3gpp_feature_list_ett = -1; static gint diameter_3gpp_uar_flags_ett = -1; static gint diameter_3gpp_tmgi_ett = -1; static gint diameter_3gpp_cms_ett = -1; + +static int hf_diameter_3gpp_secondary_rat_type = -1; + static gint diameter_3gpp_qos_subscribed_ett = -1; static gint diameter_3gpp_ulr_flags_ett = -1; static gint diameter_3gpp_ula_flags_ett = -1; @@ -1396,6 +1399,26 @@ dissect_diameter_3gpp_location_estimate(tvbuff_t *tvb, packet_info *pinfo, proto return tvb_reported_length(tvb); } + +/* AVP Code: 1304 Secondary-RAT-Type +* 3GPP TS 32.299 +*/ +static const value_string diameter_3gpp_secondary_rat_type_vals[] = { + { 0, "5G NR" }, + { 0, NULL } +}; + +static int +dissect_diameter_3gpp_secondary_rat_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) +{ + int offset = 0; + int length = tvb_reported_length(tvb); + + proto_tree_add_item(tree, hf_diameter_3gpp_secondary_rat_type, tvb, offset, 1, ENC_BIG_ENDIAN); + + return length; +} + /* Helper function returning the main bitrates in kbps */ static guint32 qos_calc_bitrate(guint8 oct) @@ -2573,6 +2596,9 @@ proto_reg_handoff_diameter_3gpp(void) /* AVP Code: 1242 location estimate */ dissector_add_uint("diameter.3gpp", 1242, create_dissector_handle(dissect_diameter_3gpp_location_estimate, proto_diameter_3gpp)); + /* AVP Code: 1304 Secondary-RAT-Type */ + dissector_add_uint("diameter.3gpp", 1304, create_dissector_handle(dissect_diameter_3gpp_secondary_rat_type, proto_diameter_3gpp)); + /* AVP Code: 1404 QoS-Subscribed */ dissector_add_uint("diameter.3gpp", 1404, create_dissector_handle(dissect_diameter_3ggp_qos_susbscribed, proto_diameter_3gpp)); @@ -3541,6 +3567,11 @@ proto_register_diameter_3gpp(void) FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x80000000, NULL, HFILL } }, + { &hf_diameter_3gpp_secondary_rat_type, + { "Secondary RAT Type", "diameter.3gpp.secondary_rat_type", + FT_UINT8, BASE_DEC, VALS(diameter_3gpp_secondary_rat_type_vals), 0x00, + NULL, HFILL } + }, { &hf_diameter_3gpp_qos_subscribed, { "QoS-Subscribed", "diameter.3gpp.qos_subscribed", FT_BYTES, BASE_NONE, NULL, 0x0, |