diff options
author | Gerald Combs <gerald@wireshark.org> | 1998-12-21 03:42:22 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 1998-12-21 03:42:22 +0000 |
commit | 719fd89b5fc4eab442e9bee00f7214589981ce64 (patch) | |
tree | fcb73fd753e3c82fc307fb7a7de2f2e5e9153e84 /packet-udp.c | |
parent | 3ef33b29e9d40301da91c1d070a5b7e5e92a6301 (diff) | |
download | wireshark-719fd89b5fc4eab442e9bee00f7214589981ce64.tar.gz wireshark-719fd89b5fc4eab442e9bee00f7214589981ce64.tar.bz2 wireshark-719fd89b5fc4eab442e9bee00f7214589981ce64.zip |
Changed port print formats to unsigned, added raw port number to tree output.
svn path=/trunk/; revision=132
Diffstat (limited to 'packet-udp.c')
-rw-r--r-- | packet-udp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packet-udp.c b/packet-udp.c index 488e6fd863..a3e5df4089 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.9 1998/11/20 05:58:41 gram Exp $ + * $Id: packet-udp.c,v 1.10 1998/12/21 03:42:22 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -65,20 +65,22 @@ dissect_udp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { 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); + col_add_fstr(fd, COL_UNRES_SRC_PORT, "%u", 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); + col_add_fstr(fd, COL_UNRES_DST_PORT, "%u", uh_dport); if (tree) { ti = add_item_to_tree(GTK_WIDGET(tree), offset, 8, "User Datagram Protocol"); udp_tree = gtk_tree_new(); add_subtree(ti, udp_tree, ETT_UDP); - add_item_to_tree(udp_tree, offset, 2, "Source port: %s", get_udp_port(uh_sport)); - add_item_to_tree(udp_tree, offset + 2, 2, "Destination port: %s", get_udp_port(uh_dport)); - add_item_to_tree(udp_tree, offset + 4, 2, "Length: %d", uh_ulen); + add_item_to_tree(udp_tree, offset, 2, "Source port: %s (%u)", + get_udp_port(uh_sport), uh_sport); + add_item_to_tree(udp_tree, offset + 2, 2, "Destination port: %s (%u)", + get_udp_port(uh_dport), uh_dport); + add_item_to_tree(udp_tree, offset + 4, 2, "Length: %u", uh_ulen); add_item_to_tree(udp_tree, offset + 6, 2, "Checksum: 0x%04x", uh_sum); } |