1 /* packet-dcerpc-dnsserver.c
2 * Routines for SMB \PIPE\DNSSERVER packet disassembly
3 * Copyright 2001, 2002 Tim Potter <tpot@samba.org>
5 * $Id: packet-dcerpc-dnsserver.c,v 1.2 2003/06/26 04:30:27 tpot Exp $
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #include <epan/packet.h>
32 #include "packet-dcerpc.h"
33 #include "packet-dcerpc-nt.h"
34 #include "packet-dcerpc-dnsserver.h"
37 /* Global hf index fields */
39 static int hf_rc = -1;
41 static int proto_dcerpc_dnsserver = -1;
42 static int hf_opnum = -1;
44 static gint ett_dnsserver = -1;
46 static e_uuid_t uuid_dcerpc_dnsserver = {
47 0x50abc2a4, 0x574d, 0x40b3,
48 { 0x9d, 0x66, 0xee, 0x4f, 0xd5, 0xfb, 0xa0, 0x76 }
51 static guint16 ver_dcerpc_dnsserver = 5;
53 static dcerpc_sub_dissector dcerpc_dnsserver_dissectors[] = {
54 { UNKNOWN_00, "Unknown 0x00", NULL, NULL },
55 { UNKNOWN_01, "Unknown 0x01", NULL, NULL },
56 { UNKNOWN_02, "Unknown 0x02", NULL, NULL },
57 { UNKNOWN_03, "Unknown 0x02", NULL, NULL },
59 { 0, NULL, NULL, NULL }
63 proto_register_dcerpc_dnsserver(void)
65 static hf_register_info hf[] = {
70 { "Return code", "dnsserver.rc", FT_UINT32, BASE_HEX,
71 VALS(NT_errors), 0x0, "Return code", HFILL }},
74 { "Operation", "dnsserver.opnum", FT_UINT16, BASE_DEC,
75 NULL, 0x0, "Operation", HFILL }},
78 static gint *ett[] = {
82 proto_dcerpc_dnsserver = proto_register_protocol(
83 "Windows 2000 DNS", "DNSSERVER", "dnsserver");
85 proto_register_field_array(proto_dcerpc_dnsserver, hf, array_length(hf));
87 proto_register_subtree_array(ett, array_length(ett));
91 proto_reg_handoff_dcerpc_dnsserver(void)
93 header_field_info *hf_info;
95 /* Register protocol as dcerpc */
98 proto_dcerpc_dnsserver, ett_dnsserver, &uuid_dcerpc_dnsserver,
99 ver_dcerpc_dnsserver, dcerpc_dnsserver_dissectors, hf_opnum);
101 /* Set opnum strings from subdissector list */
103 hf_info = proto_registrar_get_nth(hf_opnum);
104 hf_info->strings = value_string_from_subdissectors(
105 dcerpc_dnsserver_dissectors, array_length(dcerpc_dnsserver_dissectors));