2 * This dissector is autogenerated
5 /* packet-dcerpc-drsuapi.c
6 * Routines for DRSUAPI packet disassembly
9 * $Id: packet-dcerpc-drsuapi-template.c 30422 2009-10-09 09:12:59Z krj $
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 #include <epan/packet.h>
38 #include "packet-dcerpc.h"
39 #include "packet-dcerpc-nt.h"
40 #include "packet-windows-common.h"
41 #include "packet-dcerpc-drsuapi.h"
43 static int proto_drsuapi
= -1;
44 static int hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn
= -1;
50 ucarray_drsuapi_dissect_DsReplicaSyncRequest1Info_nc_dn(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
, guint8
*drep
)
52 header_field_info
*hfinfo
;
58 di
=pinfo
->private_data
;
59 if(di
->conformant_run
){
60 /*just a run to handle conformant arrays, nothing to dissect
61 but we need to remember how long this array was.
62 see packet-dcerpc.c for examples of conformant_run
66 offset
=dissect_dcerpc_uint32(tvb
, offset
, pinfo
, NULL
, drep
, -1, &len
);
67 di
->array_max_count_offset
=offset
-4;
69 di
->conformant_eaten
=offset
-old_offset
;
75 s
= tvb_fake_unicode(tvb
, offset
, len
, TRUE
);
77 hfinfo
= proto_registrar_get_nth(hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn
);
78 if (hfinfo
->type
== FT_STRING
) {
79 proto_tree_add_string(tree
, hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn
, tvb
, offset
,
82 proto_tree_add_item(tree
, hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn
, tvb
, offset
,
92 drsuapi_dissect_a_string(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
, guint8
*drep
, int hf_index
, guint32 param _U_
)
94 offset
=dissect_ndr_vstring(tvb
, offset
, pinfo
, tree
, drep
, 1, hf_index
, FALSE
, NULL
);
101 proto_register_drsuapi(void)
103 static hf_register_info hf
[] = {
104 { &hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn
,
105 { "nc_dn", "drsuapi.DsReplicaSyncRequest1Info.nc_dn", FT_STRING
, BASE_NONE
,
112 static gint
*ett
[] = {
116 proto_drsuapi
= proto_register_protocol(
118 "DRSUAPI", "drsuapi");
119 proto_register_field_array(proto_drsuapi
, hf
, array_length(hf
));
120 proto_register_subtree_array(ett
, array_length(ett
));
123 static dcerpc_sub_dissector function_dissectors
[] = {
125 { 0, NULL
, NULL
, NULL
},
129 proto_reg_handoff_drsuapi(void)