diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
commit | 7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 (patch) | |
tree | 3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-dns.c | |
parent | 6f1d3a3be830da628246f7cea77fe9c491470d17 (diff) | |
download | wireshark-7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3.tar.gz wireshark-7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3.tar.bz2 wireshark-7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3.zip |
Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also
added packet-clip.c to the Nmake makefile.
svn path=/trunk/; revision=402
Diffstat (limited to 'packet-dns.c')
-rw-r--r-- | packet-dns.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/packet-dns.c b/packet-dns.c index 66eec34107..7ff4b7f113 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.19 1999/07/07 22:51:41 gram Exp $ + * $Id: packet-dns.c,v 1.20 1999/07/29 05:46:53 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -40,6 +40,7 @@ #include "packet-dns.h" #include "util.h" +static int proto_dns = -1; /* DNS structs and definitions */ @@ -706,7 +707,7 @@ dissect_dns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } if (tree) { - ti = proto_tree_add_text(tree, offset, 4, + ti = proto_tree_add_item_format(tree, proto_dns, offset, 4, NULL, (flags & F_RESPONSE) ? "DNS response" : "DNS query"); dns_tree = proto_item_add_subtree(ti, ETT_DNS); @@ -781,3 +782,15 @@ dissect_dns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { dns_tree, "Additional records"); } } + +void +proto_register_dns(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "dns.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_dns = proto_register_protocol("Domain Name Service", "dns"); + /* proto_register_field_array(proto_dns, hf, array_length(hf));*/ +} |