aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtpv2.c
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2015-05-08 15:33:42 +0200
committerAnders Broman <a.broman58@gmail.com>2015-05-08 13:43:28 +0000
commit92853e8ec4fb1b8db6514530b6f9e4e1dbf7b0c4 (patch)
treece1b89a4846339e991445b06876cf7f82f277f0b /epan/dissectors/packet-gtpv2.c
parente7eaca4416e5ae90e4ccc2065f7ec000aa18159f (diff)
[GTPv2] Add dissection of Throttling IE.
Change-Id: I9c71a9d6e276213eb43e4265578e57f87f1619fd Reviewed-on: https://code.wireshark.org/review/8352 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gtpv2.c')
-rw-r--r--epan/dissectors/packet-gtpv2.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 36413516e1..75c0cfcc33 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -424,6 +424,8 @@ static int hf_gtpv2_arp_pvi = -1;
static int hf_gtpv2_arp_pl = -1;
static int hf_gtpv2_arp_pci = -1;
static int hf_gtpv2_timer_unit = -1;
+static int hf_gtpv2_throttling_delay_unit = -1;
+static int hf_gtpv2_throttling_delay_value = -1;
static int hf_gtpv2_timer_value = -1;
static int hf_gtpv2_lapi = -1;
@@ -460,6 +462,7 @@ static int hf_gtpv2_authentication_quadruplets = -1;
static int hf_gtpv2_utran_srvcc_kc = -1;
static int hf_gtpv2_spare_bytes = -1;
static int hf_gtpv2_metric = -1;
+static int hf_gtpv2_throttling_factor = -1;
static int hf_gtpv2_relative_capacity = -1;
static int hf_gtpv2_apn_length = -1;
static int hf_gtpv2_sequence_number = -1;
@@ -5052,7 +5055,23 @@ dissect_gtpv2_mbms_time_to_data_xfer(tvbuff_t *tvb, packet_info *pinfo _U_, prot
static void
dissect_gtpv2_throttling(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
+ int offset = 0;
+ guint8 oct;
+
+ proto_tree_add_item(tree, hf_gtpv2_throttling_delay_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gtpv2_throttling_delay_value, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ oct = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_gtpv2_throttling_factor, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (oct > 0x64)
+ proto_item_append_text(item, "Throttling factor: value beyond (0,100) is considered as 0");
+ offset++;
+
+ if (length > 2)
+ proto_tree_add_item(tree, hf_gtpv2_spare_bytes, tvb, offset, length - 2, ENC_NA);
+
+
}
/* 8.86 Allocation/Retention Priority (ARP) */
@@ -7145,6 +7164,11 @@ void proto_register_gtpv2(void)
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
+ { &hf_gtpv2_throttling_factor,
+ {"Throttling Factor", "gtpv2.throttling_factor",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_gtpv2_relative_capacity,
{"Relative Capacity", "gtpv2.relative_capacity",
FT_UINT8, BASE_DEC, NULL, 0x0,
@@ -7718,11 +7742,21 @@ void proto_register_gtpv2(void)
FT_UINT8, BASE_DEC, VALS(gtpv2_timer_unit_vals), 0xe0,
NULL, HFILL}
},
+ { &hf_gtpv2_throttling_delay_unit,
+ {"Throttling Delay unit", "gtpv2.throttling_delay_unit",
+ FT_UINT8, BASE_DEC, VALS(gtpv2_timer_unit_vals), 0xe0,
+ NULL, HFILL }
+ },
{ &hf_gtpv2_timer_value,
{"Timer value", "gtpv2.timer_value",
FT_UINT8, BASE_DEC, NULL, 0x1f,
NULL, HFILL}
},
+ { &hf_gtpv2_throttling_delay_value,
+ {"Throttling Delay value", "gtpv2.throttling_delay_value",
+ FT_UINT8, BASE_DEC, NULL, 0x1f,
+ NULL, HFILL }
+ },
{ &hf_gtpv2_lapi,
{"LAPI (Low Access Priority Indication)", "gtpv2.lapi",
FT_BOOLEAN, 8, NULL, 0x01,