aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rx.c
diff options
context:
space:
mode:
authorMark Vitale <mvitale@sinenomine.net>2019-12-18 21:02:32 -0500
committerAnders Broman <a.broman58@gmail.com>2020-03-06 04:00:14 +0000
commita58b3984613e408c8bdfeec06e58da5b7b2f039d (patch)
treeb7ab618577fdb6207e5b40fa7d249feb157bd6e1 /epan/dissectors/packet-rx.c
parent3c91b1b5339e0d692c5b2e3cf63cbf4ea8661dde (diff)
rx: display rx-ack reason string
There are many reasons for an Rx ack packet; add the reason string to the info column. Change-Id: I7512fcff0a9eda2def20f8194cb5ca804497a4dc Reviewed-on: https://code.wireshark.org/review/36293 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rx.c')
-rw-r--r--epan/dissectors/packet-rx.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/epan/dissectors/packet-rx.c b/epan/dissectors/packet-rx.c
index 01628f56bd..b9fbb3221b 100644
--- a/epan/dissectors/packet-rx.c
+++ b/epan/dissectors/packet-rx.c
@@ -295,20 +295,10 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
{
proto_tree *tree;
proto_item *item;
- guint8 num;
+ guint8 num, reason;
int old_offset = offset;
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "ACK "
- "Seq: %lu "
- "Call: %lu "
- "Source Port: %s "
- "Destination Port: %s ",
- (unsigned long)seq,
- (unsigned long)callnumber,
- udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
- udp_port_to_display(wmem_packet_scope(), pinfo->destport)
- );
+
item = proto_tree_add_item(parent_tree, hf_rx_ack, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_rx_ack);
@@ -335,6 +325,7 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
offset += 4;
/* reason : 1 byte */
+ reason = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_rx_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -383,6 +374,19 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
}
}
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "ACK %s "
+ "Seq: %lu "
+ "Call: %lu "
+ "Source Port: %s "
+ "Destination Port: %s ",
+ val_to_str(reason, rx_reason, "%d"),
+ (unsigned long)seq,
+ (unsigned long)callnumber,
+ udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
+ udp_port_to_display(wmem_packet_scope(), pinfo->destport)
+ );
+
proto_item_set_len(item, offset-old_offset);
return offset;
}