diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-11-17 05:04:04 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-11-17 05:04:04 +0000 |
commit | 39d50a09f5cc4465bff17749837c9843da33d057 (patch) | |
tree | b9400595363fcf5ff1a35dca3efccf7b7d92cd94 | |
parent | 470fffbe32e31e4c164477cd823fd3b92780e325 (diff) |
* Fixes for TCP and UDP port number display.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@98 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | column.c | 8 | ||||
-rw-r--r-- | packet-tcp.c | 10 | ||||
-rw-r--r-- | packet-udp.c | 12 |
3 files changed, 26 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* column.c * Routines for handling column preferences * - * $Id: column.c,v 1.1 1998/11/17 04:28:40 gerald Exp $ + * $Id: column.c,v 1.2 1998/11/17 05:04:03 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -150,6 +150,12 @@ get_column_format_matches(gboolean *fmt_list, gint format) { case COL_DEF_NET_DST: fmt_list[COL_RES_NET_DST] = TRUE; break; + case COL_DEF_SRC_PORT: + fmt_list[COL_RES_SRC_PORT] = TRUE; + break; + case COL_DEF_DST_PORT: + fmt_list[COL_RES_DST_PORT] = TRUE; + break; default: break; } diff --git a/packet-tcp.c b/packet-tcp.c index 433ab55e5d..a3c8b47356 100644 --- a/packet-tcp.c +++ b/packet-tcp.c @@ -1,7 +1,7 @@ /* packet-tcp.c * Routines for TCP packet disassembly * - * $Id: packet-tcp.c,v 1.6 1998/11/17 04:29:05 gerald Exp $ + * $Id: packet-tcp.c,v 1.7 1998/11/17 05:04:04 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -255,6 +255,14 @@ dissect_tcp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { if (check_col(fd, COL_INFO)) col_add_fstr(fd, COL_INFO, "Source port: %d Destination port: %d", th.th_sport, th.th_dport); + if (check_col(fd, COL_RES_SRC_PORT)) + col_add_fstr(fd, COL_RES_SRC_PORT, "%d", th.th_sport); + if (check_col(fd, COL_UNRES_SRC_PORT)) + col_add_fstr(fd, COL_UNRES_SRC_PORT, "%d", th.th_sport); + if (check_col(fd, COL_RES_DST_PORT)) + col_add_fstr(fd, COL_RES_DST_PORT, "%d", th.th_dport); + if (check_col(fd, COL_UNRES_DST_PORT)) + col_add_fstr(fd, COL_UNRES_DST_PORT, "%d", th.th_dport); hlen = th.th_off * 4; /* TCP header length, in bytes */ diff --git a/packet-udp.c b/packet-udp.c index 8ac5c3ff24..81841e48bd 100644 --- a/packet-udp.c +++ b/packet-udp.c @@ -1,7 +1,7 @@ /* packet-udp.c * Routines for UDP packet disassembly * - * $Id: packet-udp.c,v 1.7 1998/11/17 04:29:07 gerald Exp $ + * $Id: packet-udp.c,v 1.8 1998/11/17 05:04:04 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -62,7 +62,15 @@ dissect_udp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { if (check_col(fd, COL_INFO)) col_add_fstr(fd, COL_INFO, "Source port: %s Destination port: %s", get_udp_port(uh_sport), get_udp_port(uh_dport)); - + if (check_col(fd, COL_RES_SRC_PORT)) + col_add_str(fd, COL_RES_SRC_PORT, get_udp_port(uh_sport)); + if (check_col(fd, COL_UNRES_SRC_PORT)) + col_add_fstr(fd, COL_UNRES_SRC_PORT, "%d", uh_sport); + if (check_col(fd, COL_RES_DST_PORT)) + col_add_str(fd, COL_RES_DST_PORT, get_udp_port(uh_dport)); + if (check_col(fd, COL_UNRES_DST_PORT)) + col_add_fstr(fd, COL_UNRES_DST_PORT, "%d", uh_dport); + if (tree) { ti = add_item_to_tree(GTK_WIDGET(tree), offset, 8, "User Datagram Protocol"); |