summaryrefslogtreecommitdiff
path: root/packet-dns.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>1998-09-27 22:12:47 +0000
committerGerald Combs <gerald@wireshark.org>1998-09-27 22:12:47 +0000
commit2e7e493198543e3fdb4b404763b02a2ad22d180e (patch)
tree01aa8a843d84f24a66f7bd9af00e105efe1ffcdc /packet-dns.c
parent385699d4310480e19aecf08dcff23e792667747a (diff)
downloadwireshark-2e7e493198543e3fdb4b404763b02a2ad22d180e.tar.gz
Merged in a _huge_ patch from Guy Harris. It adds a time stap column,
generalizes the column printing code, adds a "frame" tree item to the tree view, and fixes a bunch of miscellaneous coding bugs. svn path=/trunk/; revision=31
Diffstat (limited to 'packet-dns.c')
-rw-r--r--packet-dns.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/packet-dns.c b/packet-dns.c
index f493da19db..59f96a1bee 100644
--- a/packet-dns.c
+++ b/packet-dns.c
@@ -1,7 +1,7 @@
/* packet-dns.c
* Routines for DNS packet disassembly
*
- * $Id: packet-dns.c,v 1.3 1998/09/27 03:42:33 gram Exp $
+ * $Id: packet-dns.c,v 1.4 1998/09/27 22:12:28 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -31,6 +31,7 @@
#include <pcap.h>
#include <stdio.h>
+#include <memory.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -40,6 +41,7 @@
# include <netinet/in.h>
#endif
+#include "ethereal.h"
#include "packet.h"
@@ -405,13 +407,13 @@ dissect_dns(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
query = ! (flags & (1 << 15));
- if (fd->win_info[0]) {
- strcpy(fd->win_info[3], "DNS (UDP)");
- strcpy(fd->win_info[4], query ? "Query" : "Response");
+ if (fd->win_info[COL_NUM]) {
+ strcpy(fd->win_info[COL_PROTOCOL], "DNS (UDP)");
+ strcpy(fd->win_info[COL_INFO], query ? "Query" : "Response");
}
if (tree) {
- ti = add_item_to_tree(GTK_WIDGET(tree), offset, END_OF_FRAME,
+ ti = add_item_to_tree(GTK_WIDGET(tree), offset, 4,
query ? "DNS query" : "DNS response");
dns_tree = gtk_tree_new();