aboutsummaryrefslogtreecommitdiffstats
path: root/packet-bootp.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-bootp.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-bootp.c')
-rw-r--r--packet-bootp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/packet-bootp.c b/packet-bootp.c
index 83931d1cad..e3e77ff75f 100644
--- a/packet-bootp.c
+++ b/packet-bootp.c
@@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-bootp.c,v 1.9 1998/11/12 21:39:18 gram Exp $
+ * $Id: packet-bootp.c,v 1.10 1998/11/17 04:28:51 gerald Exp $
*
* The information used comes from:
* RFC 2132: DHCP Options and BOOTP Vendor Extensions
@@ -388,16 +388,17 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree)
GtkWidget *bp_tree, *ti;
int voff, eoff; /* vender offset, end offset */
- if (fd->win_info[COL_NUM]) {
- strcpy(fd->win_info[COL_PROTOCOL], "BOOTP");
+ if (check_col(fd, COL_PROTOCOL))
+ col_add_str(fd, COL_PROTOCOL, "BOOTP");
+ if (check_col(fd, COL_INFO)) {
/* if hwaddr is 6 bytes, assume MAC */
if (pd[offset] == 1 && pd[offset+2] == 6) {
- sprintf(fd->win_info[COL_INFO], "Boot Request from %s",
+ col_add_fstr(fd, COL_INFO, "Boot Request from %s",
ether_to_str((guint8*)&pd[offset+28]));
}
else {
- strcpy(fd->win_info[COL_INFO], pd[offset] == 1 ? "Boot Request" :
+ col_add_str(fd, COL_INFO, pd[offset] == 1 ? "Boot Request" :
"Boot Reply");
}
}