HACK: 2nd try to match RowsetProperties
[wireshark-wip.git] / epan / dissectors / dcerpc / drsuapi / packet-dcerpc-drsuapi-template.c
blobf80d4990f4d80e92a10dd522760a8e153515bc87
1 /* DO NOT EDIT
2 * This dissector is autogenerated
3 */
5 /* packet-dcerpc-drsuapi.c
6 * Routines for DRSUAPI packet disassembly
7 * ronnie sahlberg 2005
9 * $Id$
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #include "config.h"
32 #include <glib.h>
33 #include <string.h>
35 #include <epan/packet.h>
36 #include "packet-dcerpc.h"
37 #include "packet-dcerpc-nt.h"
38 #include "packet-windows-common.h"
39 #include "packet-dcerpc-drsuapi.h"
41 static int proto_drsuapi = -1;
42 static int hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn = -1;
43 ETH_HF
45 ETH_ETT
47 static int
48 ucarray_drsuapi_dissect_DsReplicaSyncRequest1Info_nc_dn(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
50 static guint32 len;
51 int old_offset;
53 if(di->conformant_run){
54 /*just a run to handle conformant arrays, nothing to dissect
55 but we need to remember how long this array was.
56 see packet-dcerpc.c for examples of conformant_run
57 and what it is.
59 old_offset=offset;
60 offset=dissect_dcerpc_uint32(tvb, offset, pinfo, NULL, drep, -1, &len);
61 di->array_max_count_offset=offset-4;
62 di->conformant_run=1;
63 di->conformant_eaten=offset-old_offset;
64 return offset;
67 ALIGN_TO_2_BYTES;
69 if (tree && len) {
70 proto_tree_add_item(tree, hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn, tvb, offset,
71 len*2, ENC_UTF_16|ENC_LITTLE_ENDIAN);
74 offset+=2*len;
75 return offset;
78 static int
79 drsuapi_dissect_a_string(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep, int hf_index, guint32 param _U_)
81 offset=dissect_ndr_vstring(tvb, offset, pinfo, tree, di, drep, 1, hf_index, FALSE, NULL);
82 return offset;
85 ETH_CODE
87 void
88 proto_register_drsuapi(void)
90 static hf_register_info hf[] = {
91 { &hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn,
92 { "nc_dn", "drsuapi.DsReplicaSyncRequest1Info.nc_dn", FT_STRING, BASE_NONE,
93 NULL, 0,
94 NULL, HFILL }},
96 ETH_HFARR
99 static gint *ett[] = {
100 ETH_ETTARR
103 proto_drsuapi = proto_register_protocol(
104 "DRSUAPI",
105 "DRSUAPI", "drsuapi");
106 proto_register_field_array(proto_drsuapi, hf, array_length(hf));
107 proto_register_subtree_array(ett, array_length(ett));
110 static dcerpc_sub_dissector function_dissectors[] = {
111 ETH_FT
112 { 0, NULL, NULL, NULL },
115 void
116 proto_reg_handoff_drsuapi(void)
118 ETH_HANDOFF