From 6c066adad7649bfcc031e0b28f08d561183f131c Mon Sep 17 00:00:00 2001 From: Vivek Mangala Date: Wed, 15 Sep 2021 14:37:35 +0530 Subject: twamp: improved decoding of Request-Session Added decoding and display of "Number of Schedule Slots" and "Number of Packets" parameters contained in Request-Session message in TWAMP Control protocol, in accordance with RFC-4656. --- epan/dissectors/packet-twamp.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'epan/dissectors/packet-twamp.c') diff --git a/epan/dissectors/packet-twamp.c b/epan/dissectors/packet-twamp.c index 1f46e0d677..8095035f54 100644 --- a/epan/dissectors/packet-twamp.c +++ b/epan/dissectors/packet-twamp.c @@ -123,6 +123,8 @@ static int hf_twamp_control_iv = -1; static int hf_twamp_control_ipvn = -1; static int hf_twamp_control_conf_sender = -1; static int hf_twamp_control_conf_receiver = -1; +static int hf_twamp_control_number_of_schedule_slots = -1; +static int hf_twamp_control_number_of_packets = -1; static int hf_twamp_control_start_time = -1; static int hf_twamp_control_accept = -1; static int hf_twamp_control_timeout = -1; @@ -380,8 +382,14 @@ dissect_twamp_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void offset += 1; proto_tree_add_item(twamp_tree, hf_twamp_control_conf_receiver, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(twamp_tree, hf_twamp_control_number_of_schedule_slots, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + + proto_tree_add_item(twamp_tree, hf_twamp_control_number_of_packets, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; - offset = 12; proto_tree_add_item(twamp_tree, hf_twamp_control_sender_port, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(twamp_tree, hf_twamp_control_receiver_port, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -749,6 +757,12 @@ void proto_register_twamp(void) {&hf_twamp_control_conf_receiver, {"Conf-Receiver", "twamp.control.conf_receiver", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, + {&hf_twamp_control_number_of_schedule_slots, + {"Number of Schedule Slots", "twamp.control.number_of_schedule_slots", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} + }, + {&hf_twamp_control_number_of_packets, + {"Number of Packets", "twamp.control.number_of_packets", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} + }, {&hf_twamp_control_sender_ipv4, {"Sender Address", "twamp.control.sender_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, "IPv4 sender address want to use in test packets", HFILL} -- cgit v1.2.3