aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tr.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>1998-11-17 04:29:13 +0000
committerGerald Combs <gerald@wireshark.org>1998-11-17 04:29:13 +0000
commit6ca358948b8c5aa99a4e0db8595f601ab834e76e (patch)
tree750ab11a6661c391b126d4ce990b7fc01cb98d46 /packet-tr.c
parent8d616b03429fe2185782f5153d7b187a44698b5d (diff)
* Added column formatting functionality.
* Added check_col(), add_col_str() and add_col_fmt() to replace references to ft->win_info. * Added column prefs handling code. svn path=/trunk/; revision=97
Diffstat (limited to 'packet-tr.c')
-rw-r--r--packet-tr.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/packet-tr.c b/packet-tr.c
index b14e75e6a5..89702e8a11 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-tr.c,v 1.7 1998/11/12 00:06:38 gram Exp $
+ * $Id: packet-tr.c,v 1.8 1998/11/17 04:29:06 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -178,12 +178,14 @@ dissect_tr(const u_char *pd, frame_data *fd, GtkTree *tree) {
/* information window */
- if (fd->win_info[COL_NUM]) {
- strcpy(fd->win_info[COL_DESTINATION], ether_to_str((guint8 *)&pd[2]));
- strcpy(fd->win_info[COL_SOURCE], ether_to_str(trn_shost_nonsr));
- strcpy(fd->win_info[COL_PROTOCOL], "TR");
- sprintf(fd->win_info[COL_INFO], "Token-Ring %s", fc[frame_type]);
- }
+ if (check_col(fd, COL_RES_DL_DST))
+ col_add_str(fd, COL_RES_DL_DST, ether_to_str((guint8 *)&pd[2]));
+ if (check_col(fd, COL_RES_DL_SRC))
+ col_add_str(fd, COL_RES_DL_SRC, ether_to_str(trn_shost_nonsr));
+ if (check_col(fd, COL_PROTOCOL))
+ col_add_str(fd, COL_PROTOCOL, "TR");
+ if (check_col(fd, COL_INFO))
+ col_add_fstr(fd, COL_INFO, "Token-Ring %s", fc[frame_type]);
/* protocol analysis tree */
if (tree) {