6586ee2a838c80734bdcd5af0484326ceb2e3b10
[metze/samba/wip.git] / bin / default / librpc / gen_ndr / packet-dcerpc-dcerpc.c
1 /* DO NOT EDIT
2         This filter was automatically generated
3         from /home/metze/devel/samba/4.0/master4-franky/librpc/idl/dcerpc.idl and /home/metze/devel/samba/4.0/master4-franky/librpc/idl/dcerpc.cnf.
4         
5         Pidl is a perl based IDL compiler for DCE/RPC idl files.
6         It is maintained by the Samba team, not the Wireshark team.
7         Instructions on how to download and install Pidl can be
8         found at http://wiki.wireshark.org/Pidl
9
10         $Id$
11 */
12
13
14 #include "config.h"
15 #ifdef _MSC_VER
16 #pragma warning(disable:4005)
17 #pragma warning(disable:4013)
18 #pragma warning(disable:4018)
19 #pragma warning(disable:4101)
20 #endif
21
22 #include <glib.h>
23 #include <string.h>
24 #include <epan/packet.h>
25
26 #include "packet-dcerpc.h"
27 #include "packet-dcerpc-nt.h"
28 #include "packet-windows-common.h"
29 #include "packet-dcerpc-dcerpc.h"
30
31 /* Ett declarations */
32 static gint ett_dcerpc_dcerpc = -1;
33 static gint ett_dcerpc_dcerpc_ctx_list = -1;
34 static gint ett_dcerpc_dcerpc_bind = -1;
35 static gint ett_dcerpc_dcerpc_empty = -1;
36 static gint ett_dcerpc_dcerpc_object = -1;
37 static gint ett_dcerpc_dcerpc_request = -1;
38 static gint ett_dcerpc_dcerpc_ack_ctx = -1;
39 static gint ett_dcerpc_dcerpc_bind_ack = -1;
40 static gint ett_dcerpc_dcerpc_bind_nak_versions = -1;
41 static gint ett_dcerpc_dcerpc_bind_nak_versions_ctr = -1;
42 static gint ett_dcerpc_dcerpc_bind_nak = -1;
43 static gint ett_dcerpc_dcerpc_response = -1;
44 static gint ett_dcerpc_dcerpc_fault = -1;
45 static gint ett_dcerpc_dcerpc_auth = -1;
46 static gint ett_dcerpc_dcerpc_auth3 = -1;
47 static gint ett_dcerpc_dcerpc_orphaned = -1;
48 static gint ett_dcerpc_dcerpc_co_cancel = -1;
49 static gint ett_dcerpc_dcerpc_cl_cancel = -1;
50 static gint ett_dcerpc_dcerpc_cancel_ack = -1;
51 static gint ett_dcerpc_dcerpc_fack = -1;
52 static gint ett_dcerpc_dcerpc_ack = -1;
53 static gint ett_dcerpc_dcerpc_ping = -1;
54 static gint ett_dcerpc_dcerpc_shutdown = -1;
55 static gint ett_dcerpc_dcerpc_working = -1;
56 static gint ett_dcerpc_RTSCookie = -1;
57 static gint ett_dcerpc_ClientAddressType = -1;
58 static gint ett_dcerpc_ClientAddress = -1;
59 static gint ett_dcerpc_FlowControlAcknowledgment = -1;
60 static gint ett_dcerpc_dcerpc_rts_cmd_ReceiveWindowSize = -1;
61 static gint ett_dcerpc_dcerpc_rts_cmd_FlowControlAck = -1;
62 static gint ett_dcerpc_dcerpc_rts_cmd_ConnectionTimeout = -1;
63 static gint ett_dcerpc_dcerpc_rts_cmd_Cookie = -1;
64 static gint ett_dcerpc_dcerpc_rts_cmd_ChannelLifetime = -1;
65 static gint ett_dcerpc_dcerpc_rts_cmd_ClientKeepalive = -1;
66 static gint ett_dcerpc_dcerpc_rts_cmd_Version = -1;
67 static gint ett_dcerpc_dcerpc_rts_cmd_Empty = -1;
68 static gint ett_dcerpc_dcerpc_rts_cmd_Padding = -1;
69 static gint ett_dcerpc_dcerpc_rts_cmd_NegativeANCE = -1;
70 static gint ett_dcerpc_dcerpc_rts_cmd_ANCE = -1;
71 static gint ett_dcerpc_dcerpc_rts_cmd_ClientAddress = -1;
72 static gint ett_dcerpc_dcerpc_rts_cmd_AssociationGroupId = -1;
73 static gint ett_dcerpc_dcerpc_rts_cmd_Destination = -1;
74 static gint ett_dcerpc_dcerpc_rts_cmd_PingTrafficSentNotify = -1;
75 static gint ett_dcerpc_dcerpc_rts_cmds = -1;
76 static gint ett_dcerpc_dcerpc_rts_cmd = -1;
77 static gint ett_dcerpc_dcerpc_rts_flags = -1;
78 static gint ett_dcerpc_dcerpc_rts = -1;
79 static gint ett_dcerpc_dcerpc_payload = -1;
80 static gint ett_dcerpc_ncacn_packet = -1;
81 static gint ett_dcerpc_ncadg_packet = -1;
82
83
84 /* Header field declarations */
85 static gint hf_dcerpc_dcerpc_rts_cmds_val0xE_PingTrafficSentNotify = -1;
86 static gint hf_dcerpc_dcerpc_auth_auth_reserved = -1;
87 static gint hf_dcerpc_dcerpc_bind_ack_secondary_address_size = -1;
88 static gint hf_dcerpc_dcerpc_request_stub_and_verifier = -1;
89 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_PING = -1;
90 static gint hf_dcerpc_ncadg_packet_u = -1;
91 static gint hf_dcerpc_dcerpc_rts_cmds_val0x2_ConnectionTimeout = -1;
92 static gint hf_dcerpc_dcerpc_fack_serial_no = -1;
93 static gint hf_dcerpc_dcerpc_cl_cancel_version = -1;
94 static gint hf_dcerpc_dcerpc_rts_cmds_val0x1_FlowControlAck = -1;
95 static gint hf_dcerpc_dcerpc_orphaned_auth_info = -1;
96 static gint hf_dcerpc_dcerpc_ack_ctx_result = -1;
97 static gint hf_dcerpc_dcerpc_co_cancel_auth_info = -1;
98 static gint hf_dcerpc_dcerpc_auth_auth_context_id = -1;
99 static gint hf_dcerpc_dcerpc_rts_cmd_Command = -1;
100 static gint hf_dcerpc_dcerpc_rts_cmds_val0x8_Padding = -1;
101 static gint hf_dcerpc_ncadg_packet_fragnum = -1;
102 static gint hf_dcerpc_ncadg_packet_pfc_flags = -1;
103 static gint hf_dcerpc_ncacn_packet_u = -1;
104 static gint hf_dcerpc_dcerpc_rts_cmds_val0x4_ChannelLifetime = -1;
105 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_REQUEST_request = -1;
106 static gint hf_dcerpc_dcerpc_bind_nak_versions_num_versions = -1;
107 static gint hf_dcerpc_dcerpc_rts_cmds_val0xB_ClientAddress = -1;
108 static gint hf_dcerpc_ncacn_packet_auth_length = -1;
109 static gint hf_dcerpc_ncadg_packet_ihint = -1;
110 static gint hf_dcerpc_ncadg_packet_iface = -1;
111 static gint hf_dcerpc_dcerpc_rts_cmd_Padding_ConformanceCount = -1;
112 static gint hf_dcerpc_dcerpc_request_object = -1;
113 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_AUTH3_auth3 = -1;
114 static gint hf_dcerpc_ncacn_packet_call_id = -1;
115 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_ACK_bind_ack = -1;
116 static gint hf_dcerpc_dcerpc_request_alloc_hint = -1;
117 static gint hf_dcerpc_dcerpc_bind_ctx_list = -1;
118 static gint hf_dcerpc_dcerpc_ack_ctx_reason = -1;
119 static gint hf_dcerpc_dcerpc_bind_max_xmit_frag = -1;
120 static gint hf_dcerpc_dcerpc_bind_num_contexts = -1;
121 static gint hf_dcerpc_dcerpc_cl_cancel_id = -1;
122 static gint hf_dcerpc_dcerpc_ack_ctx_syntax = -1;
123 static gint hf_dcerpc_ClientAddressType_valRTS_IPV4_ClientAddressIPV4 = -1;
124 static gint hf_dcerpc_dcerpc_bind_ack_max_xmit_frag = -1;
125 static gint hf_dcerpc_dcerpc_rts_cmds_val0x6_Version = -1;
126 static gint hf_dcerpc_dcerpc_fack_max_frag_size = -1;
127 static gint hf_dcerpc_dcerpc_orphaned__pad = -1;
128 static gint hf_dcerpc_dcerpc_bind_ack_max_recv_frag = -1;
129 static gint hf_dcerpc_dcerpc_rts_cmds_val0x0_ReceiveWindowSize = -1;
130 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CANCEL_ACK_cancel_ack = -1;
131 static gint hf_dcerpc_ClientAddressType_valRTS_IPV6_ClientAddressIPV6 = -1;
132 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_SHUTDOWN_shutdown = -1;
133 static gint hf_dcerpc_ncadg_packet_ncadg_flags = -1;
134 static gint hf_dcerpc_dcerpc_ctx_list_context_id = -1;
135 static gint hf_dcerpc_dcerpc_rts_cmds_val0x5_ClientKeepalive = -1;
136 static gint hf_dcerpc_dcerpc_rts_cmd_FlowControlAck_Ack = -1;
137 static gint hf_dcerpc_dcerpc_rts_cmds_val0x7_Empty = -1;
138 static gint hf_dcerpc_dcerpc_bind_max_recv_frag = -1;
139 static gint hf_dcerpc_dcerpc_fack_selack_size = -1;
140 static gint hf_dcerpc_dcerpc_bind_ack_secondary_address = -1;
141 static gint hf_dcerpc_dcerpc_response__pad = -1;
142 static gint hf_dcerpc_dcerpc_rts_cmd_PingTrafficSentNotify_PingTrafficSent = -1;
143 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_FAULT_fault = -1;
144 static gint hf_dcerpc_dcerpc_rts_NumberOfCommands = -1;
145 static gint hf_dcerpc_dcerpc_rts_cmd_ClientKeepalive_ClientKeepalive = -1;
146 static gint hf_dcerpc_ncadg_packet_server_boot = -1;
147 static gint hf_dcerpc_ncacn_packet_rpc_vers_minor = -1;
148 static gint hf_dcerpc_dcerpc_rts_Commands = -1;
149 static gint hf_dcerpc_dcerpc_fault__pad = -1;
150 static gint hf_dcerpc_dcerpc_cancel_ack_id = -1;
151 static gint hf_dcerpc_dcerpc_rts_cmd_Destination_ForwardDestination = -1;
152 static gint hf_dcerpc_dcerpc_fack_selack = -1;
153 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_PING_ping = -1;
154 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_RESPONSE_response = -1;
155 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_EOF = -1;
156 static gint hf_dcerpc_dcerpc_rts_cmds_val0xD_Destination = -1;
157 static gint hf_dcerpc_ClientAddress_Padding = -1;
158 static gint hf_dcerpc_dcerpc_bind_assoc_group_id = -1;
159 static gint hf_dcerpc_dcerpc_fault_cancel_count = -1;
160 static gint hf_dcerpc_dcerpc_response_alloc_hint = -1;
161 static gint hf_dcerpc_dcerpc_fack_window_size = -1;
162 static gint hf_dcerpc_dcerpc_auth_auth_pad_length = -1;
163 static gint hf_dcerpc_ncadg_packet_serial_low = -1;
164 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_NOCALL_nocall = -1;
165 static gint hf_dcerpc_ncadg_packet_opnum = -1;
166 static gint hf_dcerpc_dcerpc_response_stub_and_verifier = -1;
167 static gint hf_dcerpc_FlowControlAcknowledgment_BytesReceived = -1;
168 static gint hf_dcerpc_dcerpc_auth_auth_type = -1;
169 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ACK_ack = -1;
170 static gint hf_dcerpc_dcerpc_request_opnum = -1;
171 static gint hf_dcerpc_ncadg_packet_seq_num = -1;
172 static gint hf_dcerpc_dcerpc_cancel_ack_version = -1;
173 static gint hf_dcerpc_dcerpc_rts_cmds_val0x9_NegativeANCE = -1;
174 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_IN_CHANNEL = -1;
175 static gint hf_dcerpc_dcerpc_bind_ack_num_results = -1;
176 static gint hf_dcerpc_FlowControlAcknowledgment_ChannelCookie = -1;
177 static gint hf_dcerpc_dcerpc_rts_cmd_AssociationGroupId_AssociationGroupId = -1;
178 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_RTS_rts = -1;
179 static gint hf_dcerpc_dcerpc_co_cancel__pad = -1;
180 static gint hf_dcerpc_dcerpc_request__pad = -1;
181 static gint hf_dcerpc_dcerpc_auth_credentials = -1;
182 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_OTHER_CMD = -1;
183 static gint hf_dcerpc_dcerpc_bind_nak_versions_versions = -1;
184 static gint hf_dcerpc_ncadg_packet_activity = -1;
185 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CL_CANCEL_cl_cancel = -1;
186 static gint hf_dcerpc_dcerpc_rts_cmd_ChannelLifetime_ChannelLifetime = -1;
187 static gint hf_dcerpc_ncadg_packet_auth_proto = -1;
188 static gint hf_dcerpc_dcerpc_bind_ack_assoc_group_id = -1;
189 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ALTER_RESP_alter_resp = -1;
190 static gint hf_dcerpc_dcerpc_fault_context_id = -1;
191 static gint hf_dcerpc_ncacn_packet_drep = -1;
192 static gint hf_dcerpc_dcerpc_bind_nak_reject_reason = -1;
193 static gint hf_dcerpc_dcerpc_cancel_ack_server_is_accepting = -1;
194 static gint hf_dcerpc_dcerpc_rts_cmd_ClientAddress_ClientAddress = -1;
195 static gint hf_dcerpc_dcerpc_auth3_auth_info = -1;
196 static gint hf_dcerpc_dcerpc_object_valLIBNDR_FLAG_OBJECT_PRESENT_object = -1;
197 static gint hf_dcerpc_FlowControlAcknowledgment_AvailableWindow = -1;
198 static gint hf_dcerpc_ncacn_packet_frag_length = -1;
199 static gint hf_dcerpc_dcerpc_bind_ack__pad1 = -1;
200 static gint hf_dcerpc_dcerpc_ctx_list_num_transfer_syntaxes = -1;
201 static gint hf_dcerpc_dcerpc_bind_auth_info = -1;
202 static gint hf_dcerpc_dcerpc_auth_auth_level = -1;
203 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_WORKING_working = -1;
204 static gint hf_dcerpc_ncadg_packet_ptype = -1;
205 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CO_CANCEL_co_cancel = -1;
206 static gint hf_dcerpc_ncacn_packet_ptype = -1;
207 static gint hf_dcerpc_dcerpc_fault_status = -1;
208 static gint hf_dcerpc_dcerpc_rts_cmds_val0xA_ANCE = -1;
209 static gint hf_dcerpc_ncadg_packet_serial_high = -1;
210 static gint hf_dcerpc_dcerpc_auth3__pad = -1;
211 static gint hf_dcerpc_dcerpc_rts_cmd_Padding_Padding = -1;
212 static gint hf_dcerpc_ClientAddress_ClientAddress = -1;
213 static gint hf_dcerpc_dcerpc_rts_cmd_Cookie_Cookie = -1;
214 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_FACK_fack = -1;
215 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_REJECT_reject = -1;
216 static gint hf_dcerpc_dcerpc_rts_cmd_ConnectionTimeout_ConnectionTimeout = -1;
217 static gint hf_dcerpc_ncadg_packet_iface_version = -1;
218 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_ECHO = -1;
219 static gint hf_dcerpc_dcerpc_rts_cmds_val0x3_Cookie = -1;
220 static gint hf_dcerpc_dcerpc_bind_nak_versions_ctr_valDECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED_v = -1;
221 static gint hf_dcerpc_dcerpc_fack_max_tdsu = -1;
222 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_NAK_bind_nak = -1;
223 static gint hf_dcerpc_dcerpc_rts_cmd_CommandType = -1;
224 static gint hf_dcerpc_ncacn_packet_rpc_vers = -1;
225 static gint hf_dcerpc_dcerpc_bind_nak_versions = -1;
226 static gint hf_dcerpc_dcerpc_request_context_id = -1;
227 static gint hf_dcerpc_ncadg_packet_ahint = -1;
228 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_OUT_CHANNEL = -1;
229 static gint hf_dcerpc_dcerpc_bind_ack_ctx_list = -1;
230 static gint hf_dcerpc_dcerpc_fack_version = -1;
231 static gint hf_dcerpc_dcerpc_rts_cmd_Version_Version = -1;
232 static gint hf_dcerpc_dcerpc_rts_cmds_val0xC_AssociationGroupId = -1;
233 static gint hf_dcerpc_dcerpc_rts_cmd_ReceiveWindowSize_ReceiveWindowSize = -1;
234 static gint hf_dcerpc_ncadg_packet_rpc_vers = -1;
235 static gint hf_dcerpc_RTSCookie_Cookie = -1;
236 static gint hf_dcerpc_dcerpc_rts_Flags = -1;
237 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ALTER_alter = -1;
238 static gint hf_dcerpc_ClientAddress_AddressType = -1;
239 static gint hf_dcerpc_dcerpc_response_context_id = -1;
240 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_bind = -1;
241 static gint hf_dcerpc_ncadg_packet_drep = -1;
242 static gint hf_dcerpc_ncadg_packet_len = -1;
243 static gint hf_dcerpc_opnum = -1;
244 static gint hf_dcerpc_dcerpc_fault_alloc_hint = -1;
245 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_NONE = -1;
246 static gint hf_dcerpc_ncadg_packet_object = -1;
247 static gint hf_dcerpc_dcerpc_response_cancel_count = -1;
248 static gint hf_dcerpc_dcerpc_fack__pad1 = -1;
249 static gint hf_dcerpc_dcerpc_ctx_list_abstract_syntax = -1;
250 static gint hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_RECYCLE_CHANNEL = -1;
251 static gint hf_dcerpc_ncacn_packet_pfc_flags = -1;
252 static gint hf_dcerpc_dcerpc_object_valdefault_empty = -1;
253 static gint hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ORPHANED_orphaned = -1;
254 static gint hf_dcerpc_dcerpc_ctx_list_transfer_syntaxes = -1;
255 static gint hf_dcerpc_dcerpc_bind_ack_auth_info = -1;
256
257 static gint proto_dcerpc_dcerpc = -1;
258 /* Version information */
259
260
261 static e_uuid_t uuid_dcerpc_dcerpc = {
262         0x, 0x, 0x,
263         { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x }
264 };
265 static guint16 ver_dcerpc_dcerpc = 0;
266
267 static int dcerpc_dissect_element_ctx_list_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
268 static int dcerpc_dissect_element_ctx_list_num_transfer_syntaxes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
269 static int dcerpc_dissect_element_ctx_list_abstract_syntax(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
270 static int dcerpc_dissect_element_ctx_list_transfer_syntaxes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
271 static int dcerpc_dissect_element_ctx_list_transfer_syntaxes_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
272 static int dcerpc_dissect_element_bind_max_xmit_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
273 static int dcerpc_dissect_element_bind_max_recv_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
274 static int dcerpc_dissect_element_bind_assoc_group_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
275 static int dcerpc_dissect_element_bind_num_contexts(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
276 static int dcerpc_dissect_element_bind_ctx_list(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
277 static int dcerpc_dissect_element_bind_ctx_list_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
278 static int dcerpc_dissect_element_bind_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
279 static int dcerpc_dissect_element_object_valdefault_empty(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
280 static int dcerpc_dissect_element_object_valLIBNDR_FLAG_OBJECT_PRESENT_object(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
281 static int dcerpc_dissect_element_request_alloc_hint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
282 static int dcerpc_dissect_element_request_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
283 static int dcerpc_dissect_element_request_opnum(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
284 static int dcerpc_dissect_element_request_object(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *);
285 static int dcerpc_dissect_element_request__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
286 static int dcerpc_dissect_element_request_stub_and_verifier(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
287 static int dcerpc_dissect_element_ack_ctx_result(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
288 static int dcerpc_dissect_element_ack_ctx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
289 static int dcerpc_dissect_element_ack_ctx_syntax(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
290 static int dcerpc_dissect_element_bind_ack_max_xmit_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
291 static int dcerpc_dissect_element_bind_ack_max_recv_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
292 static int dcerpc_dissect_element_bind_ack_assoc_group_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
293 static int dcerpc_dissect_element_bind_ack_secondary_address_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
294 static int dcerpc_dissect_element_bind_ack_secondary_address(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
295 static int dcerpc_dissect_element_bind_ack_secondary_address_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
296 static int dcerpc_dissect_element_bind_ack__pad1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
297 static int dcerpc_dissect_element_bind_ack_num_results(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
298 static int dcerpc_dissect_element_bind_ack_ctx_list(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
299 static int dcerpc_dissect_element_bind_ack_ctx_list_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
300 static int dcerpc_dissect_element_bind_ack_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
301 static int dcerpc_dissect_element_bind_nak_versions_num_versions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
302 static int dcerpc_dissect_element_bind_nak_versions_versions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
303 static int dcerpc_dissect_element_bind_nak_versions_versions_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
304 static int dcerpc_dissect_element_bind_nak_versions_ctr_valDECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED_v(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
305 static int dcerpc_dissect_element_bind_nak_reject_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint16 *reject_reason);
306 static int dcerpc_dissect_element_bind_nak_versions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint16 *reject_reason);
307 static int dcerpc_dissect_element_response_alloc_hint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
308 static int dcerpc_dissect_element_response_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
309 static int dcerpc_dissect_element_response_cancel_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
310 static int dcerpc_dissect_element_response__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
311 static int dcerpc_dissect_element_response_stub_and_verifier(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
312 const value_string dcerpc_dcerpc_nca_status_vals[] = {
313         { DCERPC_NCA_S_COMM_FAILURE, "DCERPC_NCA_S_COMM_FAILURE" },
314         { DCERPC_NCA_S_OP_RNG_ERROR, "DCERPC_NCA_S_OP_RNG_ERROR" },
315         { DCERPC_NCA_S_UNKNOWN_IF, "DCERPC_NCA_S_UNKNOWN_IF" },
316         { DCERPC_NCA_S_WRONG_BOOT_TIME, "DCERPC_NCA_S_WRONG_BOOT_TIME" },
317         { DCERPC_NCA_S_YOU_CRASHED, "DCERPC_NCA_S_YOU_CRASHED" },
318         { DCERPC_NCA_S_PROTO_ERROR, "DCERPC_NCA_S_PROTO_ERROR" },
319         { DCERPC_NCA_S_OUT_ARGS_TOO_BIG, "DCERPC_NCA_S_OUT_ARGS_TOO_BIG" },
320         { DCERPC_NCA_S_SERVER_TOO_BUSY, "DCERPC_NCA_S_SERVER_TOO_BUSY" },
321         { DCERPC_NCA_S_FAULT_STRING_TOO_LARGE, "DCERPC_NCA_S_FAULT_STRING_TOO_LARGE" },
322         { DCERPC_NCA_S_UNSUPPORTED_TYPE, "DCERPC_NCA_S_UNSUPPORTED_TYPE" },
323         { DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO, "DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO" },
324         { DCERPC_NCA_S_FAULT_ADDR_ERROR, "DCERPC_NCA_S_FAULT_ADDR_ERROR" },
325         { DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO, "DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO" },
326         { DCERPC_NCA_S_FAULT_FP_UNDERFLOW, "DCERPC_NCA_S_FAULT_FP_UNDERFLOW" },
327         { DCERPC_NCA_S_FAULT_FP_OVERRFLOW, "DCERPC_NCA_S_FAULT_FP_OVERRFLOW" },
328         { DCERPC_NCA_S_FAULT_INVALID_TAG, "DCERPC_NCA_S_FAULT_INVALID_TAG" },
329         { DCERPC_NCA_S_FAULT_INVALID_BOUND, "DCERPC_NCA_S_FAULT_INVALID_BOUND" },
330         { DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH, "DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH" },
331         { DCERPC_NCA_S_FAULT_UNSPEC_REJECT, "DCERPC_NCA_S_FAULT_UNSPEC_REJECT" },
332         { DCERPC_NCA_S_FAULT_BAD_ACTID, "DCERPC_NCA_S_FAULT_BAD_ACTID" },
333         { DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED, "DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED" },
334         { DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED, "DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED" },
335         { DCERPC_NCA_S_FAULT_CANCEL, "DCERPC_NCA_S_FAULT_CANCEL" },
336         { DCERPC_NCA_S_FAULT_ILL_INST, "DCERPC_NCA_S_FAULT_ILL_INST" },
337         { DCERPC_NCA_S_FAULT_FP_ERROR, "DCERPC_NCA_S_FAULT_FP_ERROR" },
338         { DCERPC_NCA_S_FAULT_INT_OVERFLOW, "DCERPC_NCA_S_FAULT_INT_OVERFLOW" },
339         { DCERPC_NCA_S_UNUSED_1C000011, "DCERPC_NCA_S_UNUSED_1C000011" },
340         { DCERPC_NCA_S_FAULT_UNSPEC, "DCERPC_NCA_S_FAULT_UNSPEC" },
341         { DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE, "DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE" },
342         { DCERPC_NCA_S_FAULT_PIPE_EMPTY, "DCERPC_NCA_S_FAULT_PIPE_EMPTY" },
343         { DCERPC_NCA_S_FAULT_PIPE_CLOSED, "DCERPC_NCA_S_FAULT_PIPE_CLOSED" },
344         { DCERPC_NCA_S_FAULT_PIPE_ORDER, "DCERPC_NCA_S_FAULT_PIPE_ORDER" },
345         { DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE, "DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE" },
346         { DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR, "DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR" },
347         { DCERPC_NCA_S_FAULT_PIPE_MEMORY, "DCERPC_NCA_S_FAULT_PIPE_MEMORY" },
348         { DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH, "DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH" },
349         { DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY, "DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY" },
350         { DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID, "DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID" },
351         { DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL, "DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL" },
352         { DCERPC_NCA_S_UNUSED_1C00001E, "DCERPC_NCA_S_UNUSED_1C00001E" },
353         { DCERPC_NCA_S_INVALID_CHECKSUM, "DCERPC_NCA_S_INVALID_CHECKSUM" },
354         { DCERPC_NCA_S_INVALID_CRC, "DCERPC_NCA_S_INVALID_CRC" },
355         { DCERPC_NCA_S_FAULT_USER_DEFINED, "DCERPC_NCA_S_FAULT_USER_DEFINED" },
356         { DCERPC_NCA_S_FAULT_TX_OPEN_FAILED, "DCERPC_NCA_S_FAULT_TX_OPEN_FAILED" },
357         { DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR, "DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR" },
358         { DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND, "DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND" },
359         { DCERPC_NCA_S_FAULT_NO_CLIENT_STUB, "DCERPC_NCA_S_FAULT_NO_CLIENT_STUB" },
360 { 0, NULL }
361 };
362 static int dcerpc_dissect_element_fault_alloc_hint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
363 static int dcerpc_dissect_element_fault_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
364 static int dcerpc_dissect_element_fault_cancel_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
365 static int dcerpc_dissect_element_fault_status(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
366 static int dcerpc_dissect_element_fault__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
367 const value_string dcerpc_dcerpc_AuthType_vals[] = {
368         { DCERPC_AUTH_TYPE_NONE, "DCERPC_AUTH_TYPE_NONE" },
369         { DCERPC_AUTH_TYPE_KRB5_1, "DCERPC_AUTH_TYPE_KRB5_1" },
370         { DCERPC_AUTH_TYPE_SPNEGO, "DCERPC_AUTH_TYPE_SPNEGO" },
371         { DCERPC_AUTH_TYPE_NTLMSSP, "DCERPC_AUTH_TYPE_NTLMSSP" },
372         { DCERPC_AUTH_TYPE_KRB5, "DCERPC_AUTH_TYPE_KRB5" },
373         { DCERPC_AUTH_TYPE_DPA, "DCERPC_AUTH_TYPE_DPA" },
374         { DCERPC_AUTH_TYPE_MSN, "DCERPC_AUTH_TYPE_MSN" },
375         { DCERPC_AUTH_TYPE_DIGEST, "DCERPC_AUTH_TYPE_DIGEST" },
376         { DCERPC_AUTH_TYPE_SCHANNEL, "DCERPC_AUTH_TYPE_SCHANNEL" },
377         { DCERPC_AUTH_TYPE_MSMQ, "DCERPC_AUTH_TYPE_MSMQ" },
378         { DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM, "DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM" },
379 { 0, NULL }
380 };
381 const value_string dcerpc_dcerpc_AuthLevel_vals[] = {
382         { DCERPC_AUTH_LEVEL_NONE, "DCERPC_AUTH_LEVEL_NONE" },
383         { DCERPC_AUTH_LEVEL_CONNECT, "DCERPC_AUTH_LEVEL_CONNECT" },
384         { DCERPC_AUTH_LEVEL_CALL, "DCERPC_AUTH_LEVEL_CALL" },
385         { DCERPC_AUTH_LEVEL_PACKET, "DCERPC_AUTH_LEVEL_PACKET" },
386         { DCERPC_AUTH_LEVEL_INTEGRITY, "DCERPC_AUTH_LEVEL_INTEGRITY" },
387         { DCERPC_AUTH_LEVEL_PRIVACY, "DCERPC_AUTH_LEVEL_PRIVACY" },
388 { 0, NULL }
389 };
390 static int dcerpc_dissect_element_auth_auth_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
391 static int dcerpc_dissect_element_auth_auth_level(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
392 static int dcerpc_dissect_element_auth_auth_pad_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
393 static int dcerpc_dissect_element_auth_auth_reserved(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
394 static int dcerpc_dissect_element_auth_auth_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
395 static int dcerpc_dissect_element_auth_credentials(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
396 static int dcerpc_dissect_element_auth3__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
397 static int dcerpc_dissect_element_auth3_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
398 static int dcerpc_dissect_element_orphaned__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
399 static int dcerpc_dissect_element_orphaned_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
400 static int dcerpc_dissect_element_co_cancel__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
401 static int dcerpc_dissect_element_co_cancel_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
402 static int dcerpc_dissect_element_cl_cancel_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
403 static int dcerpc_dissect_element_cl_cancel_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
404 static int dcerpc_dissect_element_cancel_ack_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
405 static int dcerpc_dissect_element_cancel_ack_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
406 static int dcerpc_dissect_element_cancel_ack_server_is_accepting(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
407 static int dcerpc_dissect_element_fack_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
408 static int dcerpc_dissect_element_fack__pad1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
409 static int dcerpc_dissect_element_fack_window_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
410 static int dcerpc_dissect_element_fack_max_tdsu(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
411 static int dcerpc_dissect_element_fack_max_frag_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
412 static int dcerpc_dissect_element_fack_serial_no(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
413 static int dcerpc_dissect_element_fack_selack_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
414 static int dcerpc_dissect_element_fack_selack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
415 static int dcerpc_dissect_element_fack_selack_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
416 static int dcerpc_dissect_element_RTSCookie_Cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
417 const value_string dcerpc_AddressType_vals[] = {
418         { RTS_IPV4, "RTS_IPV4" },
419         { RTS_IPV6, "RTS_IPV6" },
420 { 0, NULL }
421 };
422 static int dcerpc_dissect_element_ClientAddressType_valRTS_IPV4_ClientAddressIPV4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
423 static int dcerpc_dissect_element_ClientAddressType_valRTS_IPV6_ClientAddressIPV6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
424 static int dcerpc_dissect_element_ClientAddress_AddressType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *AddressType);
425 static int dcerpc_dissect_element_ClientAddress_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *AddressType);
426 static int dcerpc_dissect_element_ClientAddress_Padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
427 static int dcerpc_dissect_element_ClientAddress_Padding_(tvbuff_t *tvb _U_, int offset _U_,int length _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
428 const value_string dcerpc_ForwardDestination_vals[] = {
429         { FDClient, "FDClient" },
430         { FDInProxy, "FDInProxy" },
431         { FDServer, "FDServer" },
432         { FDOutProxy, "FDOutProxy" },
433 { 0, NULL }
434 };
435 static int dcerpc_dissect_element_FlowControlAcknowledgment_BytesReceived(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
436 static int dcerpc_dissect_element_FlowControlAcknowledgment_AvailableWindow(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
437 static int dcerpc_dissect_element_FlowControlAcknowledgment_ChannelCookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
438 static int dcerpc_dissect_element_rts_cmd_ReceiveWindowSize_ReceiveWindowSize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
439 static int dcerpc_dissect_element_rts_cmd_FlowControlAck_Ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
440 static int dcerpc_dissect_element_rts_cmd_ConnectionTimeout_ConnectionTimeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
441 static int dcerpc_dissect_element_rts_cmd_Cookie_Cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
442 static int dcerpc_dissect_element_rts_cmd_ChannelLifetime_ChannelLifetime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
443 static int dcerpc_dissect_element_rts_cmd_ClientKeepalive_ClientKeepalive(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
444 static int dcerpc_dissect_element_rts_cmd_Version_Version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
445 static int dcerpc_dissect_element_rts_cmd_Padding_ConformanceCount(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
446 static int dcerpc_dissect_element_rts_cmd_Padding_Padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
447 static int dcerpc_dissect_element_rts_cmd_Padding_Padding_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
448 static int dcerpc_dissect_element_rts_cmd_ClientAddress_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
449 static int dcerpc_dissect_element_rts_cmd_AssociationGroupId_AssociationGroupId(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
450 static int dcerpc_dissect_element_rts_cmd_Destination_ForwardDestination(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
451 static int dcerpc_dissect_element_rts_cmd_PingTrafficSentNotify_PingTrafficSent(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
452 static int dcerpc_dissect_element_rts_cmds_val0x0_ReceiveWindowSize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
453 static int dcerpc_dissect_element_rts_cmds_val0x1_FlowControlAck(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
454 static int dcerpc_dissect_element_rts_cmds_val0x2_ConnectionTimeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
455 static int dcerpc_dissect_element_rts_cmds_val0x3_Cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
456 static int dcerpc_dissect_element_rts_cmds_val0x4_ChannelLifetime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
457 static int dcerpc_dissect_element_rts_cmds_val0x5_ClientKeepalive(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
458 static int dcerpc_dissect_element_rts_cmds_val0x6_Version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
459 static int dcerpc_dissect_element_rts_cmds_val0x7_Empty(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
460 static int dcerpc_dissect_element_rts_cmds_val0x8_Padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
461 static int dcerpc_dissect_element_rts_cmds_val0x9_NegativeANCE(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
462 static int dcerpc_dissect_element_rts_cmds_val0xA_ANCE(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
463 static int dcerpc_dissect_element_rts_cmds_val0xB_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
464 static int dcerpc_dissect_element_rts_cmds_val0xC_AssociationGroupId(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
465 static int dcerpc_dissect_element_rts_cmds_val0xD_Destination(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
466 static int dcerpc_dissect_element_rts_cmds_val0xE_PingTrafficSentNotify(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
467 static int dcerpc_dissect_element_rts_cmd_CommandType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *CommandType);
468 static int dcerpc_dissect_element_rts_cmd_Command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *CommandType);
469 static const true_false_string dcerpc_rts_flags_RTS_FLAG_NONE_tfs = {
470    "RTS_FLAG_NONE is SET",
471    "RTS_FLAG_NONE is NOT SET",
472 };
473 static const true_false_string dcerpc_rts_flags_RTS_FLAG_PING_tfs = {
474    "RTS_FLAG_PING is SET",
475    "RTS_FLAG_PING is NOT SET",
476 };
477 static const true_false_string dcerpc_rts_flags_RTS_FLAG_OTHER_CMD_tfs = {
478    "RTS_FLAG_OTHER_CMD is SET",
479    "RTS_FLAG_OTHER_CMD is NOT SET",
480 };
481 static const true_false_string dcerpc_rts_flags_RTS_FLAG_RECYCLE_CHANNEL_tfs = {
482    "RTS_FLAG_RECYCLE_CHANNEL is SET",
483    "RTS_FLAG_RECYCLE_CHANNEL is NOT SET",
484 };
485 static const true_false_string dcerpc_rts_flags_RTS_FLAG_IN_CHANNEL_tfs = {
486    "RTS_FLAG_IN_CHANNEL is SET",
487    "RTS_FLAG_IN_CHANNEL is NOT SET",
488 };
489 static const true_false_string dcerpc_rts_flags_RTS_FLAG_OUT_CHANNEL_tfs = {
490    "RTS_FLAG_OUT_CHANNEL is SET",
491    "RTS_FLAG_OUT_CHANNEL is NOT SET",
492 };
493 static const true_false_string dcerpc_rts_flags_RTS_FLAG_EOF_tfs = {
494    "RTS_FLAG_EOF is SET",
495    "RTS_FLAG_EOF is NOT SET",
496 };
497 static const true_false_string dcerpc_rts_flags_RTS_FLAG_ECHO_tfs = {
498    "RTS_FLAG_ECHO is SET",
499    "RTS_FLAG_ECHO is NOT SET",
500 };
501 static int dcerpc_dissect_element_rts_Flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
502 static int dcerpc_dissect_element_rts_NumberOfCommands(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
503 static int dcerpc_dissect_element_rts_Commands(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
504 static int dcerpc_dissect_element_rts_Commands_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
505 const value_string dcerpc_dcerpc_pkt_type_vals[] = {
506         { DCERPC_PKT_REQUEST, "DCERPC_PKT_REQUEST" },
507         { DCERPC_PKT_PING, "DCERPC_PKT_PING" },
508         { DCERPC_PKT_RESPONSE, "DCERPC_PKT_RESPONSE" },
509         { DCERPC_PKT_FAULT, "DCERPC_PKT_FAULT" },
510         { DCERPC_PKT_WORKING, "DCERPC_PKT_WORKING" },
511         { DCERPC_PKT_NOCALL, "DCERPC_PKT_NOCALL" },
512         { DCERPC_PKT_REJECT, "DCERPC_PKT_REJECT" },
513         { DCERPC_PKT_ACK, "DCERPC_PKT_ACK" },
514         { DCERPC_PKT_CL_CANCEL, "DCERPC_PKT_CL_CANCEL" },
515         { DCERPC_PKT_FACK, "DCERPC_PKT_FACK" },
516         { DCERPC_PKT_CANCEL_ACK, "DCERPC_PKT_CANCEL_ACK" },
517         { DCERPC_PKT_BIND, "DCERPC_PKT_BIND" },
518         { DCERPC_PKT_BIND_ACK, "DCERPC_PKT_BIND_ACK" },
519         { DCERPC_PKT_BIND_NAK, "DCERPC_PKT_BIND_NAK" },
520         { DCERPC_PKT_ALTER, "DCERPC_PKT_ALTER" },
521         { DCERPC_PKT_ALTER_RESP, "DCERPC_PKT_ALTER_RESP" },
522         { DCERPC_PKT_AUTH3, "DCERPC_PKT_AUTH3" },
523         { DCERPC_PKT_SHUTDOWN, "DCERPC_PKT_SHUTDOWN" },
524         { DCERPC_PKT_CO_CANCEL, "DCERPC_PKT_CO_CANCEL" },
525         { DCERPC_PKT_ORPHANED, "DCERPC_PKT_ORPHANED" },
526         { DCERPC_PKT_RTS, "DCERPC_PKT_RTS" },
527 { 0, NULL }
528 };
529 static int dcerpc_dissect_element_payload_valDCERPC_PKT_REQUEST_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
530 static int dcerpc_dissect_element_payload_valDCERPC_PKT_PING_ping(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
531 static int dcerpc_dissect_element_payload_valDCERPC_PKT_RESPONSE_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
532 static int dcerpc_dissect_element_payload_valDCERPC_PKT_FAULT_fault(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
533 static int dcerpc_dissect_element_payload_valDCERPC_PKT_WORKING_working(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
534 static int dcerpc_dissect_element_payload_valDCERPC_PKT_NOCALL_nocall(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
535 static int dcerpc_dissect_element_payload_valDCERPC_PKT_REJECT_reject(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
536 static int dcerpc_dissect_element_payload_valDCERPC_PKT_ACK_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
537 static int dcerpc_dissect_element_payload_valDCERPC_PKT_CL_CANCEL_cl_cancel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
538 static int dcerpc_dissect_element_payload_valDCERPC_PKT_FACK_fack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
539 static int dcerpc_dissect_element_payload_valDCERPC_PKT_CANCEL_ACK_cancel_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
540 static int dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_bind(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
541 static int dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_ACK_bind_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
542 static int dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_NAK_bind_nak(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
543 static int dcerpc_dissect_element_payload_valDCERPC_PKT_ALTER_alter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
544 static int dcerpc_dissect_element_payload_valDCERPC_PKT_ALTER_RESP_alter_resp(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
545 static int dcerpc_dissect_element_payload_valDCERPC_PKT_SHUTDOWN_shutdown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
546 static int dcerpc_dissect_element_payload_valDCERPC_PKT_CO_CANCEL_co_cancel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
547 static int dcerpc_dissect_element_payload_valDCERPC_PKT_ORPHANED_orphaned(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
548 static int dcerpc_dissect_element_payload_valDCERPC_PKT_AUTH3_auth3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
549 static int dcerpc_dissect_element_payload_valDCERPC_PKT_RTS_rts(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
550 static int dcerpc_dissect_element_ncacn_packet_rpc_vers(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
551 static int dcerpc_dissect_element_ncacn_packet_rpc_vers_minor(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
552 static int dcerpc_dissect_element_ncacn_packet_ptype(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype);
553 static int dcerpc_dissect_element_ncacn_packet_pfc_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
554 static int dcerpc_dissect_element_ncacn_packet_drep(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
555 static int dcerpc_dissect_element_ncacn_packet_drep_(tvbuff_t *tvb _U_, int offset _U_,int length _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
556 static int dcerpc_dissect_element_ncacn_packet_frag_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
557 static int dcerpc_dissect_element_ncacn_packet_auth_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
558 static int dcerpc_dissect_element_ncacn_packet_call_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
559 static int dcerpc_dissect_element_ncacn_packet_u(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype);
560 static int dcerpc_dissect_element_ncadg_packet_rpc_vers(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
561 static int dcerpc_dissect_element_ncadg_packet_ptype(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype);
562 static int dcerpc_dissect_element_ncadg_packet_pfc_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
563 static int dcerpc_dissect_element_ncadg_packet_ncadg_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
564 static int dcerpc_dissect_element_ncadg_packet_drep(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
565 static int dcerpc_dissect_element_ncadg_packet_drep_(tvbuff_t *tvb _U_, int offset _U_,int length _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
566 static int dcerpc_dissect_element_ncadg_packet_serial_high(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
567 static int dcerpc_dissect_element_ncadg_packet_object(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
568 static int dcerpc_dissect_element_ncadg_packet_iface(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
569 static int dcerpc_dissect_element_ncadg_packet_activity(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
570 static int dcerpc_dissect_element_ncadg_packet_server_boot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
571 static int dcerpc_dissect_element_ncadg_packet_iface_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
572 static int dcerpc_dissect_element_ncadg_packet_seq_num(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
573 static int dcerpc_dissect_element_ncadg_packet_opnum(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
574 static int dcerpc_dissect_element_ncadg_packet_ihint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
575 static int dcerpc_dissect_element_ncadg_packet_ahint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
576 static int dcerpc_dissect_element_ncadg_packet_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
577 static int dcerpc_dissect_element_ncadg_packet_fragnum(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
578 static int dcerpc_dissect_element_ncadg_packet_auth_proto(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
579 static int dcerpc_dissect_element_ncadg_packet_serial_low(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
580 static int dcerpc_dissect_element_ncadg_packet_u(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype);
581
582
583 /* IDL: struct { */
584 /* IDL:         uint16 context_id; */
585 /* IDL:         uint8 num_transfer_syntaxes; */
586 /* IDL:         ndr_syntax_id abstract_syntax; */
587 /* IDL:         ndr_syntax_id transfer_syntaxes[num_transfer_syntaxes]; */
588 /* IDL: } */
589
590 static int
591 dcerpc_dissect_element_ctx_list_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
592 {
593         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_ctx_list_context_id, 0);
594
595         return offset;
596 }
597
598 static int
599 dcerpc_dissect_element_ctx_list_num_transfer_syntaxes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
600 {
601         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_ctx_list_num_transfer_syntaxes, 0);
602
603         return offset;
604 }
605
606 static int
607 dcerpc_dissect_element_ctx_list_abstract_syntax(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
608 {
609         offset = dcerpc_dissect_struct_ndr_syntax_id(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_ctx_list_abstract_syntax,0);
610
611         return offset;
612 }
613
614 static int
615 dcerpc_dissect_element_ctx_list_transfer_syntaxes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
616 {
617
618         return offset;
619 }
620
621 static int
622 dcerpc_dissect_element_ctx_list_transfer_syntaxes_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
623 {
624         offset = dcerpc_dissect_struct_ndr_syntax_id(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_ctx_list_transfer_syntaxes,0);
625
626         return offset;
627 }
628
629 int
630 dcerpc_dissect_struct_ctx_list(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
631 {
632         proto_item *item = NULL;
633         proto_tree *tree = NULL;
634         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
635         int old_offset;
636
637         ALIGN_TO_4_BYTES;
638
639         old_offset = offset;
640
641         if (parent_tree) {
642                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
643                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_ctx_list);
644         }
645         
646         offset = dcerpc_dissect_element_ctx_list_context_id(tvb, offset, pinfo, tree, drep);
647
648         offset = dcerpc_dissect_element_ctx_list_num_transfer_syntaxes(tvb, offset, pinfo, tree, drep);
649
650         offset = dcerpc_dissect_element_ctx_list_abstract_syntax(tvb, offset, pinfo, tree, drep);
651
652         offset = dcerpc_dissect_element_ctx_list_transfer_syntaxes(tvb, offset, pinfo, tree, drep);
653
654
655         proto_item_set_len(item, offset-old_offset);
656
657
658         if (di->call_data->flags & DCERPC_IS_NDR64) {
659                 ALIGN_TO_4_BYTES;
660         }
661
662         return offset;
663 }
664
665
666 /* IDL: struct { */
667 /* IDL:         uint16 max_xmit_frag; */
668 /* IDL:         uint16 max_recv_frag; */
669 /* IDL:         uint32 assoc_group_id; */
670 /* IDL:         uint8 num_contexts; */
671 /* IDL:         dcerpc_ctx_list ctx_list[num_contexts]; */
672 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB auth_info; */
673 /* IDL: } */
674
675 static int
676 dcerpc_dissect_element_bind_max_xmit_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
677 {
678         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_max_xmit_frag, 0);
679
680         return offset;
681 }
682
683 static int
684 dcerpc_dissect_element_bind_max_recv_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
685 {
686         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_max_recv_frag, 0);
687
688         return offset;
689 }
690
691 static int
692 dcerpc_dissect_element_bind_assoc_group_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
693 {
694         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_assoc_group_id, 0);
695
696         return offset;
697 }
698
699 static int
700 dcerpc_dissect_element_bind_num_contexts(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
701 {
702         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_num_contexts, 0);
703
704         return offset;
705 }
706
707 static int
708 dcerpc_dissect_element_bind_ctx_list(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
709 {
710
711         return offset;
712 }
713
714 static int
715 dcerpc_dissect_element_bind_ctx_list_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
716 {
717         offset = dcerpc_dissect_struct_ctx_list(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_bind_ctx_list,0);
718
719         return offset;
720 }
721
722 static int
723 dcerpc_dissect_element_bind_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
724 {
725         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_auth_info, 1);
726
727         return offset;
728 }
729
730 int
731 dcerpc_dissect_struct_bind(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
732 {
733         proto_item *item = NULL;
734         proto_tree *tree = NULL;
735         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
736         int old_offset;
737
738         ALIGN_TO_4_BYTES;
739
740         old_offset = offset;
741
742         if (parent_tree) {
743                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
744                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_bind);
745         }
746         
747         offset = dcerpc_dissect_element_bind_max_xmit_frag(tvb, offset, pinfo, tree, drep);
748
749         offset = dcerpc_dissect_element_bind_max_recv_frag(tvb, offset, pinfo, tree, drep);
750
751         offset = dcerpc_dissect_element_bind_assoc_group_id(tvb, offset, pinfo, tree, drep);
752
753         offset = dcerpc_dissect_element_bind_num_contexts(tvb, offset, pinfo, tree, drep);
754
755         offset = dcerpc_dissect_element_bind_ctx_list(tvb, offset, pinfo, tree, drep);
756
757         offset = dcerpc_dissect_element_bind_auth_info(tvb, offset, pinfo, tree, drep);
758
759
760         proto_item_set_len(item, offset-old_offset);
761
762
763         if (di->call_data->flags & DCERPC_IS_NDR64) {
764                 ALIGN_TO_4_BYTES;
765         }
766
767         return offset;
768 }
769
770
771 /* IDL: struct { */
772 /* IDL: } */
773
774 int
775 dcerpc_dissect_struct_empty(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
776 {
777         proto_item *item = NULL;
778         proto_tree *tree = NULL;
779         int old_offset;
780
781
782         old_offset = offset;
783
784         if (parent_tree) {
785                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
786                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_empty);
787         }
788         
789
790         proto_item_set_len(item, offset-old_offset);
791
792
793         return offset;
794 }
795
796
797 /* IDL: [nodiscriminant(1)] union { */
798 /* IDL: [default] ; */
799 /* IDL: [case(LIBNDR_FLAG_OBJECT_PRESENT)] [case(LIBNDR_FLAG_OBJECT_PRESENT)] GUID object; */
800 /* IDL: } */
801
802 static int
803 dcerpc_dissect_element_object_valdefault_empty(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
804 {
805         offset = dcerpc_dissect_struct_empty(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_object_valdefault_empty,0);
806
807         return offset;
808 }
809
810 static int
811 dcerpc_dissect_element_object_valLIBNDR_FLAG_OBJECT_PRESENT_object(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
812 {
813         offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_object_valLIBNDR_FLAG_OBJECT_PRESENT_object, NULL);
814
815         return offset;
816 }
817
818 static int
819 dcerpc_dissect_object(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
820 {
821         proto_item *item = NULL;
822         proto_tree *tree = NULL;
823         int old_offset;
824         guint32 level = param;
825
826         old_offset = offset;
827         if (parent_tree) {
828                 item = proto_tree_add_text(parent_tree, tvb, offset, -1, "dcerpc_object");
829                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_object);
830         }
831
832         switch(level) {
833                 default:
834                         offset = dcerpc_dissect_element_object_valdefault_empty(tvb, offset, pinfo, tree, drep);
835                 break;
836
837                 case LIBNDR_FLAG_OBJECT_PRESENT:
838                         offset = dcerpc_dissect_element_object_valLIBNDR_FLAG_OBJECT_PRESENT_object(tvb, offset, pinfo, tree, drep);
839                 break;
840         }
841         proto_item_set_len(item, offset-old_offset);
842
843
844         return offset;
845 }
846
847 /* IDL: struct { */
848 /* IDL:         uint32 alloc_hint; */
849 /* IDL:         uint16 context_id; */
850 /* IDL:         uint16 opnum; */
851 /* IDL:         [switch_is(ndr->flags&LIBNDR_FLAG_OBJECT_PRESENT)] dcerpc_object object; */
852 /* IDL:         [flag(LIBNDR_FLAG_ALIGN8)] DATA_BLOB _pad; */
853 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB stub_and_verifier; */
854 /* IDL: } */
855
856 static int
857 dcerpc_dissect_element_request_alloc_hint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
858 {
859         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_request_alloc_hint, 0);
860
861         return offset;
862 }
863
864 static int
865 dcerpc_dissect_element_request_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
866 {
867         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_request_context_id, 0);
868
869         return offset;
870 }
871
872 static int
873 dcerpc_dissect_element_request_opnum(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
874 {
875         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_request_opnum, 0);
876
877         return offset;
878 }
879
880 static int
881 dcerpc_dissect_element_request_object(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *)
882 {
883         offset = dcerpc_dissect_object(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_request_object, *);
884
885         return offset;
886 }
887
888 static int
889 dcerpc_dissect_element_request__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
890 {
891         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_request__pad, 0);
892
893         return offset;
894 }
895
896 static int
897 dcerpc_dissect_element_request_stub_and_verifier(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
898 {
899         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_request_stub_and_verifier, 1);
900
901         return offset;
902 }
903
904 int
905 dcerpc_dissect_struct_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
906 {
907         proto_item *item = NULL;
908         proto_tree *tree = NULL;
909         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
910         int old_offset;
911
912         ALIGN_TO_4_BYTES;
913
914         old_offset = offset;
915
916         if (parent_tree) {
917                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
918                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_request);
919         }
920         
921         offset = dcerpc_dissect_element_request_alloc_hint(tvb, offset, pinfo, tree, drep);
922
923         offset = dcerpc_dissect_element_request_context_id(tvb, offset, pinfo, tree, drep);
924
925         offset = dcerpc_dissect_element_request_opnum(tvb, offset, pinfo, tree, drep);
926
927         offset = dcerpc_dissect_element_request_object(tvb, offset, pinfo, tree, drep, &);
928
929         offset = dcerpc_dissect_element_request__pad(tvb, offset, pinfo, tree, drep);
930
931         offset = dcerpc_dissect_element_request_stub_and_verifier(tvb, offset, pinfo, tree, drep);
932
933
934         proto_item_set_len(item, offset-old_offset);
935
936
937         if (di->call_data->flags & DCERPC_IS_NDR64) {
938                 ALIGN_TO_4_BYTES;
939         }
940
941         return offset;
942 }
943
944
945 /* IDL: struct { */
946 /* IDL:         uint16 result; */
947 /* IDL:         uint16 reason; */
948 /* IDL:         ndr_syntax_id syntax; */
949 /* IDL: } */
950
951 static int
952 dcerpc_dissect_element_ack_ctx_result(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
953 {
954         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_ack_ctx_result, 0);
955
956         return offset;
957 }
958
959 static int
960 dcerpc_dissect_element_ack_ctx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
961 {
962         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_ack_ctx_reason, 0);
963
964         return offset;
965 }
966
967 static int
968 dcerpc_dissect_element_ack_ctx_syntax(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
969 {
970         offset = dcerpc_dissect_struct_ndr_syntax_id(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_ack_ctx_syntax,0);
971
972         return offset;
973 }
974
975 int
976 dcerpc_dissect_struct_ack_ctx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
977 {
978         proto_item *item = NULL;
979         proto_tree *tree = NULL;
980         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
981         int old_offset;
982
983         ALIGN_TO_4_BYTES;
984
985         old_offset = offset;
986
987         if (parent_tree) {
988                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
989                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_ack_ctx);
990         }
991         
992         offset = dcerpc_dissect_element_ack_ctx_result(tvb, offset, pinfo, tree, drep);
993
994         offset = dcerpc_dissect_element_ack_ctx_reason(tvb, offset, pinfo, tree, drep);
995
996         offset = dcerpc_dissect_element_ack_ctx_syntax(tvb, offset, pinfo, tree, drep);
997
998
999         proto_item_set_len(item, offset-old_offset);
1000
1001
1002         if (di->call_data->flags & DCERPC_IS_NDR64) {
1003                 ALIGN_TO_4_BYTES;
1004         }
1005
1006         return offset;
1007 }
1008
1009
1010 /* IDL: struct { */
1011 /* IDL:         uint16 max_xmit_frag; */
1012 /* IDL:         uint16 max_recv_frag; */
1013 /* IDL:         uint32 assoc_group_id; */
1014 /* IDL:         [value(strlen(secondary_address)+1)] uint16 secondary_address_size; */
1015 /* IDL:         [charset(DOS)] uint8 secondary_address[secondary_address_size]; */
1016 /* IDL:         [flag(LIBNDR_FLAG_ALIGN4)] DATA_BLOB _pad1; */
1017 /* IDL:         uint8 num_results; */
1018 /* IDL:         dcerpc_ack_ctx ctx_list[num_results]; */
1019 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB auth_info; */
1020 /* IDL: } */
1021
1022 static int
1023 dcerpc_dissect_element_bind_ack_max_xmit_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1024 {
1025         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack_max_xmit_frag, 0);
1026
1027         return offset;
1028 }
1029
1030 static int
1031 dcerpc_dissect_element_bind_ack_max_recv_frag(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1032 {
1033         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack_max_recv_frag, 0);
1034
1035         return offset;
1036 }
1037
1038 static int
1039 dcerpc_dissect_element_bind_ack_assoc_group_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1040 {
1041         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack_assoc_group_id, 0);
1042
1043         return offset;
1044 }
1045
1046 static int
1047 dcerpc_dissect_element_bind_ack_secondary_address_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1048 {
1049         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack_secondary_address_size, 0);
1050
1051         return offset;
1052 }
1053
1054 static int
1055 dcerpc_dissect_element_bind_ack_secondary_address(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1056 {
1057
1058         return offset;
1059 }
1060
1061 static int
1062 dcerpc_dissect_element_bind_ack_secondary_address_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1063 {
1064         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack_secondary_address, 0);
1065
1066         return offset;
1067 }
1068
1069 static int
1070 dcerpc_dissect_element_bind_ack__pad1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1071 {
1072         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack__pad1, 0);
1073
1074         return offset;
1075 }
1076
1077 static int
1078 dcerpc_dissect_element_bind_ack_num_results(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1079 {
1080         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack_num_results, 0);
1081
1082         return offset;
1083 }
1084
1085 static int
1086 dcerpc_dissect_element_bind_ack_ctx_list(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1087 {
1088
1089         return offset;
1090 }
1091
1092 static int
1093 dcerpc_dissect_element_bind_ack_ctx_list_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1094 {
1095         offset = dcerpc_dissect_struct_ack_ctx(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_bind_ack_ctx_list,0);
1096
1097         return offset;
1098 }
1099
1100 static int
1101 dcerpc_dissect_element_bind_ack_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1102 {
1103         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_ack_auth_info, 1);
1104
1105         return offset;
1106 }
1107
1108 int
1109 dcerpc_dissect_struct_bind_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1110 {
1111         proto_item *item = NULL;
1112         proto_tree *tree = NULL;
1113         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1114         int old_offset;
1115
1116         ALIGN_TO_4_BYTES;
1117
1118         old_offset = offset;
1119
1120         if (parent_tree) {
1121                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1122                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_bind_ack);
1123         }
1124         
1125         offset = dcerpc_dissect_element_bind_ack_max_xmit_frag(tvb, offset, pinfo, tree, drep);
1126
1127         offset = dcerpc_dissect_element_bind_ack_max_recv_frag(tvb, offset, pinfo, tree, drep);
1128
1129         offset = dcerpc_dissect_element_bind_ack_assoc_group_id(tvb, offset, pinfo, tree, drep);
1130
1131         offset = dcerpc_dissect_element_bind_ack_secondary_address_size(tvb, offset, pinfo, tree, drep);
1132
1133         offset = dcerpc_dissect_element_bind_ack_secondary_address(tvb, offset, pinfo, tree, drep);
1134
1135         offset = dcerpc_dissect_element_bind_ack__pad1(tvb, offset, pinfo, tree, drep);
1136
1137         offset = dcerpc_dissect_element_bind_ack_num_results(tvb, offset, pinfo, tree, drep);
1138
1139         offset = dcerpc_dissect_element_bind_ack_ctx_list(tvb, offset, pinfo, tree, drep);
1140
1141         offset = dcerpc_dissect_element_bind_ack_auth_info(tvb, offset, pinfo, tree, drep);
1142
1143
1144         proto_item_set_len(item, offset-old_offset);
1145
1146
1147         if (di->call_data->flags & DCERPC_IS_NDR64) {
1148                 ALIGN_TO_4_BYTES;
1149         }
1150
1151         return offset;
1152 }
1153
1154
1155 /* IDL: struct { */
1156 /* IDL:         uint32 num_versions; */
1157 /* IDL:         uint32 versions[num_versions]; */
1158 /* IDL: } */
1159
1160 static int
1161 dcerpc_dissect_element_bind_nak_versions_num_versions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1162 {
1163         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_nak_versions_num_versions, 0);
1164
1165         return offset;
1166 }
1167
1168 static int
1169 dcerpc_dissect_element_bind_nak_versions_versions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1170 {
1171
1172         return offset;
1173 }
1174
1175 static int
1176 dcerpc_dissect_element_bind_nak_versions_versions_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1177 {
1178         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_nak_versions_versions, 0);
1179
1180         return offset;
1181 }
1182
1183 int
1184 dcerpc_dissect_struct_bind_nak_versions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1185 {
1186         proto_item *item = NULL;
1187         proto_tree *tree = NULL;
1188         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1189         int old_offset;
1190
1191         ALIGN_TO_4_BYTES;
1192
1193         old_offset = offset;
1194
1195         if (parent_tree) {
1196                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1197                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_bind_nak_versions);
1198         }
1199         
1200         offset = dcerpc_dissect_element_bind_nak_versions_num_versions(tvb, offset, pinfo, tree, drep);
1201
1202         offset = dcerpc_dissect_element_bind_nak_versions_versions(tvb, offset, pinfo, tree, drep);
1203
1204
1205         proto_item_set_len(item, offset-old_offset);
1206
1207
1208         if (di->call_data->flags & DCERPC_IS_NDR64) {
1209                 ALIGN_TO_4_BYTES;
1210         }
1211
1212         return offset;
1213 }
1214
1215
1216 /* IDL: [nodiscriminant(1)] union { */
1217 /* IDL: [case(DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED)] [case(DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED)] dcerpc_bind_nak_versions v; */
1218 /* IDL: [default] ; */
1219 /* IDL: } */
1220
1221 static int
1222 dcerpc_dissect_element_bind_nak_versions_ctr_valDECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED_v(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1223 {
1224         offset = dcerpc_dissect_struct_bind_nak_versions(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_bind_nak_versions_ctr_valDECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED_v,0);
1225
1226         return offset;
1227 }
1228
1229 static int
1230 dcerpc_dissect_bind_nak_versions_ctr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1231 {
1232         proto_item *item = NULL;
1233         proto_tree *tree = NULL;
1234         int old_offset;
1235         guint32 level = param;
1236
1237         old_offset = offset;
1238         if (parent_tree) {
1239                 item = proto_tree_add_text(parent_tree, tvb, offset, -1, "dcerpc_bind_nak_versions_ctr");
1240                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_bind_nak_versions_ctr);
1241         }
1242
1243         switch(level) {
1244                 case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED:
1245                         offset = dcerpc_dissect_element_bind_nak_versions_ctr_valDECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED_v(tvb, offset, pinfo, tree, drep);
1246                 break;
1247
1248                 default:
1249                 break;
1250         }
1251         proto_item_set_len(item, offset-old_offset);
1252
1253
1254         return offset;
1255 }
1256
1257 /* IDL: struct { */
1258 /* IDL:         uint16 reject_reason; */
1259 /* IDL:         [switch_is(reject_reason)] dcerpc_bind_nak_versions_ctr versions; */
1260 /* IDL: } */
1261
1262 static int
1263 dcerpc_dissect_element_bind_nak_reject_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint16 *reject_reason)
1264 {
1265         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_nak_reject_reason, reject_reason);
1266
1267         return offset;
1268 }
1269
1270 static int
1271 dcerpc_dissect_element_bind_nak_versions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint16 *reject_reason)
1272 {
1273         offset = dcerpc_dissect_bind_nak_versions_ctr(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_bind_nak_versions, *reject_reason);
1274
1275         return offset;
1276 }
1277
1278 int
1279 dcerpc_dissect_struct_bind_nak(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1280 {
1281         guint16 reject_reason;
1282         proto_item *item = NULL;
1283         proto_tree *tree = NULL;
1284         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1285         int old_offset;
1286
1287         ALIGN_TO_4_BYTES;
1288
1289         old_offset = offset;
1290
1291         if (parent_tree) {
1292                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1293                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_bind_nak);
1294         }
1295         
1296         offset = dcerpc_dissect_element_bind_nak_reject_reason(tvb, offset, pinfo, tree, drep, &reject_reason);
1297
1298         offset = dcerpc_dissect_element_bind_nak_versions(tvb, offset, pinfo, tree, drep, &reject_reason);
1299
1300
1301         proto_item_set_len(item, offset-old_offset);
1302
1303
1304         if (di->call_data->flags & DCERPC_IS_NDR64) {
1305                 ALIGN_TO_4_BYTES;
1306         }
1307
1308         return offset;
1309 }
1310
1311
1312 /* IDL: struct { */
1313 /* IDL:         uint32 alloc_hint; */
1314 /* IDL:         uint16 context_id; */
1315 /* IDL:         uint8 cancel_count; */
1316 /* IDL:         [flag(LIBNDR_FLAG_ALIGN8)] DATA_BLOB _pad; */
1317 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB stub_and_verifier; */
1318 /* IDL: } */
1319
1320 static int
1321 dcerpc_dissect_element_response_alloc_hint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1322 {
1323         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_response_alloc_hint, 0);
1324
1325         return offset;
1326 }
1327
1328 static int
1329 dcerpc_dissect_element_response_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1330 {
1331         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_response_context_id, 0);
1332
1333         return offset;
1334 }
1335
1336 static int
1337 dcerpc_dissect_element_response_cancel_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1338 {
1339         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_response_cancel_count, 0);
1340
1341         return offset;
1342 }
1343
1344 static int
1345 dcerpc_dissect_element_response__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1346 {
1347         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_response__pad, 0);
1348
1349         return offset;
1350 }
1351
1352 static int
1353 dcerpc_dissect_element_response_stub_and_verifier(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1354 {
1355         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_response_stub_and_verifier, 1);
1356
1357         return offset;
1358 }
1359
1360 int
1361 dcerpc_dissect_struct_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1362 {
1363         proto_item *item = NULL;
1364         proto_tree *tree = NULL;
1365         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1366         int old_offset;
1367
1368         ALIGN_TO_4_BYTES;
1369
1370         old_offset = offset;
1371
1372         if (parent_tree) {
1373                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1374                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_response);
1375         }
1376         
1377         offset = dcerpc_dissect_element_response_alloc_hint(tvb, offset, pinfo, tree, drep);
1378
1379         offset = dcerpc_dissect_element_response_context_id(tvb, offset, pinfo, tree, drep);
1380
1381         offset = dcerpc_dissect_element_response_cancel_count(tvb, offset, pinfo, tree, drep);
1382
1383         offset = dcerpc_dissect_element_response__pad(tvb, offset, pinfo, tree, drep);
1384
1385         offset = dcerpc_dissect_element_response_stub_and_verifier(tvb, offset, pinfo, tree, drep);
1386
1387
1388         proto_item_set_len(item, offset-old_offset);
1389
1390
1391         if (di->call_data->flags & DCERPC_IS_NDR64) {
1392                 ALIGN_TO_4_BYTES;
1393         }
1394
1395         return offset;
1396 }
1397
1398
1399 /* IDL: enum { */
1400 /* IDL:         DCERPC_NCA_S_COMM_FAILURE=0x1C010001, */
1401 /* IDL:         DCERPC_NCA_S_OP_RNG_ERROR=0x1C010002, */
1402 /* IDL:         DCERPC_NCA_S_UNKNOWN_IF=0x1C010003, */
1403 /* IDL:         DCERPC_NCA_S_WRONG_BOOT_TIME=0x1C010006, */
1404 /* IDL:         DCERPC_NCA_S_YOU_CRASHED=0x1C010009, */
1405 /* IDL:         DCERPC_NCA_S_PROTO_ERROR=0x1C01000B, */
1406 /* IDL:         DCERPC_NCA_S_OUT_ARGS_TOO_BIG=0x1C010013, */
1407 /* IDL:         DCERPC_NCA_S_SERVER_TOO_BUSY=0x1C010014, */
1408 /* IDL:         DCERPC_NCA_S_FAULT_STRING_TOO_LARGE=0x1C010015, */
1409 /* IDL:         DCERPC_NCA_S_UNSUPPORTED_TYPE=0x1C010017, */
1410 /* IDL:         DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO=0x1C000001, */
1411 /* IDL:         DCERPC_NCA_S_FAULT_ADDR_ERROR=0x1C000002, */
1412 /* IDL:         DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO=0x1C000003, */
1413 /* IDL:         DCERPC_NCA_S_FAULT_FP_UNDERFLOW=0x1C000004, */
1414 /* IDL:         DCERPC_NCA_S_FAULT_FP_OVERRFLOW=0x1C000005, */
1415 /* IDL:         DCERPC_NCA_S_FAULT_INVALID_TAG=0x1C000006, */
1416 /* IDL:         DCERPC_NCA_S_FAULT_INVALID_BOUND=0x1C000007, */
1417 /* IDL:         DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH=0x1C000008, */
1418 /* IDL:         DCERPC_NCA_S_FAULT_UNSPEC_REJECT=0x1C000009, */
1419 /* IDL:         DCERPC_NCA_S_FAULT_BAD_ACTID=0x1C00000A, */
1420 /* IDL:         DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED=0x1C00000B, */
1421 /* IDL:         DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED=0x1C00000C, */
1422 /* IDL:         DCERPC_NCA_S_FAULT_CANCEL=0x1C00000D, */
1423 /* IDL:         DCERPC_NCA_S_FAULT_ILL_INST=0x1C00000E, */
1424 /* IDL:         DCERPC_NCA_S_FAULT_FP_ERROR=0x1C00000F, */
1425 /* IDL:         DCERPC_NCA_S_FAULT_INT_OVERFLOW=0x1C000010, */
1426 /* IDL:         DCERPC_NCA_S_UNUSED_1C000011=0x1C000011, */
1427 /* IDL:         DCERPC_NCA_S_FAULT_UNSPEC=0x1C000012, */
1428 /* IDL:         DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE=0x1C000013, */
1429 /* IDL:         DCERPC_NCA_S_FAULT_PIPE_EMPTY=0x1C000014, */
1430 /* IDL:         DCERPC_NCA_S_FAULT_PIPE_CLOSED=0x1C000015, */
1431 /* IDL:         DCERPC_NCA_S_FAULT_PIPE_ORDER=0x1C000016, */
1432 /* IDL:         DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE=0x1C000017, */
1433 /* IDL:         DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR=0x1C000018, */
1434 /* IDL:         DCERPC_NCA_S_FAULT_PIPE_MEMORY=0x1C000019, */
1435 /* IDL:         DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH=0x1C00001A, */
1436 /* IDL:         DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY=0x1C00001B, */
1437 /* IDL:         DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID=0x1C00001C, */
1438 /* IDL:         DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL=0x1C00001D, */
1439 /* IDL:         DCERPC_NCA_S_UNUSED_1C00001E=0x1C00001E, */
1440 /* IDL:         DCERPC_NCA_S_INVALID_CHECKSUM=0x1C00001F, */
1441 /* IDL:         DCERPC_NCA_S_INVALID_CRC=0x1C000020, */
1442 /* IDL:         DCERPC_NCA_S_FAULT_USER_DEFINED=0x1C000021, */
1443 /* IDL:         DCERPC_NCA_S_FAULT_TX_OPEN_FAILED=0x1C000022, */
1444 /* IDL:         DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR=0x1C000023, */
1445 /* IDL:         DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND=0x1C000024, */
1446 /* IDL:         DCERPC_NCA_S_FAULT_NO_CLIENT_STUB=0x1C000025, */
1447 /* IDL: } */
1448
1449 int
1450 dcerpc_dissect_enum_nca_status(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
1451 {
1452         guint32 parameter=0;
1453         if(param){
1454                 parameter=(guint32)*param;
1455         }
1456         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
1457         if(param){
1458                 *param=(guint32)parameter;
1459         }
1460         return offset;
1461 }
1462
1463
1464 /* IDL: struct { */
1465 /* IDL:         uint32 alloc_hint; */
1466 /* IDL:         uint16 context_id; */
1467 /* IDL:         uint8 cancel_count; */
1468 /* IDL:         dcerpc_nca_status status; */
1469 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB _pad; */
1470 /* IDL: } */
1471
1472 static int
1473 dcerpc_dissect_element_fault_alloc_hint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1474 {
1475         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fault_alloc_hint, 0);
1476
1477         return offset;
1478 }
1479
1480 static int
1481 dcerpc_dissect_element_fault_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1482 {
1483         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fault_context_id, 0);
1484
1485         return offset;
1486 }
1487
1488 static int
1489 dcerpc_dissect_element_fault_cancel_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1490 {
1491         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fault_cancel_count, 0);
1492
1493         return offset;
1494 }
1495
1496 static int
1497 dcerpc_dissect_element_fault_status(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1498 {
1499         offset = dcerpc_dissect_enum_nca_status(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fault_status, 0);
1500
1501         return offset;
1502 }
1503
1504 static int
1505 dcerpc_dissect_element_fault__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1506 {
1507         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fault__pad, 1);
1508
1509         return offset;
1510 }
1511
1512 int
1513 dcerpc_dissect_struct_fault(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1514 {
1515         proto_item *item = NULL;
1516         proto_tree *tree = NULL;
1517         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1518         int old_offset;
1519
1520         ALIGN_TO_4_BYTES;
1521
1522         old_offset = offset;
1523
1524         if (parent_tree) {
1525                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1526                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_fault);
1527         }
1528         
1529         offset = dcerpc_dissect_element_fault_alloc_hint(tvb, offset, pinfo, tree, drep);
1530
1531         offset = dcerpc_dissect_element_fault_context_id(tvb, offset, pinfo, tree, drep);
1532
1533         offset = dcerpc_dissect_element_fault_cancel_count(tvb, offset, pinfo, tree, drep);
1534
1535         offset = dcerpc_dissect_element_fault_status(tvb, offset, pinfo, tree, drep);
1536
1537         offset = dcerpc_dissect_element_fault__pad(tvb, offset, pinfo, tree, drep);
1538
1539
1540         proto_item_set_len(item, offset-old_offset);
1541
1542
1543         if (di->call_data->flags & DCERPC_IS_NDR64) {
1544                 ALIGN_TO_4_BYTES;
1545         }
1546
1547         return offset;
1548 }
1549
1550
1551 /* IDL: enum { */
1552 /* IDL:         DCERPC_AUTH_TYPE_NONE=0, */
1553 /* IDL:         DCERPC_AUTH_TYPE_KRB5_1=1, */
1554 /* IDL:         DCERPC_AUTH_TYPE_SPNEGO=9, */
1555 /* IDL:         DCERPC_AUTH_TYPE_NTLMSSP=10, */
1556 /* IDL:         DCERPC_AUTH_TYPE_KRB5=16, */
1557 /* IDL:         DCERPC_AUTH_TYPE_DPA=17, */
1558 /* IDL:         DCERPC_AUTH_TYPE_MSN=18, */
1559 /* IDL:         DCERPC_AUTH_TYPE_DIGEST=21, */
1560 /* IDL:         DCERPC_AUTH_TYPE_SCHANNEL=68, */
1561 /* IDL:         DCERPC_AUTH_TYPE_MSMQ=100, */
1562 /* IDL:         DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM=200, */
1563 /* IDL: } */
1564
1565 int
1566 dcerpc_dissect_enum_AuthType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
1567 {
1568         guint8 parameter=0;
1569         if(param){
1570                 parameter=(guint8)*param;
1571         }
1572         offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
1573         if(param){
1574                 *param=(guint32)parameter;
1575         }
1576         return offset;
1577 }
1578
1579
1580 /* IDL: enum { */
1581 /* IDL:         DCERPC_AUTH_LEVEL_NONE=1, */
1582 /* IDL:         DCERPC_AUTH_LEVEL_CONNECT=2, */
1583 /* IDL:         DCERPC_AUTH_LEVEL_CALL=3, */
1584 /* IDL:         DCERPC_AUTH_LEVEL_PACKET=4, */
1585 /* IDL:         DCERPC_AUTH_LEVEL_INTEGRITY=5, */
1586 /* IDL:         DCERPC_AUTH_LEVEL_PRIVACY=6, */
1587 /* IDL: } */
1588
1589 int
1590 dcerpc_dissect_enum_AuthLevel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
1591 {
1592         guint8 parameter=0;
1593         if(param){
1594                 parameter=(guint8)*param;
1595         }
1596         offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
1597         if(param){
1598                 *param=(guint32)parameter;
1599         }
1600         return offset;
1601 }
1602
1603
1604 /* IDL: struct { */
1605 /* IDL:         dcerpc_AuthType auth_type; */
1606 /* IDL:         dcerpc_AuthLevel auth_level; */
1607 /* IDL:         uint8 auth_pad_length; */
1608 /* IDL:         uint8 auth_reserved; */
1609 /* IDL:         uint32 auth_context_id; */
1610 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB credentials; */
1611 /* IDL: } */
1612
1613 static int
1614 dcerpc_dissect_element_auth_auth_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1615 {
1616         offset = dcerpc_dissect_enum_AuthType(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth_auth_type, 0);
1617
1618         return offset;
1619 }
1620
1621 static int
1622 dcerpc_dissect_element_auth_auth_level(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1623 {
1624         offset = dcerpc_dissect_enum_AuthLevel(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth_auth_level, 0);
1625
1626         return offset;
1627 }
1628
1629 static int
1630 dcerpc_dissect_element_auth_auth_pad_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1631 {
1632         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth_auth_pad_length, 0);
1633
1634         return offset;
1635 }
1636
1637 static int
1638 dcerpc_dissect_element_auth_auth_reserved(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1639 {
1640         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth_auth_reserved, 0);
1641
1642         return offset;
1643 }
1644
1645 static int
1646 dcerpc_dissect_element_auth_auth_context_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1647 {
1648         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth_auth_context_id, 0);
1649
1650         return offset;
1651 }
1652
1653 static int
1654 dcerpc_dissect_element_auth_credentials(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1655 {
1656         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth_credentials, 1);
1657
1658         return offset;
1659 }
1660
1661 int
1662 dcerpc_dissect_struct_auth(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1663 {
1664         proto_item *item = NULL;
1665         proto_tree *tree = NULL;
1666         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1667         int old_offset;
1668
1669         ALIGN_TO_4_BYTES;
1670
1671         old_offset = offset;
1672
1673         if (parent_tree) {
1674                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1675                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_auth);
1676         }
1677         
1678         offset = dcerpc_dissect_element_auth_auth_type(tvb, offset, pinfo, tree, drep);
1679
1680         offset = dcerpc_dissect_element_auth_auth_level(tvb, offset, pinfo, tree, drep);
1681
1682         offset = dcerpc_dissect_element_auth_auth_pad_length(tvb, offset, pinfo, tree, drep);
1683
1684         offset = dcerpc_dissect_element_auth_auth_reserved(tvb, offset, pinfo, tree, drep);
1685
1686         offset = dcerpc_dissect_element_auth_auth_context_id(tvb, offset, pinfo, tree, drep);
1687
1688         offset = dcerpc_dissect_element_auth_credentials(tvb, offset, pinfo, tree, drep);
1689
1690
1691         proto_item_set_len(item, offset-old_offset);
1692
1693
1694         if (di->call_data->flags & DCERPC_IS_NDR64) {
1695                 ALIGN_TO_4_BYTES;
1696         }
1697
1698         return offset;
1699 }
1700
1701
1702 /* IDL: struct { */
1703 /* IDL:         [value(0)] uint32 _pad; */
1704 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB auth_info; */
1705 /* IDL: } */
1706
1707 static int
1708 dcerpc_dissect_element_auth3__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1709 {
1710         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth3__pad, 0);
1711
1712         return offset;
1713 }
1714
1715 static int
1716 dcerpc_dissect_element_auth3_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1717 {
1718         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_auth3_auth_info, 1);
1719
1720         return offset;
1721 }
1722
1723 int
1724 dcerpc_dissect_struct_auth3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1725 {
1726         proto_item *item = NULL;
1727         proto_tree *tree = NULL;
1728         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1729         int old_offset;
1730
1731         ALIGN_TO_4_BYTES;
1732
1733         old_offset = offset;
1734
1735         if (parent_tree) {
1736                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1737                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_auth3);
1738         }
1739         
1740         offset = dcerpc_dissect_element_auth3__pad(tvb, offset, pinfo, tree, drep);
1741
1742         offset = dcerpc_dissect_element_auth3_auth_info(tvb, offset, pinfo, tree, drep);
1743
1744
1745         proto_item_set_len(item, offset-old_offset);
1746
1747
1748         if (di->call_data->flags & DCERPC_IS_NDR64) {
1749                 ALIGN_TO_4_BYTES;
1750         }
1751
1752         return offset;
1753 }
1754
1755
1756 /* IDL: struct { */
1757 /* IDL:         [value(0)] uint32 _pad; */
1758 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB auth_info; */
1759 /* IDL: } */
1760
1761 static int
1762 dcerpc_dissect_element_orphaned__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1763 {
1764         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_orphaned__pad, 0);
1765
1766         return offset;
1767 }
1768
1769 static int
1770 dcerpc_dissect_element_orphaned_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1771 {
1772         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_orphaned_auth_info, 1);
1773
1774         return offset;
1775 }
1776
1777 int
1778 dcerpc_dissect_struct_orphaned(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1779 {
1780         proto_item *item = NULL;
1781         proto_tree *tree = NULL;
1782         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1783         int old_offset;
1784
1785         ALIGN_TO_4_BYTES;
1786
1787         old_offset = offset;
1788
1789         if (parent_tree) {
1790                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1791                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_orphaned);
1792         }
1793         
1794         offset = dcerpc_dissect_element_orphaned__pad(tvb, offset, pinfo, tree, drep);
1795
1796         offset = dcerpc_dissect_element_orphaned_auth_info(tvb, offset, pinfo, tree, drep);
1797
1798
1799         proto_item_set_len(item, offset-old_offset);
1800
1801
1802         if (di->call_data->flags & DCERPC_IS_NDR64) {
1803                 ALIGN_TO_4_BYTES;
1804         }
1805
1806         return offset;
1807 }
1808
1809
1810 /* IDL: struct { */
1811 /* IDL:         [value(0)] uint32 _pad; */
1812 /* IDL:         [flag(LIBNDR_FLAG_REMAINING)] DATA_BLOB auth_info; */
1813 /* IDL: } */
1814
1815 static int
1816 dcerpc_dissect_element_co_cancel__pad(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1817 {
1818         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_co_cancel__pad, 0);
1819
1820         return offset;
1821 }
1822
1823 static int
1824 dcerpc_dissect_element_co_cancel_auth_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1825 {
1826         offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_co_cancel_auth_info, 1);
1827
1828         return offset;
1829 }
1830
1831 int
1832 dcerpc_dissect_struct_co_cancel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1833 {
1834         proto_item *item = NULL;
1835         proto_tree *tree = NULL;
1836         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1837         int old_offset;
1838
1839         ALIGN_TO_4_BYTES;
1840
1841         old_offset = offset;
1842
1843         if (parent_tree) {
1844                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1845                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_co_cancel);
1846         }
1847         
1848         offset = dcerpc_dissect_element_co_cancel__pad(tvb, offset, pinfo, tree, drep);
1849
1850         offset = dcerpc_dissect_element_co_cancel_auth_info(tvb, offset, pinfo, tree, drep);
1851
1852
1853         proto_item_set_len(item, offset-old_offset);
1854
1855
1856         if (di->call_data->flags & DCERPC_IS_NDR64) {
1857                 ALIGN_TO_4_BYTES;
1858         }
1859
1860         return offset;
1861 }
1862
1863
1864 /* IDL: struct { */
1865 /* IDL:         uint32 version; */
1866 /* IDL:         uint32 id; */
1867 /* IDL: } */
1868
1869 static int
1870 dcerpc_dissect_element_cl_cancel_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1871 {
1872         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_cl_cancel_version, 0);
1873
1874         return offset;
1875 }
1876
1877 static int
1878 dcerpc_dissect_element_cl_cancel_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1879 {
1880         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_cl_cancel_id, 0);
1881
1882         return offset;
1883 }
1884
1885 int
1886 dcerpc_dissect_struct_cl_cancel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1887 {
1888         proto_item *item = NULL;
1889         proto_tree *tree = NULL;
1890         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1891         int old_offset;
1892
1893         ALIGN_TO_4_BYTES;
1894
1895         old_offset = offset;
1896
1897         if (parent_tree) {
1898                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1899                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_cl_cancel);
1900         }
1901         
1902         offset = dcerpc_dissect_element_cl_cancel_version(tvb, offset, pinfo, tree, drep);
1903
1904         offset = dcerpc_dissect_element_cl_cancel_id(tvb, offset, pinfo, tree, drep);
1905
1906
1907         proto_item_set_len(item, offset-old_offset);
1908
1909
1910         if (di->call_data->flags & DCERPC_IS_NDR64) {
1911                 ALIGN_TO_4_BYTES;
1912         }
1913
1914         return offset;
1915 }
1916
1917
1918 /* IDL: struct { */
1919 /* IDL:         uint32 version; */
1920 /* IDL:         uint32 id; */
1921 /* IDL:         uint32 server_is_accepting; */
1922 /* IDL: } */
1923
1924 static int
1925 dcerpc_dissect_element_cancel_ack_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1926 {
1927         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_cancel_ack_version, 0);
1928
1929         return offset;
1930 }
1931
1932 static int
1933 dcerpc_dissect_element_cancel_ack_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1934 {
1935         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_cancel_ack_id, 0);
1936
1937         return offset;
1938 }
1939
1940 static int
1941 dcerpc_dissect_element_cancel_ack_server_is_accepting(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1942 {
1943         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_cancel_ack_server_is_accepting, 0);
1944
1945         return offset;
1946 }
1947
1948 int
1949 dcerpc_dissect_struct_cancel_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1950 {
1951         proto_item *item = NULL;
1952         proto_tree *tree = NULL;
1953         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
1954         int old_offset;
1955
1956         ALIGN_TO_4_BYTES;
1957
1958         old_offset = offset;
1959
1960         if (parent_tree) {
1961                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1962                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_cancel_ack);
1963         }
1964         
1965         offset = dcerpc_dissect_element_cancel_ack_version(tvb, offset, pinfo, tree, drep);
1966
1967         offset = dcerpc_dissect_element_cancel_ack_id(tvb, offset, pinfo, tree, drep);
1968
1969         offset = dcerpc_dissect_element_cancel_ack_server_is_accepting(tvb, offset, pinfo, tree, drep);
1970
1971
1972         proto_item_set_len(item, offset-old_offset);
1973
1974
1975         if (di->call_data->flags & DCERPC_IS_NDR64) {
1976                 ALIGN_TO_4_BYTES;
1977         }
1978
1979         return offset;
1980 }
1981
1982
1983 /* IDL: struct { */
1984 /* IDL:         uint32 version; */
1985 /* IDL:         uint8 _pad1; */
1986 /* IDL:         uint16 window_size; */
1987 /* IDL:         uint32 max_tdsu; */
1988 /* IDL:         uint32 max_frag_size; */
1989 /* IDL:         uint16 serial_no; */
1990 /* IDL:         uint16 selack_size; */
1991 /* IDL:         uint32 selack[selack_size]; */
1992 /* IDL: } */
1993
1994 static int
1995 dcerpc_dissect_element_fack_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1996 {
1997         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack_version, 0);
1998
1999         return offset;
2000 }
2001
2002 static int
2003 dcerpc_dissect_element_fack__pad1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2004 {
2005         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack__pad1, 0);
2006
2007         return offset;
2008 }
2009
2010 static int
2011 dcerpc_dissect_element_fack_window_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2012 {
2013         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack_window_size, 0);
2014
2015         return offset;
2016 }
2017
2018 static int
2019 dcerpc_dissect_element_fack_max_tdsu(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2020 {
2021         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack_max_tdsu, 0);
2022
2023         return offset;
2024 }
2025
2026 static int
2027 dcerpc_dissect_element_fack_max_frag_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2028 {
2029         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack_max_frag_size, 0);
2030
2031         return offset;
2032 }
2033
2034 static int
2035 dcerpc_dissect_element_fack_serial_no(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2036 {
2037         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack_serial_no, 0);
2038
2039         return offset;
2040 }
2041
2042 static int
2043 dcerpc_dissect_element_fack_selack_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2044 {
2045         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack_selack_size, 0);
2046
2047         return offset;
2048 }
2049
2050 static int
2051 dcerpc_dissect_element_fack_selack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2052 {
2053
2054         return offset;
2055 }
2056
2057 static int
2058 dcerpc_dissect_element_fack_selack_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2059 {
2060         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_fack_selack, 0);
2061
2062         return offset;
2063 }
2064
2065 int
2066 dcerpc_dissect_struct_fack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2067 {
2068         proto_item *item = NULL;
2069         proto_tree *tree = NULL;
2070         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2071         int old_offset;
2072
2073         ALIGN_TO_4_BYTES;
2074
2075         old_offset = offset;
2076
2077         if (parent_tree) {
2078                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2079                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_fack);
2080         }
2081         
2082         offset = dcerpc_dissect_element_fack_version(tvb, offset, pinfo, tree, drep);
2083
2084         offset = dcerpc_dissect_element_fack__pad1(tvb, offset, pinfo, tree, drep);
2085
2086         offset = dcerpc_dissect_element_fack_window_size(tvb, offset, pinfo, tree, drep);
2087
2088         offset = dcerpc_dissect_element_fack_max_tdsu(tvb, offset, pinfo, tree, drep);
2089
2090         offset = dcerpc_dissect_element_fack_max_frag_size(tvb, offset, pinfo, tree, drep);
2091
2092         offset = dcerpc_dissect_element_fack_serial_no(tvb, offset, pinfo, tree, drep);
2093
2094         offset = dcerpc_dissect_element_fack_selack_size(tvb, offset, pinfo, tree, drep);
2095
2096         offset = dcerpc_dissect_element_fack_selack(tvb, offset, pinfo, tree, drep);
2097
2098
2099         proto_item_set_len(item, offset-old_offset);
2100
2101
2102         if (di->call_data->flags & DCERPC_IS_NDR64) {
2103                 ALIGN_TO_4_BYTES;
2104         }
2105
2106         return offset;
2107 }
2108
2109
2110 /* IDL: struct { */
2111 /* IDL: } */
2112
2113 int
2114 dcerpc_dissect_struct_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2115 {
2116         proto_item *item = NULL;
2117         proto_tree *tree = NULL;
2118         int old_offset;
2119
2120
2121         old_offset = offset;
2122
2123         if (parent_tree) {
2124                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2125                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_ack);
2126         }
2127         
2128
2129         proto_item_set_len(item, offset-old_offset);
2130
2131
2132         return offset;
2133 }
2134
2135
2136 /* IDL: struct { */
2137 /* IDL: } */
2138
2139 int
2140 dcerpc_dissect_struct_ping(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2141 {
2142         proto_item *item = NULL;
2143         proto_tree *tree = NULL;
2144         int old_offset;
2145
2146
2147         old_offset = offset;
2148
2149         if (parent_tree) {
2150                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2151                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_ping);
2152         }
2153         
2154
2155         proto_item_set_len(item, offset-old_offset);
2156
2157
2158         return offset;
2159 }
2160
2161
2162 /* IDL: struct { */
2163 /* IDL: } */
2164
2165 int
2166 dcerpc_dissect_struct_shutdown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2167 {
2168         proto_item *item = NULL;
2169         proto_tree *tree = NULL;
2170         int old_offset;
2171
2172
2173         old_offset = offset;
2174
2175         if (parent_tree) {
2176                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2177                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_shutdown);
2178         }
2179         
2180
2181         proto_item_set_len(item, offset-old_offset);
2182
2183
2184         return offset;
2185 }
2186
2187
2188 /* IDL: struct { */
2189 /* IDL: } */
2190
2191 int
2192 dcerpc_dissect_struct_working(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2193 {
2194         proto_item *item = NULL;
2195         proto_tree *tree = NULL;
2196         int old_offset;
2197
2198
2199         old_offset = offset;
2200
2201         if (parent_tree) {
2202                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2203                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_working);
2204         }
2205         
2206
2207         proto_item_set_len(item, offset-old_offset);
2208
2209
2210         return offset;
2211 }
2212
2213
2214 /* IDL: struct { */
2215 /* IDL:         GUID Cookie; */
2216 /* IDL: } */
2217
2218 static int
2219 dcerpc_dissect_element_RTSCookie_Cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2220 {
2221         offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_dcerpc_RTSCookie_Cookie, NULL);
2222
2223         return offset;
2224 }
2225
2226 int
2227 dcerpc_dissect_struct_RTSCookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2228 {
2229         proto_item *item = NULL;
2230         proto_tree *tree = NULL;
2231         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2232         int old_offset;
2233
2234         ALIGN_TO_4_BYTES;
2235
2236         old_offset = offset;
2237
2238         if (parent_tree) {
2239                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2240                 tree = proto_item_add_subtree(item, ett_dcerpc_RTSCookie);
2241         }
2242         
2243         offset = dcerpc_dissect_element_RTSCookie_Cookie(tvb, offset, pinfo, tree, drep);
2244
2245
2246         proto_item_set_len(item, offset-old_offset);
2247
2248
2249         if (di->call_data->flags & DCERPC_IS_NDR64) {
2250                 ALIGN_TO_4_BYTES;
2251         }
2252
2253         return offset;
2254 }
2255
2256
2257 /* IDL: enum { */
2258 /* IDL:         RTS_IPV4=0, */
2259 /* IDL:         RTS_IPV6=1, */
2260 /* IDL: } */
2261
2262 int
2263 dcerpc_dissect_enum_AddressType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
2264 {
2265         guint32 parameter=0;
2266         if(param){
2267                 parameter=(guint32)*param;
2268         }
2269         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
2270         if(param){
2271                 *param=(guint32)parameter;
2272         }
2273         return offset;
2274 }
2275
2276
2277 /* IDL: [nodiscriminant(1)] union { */
2278 /* IDL: [case(RTS_IPV4)] [case(RTS_IPV4)] ipv4address ClientAddressIPV4; */
2279 /* IDL: [case(RTS_IPV6)] [case(RTS_IPV6)] ipv6address ClientAddressIPV6; */
2280 /* IDL: } */
2281
2282 static int
2283 dcerpc_dissect_element_ClientAddressType_valRTS_IPV4_ClientAddressIPV4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2284 {
2285         offset = dcerpc_dissect_struct_ipv4address(tvb,offset,pinfo,tree,drep,hf_dcerpc_ClientAddressType_valRTS_IPV4_ClientAddressIPV4,0);
2286
2287         return offset;
2288 }
2289
2290 static int
2291 dcerpc_dissect_element_ClientAddressType_valRTS_IPV6_ClientAddressIPV6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2292 {
2293         offset = dcerpc_dissect_struct_ipv6address(tvb,offset,pinfo,tree,drep,hf_dcerpc_ClientAddressType_valRTS_IPV6_ClientAddressIPV6,0);
2294
2295         return offset;
2296 }
2297
2298 static int
2299 dcerpc_dissect_ClientAddressType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2300 {
2301         proto_item *item = NULL;
2302         proto_tree *tree = NULL;
2303         int old_offset;
2304         guint32 level = param;
2305
2306         old_offset = offset;
2307         if (parent_tree) {
2308                 item = proto_tree_add_text(parent_tree, tvb, offset, -1, "ClientAddressType");
2309                 tree = proto_item_add_subtree(item, ett_dcerpc_ClientAddressType);
2310         }
2311
2312         switch(level) {
2313                 case RTS_IPV4:
2314                         offset = dcerpc_dissect_element_ClientAddressType_valRTS_IPV4_ClientAddressIPV4(tvb, offset, pinfo, tree, drep);
2315                 break;
2316
2317                 case RTS_IPV6:
2318                         offset = dcerpc_dissect_element_ClientAddressType_valRTS_IPV6_ClientAddressIPV6(tvb, offset, pinfo, tree, drep);
2319                 break;
2320         }
2321         proto_item_set_len(item, offset-old_offset);
2322
2323
2324         return offset;
2325 }
2326
2327 /* IDL: struct { */
2328 /* IDL:         AddressType AddressType; */
2329 /* IDL:         [switch_is(AddressType)] ClientAddressType ClientAddress; */
2330 /* IDL:         uint8 Padding[12]; */
2331 /* IDL: } */
2332
2333 static int
2334 dcerpc_dissect_element_ClientAddress_AddressType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *AddressType)
2335 {
2336         offset = dcerpc_dissect_enum_AddressType(tvb, offset, pinfo, tree, drep, hf_dcerpc_ClientAddress_AddressType, AddressType);
2337
2338         return offset;
2339 }
2340
2341 static int
2342 dcerpc_dissect_element_ClientAddress_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *AddressType)
2343 {
2344         offset = dcerpc_dissect_ClientAddressType(tvb, offset, pinfo, tree, drep, hf_dcerpc_ClientAddress_ClientAddress, *AddressType);
2345
2346         return offset;
2347 }
2348
2349 static int
2350 dcerpc_dissect_element_ClientAddress_Padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2351 {
2352         dcerpc_info *di = (dcerpc_info*)pinfo->private_data;
2353         int conformant = di->conformant_run;
2354         if (!conformant) {
2355                 offset = dcerpc_dissect_element_ClientAddress_Padding_(tvb, offset, 12, pinfo, tree, drep);
2356         }
2357
2358         return offset;
2359 }
2360
2361 static int
2362 dcerpc_dissect_element_ClientAddress_Padding_(tvbuff_t *tvb _U_, int offset _U_,int length _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2363 {
2364         proto_tree_add_bytes(tree, hf_dcerpc_ClientAddress_Padding, tvb, offset, length, tvb_get_ptr(tvb, offset,length)); offset += length;
2365
2366         return offset;
2367 }
2368
2369 int
2370 dcerpc_dissect_struct_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2371 {
2372         guint32 AddressType;
2373         proto_item *item = NULL;
2374         proto_tree *tree = NULL;
2375         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2376         int old_offset;
2377
2378         ALIGN_TO_4_BYTES;
2379
2380         old_offset = offset;
2381
2382         if (parent_tree) {
2383                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2384                 tree = proto_item_add_subtree(item, ett_dcerpc_ClientAddress);
2385         }
2386         
2387         offset = dcerpc_dissect_element_ClientAddress_AddressType(tvb, offset, pinfo, tree, drep, &AddressType);
2388
2389         offset = dcerpc_dissect_element_ClientAddress_ClientAddress(tvb, offset, pinfo, tree, drep, &AddressType);
2390
2391         offset = dcerpc_dissect_element_ClientAddress_Padding(tvb, offset, pinfo, tree, drep);
2392
2393
2394         proto_item_set_len(item, offset-old_offset);
2395
2396
2397         if (di->call_data->flags & DCERPC_IS_NDR64) {
2398                 ALIGN_TO_4_BYTES;
2399         }
2400
2401         return offset;
2402 }
2403
2404
2405 /* IDL: enum { */
2406 /* IDL:         FDClient=0, */
2407 /* IDL:         FDInProxy=1, */
2408 /* IDL:         FDServer=2, */
2409 /* IDL:         FDOutProxy=3, */
2410 /* IDL: } */
2411
2412 int
2413 dcerpc_dissect_enum_ForwardDestination(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
2414 {
2415         guint32 parameter=0;
2416         if(param){
2417                 parameter=(guint32)*param;
2418         }
2419         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
2420         if(param){
2421                 *param=(guint32)parameter;
2422         }
2423         return offset;
2424 }
2425
2426
2427 /* IDL: struct { */
2428 /* IDL:         uint32 BytesReceived; */
2429 /* IDL:         uint32 AvailableWindow; */
2430 /* IDL:         RTSCookie ChannelCookie; */
2431 /* IDL: } */
2432
2433 static int
2434 dcerpc_dissect_element_FlowControlAcknowledgment_BytesReceived(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2435 {
2436         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_FlowControlAcknowledgment_BytesReceived, 0);
2437
2438         return offset;
2439 }
2440
2441 static int
2442 dcerpc_dissect_element_FlowControlAcknowledgment_AvailableWindow(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2443 {
2444         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_FlowControlAcknowledgment_AvailableWindow, 0);
2445
2446         return offset;
2447 }
2448
2449 static int
2450 dcerpc_dissect_element_FlowControlAcknowledgment_ChannelCookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2451 {
2452         offset = dcerpc_dissect_struct_RTSCookie(tvb,offset,pinfo,tree,drep,hf_dcerpc_FlowControlAcknowledgment_ChannelCookie,0);
2453
2454         return offset;
2455 }
2456
2457 int
2458 dcerpc_dissect_struct_FlowControlAcknowledgment(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2459 {
2460         proto_item *item = NULL;
2461         proto_tree *tree = NULL;
2462         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2463         int old_offset;
2464
2465         ALIGN_TO_4_BYTES;
2466
2467         old_offset = offset;
2468
2469         if (parent_tree) {
2470                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2471                 tree = proto_item_add_subtree(item, ett_dcerpc_FlowControlAcknowledgment);
2472         }
2473         
2474         offset = dcerpc_dissect_element_FlowControlAcknowledgment_BytesReceived(tvb, offset, pinfo, tree, drep);
2475
2476         offset = dcerpc_dissect_element_FlowControlAcknowledgment_AvailableWindow(tvb, offset, pinfo, tree, drep);
2477
2478         offset = dcerpc_dissect_element_FlowControlAcknowledgment_ChannelCookie(tvb, offset, pinfo, tree, drep);
2479
2480
2481         proto_item_set_len(item, offset-old_offset);
2482
2483
2484         if (di->call_data->flags & DCERPC_IS_NDR64) {
2485                 ALIGN_TO_4_BYTES;
2486         }
2487
2488         return offset;
2489 }
2490
2491
2492 /* IDL: struct { */
2493 /* IDL:         [range(0x2000,0x40000)] uint32 ReceiveWindowSize; */
2494 /* IDL: } */
2495
2496 static int
2497 dcerpc_dissect_element_rts_cmd_ReceiveWindowSize_ReceiveWindowSize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2498 {
2499         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_ReceiveWindowSize_ReceiveWindowSize, 0);
2500
2501         return offset;
2502 }
2503
2504 int
2505 dcerpc_dissect_struct_rts_cmd_ReceiveWindowSize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2506 {
2507         proto_item *item = NULL;
2508         proto_tree *tree = NULL;
2509         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2510         int old_offset;
2511
2512         ALIGN_TO_4_BYTES;
2513
2514         old_offset = offset;
2515
2516         if (parent_tree) {
2517                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2518                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_ReceiveWindowSize);
2519         }
2520         
2521         offset = dcerpc_dissect_element_rts_cmd_ReceiveWindowSize_ReceiveWindowSize(tvb, offset, pinfo, tree, drep);
2522
2523
2524         proto_item_set_len(item, offset-old_offset);
2525
2526
2527         if (di->call_data->flags & DCERPC_IS_NDR64) {
2528                 ALIGN_TO_4_BYTES;
2529         }
2530
2531         return offset;
2532 }
2533
2534
2535 /* IDL: struct { */
2536 /* IDL:         FlowControlAcknowledgment Ack; */
2537 /* IDL: } */
2538
2539 static int
2540 dcerpc_dissect_element_rts_cmd_FlowControlAck_Ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2541 {
2542         offset = dcerpc_dissect_struct_FlowControlAcknowledgment(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmd_FlowControlAck_Ack,0);
2543
2544         return offset;
2545 }
2546
2547 int
2548 dcerpc_dissect_struct_rts_cmd_FlowControlAck(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2549 {
2550         proto_item *item = NULL;
2551         proto_tree *tree = NULL;
2552         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2553         int old_offset;
2554
2555         ALIGN_TO_4_BYTES;
2556
2557         old_offset = offset;
2558
2559         if (parent_tree) {
2560                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2561                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_FlowControlAck);
2562         }
2563         
2564         offset = dcerpc_dissect_element_rts_cmd_FlowControlAck_Ack(tvb, offset, pinfo, tree, drep);
2565
2566
2567         proto_item_set_len(item, offset-old_offset);
2568
2569
2570         if (di->call_data->flags & DCERPC_IS_NDR64) {
2571                 ALIGN_TO_4_BYTES;
2572         }
2573
2574         return offset;
2575 }
2576
2577
2578 /* IDL: struct { */
2579 /* IDL:         [range(0x1D4C0,0xDBBA00)] uint32 ConnectionTimeout; */
2580 /* IDL: } */
2581
2582 static int
2583 dcerpc_dissect_element_rts_cmd_ConnectionTimeout_ConnectionTimeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2584 {
2585         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_ConnectionTimeout_ConnectionTimeout, 0);
2586
2587         return offset;
2588 }
2589
2590 int
2591 dcerpc_dissect_struct_rts_cmd_ConnectionTimeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2592 {
2593         proto_item *item = NULL;
2594         proto_tree *tree = NULL;
2595         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2596         int old_offset;
2597
2598         ALIGN_TO_4_BYTES;
2599
2600         old_offset = offset;
2601
2602         if (parent_tree) {
2603                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2604                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_ConnectionTimeout);
2605         }
2606         
2607         offset = dcerpc_dissect_element_rts_cmd_ConnectionTimeout_ConnectionTimeout(tvb, offset, pinfo, tree, drep);
2608
2609
2610         proto_item_set_len(item, offset-old_offset);
2611
2612
2613         if (di->call_data->flags & DCERPC_IS_NDR64) {
2614                 ALIGN_TO_4_BYTES;
2615         }
2616
2617         return offset;
2618 }
2619
2620
2621 /* IDL: struct { */
2622 /* IDL:         RTSCookie Cookie; */
2623 /* IDL: } */
2624
2625 static int
2626 dcerpc_dissect_element_rts_cmd_Cookie_Cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2627 {
2628         offset = dcerpc_dissect_struct_RTSCookie(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmd_Cookie_Cookie,0);
2629
2630         return offset;
2631 }
2632
2633 int
2634 dcerpc_dissect_struct_rts_cmd_Cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2635 {
2636         proto_item *item = NULL;
2637         proto_tree *tree = NULL;
2638         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2639         int old_offset;
2640
2641         ALIGN_TO_4_BYTES;
2642
2643         old_offset = offset;
2644
2645         if (parent_tree) {
2646                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2647                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_Cookie);
2648         }
2649         
2650         offset = dcerpc_dissect_element_rts_cmd_Cookie_Cookie(tvb, offset, pinfo, tree, drep);
2651
2652
2653         proto_item_set_len(item, offset-old_offset);
2654
2655
2656         if (di->call_data->flags & DCERPC_IS_NDR64) {
2657                 ALIGN_TO_4_BYTES;
2658         }
2659
2660         return offset;
2661 }
2662
2663
2664 /* IDL: struct { */
2665 /* IDL:         [range(0x20000,0x80000000)] uint32 ChannelLifetime; */
2666 /* IDL: } */
2667
2668 static int
2669 dcerpc_dissect_element_rts_cmd_ChannelLifetime_ChannelLifetime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2670 {
2671         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_ChannelLifetime_ChannelLifetime, 0);
2672
2673         return offset;
2674 }
2675
2676 int
2677 dcerpc_dissect_struct_rts_cmd_ChannelLifetime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2678 {
2679         proto_item *item = NULL;
2680         proto_tree *tree = NULL;
2681         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2682         int old_offset;
2683
2684         ALIGN_TO_4_BYTES;
2685
2686         old_offset = offset;
2687
2688         if (parent_tree) {
2689                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2690                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_ChannelLifetime);
2691         }
2692         
2693         offset = dcerpc_dissect_element_rts_cmd_ChannelLifetime_ChannelLifetime(tvb, offset, pinfo, tree, drep);
2694
2695
2696         proto_item_set_len(item, offset-old_offset);
2697
2698
2699         if (di->call_data->flags & DCERPC_IS_NDR64) {
2700                 ALIGN_TO_4_BYTES;
2701         }
2702
2703         return offset;
2704 }
2705
2706
2707 /* IDL: struct { */
2708 /* IDL:         uint32 ClientKeepalive; */
2709 /* IDL: } */
2710
2711 static int
2712 dcerpc_dissect_element_rts_cmd_ClientKeepalive_ClientKeepalive(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2713 {
2714         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_ClientKeepalive_ClientKeepalive, 0);
2715
2716         return offset;
2717 }
2718
2719 int
2720 dcerpc_dissect_struct_rts_cmd_ClientKeepalive(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2721 {
2722         proto_item *item = NULL;
2723         proto_tree *tree = NULL;
2724         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2725         int old_offset;
2726
2727         ALIGN_TO_4_BYTES;
2728
2729         old_offset = offset;
2730
2731         if (parent_tree) {
2732                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2733                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_ClientKeepalive);
2734         }
2735         
2736         offset = dcerpc_dissect_element_rts_cmd_ClientKeepalive_ClientKeepalive(tvb, offset, pinfo, tree, drep);
2737
2738
2739         proto_item_set_len(item, offset-old_offset);
2740
2741
2742         if (di->call_data->flags & DCERPC_IS_NDR64) {
2743                 ALIGN_TO_4_BYTES;
2744         }
2745
2746         return offset;
2747 }
2748
2749
2750 /* IDL: struct { */
2751 /* IDL:         uint32 Version; */
2752 /* IDL: } */
2753
2754 static int
2755 dcerpc_dissect_element_rts_cmd_Version_Version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2756 {
2757         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_Version_Version, 0);
2758
2759         return offset;
2760 }
2761
2762 int
2763 dcerpc_dissect_struct_rts_cmd_Version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2764 {
2765         proto_item *item = NULL;
2766         proto_tree *tree = NULL;
2767         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2768         int old_offset;
2769
2770         ALIGN_TO_4_BYTES;
2771
2772         old_offset = offset;
2773
2774         if (parent_tree) {
2775                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2776                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_Version);
2777         }
2778         
2779         offset = dcerpc_dissect_element_rts_cmd_Version_Version(tvb, offset, pinfo, tree, drep);
2780
2781
2782         proto_item_set_len(item, offset-old_offset);
2783
2784
2785         if (di->call_data->flags & DCERPC_IS_NDR64) {
2786                 ALIGN_TO_4_BYTES;
2787         }
2788
2789         return offset;
2790 }
2791
2792
2793 /* IDL: struct { */
2794 /* IDL: } */
2795
2796 int
2797 dcerpc_dissect_struct_rts_cmd_Empty(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2798 {
2799         proto_item *item = NULL;
2800         proto_tree *tree = NULL;
2801         int old_offset;
2802
2803
2804         old_offset = offset;
2805
2806         if (parent_tree) {
2807                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2808                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_Empty);
2809         }
2810         
2811
2812         proto_item_set_len(item, offset-old_offset);
2813
2814
2815         return offset;
2816 }
2817
2818
2819 /* IDL: struct { */
2820 /* IDL:         [range(0x0,0xFFFF)] uint32 ConformanceCount; */
2821 /* IDL:         uint8 Padding[ConformanceCount]; */
2822 /* IDL: } */
2823
2824 static int
2825 dcerpc_dissect_element_rts_cmd_Padding_ConformanceCount(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2826 {
2827         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_Padding_ConformanceCount, 0);
2828
2829         return offset;
2830 }
2831
2832 static int
2833 dcerpc_dissect_element_rts_cmd_Padding_Padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2834 {
2835
2836         return offset;
2837 }
2838
2839 static int
2840 dcerpc_dissect_element_rts_cmd_Padding_Padding_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2841 {
2842         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_Padding_Padding, 0);
2843
2844         return offset;
2845 }
2846
2847 int
2848 dcerpc_dissect_struct_rts_cmd_Padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2849 {
2850         proto_item *item = NULL;
2851         proto_tree *tree = NULL;
2852         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2853         int old_offset;
2854
2855         ALIGN_TO_4_BYTES;
2856
2857         old_offset = offset;
2858
2859         if (parent_tree) {
2860                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2861                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_Padding);
2862         }
2863         
2864         offset = dcerpc_dissect_element_rts_cmd_Padding_ConformanceCount(tvb, offset, pinfo, tree, drep);
2865
2866         offset = dcerpc_dissect_element_rts_cmd_Padding_Padding(tvb, offset, pinfo, tree, drep);
2867
2868
2869         proto_item_set_len(item, offset-old_offset);
2870
2871
2872         if (di->call_data->flags & DCERPC_IS_NDR64) {
2873                 ALIGN_TO_4_BYTES;
2874         }
2875
2876         return offset;
2877 }
2878
2879
2880 /* IDL: struct { */
2881 /* IDL: } */
2882
2883 int
2884 dcerpc_dissect_struct_rts_cmd_NegativeANCE(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2885 {
2886         proto_item *item = NULL;
2887         proto_tree *tree = NULL;
2888         int old_offset;
2889
2890
2891         old_offset = offset;
2892
2893         if (parent_tree) {
2894                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2895                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_NegativeANCE);
2896         }
2897         
2898
2899         proto_item_set_len(item, offset-old_offset);
2900
2901
2902         return offset;
2903 }
2904
2905
2906 /* IDL: struct { */
2907 /* IDL: } */
2908
2909 int
2910 dcerpc_dissect_struct_rts_cmd_ANCE(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2911 {
2912         proto_item *item = NULL;
2913         proto_tree *tree = NULL;
2914         int old_offset;
2915
2916
2917         old_offset = offset;
2918
2919         if (parent_tree) {
2920                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2921                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_ANCE);
2922         }
2923         
2924
2925         proto_item_set_len(item, offset-old_offset);
2926
2927
2928         return offset;
2929 }
2930
2931
2932 /* IDL: struct { */
2933 /* IDL:         ClientAddress ClientAddress; */
2934 /* IDL: } */
2935
2936 static int
2937 dcerpc_dissect_element_rts_cmd_ClientAddress_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2938 {
2939         offset = dcerpc_dissect_struct_ClientAddress(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmd_ClientAddress_ClientAddress,0);
2940
2941         return offset;
2942 }
2943
2944 int
2945 dcerpc_dissect_struct_rts_cmd_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2946 {
2947         proto_item *item = NULL;
2948         proto_tree *tree = NULL;
2949         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2950         int old_offset;
2951
2952         ALIGN_TO_4_BYTES;
2953
2954         old_offset = offset;
2955
2956         if (parent_tree) {
2957                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
2958                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_ClientAddress);
2959         }
2960         
2961         offset = dcerpc_dissect_element_rts_cmd_ClientAddress_ClientAddress(tvb, offset, pinfo, tree, drep);
2962
2963
2964         proto_item_set_len(item, offset-old_offset);
2965
2966
2967         if (di->call_data->flags & DCERPC_IS_NDR64) {
2968                 ALIGN_TO_4_BYTES;
2969         }
2970
2971         return offset;
2972 }
2973
2974
2975 /* IDL: struct { */
2976 /* IDL:         RTSCookie AssociationGroupId; */
2977 /* IDL: } */
2978
2979 static int
2980 dcerpc_dissect_element_rts_cmd_AssociationGroupId_AssociationGroupId(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2981 {
2982         offset = dcerpc_dissect_struct_RTSCookie(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmd_AssociationGroupId_AssociationGroupId,0);
2983
2984         return offset;
2985 }
2986
2987 int
2988 dcerpc_dissect_struct_rts_cmd_AssociationGroupId(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
2989 {
2990         proto_item *item = NULL;
2991         proto_tree *tree = NULL;
2992         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
2993         int old_offset;
2994
2995         ALIGN_TO_4_BYTES;
2996
2997         old_offset = offset;
2998
2999         if (parent_tree) {
3000                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
3001                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_AssociationGroupId);
3002         }
3003         
3004         offset = dcerpc_dissect_element_rts_cmd_AssociationGroupId_AssociationGroupId(tvb, offset, pinfo, tree, drep);
3005
3006
3007         proto_item_set_len(item, offset-old_offset);
3008
3009
3010         if (di->call_data->flags & DCERPC_IS_NDR64) {
3011                 ALIGN_TO_4_BYTES;
3012         }
3013
3014         return offset;
3015 }
3016
3017
3018 /* IDL: struct { */
3019 /* IDL:         ForwardDestination ForwardDestination; */
3020 /* IDL: } */
3021
3022 static int
3023 dcerpc_dissect_element_rts_cmd_Destination_ForwardDestination(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3024 {
3025         offset = dcerpc_dissect_enum_ForwardDestination(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_Destination_ForwardDestination, 0);
3026
3027         return offset;
3028 }
3029
3030 int
3031 dcerpc_dissect_struct_rts_cmd_Destination(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3032 {
3033         proto_item *item = NULL;
3034         proto_tree *tree = NULL;
3035         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
3036         int old_offset;
3037
3038         ALIGN_TO_4_BYTES;
3039
3040         old_offset = offset;
3041
3042         if (parent_tree) {
3043                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
3044                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_Destination);
3045         }
3046         
3047         offset = dcerpc_dissect_element_rts_cmd_Destination_ForwardDestination(tvb, offset, pinfo, tree, drep);
3048
3049
3050         proto_item_set_len(item, offset-old_offset);
3051
3052
3053         if (di->call_data->flags & DCERPC_IS_NDR64) {
3054                 ALIGN_TO_4_BYTES;
3055         }
3056
3057         return offset;
3058 }
3059
3060
3061 /* IDL: struct { */
3062 /* IDL:         uint32 PingTrafficSent; */
3063 /* IDL: } */
3064
3065 static int
3066 dcerpc_dissect_element_rts_cmd_PingTrafficSentNotify_PingTrafficSent(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3067 {
3068         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_PingTrafficSentNotify_PingTrafficSent, 0);
3069
3070         return offset;
3071 }
3072
3073 int
3074 dcerpc_dissect_struct_rts_cmd_PingTrafficSentNotify(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3075 {
3076         proto_item *item = NULL;
3077         proto_tree *tree = NULL;
3078         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
3079         int old_offset;
3080
3081         ALIGN_TO_4_BYTES;
3082
3083         old_offset = offset;
3084
3085         if (parent_tree) {
3086                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
3087                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd_PingTrafficSentNotify);
3088         }
3089         
3090         offset = dcerpc_dissect_element_rts_cmd_PingTrafficSentNotify_PingTrafficSent(tvb, offset, pinfo, tree, drep);
3091
3092
3093         proto_item_set_len(item, offset-old_offset);
3094
3095
3096         if (di->call_data->flags & DCERPC_IS_NDR64) {
3097                 ALIGN_TO_4_BYTES;
3098         }
3099
3100         return offset;
3101 }
3102
3103
3104 /* IDL: [nodiscriminant(1)] union { */
3105 /* IDL: [case(0x0)] [case(0x0)] dcerpc_rts_cmd_ReceiveWindowSize ReceiveWindowSize; */
3106 /* IDL: [case(0x1)] [case(0x1)] dcerpc_rts_cmd_FlowControlAck FlowControlAck; */
3107 /* IDL: [case(0x2)] [case(0x2)] dcerpc_rts_cmd_ConnectionTimeout ConnectionTimeout; */
3108 /* IDL: [case(0x3)] [case(0x3)] dcerpc_rts_cmd_Cookie Cookie; */
3109 /* IDL: [case(0x4)] [case(0x4)] dcerpc_rts_cmd_ChannelLifetime ChannelLifetime; */
3110 /* IDL: [case(0x5)] [case(0x5)] dcerpc_rts_cmd_ClientKeepalive ClientKeepalive; */
3111 /* IDL: [case(0x6)] [case(0x6)] dcerpc_rts_cmd_Version Version; */
3112 /* IDL: [case(0x7)] [case(0x7)] dcerpc_rts_cmd_Empty Empty; */
3113 /* IDL: [case(0x8)] [case(0x8)] dcerpc_rts_cmd_Padding Padding; */
3114 /* IDL: [case(0x9)] [case(0x9)] dcerpc_rts_cmd_NegativeANCE NegativeANCE; */
3115 /* IDL: [case(0xA)] [case(0xA)] dcerpc_rts_cmd_ANCE ANCE; */
3116 /* IDL: [case(0xB)] [case(0xB)] dcerpc_rts_cmd_ClientAddress ClientAddress; */
3117 /* IDL: [case(0xC)] [case(0xC)] dcerpc_rts_cmd_AssociationGroupId AssociationGroupId; */
3118 /* IDL: [case(0xD)] [case(0xD)] dcerpc_rts_cmd_Destination Destination; */
3119 /* IDL: [case(0xE)] [case(0xE)] dcerpc_rts_cmd_PingTrafficSentNotify PingTrafficSentNotify; */
3120 /* IDL: } */
3121
3122 static int
3123 dcerpc_dissect_element_rts_cmds_val0x0_ReceiveWindowSize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3124 {
3125         offset = dcerpc_dissect_struct_rts_cmd_ReceiveWindowSize(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x0_ReceiveWindowSize,0);
3126
3127         return offset;
3128 }
3129
3130 static int
3131 dcerpc_dissect_element_rts_cmds_val0x1_FlowControlAck(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3132 {
3133         offset = dcerpc_dissect_struct_rts_cmd_FlowControlAck(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x1_FlowControlAck,0);
3134
3135         return offset;
3136 }
3137
3138 static int
3139 dcerpc_dissect_element_rts_cmds_val0x2_ConnectionTimeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3140 {
3141         offset = dcerpc_dissect_struct_rts_cmd_ConnectionTimeout(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x2_ConnectionTimeout,0);
3142
3143         return offset;
3144 }
3145
3146 static int
3147 dcerpc_dissect_element_rts_cmds_val0x3_Cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3148 {
3149         offset = dcerpc_dissect_struct_rts_cmd_Cookie(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x3_Cookie,0);
3150
3151         return offset;
3152 }
3153
3154 static int
3155 dcerpc_dissect_element_rts_cmds_val0x4_ChannelLifetime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3156 {
3157         offset = dcerpc_dissect_struct_rts_cmd_ChannelLifetime(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x4_ChannelLifetime,0);
3158
3159         return offset;
3160 }
3161
3162 static int
3163 dcerpc_dissect_element_rts_cmds_val0x5_ClientKeepalive(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3164 {
3165         offset = dcerpc_dissect_struct_rts_cmd_ClientKeepalive(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x5_ClientKeepalive,0);
3166
3167         return offset;
3168 }
3169
3170 static int
3171 dcerpc_dissect_element_rts_cmds_val0x6_Version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3172 {
3173         offset = dcerpc_dissect_struct_rts_cmd_Version(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x6_Version,0);
3174
3175         return offset;
3176 }
3177
3178 static int
3179 dcerpc_dissect_element_rts_cmds_val0x7_Empty(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3180 {
3181         offset = dcerpc_dissect_struct_rts_cmd_Empty(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x7_Empty,0);
3182
3183         return offset;
3184 }
3185
3186 static int
3187 dcerpc_dissect_element_rts_cmds_val0x8_Padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3188 {
3189         offset = dcerpc_dissect_struct_rts_cmd_Padding(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x8_Padding,0);
3190
3191         return offset;
3192 }
3193
3194 static int
3195 dcerpc_dissect_element_rts_cmds_val0x9_NegativeANCE(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3196 {
3197         offset = dcerpc_dissect_struct_rts_cmd_NegativeANCE(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0x9_NegativeANCE,0);
3198
3199         return offset;
3200 }
3201
3202 static int
3203 dcerpc_dissect_element_rts_cmds_val0xA_ANCE(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3204 {
3205         offset = dcerpc_dissect_struct_rts_cmd_ANCE(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0xA_ANCE,0);
3206
3207         return offset;
3208 }
3209
3210 static int
3211 dcerpc_dissect_element_rts_cmds_val0xB_ClientAddress(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3212 {
3213         offset = dcerpc_dissect_struct_rts_cmd_ClientAddress(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0xB_ClientAddress,0);
3214
3215         return offset;
3216 }
3217
3218 static int
3219 dcerpc_dissect_element_rts_cmds_val0xC_AssociationGroupId(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3220 {
3221         offset = dcerpc_dissect_struct_rts_cmd_AssociationGroupId(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0xC_AssociationGroupId,0);
3222
3223         return offset;
3224 }
3225
3226 static int
3227 dcerpc_dissect_element_rts_cmds_val0xD_Destination(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3228 {
3229         offset = dcerpc_dissect_struct_rts_cmd_Destination(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0xD_Destination,0);
3230
3231         return offset;
3232 }
3233
3234 static int
3235 dcerpc_dissect_element_rts_cmds_val0xE_PingTrafficSentNotify(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3236 {
3237         offset = dcerpc_dissect_struct_rts_cmd_PingTrafficSentNotify(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_cmds_val0xE_PingTrafficSentNotify,0);
3238
3239         return offset;
3240 }
3241
3242 static int
3243 dcerpc_dissect_rts_cmds(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3244 {
3245         proto_item *item = NULL;
3246         proto_tree *tree = NULL;
3247         int old_offset;
3248         guint32 level = param;
3249
3250         old_offset = offset;
3251         if (parent_tree) {
3252                 item = proto_tree_add_text(parent_tree, tvb, offset, -1, "dcerpc_rts_cmds");
3253                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmds);
3254         }
3255
3256         switch(level) {
3257                 case 0x0:
3258                         offset = dcerpc_dissect_element_rts_cmds_val0x0_ReceiveWindowSize(tvb, offset, pinfo, tree, drep);
3259                 break;
3260
3261                 case 0x1:
3262                         offset = dcerpc_dissect_element_rts_cmds_val0x1_FlowControlAck(tvb, offset, pinfo, tree, drep);
3263                 break;
3264
3265                 case 0x2:
3266                         offset = dcerpc_dissect_element_rts_cmds_val0x2_ConnectionTimeout(tvb, offset, pinfo, tree, drep);
3267                 break;
3268
3269                 case 0x3:
3270                         offset = dcerpc_dissect_element_rts_cmds_val0x3_Cookie(tvb, offset, pinfo, tree, drep);
3271                 break;
3272
3273                 case 0x4:
3274                         offset = dcerpc_dissect_element_rts_cmds_val0x4_ChannelLifetime(tvb, offset, pinfo, tree, drep);
3275                 break;
3276
3277                 case 0x5:
3278                         offset = dcerpc_dissect_element_rts_cmds_val0x5_ClientKeepalive(tvb, offset, pinfo, tree, drep);
3279                 break;
3280
3281                 case 0x6:
3282                         offset = dcerpc_dissect_element_rts_cmds_val0x6_Version(tvb, offset, pinfo, tree, drep);
3283                 break;
3284
3285                 case 0x7:
3286                         offset = dcerpc_dissect_element_rts_cmds_val0x7_Empty(tvb, offset, pinfo, tree, drep);
3287                 break;
3288
3289                 case 0x8:
3290                         offset = dcerpc_dissect_element_rts_cmds_val0x8_Padding(tvb, offset, pinfo, tree, drep);
3291                 break;
3292
3293                 case 0x9:
3294                         offset = dcerpc_dissect_element_rts_cmds_val0x9_NegativeANCE(tvb, offset, pinfo, tree, drep);
3295                 break;
3296
3297                 case 0xA:
3298                         offset = dcerpc_dissect_element_rts_cmds_val0xA_ANCE(tvb, offset, pinfo, tree, drep);
3299                 break;
3300
3301                 case 0xB:
3302                         offset = dcerpc_dissect_element_rts_cmds_val0xB_ClientAddress(tvb, offset, pinfo, tree, drep);
3303                 break;
3304
3305                 case 0xC:
3306                         offset = dcerpc_dissect_element_rts_cmds_val0xC_AssociationGroupId(tvb, offset, pinfo, tree, drep);
3307                 break;
3308
3309                 case 0xD:
3310                         offset = dcerpc_dissect_element_rts_cmds_val0xD_Destination(tvb, offset, pinfo, tree, drep);
3311                 break;
3312
3313                 case 0xE:
3314                         offset = dcerpc_dissect_element_rts_cmds_val0xE_PingTrafficSentNotify(tvb, offset, pinfo, tree, drep);
3315                 break;
3316         }
3317         proto_item_set_len(item, offset-old_offset);
3318
3319
3320         return offset;
3321 }
3322
3323 /* IDL: struct { */
3324 /* IDL:         uint32 CommandType; */
3325 /* IDL:         [switch_is(CommandType)] dcerpc_rts_cmds Command; */
3326 /* IDL: } */
3327
3328 static int
3329 dcerpc_dissect_element_rts_cmd_CommandType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *CommandType)
3330 {
3331         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_CommandType, CommandType);
3332
3333         return offset;
3334 }
3335
3336 static int
3337 dcerpc_dissect_element_rts_cmd_Command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint32 *CommandType)
3338 {
3339         offset = dcerpc_dissect_rts_cmds(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_cmd_Command, *CommandType);
3340
3341         return offset;
3342 }
3343
3344 int
3345 dcerpc_dissect_struct_rts_cmd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3346 {
3347         guint32 CommandType;
3348          Command;
3349         proto_item *item = NULL;
3350         proto_tree *tree = NULL;
3351         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
3352         int old_offset;
3353
3354         ALIGN_TO_4_BYTES;
3355
3356         old_offset = offset;
3357
3358         if (parent_tree) {
3359                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
3360                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts_cmd);
3361         }
3362         
3363         offset = dcerpc_dissect_element_rts_cmd_CommandType(tvb, offset, pinfo, tree, drep, &CommandType);
3364
3365         offset = dcerpc_dissect_element_rts_cmd_Command(tvb, offset, pinfo, tree, drep, &CommandType);
3366
3367
3368         proto_item_set_len(item, offset-old_offset);
3369
3370
3371         if (di->call_data->flags & DCERPC_IS_NDR64) {
3372                 ALIGN_TO_4_BYTES;
3373         }
3374
3375         return offset;
3376 }
3377
3378
3379 /* IDL: bitmap { */
3380 /* IDL:         RTS_FLAG_NONE =  0x0000 , */
3381 /* IDL:         RTS_FLAG_PING =  0x0001 , */
3382 /* IDL:         RTS_FLAG_OTHER_CMD =  0x0002 , */
3383 /* IDL:         RTS_FLAG_RECYCLE_CHANNEL =  0x0004 , */
3384 /* IDL:         RTS_FLAG_IN_CHANNEL =  0x0008 , */
3385 /* IDL:         RTS_FLAG_OUT_CHANNEL =  0x0010 , */
3386 /* IDL:         RTS_FLAG_EOF =  0x0020 , */
3387 /* IDL:         RTS_FLAG_ECHO =  0x0040 , */
3388 /* IDL: } */
3389
3390 int
3391 dcerpc_dissect_bitmap_rts_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3392 {
3393         proto_item *item = NULL;
3394         proto_tree *tree = NULL;
3395
3396         guint16 flags;
3397         ALIGN_TO_2_BYTES;
3398
3399         if (parent_tree) {
3400                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 2, DREP_ENC_INTEGER(drep));
3401                 tree = proto_item_add_subtree(item,ett_dcerpc_dcerpc_rts_flags);
3402         }
3403
3404         offset = dissect_ndr_uint16(tvb, offset, pinfo, NULL, drep, -1, &flags);
3405         proto_item_append_text(item, ": ");
3406
3407         if (!flags)
3408                 proto_item_append_text(item, "(No values set)");
3409
3410         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_NONE, tvb, offset-2, 2, flags);
3411         if (flags&( 0x0000 )){
3412                 proto_item_append_text(item, "RTS_FLAG_NONE");
3413                 if (flags & (~( 0x0000 )))
3414                         proto_item_append_text(item, ", ");
3415         }
3416         flags&=(~( 0x0000 ));
3417
3418         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_PING, tvb, offset-2, 2, flags);
3419         if (flags&( 0x0001 )){
3420                 proto_item_append_text(item, "RTS_FLAG_PING");
3421                 if (flags & (~( 0x0001 )))
3422                         proto_item_append_text(item, ", ");
3423         }
3424         flags&=(~( 0x0001 ));
3425
3426         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_OTHER_CMD, tvb, offset-2, 2, flags);
3427         if (flags&( 0x0002 )){
3428                 proto_item_append_text(item, "RTS_FLAG_OTHER_CMD");
3429                 if (flags & (~( 0x0002 )))
3430                         proto_item_append_text(item, ", ");
3431         }
3432         flags&=(~( 0x0002 ));
3433
3434         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_RECYCLE_CHANNEL, tvb, offset-2, 2, flags);
3435         if (flags&( 0x0004 )){
3436                 proto_item_append_text(item, "RTS_FLAG_RECYCLE_CHANNEL");
3437                 if (flags & (~( 0x0004 )))
3438                         proto_item_append_text(item, ", ");
3439         }
3440         flags&=(~( 0x0004 ));
3441
3442         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_IN_CHANNEL, tvb, offset-2, 2, flags);
3443         if (flags&( 0x0008 )){
3444                 proto_item_append_text(item, "RTS_FLAG_IN_CHANNEL");
3445                 if (flags & (~( 0x0008 )))
3446                         proto_item_append_text(item, ", ");
3447         }
3448         flags&=(~( 0x0008 ));
3449
3450         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_OUT_CHANNEL, tvb, offset-2, 2, flags);
3451         if (flags&( 0x0010 )){
3452                 proto_item_append_text(item, "RTS_FLAG_OUT_CHANNEL");
3453                 if (flags & (~( 0x0010 )))
3454                         proto_item_append_text(item, ", ");
3455         }
3456         flags&=(~( 0x0010 ));
3457
3458         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_EOF, tvb, offset-2, 2, flags);
3459         if (flags&( 0x0020 )){
3460                 proto_item_append_text(item, "RTS_FLAG_EOF");
3461                 if (flags & (~( 0x0020 )))
3462                         proto_item_append_text(item, ", ");
3463         }
3464         flags&=(~( 0x0020 ));
3465
3466         proto_tree_add_boolean(tree, hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_ECHO, tvb, offset-2, 2, flags);
3467         if (flags&( 0x0040 )){
3468                 proto_item_append_text(item, "RTS_FLAG_ECHO");
3469                 if (flags & (~( 0x0040 )))
3470                         proto_item_append_text(item, ", ");
3471         }
3472         flags&=(~( 0x0040 ));
3473
3474         if (flags) {
3475                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
3476         }
3477
3478         return offset;
3479 }
3480
3481
3482 /* IDL: struct { */
3483 /* IDL:         dcerpc_rts_flags Flags; */
3484 /* IDL:         uint16 NumberOfCommands; */
3485 /* IDL:         dcerpc_rts_cmd Commands[NumberOfCommands]; */
3486 /* IDL: } */
3487
3488 static int
3489 dcerpc_dissect_element_rts_Flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3490 {
3491         offset = dcerpc_dissect_bitmap_rts_flags(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_Flags, 0);
3492
3493         return offset;
3494 }
3495
3496 static int
3497 dcerpc_dissect_element_rts_NumberOfCommands(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3498 {
3499         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_dcerpc_rts_NumberOfCommands, 0);
3500
3501         return offset;
3502 }
3503
3504 static int
3505 dcerpc_dissect_element_rts_Commands(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3506 {
3507
3508         return offset;
3509 }
3510
3511 static int
3512 dcerpc_dissect_element_rts_Commands_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3513 {
3514         offset = dcerpc_dissect_struct_rts_cmd(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_rts_Commands,0);
3515
3516         return offset;
3517 }
3518
3519 int
3520 dcerpc_dissect_struct_rts(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3521 {
3522         proto_item *item = NULL;
3523         proto_tree *tree = NULL;
3524         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
3525         int old_offset;
3526
3527         ALIGN_TO_4_BYTES;
3528
3529         old_offset = offset;
3530
3531         if (parent_tree) {
3532                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
3533                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_rts);
3534         }
3535         
3536         offset = dcerpc_dissect_element_rts_Flags(tvb, offset, pinfo, tree, drep);
3537
3538         offset = dcerpc_dissect_element_rts_NumberOfCommands(tvb, offset, pinfo, tree, drep);
3539
3540         offset = dcerpc_dissect_element_rts_Commands(tvb, offset, pinfo, tree, drep);
3541
3542
3543         proto_item_set_len(item, offset-old_offset);
3544
3545
3546         if (di->call_data->flags & DCERPC_IS_NDR64) {
3547                 ALIGN_TO_4_BYTES;
3548         }
3549
3550         return offset;
3551 }
3552
3553
3554 /* IDL: enum { */
3555 /* IDL:         DCERPC_PKT_REQUEST=0, */
3556 /* IDL:         DCERPC_PKT_PING=1, */
3557 /* IDL:         DCERPC_PKT_RESPONSE=2, */
3558 /* IDL:         DCERPC_PKT_FAULT=3, */
3559 /* IDL:         DCERPC_PKT_WORKING=4, */
3560 /* IDL:         DCERPC_PKT_NOCALL=5, */
3561 /* IDL:         DCERPC_PKT_REJECT=6, */
3562 /* IDL:         DCERPC_PKT_ACK=7, */
3563 /* IDL:         DCERPC_PKT_CL_CANCEL=8, */
3564 /* IDL:         DCERPC_PKT_FACK=9, */
3565 /* IDL:         DCERPC_PKT_CANCEL_ACK=10, */
3566 /* IDL:         DCERPC_PKT_BIND=11, */
3567 /* IDL:         DCERPC_PKT_BIND_ACK=12, */
3568 /* IDL:         DCERPC_PKT_BIND_NAK=13, */
3569 /* IDL:         DCERPC_PKT_ALTER=14, */
3570 /* IDL:         DCERPC_PKT_ALTER_RESP=15, */
3571 /* IDL:         DCERPC_PKT_AUTH3=16, */
3572 /* IDL:         DCERPC_PKT_SHUTDOWN=17, */
3573 /* IDL:         DCERPC_PKT_CO_CANCEL=18, */
3574 /* IDL:         DCERPC_PKT_ORPHANED=19, */
3575 /* IDL:         DCERPC_PKT_RTS=20, */
3576 /* IDL: } */
3577
3578 int
3579 dcerpc_dissect_enum_pkt_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
3580 {
3581         guint8 parameter=0;
3582         if(param){
3583                 parameter=(guint8)*param;
3584         }
3585         offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
3586         if(param){
3587                 *param=(guint32)parameter;
3588         }
3589         return offset;
3590 }
3591
3592
3593 /* IDL: [nodiscriminant(1)] union { */
3594 /* IDL: [case(DCERPC_PKT_REQUEST)] [case(DCERPC_PKT_REQUEST)] dcerpc_request request; */
3595 /* IDL: [case(DCERPC_PKT_PING)] [case(DCERPC_PKT_PING)] dcerpc_ping ping; */
3596 /* IDL: [case(DCERPC_PKT_RESPONSE)] [case(DCERPC_PKT_RESPONSE)] dcerpc_response response; */
3597 /* IDL: [case(DCERPC_PKT_FAULT)] [case(DCERPC_PKT_FAULT)] dcerpc_fault fault; */
3598 /* IDL: [case(DCERPC_PKT_WORKING)] [case(DCERPC_PKT_WORKING)] dcerpc_working working; */
3599 /* IDL: [case(DCERPC_PKT_NOCALL)] [case(DCERPC_PKT_NOCALL)] dcerpc_fack nocall; */
3600 /* IDL: [case(DCERPC_PKT_REJECT)] [case(DCERPC_PKT_REJECT)] dcerpc_fault reject; */
3601 /* IDL: [case(DCERPC_PKT_ACK)] [case(DCERPC_PKT_ACK)] dcerpc_ack ack; */
3602 /* IDL: [case(DCERPC_PKT_CL_CANCEL)] [case(DCERPC_PKT_CL_CANCEL)] dcerpc_cl_cancel cl_cancel; */
3603 /* IDL: [case(DCERPC_PKT_FACK)] [case(DCERPC_PKT_FACK)] dcerpc_fack fack; */
3604 /* IDL: [case(DCERPC_PKT_CANCEL_ACK)] [case(DCERPC_PKT_CANCEL_ACK)] dcerpc_cancel_ack cancel_ack; */
3605 /* IDL: [case(DCERPC_PKT_BIND)] [case(DCERPC_PKT_BIND)] dcerpc_bind bind; */
3606 /* IDL: [case(DCERPC_PKT_BIND_ACK)] [case(DCERPC_PKT_BIND_ACK)] dcerpc_bind_ack bind_ack; */
3607 /* IDL: [case(DCERPC_PKT_BIND_NAK)] [case(DCERPC_PKT_BIND_NAK)] dcerpc_bind_nak bind_nak; */
3608 /* IDL: [case(DCERPC_PKT_ALTER)] [case(DCERPC_PKT_ALTER)] dcerpc_bind alter; */
3609 /* IDL: [case(DCERPC_PKT_ALTER_RESP)] [case(DCERPC_PKT_ALTER_RESP)] dcerpc_bind_ack alter_resp; */
3610 /* IDL: [case(DCERPC_PKT_SHUTDOWN)] [case(DCERPC_PKT_SHUTDOWN)] dcerpc_shutdown shutdown; */
3611 /* IDL: [case(DCERPC_PKT_CO_CANCEL)] [case(DCERPC_PKT_CO_CANCEL)] dcerpc_co_cancel co_cancel; */
3612 /* IDL: [case(DCERPC_PKT_ORPHANED)] [case(DCERPC_PKT_ORPHANED)] dcerpc_orphaned orphaned; */
3613 /* IDL: [case(DCERPC_PKT_AUTH3)] [case(DCERPC_PKT_AUTH3)] dcerpc_auth3 auth3; */
3614 /* IDL: [case(DCERPC_PKT_RTS)] [case(DCERPC_PKT_RTS)] dcerpc_rts rts; */
3615 /* IDL: } */
3616
3617 static int
3618 dcerpc_dissect_element_payload_valDCERPC_PKT_REQUEST_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3619 {
3620         offset = dcerpc_dissect_struct_request(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_REQUEST_request,0);
3621
3622         return offset;
3623 }
3624
3625 static int
3626 dcerpc_dissect_element_payload_valDCERPC_PKT_PING_ping(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3627 {
3628         offset = dcerpc_dissect_struct_ping(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_PING_ping,0);
3629
3630         return offset;
3631 }
3632
3633 static int
3634 dcerpc_dissect_element_payload_valDCERPC_PKT_RESPONSE_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3635 {
3636         offset = dcerpc_dissect_struct_response(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_RESPONSE_response,0);
3637
3638         return offset;
3639 }
3640
3641 static int
3642 dcerpc_dissect_element_payload_valDCERPC_PKT_FAULT_fault(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3643 {
3644         offset = dcerpc_dissect_struct_fault(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_FAULT_fault,0);
3645
3646         return offset;
3647 }
3648
3649 static int
3650 dcerpc_dissect_element_payload_valDCERPC_PKT_WORKING_working(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3651 {
3652         offset = dcerpc_dissect_struct_working(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_WORKING_working,0);
3653
3654         return offset;
3655 }
3656
3657 static int
3658 dcerpc_dissect_element_payload_valDCERPC_PKT_NOCALL_nocall(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3659 {
3660         offset = dcerpc_dissect_struct_fack(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_NOCALL_nocall,0);
3661
3662         return offset;
3663 }
3664
3665 static int
3666 dcerpc_dissect_element_payload_valDCERPC_PKT_REJECT_reject(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3667 {
3668         offset = dcerpc_dissect_struct_fault(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_REJECT_reject,0);
3669
3670         return offset;
3671 }
3672
3673 static int
3674 dcerpc_dissect_element_payload_valDCERPC_PKT_ACK_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3675 {
3676         offset = dcerpc_dissect_struct_ack(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ACK_ack,0);
3677
3678         return offset;
3679 }
3680
3681 static int
3682 dcerpc_dissect_element_payload_valDCERPC_PKT_CL_CANCEL_cl_cancel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3683 {
3684         offset = dcerpc_dissect_struct_cl_cancel(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CL_CANCEL_cl_cancel,0);
3685
3686         return offset;
3687 }
3688
3689 static int
3690 dcerpc_dissect_element_payload_valDCERPC_PKT_FACK_fack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3691 {
3692         offset = dcerpc_dissect_struct_fack(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_FACK_fack,0);
3693
3694         return offset;
3695 }
3696
3697 static int
3698 dcerpc_dissect_element_payload_valDCERPC_PKT_CANCEL_ACK_cancel_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3699 {
3700         offset = dcerpc_dissect_struct_cancel_ack(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CANCEL_ACK_cancel_ack,0);
3701
3702         return offset;
3703 }
3704
3705 static int
3706 dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_bind(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3707 {
3708         offset = dcerpc_dissect_struct_bind(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_bind,0);
3709
3710         return offset;
3711 }
3712
3713 static int
3714 dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_ACK_bind_ack(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3715 {
3716         offset = dcerpc_dissect_struct_bind_ack(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_ACK_bind_ack,0);
3717
3718         return offset;
3719 }
3720
3721 static int
3722 dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_NAK_bind_nak(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3723 {
3724         offset = dcerpc_dissect_struct_bind_nak(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_NAK_bind_nak,0);
3725
3726         return offset;
3727 }
3728
3729 static int
3730 dcerpc_dissect_element_payload_valDCERPC_PKT_ALTER_alter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3731 {
3732         offset = dcerpc_dissect_struct_bind(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ALTER_alter,0);
3733
3734         return offset;
3735 }
3736
3737 static int
3738 dcerpc_dissect_element_payload_valDCERPC_PKT_ALTER_RESP_alter_resp(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3739 {
3740         offset = dcerpc_dissect_struct_bind_ack(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ALTER_RESP_alter_resp,0);
3741
3742         return offset;
3743 }
3744
3745 static int
3746 dcerpc_dissect_element_payload_valDCERPC_PKT_SHUTDOWN_shutdown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3747 {
3748         offset = dcerpc_dissect_struct_shutdown(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_SHUTDOWN_shutdown,0);
3749
3750         return offset;
3751 }
3752
3753 static int
3754 dcerpc_dissect_element_payload_valDCERPC_PKT_CO_CANCEL_co_cancel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3755 {
3756         offset = dcerpc_dissect_struct_co_cancel(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CO_CANCEL_co_cancel,0);
3757
3758         return offset;
3759 }
3760
3761 static int
3762 dcerpc_dissect_element_payload_valDCERPC_PKT_ORPHANED_orphaned(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3763 {
3764         offset = dcerpc_dissect_struct_orphaned(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ORPHANED_orphaned,0);
3765
3766         return offset;
3767 }
3768
3769 static int
3770 dcerpc_dissect_element_payload_valDCERPC_PKT_AUTH3_auth3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3771 {
3772         offset = dcerpc_dissect_struct_auth3(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_AUTH3_auth3,0);
3773
3774         return offset;
3775 }
3776
3777 static int
3778 dcerpc_dissect_element_payload_valDCERPC_PKT_RTS_rts(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3779 {
3780         offset = dcerpc_dissect_struct_rts(tvb,offset,pinfo,tree,drep,hf_dcerpc_dcerpc_payload_valDCERPC_PKT_RTS_rts,0);
3781
3782         return offset;
3783 }
3784
3785 static int
3786 dcerpc_dissect_payload(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3787 {
3788         proto_item *item = NULL;
3789         proto_tree *tree = NULL;
3790         int old_offset;
3791         guint32 level = param;
3792
3793         old_offset = offset;
3794         if (parent_tree) {
3795                 item = proto_tree_add_text(parent_tree, tvb, offset, -1, "dcerpc_payload");
3796                 tree = proto_item_add_subtree(item, ett_dcerpc_dcerpc_payload);
3797         }
3798
3799         switch(level) {
3800                 case DCERPC_PKT_REQUEST:
3801                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_REQUEST_request(tvb, offset, pinfo, tree, drep);
3802                 break;
3803
3804                 case DCERPC_PKT_PING:
3805                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_PING_ping(tvb, offset, pinfo, tree, drep);
3806                 break;
3807
3808                 case DCERPC_PKT_RESPONSE:
3809                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_RESPONSE_response(tvb, offset, pinfo, tree, drep);
3810                 break;
3811
3812                 case DCERPC_PKT_FAULT:
3813                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_FAULT_fault(tvb, offset, pinfo, tree, drep);
3814                 break;
3815
3816                 case DCERPC_PKT_WORKING:
3817                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_WORKING_working(tvb, offset, pinfo, tree, drep);
3818                 break;
3819
3820                 case DCERPC_PKT_NOCALL:
3821                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_NOCALL_nocall(tvb, offset, pinfo, tree, drep);
3822                 break;
3823
3824                 case DCERPC_PKT_REJECT:
3825                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_REJECT_reject(tvb, offset, pinfo, tree, drep);
3826                 break;
3827
3828                 case DCERPC_PKT_ACK:
3829                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_ACK_ack(tvb, offset, pinfo, tree, drep);
3830                 break;
3831
3832                 case DCERPC_PKT_CL_CANCEL:
3833                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_CL_CANCEL_cl_cancel(tvb, offset, pinfo, tree, drep);
3834                 break;
3835
3836                 case DCERPC_PKT_FACK:
3837                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_FACK_fack(tvb, offset, pinfo, tree, drep);
3838                 break;
3839
3840                 case DCERPC_PKT_CANCEL_ACK:
3841                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_CANCEL_ACK_cancel_ack(tvb, offset, pinfo, tree, drep);
3842                 break;
3843
3844                 case DCERPC_PKT_BIND:
3845                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_bind(tvb, offset, pinfo, tree, drep);
3846                 break;
3847
3848                 case DCERPC_PKT_BIND_ACK:
3849                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_ACK_bind_ack(tvb, offset, pinfo, tree, drep);
3850                 break;
3851
3852                 case DCERPC_PKT_BIND_NAK:
3853                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_BIND_NAK_bind_nak(tvb, offset, pinfo, tree, drep);
3854                 break;
3855
3856                 case DCERPC_PKT_ALTER:
3857                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_ALTER_alter(tvb, offset, pinfo, tree, drep);
3858                 break;
3859
3860                 case DCERPC_PKT_ALTER_RESP:
3861                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_ALTER_RESP_alter_resp(tvb, offset, pinfo, tree, drep);
3862                 break;
3863
3864                 case DCERPC_PKT_SHUTDOWN:
3865                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_SHUTDOWN_shutdown(tvb, offset, pinfo, tree, drep);
3866                 break;
3867
3868                 case DCERPC_PKT_CO_CANCEL:
3869                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_CO_CANCEL_co_cancel(tvb, offset, pinfo, tree, drep);
3870                 break;
3871
3872                 case DCERPC_PKT_ORPHANED:
3873                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_ORPHANED_orphaned(tvb, offset, pinfo, tree, drep);
3874                 break;
3875
3876                 case DCERPC_PKT_AUTH3:
3877                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_AUTH3_auth3(tvb, offset, pinfo, tree, drep);
3878                 break;
3879
3880                 case DCERPC_PKT_RTS:
3881                         offset = dcerpc_dissect_element_payload_valDCERPC_PKT_RTS_rts(tvb, offset, pinfo, tree, drep);
3882                 break;
3883         }
3884         proto_item_set_len(item, offset-old_offset);
3885
3886
3887         return offset;
3888 }
3889
3890 /* IDL: struct { */
3891 /* IDL:         uint8 rpc_vers; */
3892 /* IDL:         uint8 rpc_vers_minor; */
3893 /* IDL:         dcerpc_pkt_type ptype; */
3894 /* IDL:         uint8 pfc_flags; */
3895 /* IDL:         uint8 drep[4]; */
3896 /* IDL:         uint16 frag_length; */
3897 /* IDL:         uint16 auth_length; */
3898 /* IDL:         uint32 call_id; */
3899 /* IDL:         [switch_is(ptype)] dcerpc_payload u; */
3900 /* IDL: } */
3901
3902 static int
3903 dcerpc_dissect_element_ncacn_packet_rpc_vers(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3904 {
3905         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_rpc_vers, 0);
3906
3907         return offset;
3908 }
3909
3910 static int
3911 dcerpc_dissect_element_ncacn_packet_rpc_vers_minor(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3912 {
3913         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_rpc_vers_minor, 0);
3914
3915         return offset;
3916 }
3917
3918 static int
3919 dcerpc_dissect_element_ncacn_packet_ptype(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype)
3920 {
3921         offset = dcerpc_dissect_enum_pkt_type(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_ptype, ptype);
3922
3923         return offset;
3924 }
3925
3926 static int
3927 dcerpc_dissect_element_ncacn_packet_pfc_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3928 {
3929         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_pfc_flags, 0);
3930
3931         return offset;
3932 }
3933
3934 static int
3935 dcerpc_dissect_element_ncacn_packet_drep(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3936 {
3937         dcerpc_info *di = (dcerpc_info*)pinfo->private_data;
3938         int conformant = di->conformant_run;
3939         if (!conformant) {
3940                 offset = dcerpc_dissect_element_ncacn_packet_drep_(tvb, offset, 4, pinfo, tree, drep);
3941         }
3942
3943         return offset;
3944 }
3945
3946 static int
3947 dcerpc_dissect_element_ncacn_packet_drep_(tvbuff_t *tvb _U_, int offset _U_,int length _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3948 {
3949         proto_tree_add_bytes(tree, hf_dcerpc_ncacn_packet_drep, tvb, offset, length, tvb_get_ptr(tvb, offset,length)); offset += length;
3950
3951         return offset;
3952 }
3953
3954 static int
3955 dcerpc_dissect_element_ncacn_packet_frag_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3956 {
3957         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_frag_length, 0);
3958
3959         return offset;
3960 }
3961
3962 static int
3963 dcerpc_dissect_element_ncacn_packet_auth_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3964 {
3965         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_auth_length, 0);
3966
3967         return offset;
3968 }
3969
3970 static int
3971 dcerpc_dissect_element_ncacn_packet_call_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3972 {
3973         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_call_id, 0);
3974
3975         return offset;
3976 }
3977
3978 static int
3979 dcerpc_dissect_element_ncacn_packet_u(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype)
3980 {
3981         offset = dcerpc_dissect_payload(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncacn_packet_u, *ptype);
3982
3983         return offset;
3984 }
3985
3986 int
3987 dcerpc_dissect_struct_ncacn_packet(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
3988 {
3989         guint8 ptype;
3990         proto_item *item = NULL;
3991         proto_tree *tree = NULL;
3992         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
3993         int old_offset;
3994
3995         ALIGN_TO_4_BYTES;
3996
3997         old_offset = offset;
3998
3999         if (parent_tree) {
4000                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
4001                 tree = proto_item_add_subtree(item, ett_dcerpc_ncacn_packet);
4002         }
4003         
4004         offset = dcerpc_dissect_element_ncacn_packet_rpc_vers(tvb, offset, pinfo, tree, drep);
4005
4006         offset = dcerpc_dissect_element_ncacn_packet_rpc_vers_minor(tvb, offset, pinfo, tree, drep);
4007
4008         offset = dcerpc_dissect_element_ncacn_packet_ptype(tvb, offset, pinfo, tree, drep, &ptype);
4009
4010         offset = dcerpc_dissect_element_ncacn_packet_pfc_flags(tvb, offset, pinfo, tree, drep);
4011
4012         offset = dcerpc_dissect_element_ncacn_packet_drep(tvb, offset, pinfo, tree, drep);
4013
4014         offset = dcerpc_dissect_element_ncacn_packet_frag_length(tvb, offset, pinfo, tree, drep);
4015
4016         offset = dcerpc_dissect_element_ncacn_packet_auth_length(tvb, offset, pinfo, tree, drep);
4017
4018         offset = dcerpc_dissect_element_ncacn_packet_call_id(tvb, offset, pinfo, tree, drep);
4019
4020         offset = dcerpc_dissect_element_ncacn_packet_u(tvb, offset, pinfo, tree, drep, &ptype);
4021
4022
4023         proto_item_set_len(item, offset-old_offset);
4024
4025
4026         if (di->call_data->flags & DCERPC_IS_NDR64) {
4027                 ALIGN_TO_4_BYTES;
4028         }
4029
4030         return offset;
4031 }
4032
4033
4034 /* IDL: struct { */
4035 /* IDL:         uint8 rpc_vers; */
4036 /* IDL:         uint8 ptype; */
4037 /* IDL:         uint8 pfc_flags; */
4038 /* IDL:         uint8 ncadg_flags; */
4039 /* IDL:         uint8 drep[3]; */
4040 /* IDL:         uint8 serial_high; */
4041 /* IDL:         GUID object; */
4042 /* IDL:         GUID iface; */
4043 /* IDL:         GUID activity; */
4044 /* IDL:         uint32 server_boot; */
4045 /* IDL:         uint32 iface_version; */
4046 /* IDL:         uint32 seq_num; */
4047 /* IDL:         uint16 opnum; */
4048 /* IDL:         uint16 ihint; */
4049 /* IDL:         uint16 ahint; */
4050 /* IDL:         uint16 len; */
4051 /* IDL:         uint16 fragnum; */
4052 /* IDL:         uint8 auth_proto; */
4053 /* IDL:         uint8 serial_low; */
4054 /* IDL:         [switch_is(ptype)] dcerpc_payload u; */
4055 /* IDL: } */
4056
4057 static int
4058 dcerpc_dissect_element_ncadg_packet_rpc_vers(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4059 {
4060         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_rpc_vers, 0);
4061
4062         return offset;
4063 }
4064
4065 static int
4066 dcerpc_dissect_element_ncadg_packet_ptype(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype)
4067 {
4068         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_ptype, ptype);
4069
4070         return offset;
4071 }
4072
4073 static int
4074 dcerpc_dissect_element_ncadg_packet_pfc_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4075 {
4076         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_pfc_flags, 0);
4077
4078         return offset;
4079 }
4080
4081 static int
4082 dcerpc_dissect_element_ncadg_packet_ncadg_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4083 {
4084         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_ncadg_flags, 0);
4085
4086         return offset;
4087 }
4088
4089 static int
4090 dcerpc_dissect_element_ncadg_packet_drep(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4091 {
4092         dcerpc_info *di = (dcerpc_info*)pinfo->private_data;
4093         int conformant = di->conformant_run;
4094         if (!conformant) {
4095                 offset = dcerpc_dissect_element_ncadg_packet_drep_(tvb, offset, 3, pinfo, tree, drep);
4096         }
4097
4098         return offset;
4099 }
4100
4101 static int
4102 dcerpc_dissect_element_ncadg_packet_drep_(tvbuff_t *tvb _U_, int offset _U_,int length _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4103 {
4104         proto_tree_add_bytes(tree, hf_dcerpc_ncadg_packet_drep, tvb, offset, length, tvb_get_ptr(tvb, offset,length)); offset += length;
4105
4106         return offset;
4107 }
4108
4109 static int
4110 dcerpc_dissect_element_ncadg_packet_serial_high(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4111 {
4112         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_serial_high, 0);
4113
4114         return offset;
4115 }
4116
4117 static int
4118 dcerpc_dissect_element_ncadg_packet_object(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4119 {
4120         offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_object, NULL);
4121
4122         return offset;
4123 }
4124
4125 static int
4126 dcerpc_dissect_element_ncadg_packet_iface(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4127 {
4128         offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_iface, NULL);
4129
4130         return offset;
4131 }
4132
4133 static int
4134 dcerpc_dissect_element_ncadg_packet_activity(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4135 {
4136         offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_activity, NULL);
4137
4138         return offset;
4139 }
4140
4141 static int
4142 dcerpc_dissect_element_ncadg_packet_server_boot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4143 {
4144         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_server_boot, 0);
4145
4146         return offset;
4147 }
4148
4149 static int
4150 dcerpc_dissect_element_ncadg_packet_iface_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4151 {
4152         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_iface_version, 0);
4153
4154         return offset;
4155 }
4156
4157 static int
4158 dcerpc_dissect_element_ncadg_packet_seq_num(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4159 {
4160         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_seq_num, 0);
4161
4162         return offset;
4163 }
4164
4165 static int
4166 dcerpc_dissect_element_ncadg_packet_opnum(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4167 {
4168         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_opnum, 0);
4169
4170         return offset;
4171 }
4172
4173 static int
4174 dcerpc_dissect_element_ncadg_packet_ihint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4175 {
4176         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_ihint, 0);
4177
4178         return offset;
4179 }
4180
4181 static int
4182 dcerpc_dissect_element_ncadg_packet_ahint(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4183 {
4184         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_ahint, 0);
4185
4186         return offset;
4187 }
4188
4189 static int
4190 dcerpc_dissect_element_ncadg_packet_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4191 {
4192         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_len, 0);
4193
4194         return offset;
4195 }
4196
4197 static int
4198 dcerpc_dissect_element_ncadg_packet_fragnum(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4199 {
4200         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_fragnum, 0);
4201
4202         return offset;
4203 }
4204
4205 static int
4206 dcerpc_dissect_element_ncadg_packet_auth_proto(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4207 {
4208         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_auth_proto, 0);
4209
4210         return offset;
4211 }
4212
4213 static int
4214 dcerpc_dissect_element_ncadg_packet_serial_low(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
4215 {
4216         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_serial_low, 0);
4217
4218         return offset;
4219 }
4220
4221 static int
4222 dcerpc_dissect_element_ncadg_packet_u(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, guint8 *ptype)
4223 {
4224         offset = dcerpc_dissect_payload(tvb, offset, pinfo, tree, drep, hf_dcerpc_ncadg_packet_u, *ptype);
4225
4226         return offset;
4227 }
4228
4229 int
4230 dcerpc_dissect_struct_ncadg_packet(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
4231 {
4232         guint8 ptype;
4233         proto_item *item = NULL;
4234         proto_tree *tree = NULL;
4235         dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
4236         int old_offset;
4237
4238         ALIGN_TO_4_BYTES;
4239
4240         old_offset = offset;
4241
4242         if (parent_tree) {
4243                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
4244                 tree = proto_item_add_subtree(item, ett_dcerpc_ncadg_packet);
4245         }
4246         
4247         offset = dcerpc_dissect_element_ncadg_packet_rpc_vers(tvb, offset, pinfo, tree, drep);
4248
4249         offset = dcerpc_dissect_element_ncadg_packet_ptype(tvb, offset, pinfo, tree, drep, &ptype);
4250
4251         offset = dcerpc_dissect_element_ncadg_packet_pfc_flags(tvb, offset, pinfo, tree, drep);
4252
4253         offset = dcerpc_dissect_element_ncadg_packet_ncadg_flags(tvb, offset, pinfo, tree, drep);
4254
4255         offset = dcerpc_dissect_element_ncadg_packet_drep(tvb, offset, pinfo, tree, drep);
4256
4257         offset = dcerpc_dissect_element_ncadg_packet_serial_high(tvb, offset, pinfo, tree, drep);
4258
4259         offset = dcerpc_dissect_element_ncadg_packet_object(tvb, offset, pinfo, tree, drep);
4260
4261         offset = dcerpc_dissect_element_ncadg_packet_iface(tvb, offset, pinfo, tree, drep);
4262
4263         offset = dcerpc_dissect_element_ncadg_packet_activity(tvb, offset, pinfo, tree, drep);
4264
4265         offset = dcerpc_dissect_element_ncadg_packet_server_boot(tvb, offset, pinfo, tree, drep);
4266
4267         offset = dcerpc_dissect_element_ncadg_packet_iface_version(tvb, offset, pinfo, tree, drep);
4268
4269         offset = dcerpc_dissect_element_ncadg_packet_seq_num(tvb, offset, pinfo, tree, drep);
4270
4271         offset = dcerpc_dissect_element_ncadg_packet_opnum(tvb, offset, pinfo, tree, drep);
4272
4273         offset = dcerpc_dissect_element_ncadg_packet_ihint(tvb, offset, pinfo, tree, drep);
4274
4275         offset = dcerpc_dissect_element_ncadg_packet_ahint(tvb, offset, pinfo, tree, drep);
4276
4277         offset = dcerpc_dissect_element_ncadg_packet_len(tvb, offset, pinfo, tree, drep);
4278
4279         offset = dcerpc_dissect_element_ncadg_packet_fragnum(tvb, offset, pinfo, tree, drep);
4280
4281         offset = dcerpc_dissect_element_ncadg_packet_auth_proto(tvb, offset, pinfo, tree, drep);
4282
4283         offset = dcerpc_dissect_element_ncadg_packet_serial_low(tvb, offset, pinfo, tree, drep);
4284
4285         offset = dcerpc_dissect_element_ncadg_packet_u(tvb, offset, pinfo, tree, drep, &ptype);
4286
4287
4288         proto_item_set_len(item, offset-old_offset);
4289
4290
4291         if (di->call_data->flags & DCERPC_IS_NDR64) {
4292                 ALIGN_TO_4_BYTES;
4293         }
4294
4295         return offset;
4296 }
4297
4298
4299 static dcerpc_sub_dissector dcerpc_dissectors[] = {
4300         { 0, NULL, NULL, NULL }
4301 };
4302
4303 void proto_register_dcerpc_dcerpc(void)
4304 {
4305         static hf_register_info hf[] = {
4306         { &hf_dcerpc_dcerpc_rts_cmds_val0xE_PingTrafficSentNotify,
4307           { "Pingtrafficsentnotify", "dcerpc.dcerpc_rts_cmds_val0xE.PingTrafficSentNotify", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4308         { &hf_dcerpc_dcerpc_auth_auth_reserved,
4309           { "Auth Reserved", "dcerpc.dcerpc_auth.auth_reserved", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4310         { &hf_dcerpc_dcerpc_bind_ack_secondary_address_size,
4311           { "Secondary Address Size", "dcerpc.dcerpc_bind_ack.secondary_address_size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4312         { &hf_dcerpc_dcerpc_request_stub_and_verifier,
4313           { "Stub And Verifier", "dcerpc.dcerpc_request.stub_and_verifier", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4314         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_PING,
4315           { "Rts Flag Ping", "dcerpc.dcerpc_rts_flags.RTS_FLAG_PING", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_PING_tfs), ( 0x0001 ), NULL, HFILL }},
4316         { &hf_dcerpc_ncadg_packet_u,
4317           { "U", "dcerpc.ncadg_packet.u", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4318         { &hf_dcerpc_dcerpc_rts_cmds_val0x2_ConnectionTimeout,
4319           { "Connectiontimeout", "dcerpc.dcerpc_rts_cmds_val0x2.ConnectionTimeout", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4320         { &hf_dcerpc_dcerpc_fack_serial_no,
4321           { "Serial No", "dcerpc.dcerpc_fack.serial_no", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4322         { &hf_dcerpc_dcerpc_cl_cancel_version,
4323           { "Version", "dcerpc.dcerpc_cl_cancel.version", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4324         { &hf_dcerpc_dcerpc_rts_cmds_val0x1_FlowControlAck,
4325           { "Flowcontrolack", "dcerpc.dcerpc_rts_cmds_val0x1.FlowControlAck", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4326         { &hf_dcerpc_dcerpc_orphaned_auth_info,
4327           { "Auth Info", "dcerpc.dcerpc_orphaned.auth_info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4328         { &hf_dcerpc_dcerpc_ack_ctx_result,
4329           { "Result", "dcerpc.dcerpc_ack_ctx.result", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4330         { &hf_dcerpc_dcerpc_co_cancel_auth_info,
4331           { "Auth Info", "dcerpc.dcerpc_co_cancel.auth_info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4332         { &hf_dcerpc_dcerpc_auth_auth_context_id,
4333           { "Auth Context Id", "dcerpc.dcerpc_auth.auth_context_id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4334         { &hf_dcerpc_dcerpc_rts_cmd_Command,
4335           { "Command", "dcerpc.dcerpc_rts_cmd.Command", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4336         { &hf_dcerpc_dcerpc_rts_cmds_val0x8_Padding,
4337           { "Padding", "dcerpc.dcerpc_rts_cmds_val0x8.Padding", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4338         { &hf_dcerpc_ncadg_packet_fragnum,
4339           { "Fragnum", "dcerpc.ncadg_packet.fragnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4340         { &hf_dcerpc_ncadg_packet_pfc_flags,
4341           { "Pfc Flags", "dcerpc.ncadg_packet.pfc_flags", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4342         { &hf_dcerpc_ncacn_packet_u,
4343           { "U", "dcerpc.ncacn_packet.u", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4344         { &hf_dcerpc_dcerpc_rts_cmds_val0x4_ChannelLifetime,
4345           { "Channellifetime", "dcerpc.dcerpc_rts_cmds_val0x4.ChannelLifetime", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4346         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_REQUEST_request,
4347           { "Request", "dcerpc.dcerpc_payload_valDCERPC_PKT_REQUEST.request", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4348         { &hf_dcerpc_dcerpc_bind_nak_versions_num_versions,
4349           { "Num Versions", "dcerpc.dcerpc_bind_nak_versions.num_versions", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4350         { &hf_dcerpc_dcerpc_rts_cmds_val0xB_ClientAddress,
4351           { "Clientaddress", "dcerpc.dcerpc_rts_cmds_val0xB.ClientAddress", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4352         { &hf_dcerpc_ncacn_packet_auth_length,
4353           { "Auth Length", "dcerpc.ncacn_packet.auth_length", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4354         { &hf_dcerpc_ncadg_packet_ihint,
4355           { "Ihint", "dcerpc.ncadg_packet.ihint", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4356         { &hf_dcerpc_ncadg_packet_iface,
4357           { "Iface", "dcerpc.ncadg_packet.iface", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
4358         { &hf_dcerpc_dcerpc_rts_cmd_Padding_ConformanceCount,
4359           { "Conformancecount", "dcerpc.dcerpc_rts_cmd_Padding.ConformanceCount", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4360         { &hf_dcerpc_dcerpc_request_object,
4361           { "Object", "dcerpc.dcerpc_request.object", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4362         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_AUTH3_auth3,
4363           { "Auth3", "dcerpc.dcerpc_payload_valDCERPC_PKT_AUTH3.auth3", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4364         { &hf_dcerpc_ncacn_packet_call_id,
4365           { "Call Id", "dcerpc.ncacn_packet.call_id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4366         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_ACK_bind_ack,
4367           { "Bind Ack", "dcerpc.dcerpc_payload_valDCERPC_PKT_BIND_ACK.bind_ack", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4368         { &hf_dcerpc_dcerpc_request_alloc_hint,
4369           { "Alloc Hint", "dcerpc.dcerpc_request.alloc_hint", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4370         { &hf_dcerpc_dcerpc_bind_ctx_list,
4371           { "Ctx List", "dcerpc.dcerpc_bind.ctx_list", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4372         { &hf_dcerpc_dcerpc_ack_ctx_reason,
4373           { "Reason", "dcerpc.dcerpc_ack_ctx.reason", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4374         { &hf_dcerpc_dcerpc_bind_max_xmit_frag,
4375           { "Max Xmit Frag", "dcerpc.dcerpc_bind.max_xmit_frag", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4376         { &hf_dcerpc_dcerpc_bind_num_contexts,
4377           { "Num Contexts", "dcerpc.dcerpc_bind.num_contexts", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4378         { &hf_dcerpc_dcerpc_cl_cancel_id,
4379           { "Id", "dcerpc.dcerpc_cl_cancel.id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4380         { &hf_dcerpc_dcerpc_ack_ctx_syntax,
4381           { "Syntax", "dcerpc.dcerpc_ack_ctx.syntax", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4382         { &hf_dcerpc_ClientAddressType_valRTS_IPV4_ClientAddressIPV4,
4383           { "Clientaddressipv4", "dcerpc.ClientAddressType_valRTS_IPV4.ClientAddressIPV4", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4384         { &hf_dcerpc_dcerpc_bind_ack_max_xmit_frag,
4385           { "Max Xmit Frag", "dcerpc.dcerpc_bind_ack.max_xmit_frag", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4386         { &hf_dcerpc_dcerpc_rts_cmds_val0x6_Version,
4387           { "Version", "dcerpc.dcerpc_rts_cmds_val0x6.Version", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4388         { &hf_dcerpc_dcerpc_fack_max_frag_size,
4389           { "Max Frag Size", "dcerpc.dcerpc_fack.max_frag_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4390         { &hf_dcerpc_dcerpc_orphaned__pad,
4391           { " Pad", "dcerpc.dcerpc_orphaned._pad", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4392         { &hf_dcerpc_dcerpc_bind_ack_max_recv_frag,
4393           { "Max Recv Frag", "dcerpc.dcerpc_bind_ack.max_recv_frag", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4394         { &hf_dcerpc_dcerpc_rts_cmds_val0x0_ReceiveWindowSize,
4395           { "Receivewindowsize", "dcerpc.dcerpc_rts_cmds_val0x0.ReceiveWindowSize", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4396         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CANCEL_ACK_cancel_ack,
4397           { "Cancel Ack", "dcerpc.dcerpc_payload_valDCERPC_PKT_CANCEL_ACK.cancel_ack", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4398         { &hf_dcerpc_ClientAddressType_valRTS_IPV6_ClientAddressIPV6,
4399           { "Clientaddressipv6", "dcerpc.ClientAddressType_valRTS_IPV6.ClientAddressIPV6", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4400         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_SHUTDOWN_shutdown,
4401           { "Shutdown", "dcerpc.dcerpc_payload_valDCERPC_PKT_SHUTDOWN.shutdown", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4402         { &hf_dcerpc_ncadg_packet_ncadg_flags,
4403           { "Ncadg Flags", "dcerpc.ncadg_packet.ncadg_flags", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4404         { &hf_dcerpc_dcerpc_ctx_list_context_id,
4405           { "Context Id", "dcerpc.dcerpc_ctx_list.context_id", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4406         { &hf_dcerpc_dcerpc_rts_cmds_val0x5_ClientKeepalive,
4407           { "Clientkeepalive", "dcerpc.dcerpc_rts_cmds_val0x5.ClientKeepalive", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4408         { &hf_dcerpc_dcerpc_rts_cmd_FlowControlAck_Ack,
4409           { "Ack", "dcerpc.dcerpc_rts_cmd_FlowControlAck.Ack", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4410         { &hf_dcerpc_dcerpc_rts_cmds_val0x7_Empty,
4411           { "Empty", "dcerpc.dcerpc_rts_cmds_val0x7.Empty", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4412         { &hf_dcerpc_dcerpc_bind_max_recv_frag,
4413           { "Max Recv Frag", "dcerpc.dcerpc_bind.max_recv_frag", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4414         { &hf_dcerpc_dcerpc_fack_selack_size,
4415           { "Selack Size", "dcerpc.dcerpc_fack.selack_size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4416         { &hf_dcerpc_dcerpc_bind_ack_secondary_address,
4417           { "Secondary Address", "dcerpc.dcerpc_bind_ack.secondary_address", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4418         { &hf_dcerpc_dcerpc_response__pad,
4419           { " Pad", "dcerpc.dcerpc_response._pad", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4420         { &hf_dcerpc_dcerpc_rts_cmd_PingTrafficSentNotify_PingTrafficSent,
4421           { "Pingtrafficsent", "dcerpc.dcerpc_rts_cmd_PingTrafficSentNotify.PingTrafficSent", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4422         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_FAULT_fault,
4423           { "Fault", "dcerpc.dcerpc_payload_valDCERPC_PKT_FAULT.fault", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4424         { &hf_dcerpc_dcerpc_rts_NumberOfCommands,
4425           { "Numberofcommands", "dcerpc.dcerpc_rts.NumberOfCommands", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4426         { &hf_dcerpc_dcerpc_rts_cmd_ClientKeepalive_ClientKeepalive,
4427           { "Clientkeepalive", "dcerpc.dcerpc_rts_cmd_ClientKeepalive.ClientKeepalive", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4428         { &hf_dcerpc_ncadg_packet_server_boot,
4429           { "Server Boot", "dcerpc.ncadg_packet.server_boot", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4430         { &hf_dcerpc_ncacn_packet_rpc_vers_minor,
4431           { "Rpc Vers Minor", "dcerpc.ncacn_packet.rpc_vers_minor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4432         { &hf_dcerpc_dcerpc_rts_Commands,
4433           { "Commands", "dcerpc.dcerpc_rts.Commands", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4434         { &hf_dcerpc_dcerpc_fault__pad,
4435           { " Pad", "dcerpc.dcerpc_fault._pad", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4436         { &hf_dcerpc_dcerpc_cancel_ack_id,
4437           { "Id", "dcerpc.dcerpc_cancel_ack.id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4438         { &hf_dcerpc_dcerpc_rts_cmd_Destination_ForwardDestination,
4439           { "Forwarddestination", "dcerpc.dcerpc_rts_cmd_Destination.ForwardDestination", FT_UINT32, BASE_DEC, VALS(dcerpc_ForwardDestination_vals), 0, NULL, HFILL }},
4440         { &hf_dcerpc_dcerpc_fack_selack,
4441           { "Selack", "dcerpc.dcerpc_fack.selack", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4442         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_PING_ping,
4443           { "Ping", "dcerpc.dcerpc_payload_valDCERPC_PKT_PING.ping", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4444         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_RESPONSE_response,
4445           { "Response", "dcerpc.dcerpc_payload_valDCERPC_PKT_RESPONSE.response", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4446         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_EOF,
4447           { "Rts Flag Eof", "dcerpc.dcerpc_rts_flags.RTS_FLAG_EOF", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_EOF_tfs), ( 0x0020 ), NULL, HFILL }},
4448         { &hf_dcerpc_dcerpc_rts_cmds_val0xD_Destination,
4449           { "Destination", "dcerpc.dcerpc_rts_cmds_val0xD.Destination", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4450         { &hf_dcerpc_ClientAddress_Padding,
4451           { "Padding", "dcerpc.ClientAddress.Padding", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4452         { &hf_dcerpc_dcerpc_bind_assoc_group_id,
4453           { "Assoc Group Id", "dcerpc.dcerpc_bind.assoc_group_id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4454         { &hf_dcerpc_dcerpc_fault_cancel_count,
4455           { "Cancel Count", "dcerpc.dcerpc_fault.cancel_count", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4456         { &hf_dcerpc_dcerpc_response_alloc_hint,
4457           { "Alloc Hint", "dcerpc.dcerpc_response.alloc_hint", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4458         { &hf_dcerpc_dcerpc_fack_window_size,
4459           { "Window Size", "dcerpc.dcerpc_fack.window_size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4460         { &hf_dcerpc_dcerpc_auth_auth_pad_length,
4461           { "Auth Pad Length", "dcerpc.dcerpc_auth.auth_pad_length", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4462         { &hf_dcerpc_ncadg_packet_serial_low,
4463           { "Serial Low", "dcerpc.ncadg_packet.serial_low", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4464         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_NOCALL_nocall,
4465           { "Nocall", "dcerpc.dcerpc_payload_valDCERPC_PKT_NOCALL.nocall", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4466         { &hf_dcerpc_ncadg_packet_opnum,
4467           { "Opnum", "dcerpc.ncadg_packet.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4468         { &hf_dcerpc_dcerpc_response_stub_and_verifier,
4469           { "Stub And Verifier", "dcerpc.dcerpc_response.stub_and_verifier", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4470         { &hf_dcerpc_FlowControlAcknowledgment_BytesReceived,
4471           { "Bytesreceived", "dcerpc.FlowControlAcknowledgment.BytesReceived", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4472         { &hf_dcerpc_dcerpc_auth_auth_type,
4473           { "Auth Type", "dcerpc.dcerpc_auth.auth_type", FT_UINT8, BASE_DEC, VALS(dcerpc_dcerpc_AuthType_vals), 0, NULL, HFILL }},
4474         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ACK_ack,
4475           { "Ack", "dcerpc.dcerpc_payload_valDCERPC_PKT_ACK.ack", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4476         { &hf_dcerpc_dcerpc_request_opnum,
4477           { "Opnum", "dcerpc.dcerpc_request.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4478         { &hf_dcerpc_ncadg_packet_seq_num,
4479           { "Seq Num", "dcerpc.ncadg_packet.seq_num", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4480         { &hf_dcerpc_dcerpc_cancel_ack_version,
4481           { "Version", "dcerpc.dcerpc_cancel_ack.version", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4482         { &hf_dcerpc_dcerpc_rts_cmds_val0x9_NegativeANCE,
4483           { "Negativeance", "dcerpc.dcerpc_rts_cmds_val0x9.NegativeANCE", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4484         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_IN_CHANNEL,
4485           { "Rts Flag In Channel", "dcerpc.dcerpc_rts_flags.RTS_FLAG_IN_CHANNEL", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_IN_CHANNEL_tfs), ( 0x0008 ), NULL, HFILL }},
4486         { &hf_dcerpc_dcerpc_bind_ack_num_results,
4487           { "Num Results", "dcerpc.dcerpc_bind_ack.num_results", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4488         { &hf_dcerpc_FlowControlAcknowledgment_ChannelCookie,
4489           { "Channelcookie", "dcerpc.FlowControlAcknowledgment.ChannelCookie", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4490         { &hf_dcerpc_dcerpc_rts_cmd_AssociationGroupId_AssociationGroupId,
4491           { "Associationgroupid", "dcerpc.dcerpc_rts_cmd_AssociationGroupId.AssociationGroupId", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4492         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_RTS_rts,
4493           { "Rts", "dcerpc.dcerpc_payload_valDCERPC_PKT_RTS.rts", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4494         { &hf_dcerpc_dcerpc_co_cancel__pad,
4495           { " Pad", "dcerpc.dcerpc_co_cancel._pad", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4496         { &hf_dcerpc_dcerpc_request__pad,
4497           { " Pad", "dcerpc.dcerpc_request._pad", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4498         { &hf_dcerpc_dcerpc_auth_credentials,
4499           { "Credentials", "dcerpc.dcerpc_auth.credentials", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4500         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_OTHER_CMD,
4501           { "Rts Flag Other Cmd", "dcerpc.dcerpc_rts_flags.RTS_FLAG_OTHER_CMD", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_OTHER_CMD_tfs), ( 0x0002 ), NULL, HFILL }},
4502         { &hf_dcerpc_dcerpc_bind_nak_versions_versions,
4503           { "Versions", "dcerpc.dcerpc_bind_nak_versions.versions", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4504         { &hf_dcerpc_ncadg_packet_activity,
4505           { "Activity", "dcerpc.ncadg_packet.activity", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
4506         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CL_CANCEL_cl_cancel,
4507           { "Cl Cancel", "dcerpc.dcerpc_payload_valDCERPC_PKT_CL_CANCEL.cl_cancel", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4508         { &hf_dcerpc_dcerpc_rts_cmd_ChannelLifetime_ChannelLifetime,
4509           { "Channellifetime", "dcerpc.dcerpc_rts_cmd_ChannelLifetime.ChannelLifetime", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4510         { &hf_dcerpc_ncadg_packet_auth_proto,
4511           { "Auth Proto", "dcerpc.ncadg_packet.auth_proto", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4512         { &hf_dcerpc_dcerpc_bind_ack_assoc_group_id,
4513           { "Assoc Group Id", "dcerpc.dcerpc_bind_ack.assoc_group_id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4514         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ALTER_RESP_alter_resp,
4515           { "Alter Resp", "dcerpc.dcerpc_payload_valDCERPC_PKT_ALTER_RESP.alter_resp", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4516         { &hf_dcerpc_dcerpc_fault_context_id,
4517           { "Context Id", "dcerpc.dcerpc_fault.context_id", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4518         { &hf_dcerpc_ncacn_packet_drep,
4519           { "Drep", "dcerpc.ncacn_packet.drep", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4520         { &hf_dcerpc_dcerpc_bind_nak_reject_reason,
4521           { "Reject Reason", "dcerpc.dcerpc_bind_nak.reject_reason", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4522         { &hf_dcerpc_dcerpc_cancel_ack_server_is_accepting,
4523           { "Server Is Accepting", "dcerpc.dcerpc_cancel_ack.server_is_accepting", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4524         { &hf_dcerpc_dcerpc_rts_cmd_ClientAddress_ClientAddress,
4525           { "Clientaddress", "dcerpc.dcerpc_rts_cmd_ClientAddress.ClientAddress", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4526         { &hf_dcerpc_dcerpc_auth3_auth_info,
4527           { "Auth Info", "dcerpc.dcerpc_auth3.auth_info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4528         { &hf_dcerpc_dcerpc_object_valLIBNDR_FLAG_OBJECT_PRESENT_object,
4529           { "Object", "dcerpc.dcerpc_object_valLIBNDR_FLAG_OBJECT_PRESENT.object", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
4530         { &hf_dcerpc_FlowControlAcknowledgment_AvailableWindow,
4531           { "Availablewindow", "dcerpc.FlowControlAcknowledgment.AvailableWindow", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4532         { &hf_dcerpc_ncacn_packet_frag_length,
4533           { "Frag Length", "dcerpc.ncacn_packet.frag_length", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4534         { &hf_dcerpc_dcerpc_bind_ack__pad1,
4535           { " Pad1", "dcerpc.dcerpc_bind_ack._pad1", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4536         { &hf_dcerpc_dcerpc_ctx_list_num_transfer_syntaxes,
4537           { "Num Transfer Syntaxes", "dcerpc.dcerpc_ctx_list.num_transfer_syntaxes", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4538         { &hf_dcerpc_dcerpc_bind_auth_info,
4539           { "Auth Info", "dcerpc.dcerpc_bind.auth_info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4540         { &hf_dcerpc_dcerpc_auth_auth_level,
4541           { "Auth Level", "dcerpc.dcerpc_auth.auth_level", FT_UINT8, BASE_DEC, VALS(dcerpc_dcerpc_AuthLevel_vals), 0, NULL, HFILL }},
4542         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_WORKING_working,
4543           { "Working", "dcerpc.dcerpc_payload_valDCERPC_PKT_WORKING.working", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4544         { &hf_dcerpc_ncadg_packet_ptype,
4545           { "Ptype", "dcerpc.ncadg_packet.ptype", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4546         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_CO_CANCEL_co_cancel,
4547           { "Co Cancel", "dcerpc.dcerpc_payload_valDCERPC_PKT_CO_CANCEL.co_cancel", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4548         { &hf_dcerpc_ncacn_packet_ptype,
4549           { "Ptype", "dcerpc.ncacn_packet.ptype", FT_UINT8, BASE_DEC, VALS(dcerpc_dcerpc_pkt_type_vals), 0, NULL, HFILL }},
4550         { &hf_dcerpc_dcerpc_fault_status,
4551           { "Status", "dcerpc.dcerpc_fault.status", FT_UINT32, BASE_DEC, VALS(dcerpc_dcerpc_nca_status_vals), 0, NULL, HFILL }},
4552         { &hf_dcerpc_dcerpc_rts_cmds_val0xA_ANCE,
4553           { "Ance", "dcerpc.dcerpc_rts_cmds_val0xA.ANCE", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4554         { &hf_dcerpc_ncadg_packet_serial_high,
4555           { "Serial High", "dcerpc.ncadg_packet.serial_high", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4556         { &hf_dcerpc_dcerpc_auth3__pad,
4557           { " Pad", "dcerpc.dcerpc_auth3._pad", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4558         { &hf_dcerpc_dcerpc_rts_cmd_Padding_Padding,
4559           { "Padding", "dcerpc.dcerpc_rts_cmd_Padding.Padding", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4560         { &hf_dcerpc_ClientAddress_ClientAddress,
4561           { "Clientaddress", "dcerpc.ClientAddress.ClientAddress", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4562         { &hf_dcerpc_dcerpc_rts_cmd_Cookie_Cookie,
4563           { "Cookie", "dcerpc.dcerpc_rts_cmd_Cookie.Cookie", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4564         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_FACK_fack,
4565           { "Fack", "dcerpc.dcerpc_payload_valDCERPC_PKT_FACK.fack", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4566         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_REJECT_reject,
4567           { "Reject", "dcerpc.dcerpc_payload_valDCERPC_PKT_REJECT.reject", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4568         { &hf_dcerpc_dcerpc_rts_cmd_ConnectionTimeout_ConnectionTimeout,
4569           { "Connectiontimeout", "dcerpc.dcerpc_rts_cmd_ConnectionTimeout.ConnectionTimeout", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4570         { &hf_dcerpc_ncadg_packet_iface_version,
4571           { "Iface Version", "dcerpc.ncadg_packet.iface_version", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4572         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_ECHO,
4573           { "Rts Flag Echo", "dcerpc.dcerpc_rts_flags.RTS_FLAG_ECHO", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_ECHO_tfs), ( 0x0040 ), NULL, HFILL }},
4574         { &hf_dcerpc_dcerpc_rts_cmds_val0x3_Cookie,
4575           { "Cookie", "dcerpc.dcerpc_rts_cmds_val0x3.Cookie", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4576         { &hf_dcerpc_dcerpc_bind_nak_versions_ctr_valDECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED_v,
4577           { "V", "dcerpc.dcerpc_bind_nak_versions_ctr_valDECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED.v", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4578         { &hf_dcerpc_dcerpc_fack_max_tdsu,
4579           { "Max Tdsu", "dcerpc.dcerpc_fack.max_tdsu", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4580         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_NAK_bind_nak,
4581           { "Bind Nak", "dcerpc.dcerpc_payload_valDCERPC_PKT_BIND_NAK.bind_nak", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4582         { &hf_dcerpc_dcerpc_rts_cmd_CommandType,
4583           { "Commandtype", "dcerpc.dcerpc_rts_cmd.CommandType", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4584         { &hf_dcerpc_ncacn_packet_rpc_vers,
4585           { "Rpc Vers", "dcerpc.ncacn_packet.rpc_vers", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4586         { &hf_dcerpc_dcerpc_bind_nak_versions,
4587           { "Versions", "dcerpc.dcerpc_bind_nak.versions", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4588         { &hf_dcerpc_dcerpc_request_context_id,
4589           { "Context Id", "dcerpc.dcerpc_request.context_id", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4590         { &hf_dcerpc_ncadg_packet_ahint,
4591           { "Ahint", "dcerpc.ncadg_packet.ahint", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4592         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_OUT_CHANNEL,
4593           { "Rts Flag Out Channel", "dcerpc.dcerpc_rts_flags.RTS_FLAG_OUT_CHANNEL", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_OUT_CHANNEL_tfs), ( 0x0010 ), NULL, HFILL }},
4594         { &hf_dcerpc_dcerpc_bind_ack_ctx_list,
4595           { "Ctx List", "dcerpc.dcerpc_bind_ack.ctx_list", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4596         { &hf_dcerpc_dcerpc_fack_version,
4597           { "Version", "dcerpc.dcerpc_fack.version", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4598         { &hf_dcerpc_dcerpc_rts_cmd_Version_Version,
4599           { "Version", "dcerpc.dcerpc_rts_cmd_Version.Version", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4600         { &hf_dcerpc_dcerpc_rts_cmds_val0xC_AssociationGroupId,
4601           { "Associationgroupid", "dcerpc.dcerpc_rts_cmds_val0xC.AssociationGroupId", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4602         { &hf_dcerpc_dcerpc_rts_cmd_ReceiveWindowSize_ReceiveWindowSize,
4603           { "Receivewindowsize", "dcerpc.dcerpc_rts_cmd_ReceiveWindowSize.ReceiveWindowSize", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4604         { &hf_dcerpc_ncadg_packet_rpc_vers,
4605           { "Rpc Vers", "dcerpc.ncadg_packet.rpc_vers", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4606         { &hf_dcerpc_RTSCookie_Cookie,
4607           { "Cookie", "dcerpc.RTSCookie.Cookie", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
4608         { &hf_dcerpc_dcerpc_rts_Flags,
4609           { "Flags", "dcerpc.dcerpc_rts.Flags", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
4610         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ALTER_alter,
4611           { "Alter", "dcerpc.dcerpc_payload_valDCERPC_PKT_ALTER.alter", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4612         { &hf_dcerpc_ClientAddress_AddressType,
4613           { "Addresstype", "dcerpc.ClientAddress.AddressType", FT_UINT32, BASE_DEC, VALS(dcerpc_AddressType_vals), 0, NULL, HFILL }},
4614         { &hf_dcerpc_dcerpc_response_context_id,
4615           { "Context Id", "dcerpc.dcerpc_response.context_id", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4616         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_BIND_bind,
4617           { "Bind", "dcerpc.dcerpc_payload_valDCERPC_PKT_BIND.bind", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4618         { &hf_dcerpc_ncadg_packet_drep,
4619           { "Drep", "dcerpc.ncadg_packet.drep", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4620         { &hf_dcerpc_ncadg_packet_len,
4621           { "Len", "dcerpc.ncadg_packet.len", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4622         { &hf_dcerpc_opnum,
4623           { "Operation", "dcerpc.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4624         { &hf_dcerpc_dcerpc_fault_alloc_hint,
4625           { "Alloc Hint", "dcerpc.dcerpc_fault.alloc_hint", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4626         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_NONE,
4627           { "Rts Flag None", "dcerpc.dcerpc_rts_flags.RTS_FLAG_NONE", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_NONE_tfs), ( 0x0000 ), NULL, HFILL }},
4628         { &hf_dcerpc_ncadg_packet_object,
4629           { "Object", "dcerpc.ncadg_packet.object", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
4630         { &hf_dcerpc_dcerpc_response_cancel_count,
4631           { "Cancel Count", "dcerpc.dcerpc_response.cancel_count", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4632         { &hf_dcerpc_dcerpc_fack__pad1,
4633           { " Pad1", "dcerpc.dcerpc_fack._pad1", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4634         { &hf_dcerpc_dcerpc_ctx_list_abstract_syntax,
4635           { "Abstract Syntax", "dcerpc.dcerpc_ctx_list.abstract_syntax", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4636         { &hf_dcerpc_dcerpc_rts_flags_RTS_FLAG_RECYCLE_CHANNEL,
4637           { "Rts Flag Recycle Channel", "dcerpc.dcerpc_rts_flags.RTS_FLAG_RECYCLE_CHANNEL", FT_BOOLEAN, 16, TFS(&dcerpc_rts_flags_RTS_FLAG_RECYCLE_CHANNEL_tfs), ( 0x0004 ), NULL, HFILL }},
4638         { &hf_dcerpc_ncacn_packet_pfc_flags,
4639           { "Pfc Flags", "dcerpc.ncacn_packet.pfc_flags", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4640         { &hf_dcerpc_dcerpc_object_valdefault_empty,
4641           { "Empty", "dcerpc.dcerpc_object_valdefault.empty", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4642         { &hf_dcerpc_dcerpc_payload_valDCERPC_PKT_ORPHANED_orphaned,
4643           { "Orphaned", "dcerpc.dcerpc_payload_valDCERPC_PKT_ORPHANED.orphaned", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4644         { &hf_dcerpc_dcerpc_ctx_list_transfer_syntaxes,
4645           { "Transfer Syntaxes", "dcerpc.dcerpc_ctx_list.transfer_syntaxes", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4646         { &hf_dcerpc_dcerpc_bind_ack_auth_info,
4647           { "Auth Info", "dcerpc.dcerpc_bind_ack.auth_info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4648         };
4649
4650
4651         static gint *ett[] = {
4652                 &ett_dcerpc_dcerpc,
4653                 &ett_dcerpc_dcerpc_ctx_list,
4654                 &ett_dcerpc_dcerpc_bind,
4655                 &ett_dcerpc_dcerpc_empty,
4656                 &ett_dcerpc_dcerpc_object,
4657                 &ett_dcerpc_dcerpc_request,
4658                 &ett_dcerpc_dcerpc_ack_ctx,
4659                 &ett_dcerpc_dcerpc_bind_ack,
4660                 &ett_dcerpc_dcerpc_bind_nak_versions,
4661                 &ett_dcerpc_dcerpc_bind_nak_versions_ctr,
4662                 &ett_dcerpc_dcerpc_bind_nak,
4663                 &ett_dcerpc_dcerpc_response,
4664                 &ett_dcerpc_dcerpc_fault,
4665                 &ett_dcerpc_dcerpc_auth,
4666                 &ett_dcerpc_dcerpc_auth3,
4667                 &ett_dcerpc_dcerpc_orphaned,
4668                 &ett_dcerpc_dcerpc_co_cancel,
4669                 &ett_dcerpc_dcerpc_cl_cancel,
4670                 &ett_dcerpc_dcerpc_cancel_ack,
4671                 &ett_dcerpc_dcerpc_fack,
4672                 &ett_dcerpc_dcerpc_ack,
4673                 &ett_dcerpc_dcerpc_ping,
4674                 &ett_dcerpc_dcerpc_shutdown,
4675                 &ett_dcerpc_dcerpc_working,
4676                 &ett_dcerpc_RTSCookie,
4677                 &ett_dcerpc_ClientAddressType,
4678                 &ett_dcerpc_ClientAddress,
4679                 &ett_dcerpc_FlowControlAcknowledgment,
4680                 &ett_dcerpc_dcerpc_rts_cmd_ReceiveWindowSize,
4681                 &ett_dcerpc_dcerpc_rts_cmd_FlowControlAck,
4682                 &ett_dcerpc_dcerpc_rts_cmd_ConnectionTimeout,
4683                 &ett_dcerpc_dcerpc_rts_cmd_Cookie,
4684                 &ett_dcerpc_dcerpc_rts_cmd_ChannelLifetime,
4685                 &ett_dcerpc_dcerpc_rts_cmd_ClientKeepalive,
4686                 &ett_dcerpc_dcerpc_rts_cmd_Version,
4687                 &ett_dcerpc_dcerpc_rts_cmd_Empty,
4688                 &ett_dcerpc_dcerpc_rts_cmd_Padding,
4689                 &ett_dcerpc_dcerpc_rts_cmd_NegativeANCE,
4690                 &ett_dcerpc_dcerpc_rts_cmd_ANCE,
4691                 &ett_dcerpc_dcerpc_rts_cmd_ClientAddress,
4692                 &ett_dcerpc_dcerpc_rts_cmd_AssociationGroupId,
4693                 &ett_dcerpc_dcerpc_rts_cmd_Destination,
4694                 &ett_dcerpc_dcerpc_rts_cmd_PingTrafficSentNotify,
4695                 &ett_dcerpc_dcerpc_rts_cmds,
4696                 &ett_dcerpc_dcerpc_rts_cmd,
4697                 &ett_dcerpc_dcerpc_rts_flags,
4698                 &ett_dcerpc_dcerpc_rts,
4699                 &ett_dcerpc_dcerpc_payload,
4700                 &ett_dcerpc_ncacn_packet,
4701                 &ett_dcerpc_ncadg_packet,
4702         };
4703
4704         proto_dcerpc_dcerpc = proto_register_protocol("DCERPC (pidl)", "DCERPC", "dcerpc");
4705         proto_register_field_array(proto_dcerpc_dcerpc, hf, array_length (hf));
4706         proto_register_subtree_array(ett, array_length(ett));
4707 }
4708
4709 void proto_reg_handoff_dcerpc_dcerpc(void)
4710 {
4711         dcerpc_init_uuid(proto_dcerpc_dcerpc, ett_dcerpc_dcerpc,
4712                 &uuid_dcerpc_dcerpc, ver_dcerpc_dcerpc,
4713                 dcerpc_dissectors, hf_dcerpc_opnum);
4714 }