diff options
author | Jakub Zawadzki <darkjames@darkjames.pl> | 2014-05-30 21:59:01 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-05-30 20:48:46 +0000 |
commit | 60daebaf16d46e86db8b395f49672cd4f767083a (patch) | |
tree | a274bc84ec4c2ecdcb5e09d8872501e259424e2c | |
parent | d84b683bac2d8fa50a0ba5612e58d8a58c93db27 (diff) |
Use tcp_info_append_uint() more
Change-Id: I27656eacb698f8db7bfbe4f5502658c78b03fc13
Reviewed-on: https://code.wireshark.org/review/1890
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-tcp.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 76d889d692..bfdef96dd9 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -4333,10 +4333,10 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) flags_str = tcp_flags_to_str(tcph); col_append_fstr(pinfo->cinfo, COL_INFO, " [%s] Seq=%u", flags_str, tcph->th_seq); - if (tcph->th_flags&TH_ACK) { - col_append_fstr(pinfo->cinfo, COL_INFO, " Ack=%u", tcph->th_ack); - } - col_append_fstr(pinfo->cinfo, COL_INFO, " Win=%u", tcph->th_win); + if (tcph->th_flags&TH_ACK) + tcp_info_append_uint(pinfo, "Ack", tcph->th_ack); + + tcp_info_append_uint(pinfo, "Win", tcph->th_win); if (tree) { if (tcp_summary_in_tree) { @@ -4643,7 +4643,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) rlogin. */ tcpinfo.urgent = TRUE; tcpinfo.urgent_pointer = th_urp; - col_append_fstr(pinfo->cinfo, COL_INFO, " Urg=%u", th_urp); + tcp_info_append_uint(pinfo, "Urg", th_urp); } else { tcpinfo.urgent = FALSE; if (th_urp) { @@ -4652,9 +4652,8 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - if (tcph->th_have_seglen) { - col_append_fstr(pinfo->cinfo, COL_INFO, " Len=%u", tcph->th_seglen); - } + if (tcph->th_have_seglen) + tcp_info_append_uint(pinfo, "Len", tcph->th_seglen); /* If there's more than just the fixed-length header (20 bytes), create a protocol tree item for the options. (We already know there's |