forked from osmocom/wireshark
* Fixes for TCP and UDP port number display.
svn path=/trunk/; revision=98
This commit is contained in:
parent
6ca358948b
commit
e1b6a91df5
8
column.c
8
column.c
|
@ -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;
|
||||
}
|
||||
|
|
10
packet-tcp.c
10
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 */
|
||||
|
||||
|
|
12
packet-udp.c
12
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");
|
||||
|
|
Loading…
Reference in New Issue