diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-09-27 22:12:47 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-09-27 22:12:47 +0000 |
commit | 214a634bcfe889e619b41634937ce756759baead (patch) | |
tree | 01aa8a843d84f24a66f7bd9af00e105efe1ffcdc /packet-dns.c | |
parent | 7a0ec6611ba62ef31112df49e825f6104fccb39b (diff) |
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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-dns.c')
-rw-r--r-- | packet-dns.c | 12 |
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(); |