1 /* DO NOT EDIT
2 This file was automatically generated by Pidl
3 from witness.idl and witness.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 https://gitlab.com/wireshark/wireshark/-/wikis/Pidl
9 */
10
11
12 #include "config.h"
13 #include <glib.h>
14 #include <string.h>
15 #include <epan/packet.h>
16
17 #include "packet-dcerpc.h"
18 #include "packet-dcerpc-nt.h"
19 #include "packet-windows-common.h"
20 #include "packet-dcerpc-witness.h"
21 void proto_register_dcerpc_witness(void);
22 void proto_reg_handoff_dcerpc_witness(void);
23
24 /* Ett declarations */
25 static gint ett_dcerpc_witness = -1;
26 static gint ett_witness_witness_interfaceInfo_flags = -1;
27 static gint ett_witness_witness_interfaceInfo = -1;
28 static gint ett_witness_witness_interfaceList = -1;
29 static gint ett_witness_witness_ResourceChange = -1;
30 static gint ett_witness_witness_IPaddrInfo_flags = -1;
31 static gint ett_witness_witness_IPaddrInfo = -1;
32 static gint ett_witness_witness_IPaddrInfoList = -1;
33 static gint ett_witness_witness_notifyResponse_message = -1;
34 static gint ett_witness_witness_notifyResponse = -1;
35 static gint ett_witness_witness_RegisterEx_flags = -1;
36
37
38 /* Header field declarations */
39 static gint hf_witness_opnum = -1;
40 static gint hf_witness_werror = -1;
41 static gint hf_witness_witness_AsyncNotify_context_handle = -1;
42 static gint hf_witness_witness_AsyncNotify_response = -1;
43 static gint hf_witness_witness_GetInterfaceList_interface_list = -1;
44 static gint hf_witness_witness_IPaddrInfoList_addr = -1;
45 static gint hf_witness_witness_IPaddrInfoList_length = -1;
46 static gint hf_witness_witness_IPaddrInfoList_num = -1;
47 static gint hf_witness_witness_IPaddrInfoList_reserved = -1;
48 static gint hf_witness_witness_IPaddrInfo_flags = -1;
49 static gint hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_OFFLINE = -1;
50 static gint hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_ONLINE = -1;
51 static gint hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_V4 = -1;
52 static gint hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_V6 = -1;
53 static gint hf_witness_witness_IPaddrInfo_ipv4 = -1;
54 static gint hf_witness_witness_IPaddrInfo_ipv6 = -1;
55 static gint hf_witness_witness_RegisterEx_client_computer_name = -1;
56 static gint hf_witness_witness_RegisterEx_context_handle = -1;
57 static gint hf_witness_witness_RegisterEx_flags = -1;
58 static gint hf_witness_witness_RegisterEx_flags_WITNESS_REGISTER_IP_NOTIFICATION = -1;
59 static gint hf_witness_witness_RegisterEx_ip_address = -1;
60 static gint hf_witness_witness_RegisterEx_net_name = -1;
61 static gint hf_witness_witness_RegisterEx_share_name = -1;
62 static gint hf_witness_witness_RegisterEx_timeout = -1;
63 static gint hf_witness_witness_RegisterEx_version = -1;
64 static gint hf_witness_witness_Register_client_computer_name = -1;
65 static gint hf_witness_witness_Register_context_handle = -1;
66 static gint hf_witness_witness_Register_ip_address = -1;
67 static gint hf_witness_witness_Register_net_name = -1;
68 static gint hf_witness_witness_Register_version = -1;
69 static gint hf_witness_witness_ResourceChange_length = -1;
70 static gint hf_witness_witness_ResourceChange_name = -1;
71 static gint hf_witness_witness_ResourceChange_type = -1;
72 static gint hf_witness_witness_UnRegister_context_handle = -1;
73 static gint hf_witness_witness_interfaceInfo_flags = -1;
74 static gint hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_IPv4_VALID = -1;
75 static gint hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_IPv6_VALID = -1;
76 static gint hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_WITNESS_IF = -1;
77 static gint hf_witness_witness_interfaceInfo_group_name = -1;
78 static gint hf_witness_witness_interfaceInfo_ipv4 = -1;
79 static gint hf_witness_witness_interfaceInfo_ipv6 = -1;
80 static gint hf_witness_witness_interfaceInfo_state = -1;
81 static gint hf_witness_witness_interfaceInfo_version = -1;
82 static gint hf_witness_witness_interfaceList_interfaces = -1;
83 static gint hf_witness_witness_interfaceList_num_interfaces = -1;
84 static gint hf_witness_witness_notifyResponse_length = -1;
85 static gint hf_witness_witness_notifyResponse_message_client_move = -1;
86 static gint hf_witness_witness_notifyResponse_message_data = -1;
87 static gint hf_witness_witness_notifyResponse_message_ip_change = -1;
88 static gint hf_witness_witness_notifyResponse_message_resource_change = -1;
89 static gint hf_witness_witness_notifyResponse_message_share_move = -1;
90 static gint hf_witness_witness_notifyResponse_messages = -1;
91 static gint hf_witness_witness_notifyResponse_messages_ = -1;
92 static gint hf_witness_witness_notifyResponse_num = -1;
93 static gint hf_witness_witness_notifyResponse_type = -1;
94
95 static gint proto_dcerpc_witness = -1;
96 /* Version information */
97
98
99 static e_guid_t uuid_dcerpc_witness = {
100 0xccd8c074, 0xd0e5, 0x4a40,
101 { 0x92, 0xb4, 0xd0, 0x74, 0xfa, 0xa6, 0xba, 0x28 }
102 };
103 static guint16 ver_dcerpc_witness = 1;
104
105 const value_string witness_witness_version_vals[] = {
106 { WITNESS_V1, "WITNESS_V1" },
107 { WITNESS_V2, "WITNESS_V2" },
108 { WITNESS_UNSPECIFIED_VERSION, "WITNESS_UNSPECIFIED_VERSION" },
109 { 0, NULL }
110 };
111 const value_string witness_witness_interfaceInfo_state_vals[] = {
112 { WITNESS_STATE_UNKNOWN, "WITNESS_STATE_UNKNOWN" },
113 { WITNESS_STATE_AVAILABLE, "WITNESS_STATE_AVAILABLE" },
114 { WITNESS_STATE_UNAVAILABLE, "WITNESS_STATE_UNAVAILABLE" },
115 { 0, NULL }
116 };
117 static const true_false_string witness_interfaceInfo_flags_WITNESS_INFO_IPv4_VALID_tfs = {
118 "WITNESS_INFO_IPv4_VALID is SET",
119 "WITNESS_INFO_IPv4_VALID is NOT SET",
120 };
121 static const true_false_string witness_interfaceInfo_flags_WITNESS_INFO_IPv6_VALID_tfs = {
122 "WITNESS_INFO_IPv6_VALID is SET",
123 "WITNESS_INFO_IPv6_VALID is NOT SET",
124 };
125 static const true_false_string witness_interfaceInfo_flags_WITNESS_INFO_WITNESS_IF_tfs = {
126 "WITNESS_INFO_WITNESS_IF is SET",
127 "WITNESS_INFO_WITNESS_IF is NOT SET",
128 };
129 static int witness_dissect_element_interfaceInfo_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
130 static int witness_dissect_element_interfaceInfo_state(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
131 static int witness_dissect_element_interfaceInfo_ipv4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
132 static int witness_dissect_element_interfaceInfo_ipv6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
133 static int witness_dissect_element_interfaceInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
134 static int witness_dissect_element_interfaceList_num_interfaces(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
135 static int witness_dissect_element_interfaceList_interfaces(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
136 static int witness_dissect_element_interfaceList_interfaces_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
137 static int witness_dissect_element_interfaceList_interfaces__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
138 const value_string witness_witness_notifyResponse_type_vals[] = {
139 { WITNESS_NOTIFY_RESOURCE_CHANGE, "WITNESS_NOTIFY_RESOURCE_CHANGE" },
140 { WITNESS_NOTIFY_CLIENT_MOVE, "WITNESS_NOTIFY_CLIENT_MOVE" },
141 { WITNESS_NOTIFY_SHARE_MOVE, "WITNESS_NOTIFY_SHARE_MOVE" },
142 { WITNESS_NOTIFY_IP_CHANGE, "WITNESS_NOTIFY_IP_CHANGE" },
143 { 0, NULL }
144 };
145 const value_string witness_witness_ResourceChange_type_vals[] = {
146 { WITNESS_RESOURCE_STATE_UNKNOWN, "WITNESS_RESOURCE_STATE_UNKNOWN" },
147 { WITNESS_RESOURCE_STATE_AVAILABLE, "WITNESS_RESOURCE_STATE_AVAILABLE" },
148 { WITNESS_RESOURCE_STATE_UNAVAILABLE, "WITNESS_RESOURCE_STATE_UNAVAILABLE" },
149 { 0, NULL }
150 };
151 static int witness_dissect_element_ResourceChange_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
152 static int witness_dissect_element_ResourceChange_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
153 static int witness_dissect_element_ResourceChange_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
154 static const true_false_string witness_IPaddrInfo_flags_WITNESS_IPADDR_V4_tfs = {
155 "WITNESS_IPADDR_V4 is SET",
156 "WITNESS_IPADDR_V4 is NOT SET",
157 };
158 static const true_false_string witness_IPaddrInfo_flags_WITNESS_IPADDR_V6_tfs = {
159 "WITNESS_IPADDR_V6 is SET",
160 "WITNESS_IPADDR_V6 is NOT SET",
161 };
162 static const true_false_string witness_IPaddrInfo_flags_WITNESS_IPADDR_ONLINE_tfs = {
163 "WITNESS_IPADDR_ONLINE is SET",
164 "WITNESS_IPADDR_ONLINE is NOT SET",
165 };
166 static const true_false_string witness_IPaddrInfo_flags_WITNESS_IPADDR_OFFLINE_tfs = {
167 "WITNESS_IPADDR_OFFLINE is SET",
168 "WITNESS_IPADDR_OFFLINE is NOT SET",
169 };
170 static int witness_dissect_element_IPaddrInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
171 static int witness_dissect_element_IPaddrInfo_ipv4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
172 static int witness_dissect_element_IPaddrInfo_ipv6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
173 static int witness_dissect_element_IPaddrInfoList_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
174 static int witness_dissect_element_IPaddrInfoList_reserved(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
175 static int witness_dissect_element_IPaddrInfoList_num(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
176 static int witness_dissect_element_notifyResponse_message_resource_change(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
177 static int witness_dissect_element_notifyResponse_message_client_move(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
178 static int witness_dissect_element_notifyResponse_message_share_move(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
179 static int witness_dissect_element_notifyResponse_message_ip_change(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
180 static int witness_dissect_element_notifyResponse_message_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
181 static int witness_dissect_element_notifyResponse_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, guint32 *type);
182 static int witness_dissect_element_notifyResponse_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
183 static int witness_dissect_element_notifyResponse_num(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
184 static const true_false_string witness_RegisterEx_flags_WITNESS_REGISTER_IP_NOTIFICATION_tfs = {
185 "WITNESS_REGISTER_IP_NOTIFICATION is SET",
186 "WITNESS_REGISTER_IP_NOTIFICATION is NOT SET",
187 };
188 static int witness_dissect_element_GetInterfaceList_interface_list(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
189 static int witness_dissect_element_GetInterfaceList_interface_list_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
190 static int witness_dissect_element_GetInterfaceList_interface_list__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
191 static int witness_dissect_element_Register_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
192 static int witness_dissect_element_Register_context_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
193 static int witness_dissect_element_Register_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
194 static int witness_dissect_element_Register_net_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
195 static int witness_dissect_element_Register_net_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
196 static int witness_dissect_element_Register_ip_address(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
197 static int witness_dissect_element_Register_ip_address_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
198 static int witness_dissect_element_Register_client_computer_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
199 static int witness_dissect_element_Register_client_computer_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
200 static int witness_dissect_element_UnRegister_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
201 static int witness_dissect_element_AsyncNotify_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
202 static int witness_dissect_element_AsyncNotify_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
203 static int witness_dissect_element_AsyncNotify_response_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
204 static int witness_dissect_element_AsyncNotify_response__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
205 static int witness_dissect_element_RegisterEx_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
206 static int witness_dissect_element_RegisterEx_context_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
207 static int witness_dissect_element_RegisterEx_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
208 static int witness_dissect_element_RegisterEx_net_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
209 static int witness_dissect_element_RegisterEx_net_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
210 static int witness_dissect_element_RegisterEx_share_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
211 static int witness_dissect_element_RegisterEx_share_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
212 static int witness_dissect_element_RegisterEx_ip_address(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
213 static int witness_dissect_element_RegisterEx_ip_address_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
214 static int witness_dissect_element_RegisterEx_client_computer_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
215 static int witness_dissect_element_RegisterEx_client_computer_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
216 static int witness_dissect_element_RegisterEx_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
217 static int witness_dissect_element_RegisterEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
218 #include "to_str.h"
219 static int
220 witness_dissect_notifyResponse_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_);
221 static int
witness_dissect_notifyResponse_message_(tvbuff_t * tvb,int offset,int length _U_,packet_info * pinfo,proto_tree * tree,dcerpc_info * di,guint8 * drep _U_)222 witness_dissect_notifyResponse_message_(tvbuff_t *tvb, int offset, int length _U_, packet_info *pinfo,
223 proto_tree *tree, dcerpc_info *di, guint8 *drep _U_)
224 {
225 guint32 *type = (guint32 *)di->private_data;
226 guint8 le_drep[4] = { DREP_LITTLE_ENDIAN, };
227 return witness_dissect_notifyResponse_message(tvb, offset, pinfo, tree, di, le_drep,
228 hf_witness_witness_notifyResponse_messages_, *type);
229 }
230 static int
witness_dissect_element_notifyResponse_messages(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)231 witness_dissect_element_notifyResponse_messages(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info *di _U_, guint8 *drep _U_)
232 {
233 offset = dissect_ndr_ucarray_block(tvb, offset, pinfo, tree, di, drep,
234 witness_dissect_notifyResponse_message_);
235 return offset;
236 }
237 int
witness_dissect_struct_notifyResponse(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)238 witness_dissect_struct_notifyResponse(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
239 {
240 guint32 *type = NULL;
241 proto_item *item = NULL;
242 proto_tree *tree = NULL;
243 int old_offset;
244 ALIGN_TO_4_BYTES;
245 ALIGN_TO_4_BYTES;
246 old_offset = offset;
247 if (parent_tree) {
248 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
249 tree = proto_item_add_subtree(item, ett_witness_witness_notifyResponse);
250 }
251 type = wmem_new0(pinfo->pool, guint32);
252 offset = witness_dissect_element_notifyResponse_type(tvb, offset, pinfo, tree, di, drep, type);
253 offset = witness_dissect_element_notifyResponse_length(tvb, offset, pinfo, tree, di, drep);
254 offset = witness_dissect_element_notifyResponse_num(tvb, offset, pinfo, tree, di, drep);
255 di->private_data = type;
256 offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep,
257 witness_dissect_element_notifyResponse_messages,
258 NDR_POINTER_UNIQUE, "Pointer to Message Buffer (uint8)",
259 hf_witness_witness_notifyResponse_messages);
260 proto_item_set_len(item, offset-old_offset);
261 if (di->call_data->flags & DCERPC_IS_NDR64) {
262 ALIGN_TO_4_BYTES;
263 }
264 return offset;
265 }
266 static int
witness_dissect_element_IPaddrInfoList_addr(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)267 witness_dissect_element_IPaddrInfoList_addr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
268 {
269 offset = witness_dissect_struct_IPaddrInfo(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_IPaddrInfoList_addr,0);
270 return offset;
271 }
272 int
witness_dissect_struct_IPaddrInfoList(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)273 witness_dissect_struct_IPaddrInfoList(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
274 {
275 proto_item *item = NULL;
276 proto_tree *tree = NULL;
277 gboolean oldalign = di->no_align;
278 int old_offset;
279 guint32 i, num;
280 di->no_align = TRUE;
281 old_offset = offset;
282 if (parent_tree) {
283 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
284 tree = proto_item_add_subtree(item, ett_witness_witness_IPaddrInfoList);
285 }
286 offset = witness_dissect_element_IPaddrInfoList_length(tvb, offset, pinfo, tree, di, drep);
287 offset = witness_dissect_element_IPaddrInfoList_reserved(tvb, offset, pinfo, tree, di, drep);
288 num = tvb_get_letohl(tvb, offset);
289 offset = witness_dissect_element_IPaddrInfoList_num(tvb, offset, pinfo, tree, di, drep);
290 for (i = 0; i < num; i++) {
291 offset = witness_dissect_element_IPaddrInfoList_addr(tvb, offset, pinfo, tree, di, drep);
292 }
293 proto_item_set_len(item, offset-old_offset);
294 di->no_align = oldalign;
295 return offset;
296 }
297 static int
witness_dissect_element_interfaceInfo_group_name(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * parent_tree,dcerpc_info * di _U_,guint8 * drep _U_)298 witness_dissect_element_interfaceInfo_group_name(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *parent_tree, dcerpc_info *di _U_, guint8 *drep _U_)
299 {
300 int totlen, stringlen;
301 char *str;
302 proto_item *pi;
303 /*
304 * XXX - this is described as
305 *
306 * [charset(UTF16),to_null] uint16 group_name[260];
307 *
308 * I haven't found any documentation for what "to_null" means
309 * in PIDL; is this a null-padded 260*2-byte array, so that
310 * strings can be up to 260 16-bit units in length, or is
311 * it a null-*terminated* string, so that it can be up to 259
312 * 16-bit units in length?
313 *
314 * We assume it's null-padded, for now, and scan for a 2-byte
315 * null terminator within the 260 2-byte units, and use
316 * that as the length, with the length being 2*260 if there
317 * isn't one.
318 *
319 * This will result in totlen being the total length, in
320 * bytes, of the string, including the null terminator, if
321 * present, and stringlen being the total length, in bytes.
322 * not counting any null terminator.
323 */
324 totlen = 0;
325 stringlen = 0;
326 while (totlen < 2*260) {
327 /*
328 * These 2 bytes are either part of the string
329 * or part of the null terminator, so count
330 * them.
331 */
332 totlen += 2;
333 if (tvb_get_letohs(tvb, offset + stringlen) == 0)
334 break;
335 /*
336 * Those 2 bytes are part of the string, so
337 * count them.
338 */
339 stringlen += 2;
340 }
341 pi = proto_tree_add_item_ret_display_string(parent_tree,
342 hf_witness_witness_interfaceInfo_group_name, tvb, offset, stringlen,
343 ENC_UTF_16|ENC_LITTLE_ENDIAN,
344 pinfo->pool, &str);
345 proto_item_append_text(pi, " [%d]", totlen);
346 proto_item_append_text(parent_tree, ": %s", str);
347 /*
348 * All 260 16-bit units are part of the field, as they're always
349 * there even if they don't need to be.
350 */
351 return offset + 2*260;
352 }
353 static int
PIDL_dissect_ipv4address(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree,dcerpc_info * di,guint8 * drep _U_,int hfindex,guint32 param)354 PIDL_dissect_ipv4address(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep _U_, int hfindex, guint32 param)
355 {
356 if (di->conformant_run) {
357 /* just a run to handle conformant arrays, no scalars to dissect */
358 return offset;
359 }
360 if (!di->no_align && (offset % 4)) {
361 offset += 4 - (offset % 4);
362 }
363 proto_tree_add_item(tree, hfindex, tvb, offset, 4, ENC_BIG_ENDIAN);
364 if (param & PIDL_SET_COL_INFO) {
365 const char *ip = tvb_ip_to_str(pinfo->pool, tvb, offset);
366 header_field_info *hf_info = proto_registrar_get_nth(hfindex);
367 proto_item_append_text(proto_tree_get_parent(tree), " %s:%s", hf_info->name, ip);
368 col_append_fstr(pinfo->cinfo, COL_INFO," %s:%s", hf_info->name, ip);
369 }
370 return offset + 4;
371 }
372 static int
PIDL_dissect_ipv6address(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree,dcerpc_info * di,guint8 * drep _U_,int hfindex,guint32 param)373 PIDL_dissect_ipv6address(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep _U_, int hfindex, guint32 param)
374 {
375 if (di->conformant_run) {
376 /* just a run to handle conformant arrays, no scalars to dissect */
377 return offset;
378 }
379 if (!di->no_align && (offset % 2)) {
380 offset += 2 - (offset % 2);
381 }
382 proto_tree_add_item(tree, hfindex, tvb, offset, 16, ENC_BIG_ENDIAN);
383 if (param & PIDL_SET_COL_INFO) {
384 const char *ip = tvb_ip6_to_str(pinfo->pool, tvb, offset);
385 header_field_info *hf_info = proto_registrar_get_nth(hfindex);
386 proto_item_append_text(proto_tree_get_parent(tree), " %s:%s", hf_info->name, ip);
387 col_append_fstr(pinfo->cinfo, COL_INFO," %s:%s", hf_info->name, ip);
388 }
389 return offset + 16;
390 }
391
392
393 /* IDL: enum { */
394 /* IDL: WITNESS_V1=0x00010001, */
395 /* IDL: WITNESS_V2=0x00020000, */
396 /* IDL: WITNESS_UNSPECIFIED_VERSION=0xFFFFFFFF, */
397 /* IDL: } */
398
399 int
witness_dissect_enum_version(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 * param _U_)400 witness_dissect_enum_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
401 {
402 guint32 parameter=0;
403 if (param) {
404 parameter = *param;
405 }
406 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, ¶meter);
407 if (param) {
408 *param = parameter;
409 }
410 return offset;
411 }
412
413
414 /* IDL: enum { */
415 /* IDL: WITNESS_STATE_UNKNOWN=0x00, */
416 /* IDL: WITNESS_STATE_AVAILABLE=0x01, */
417 /* IDL: WITNESS_STATE_UNAVAILABLE=0xff, */
418 /* IDL: } */
419
420 int
witness_dissect_enum_interfaceInfo_state(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint16 * param _U_)421 witness_dissect_enum_interfaceInfo_state(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint16 *param _U_)
422 {
423 guint16 parameter=0;
424 if (param) {
425 parameter = *param;
426 }
427 offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, di, drep, hf_index, ¶meter);
428 if (param) {
429 *param = parameter;
430 }
431 return offset;
432 }
433
434
435 /* IDL: bitmap { */
436 /* IDL: WITNESS_INFO_IPv4_VALID = 0x01 , */
437 /* IDL: WITNESS_INFO_IPv6_VALID = 0x02 , */
438 /* IDL: WITNESS_INFO_WITNESS_IF = 0x04 , */
439 /* IDL: } */
440
441 int
witness_dissect_bitmap_interfaceInfo_flags(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)442 witness_dissect_bitmap_interfaceInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
443 {
444 proto_item *item;
445 static int * const witness_witness_interfaceInfo_flags_fields[] = {
446 &hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_IPv4_VALID,
447 &hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_IPv6_VALID,
448 &hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_WITNESS_IF,
449 NULL
450 };
451 guint32 flags;
452 ALIGN_TO_4_BYTES;
453
454 item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
455 ett_witness_witness_interfaceInfo_flags, witness_witness_interfaceInfo_flags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);
456
457 offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);
458
459 if (!flags)
460 proto_item_append_text(item, ": (No values set)");
461
462 if (flags & (~0x00000007)) {
463 flags &= (~0x00000007);
464 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
465 }
466
467 return offset;
468 }
469
470
471 /* IDL: struct { */
472 /* IDL: [charset(UTF16)] [to_null(1)] uint16 group_name[260]; */
473 /* IDL: witness_version version; */
474 /* IDL: witness_interfaceInfo_state state; */
475 /* IDL: [flag(LIBNDR_FLAG_BIGENDIAN)] ipv4address ipv4; */
476 /* IDL: [flag(LIBNDR_FLAG_BIGENDIAN)] ipv6address ipv6; */
477 /* IDL: witness_interfaceInfo_flags flags; */
478 /* IDL: } */
479
480 static int
witness_dissect_element_interfaceInfo_version(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)481 witness_dissect_element_interfaceInfo_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
482 {
483 offset = witness_dissect_enum_version(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_interfaceInfo_version, 0);
484
485 return offset;
486 }
487
488 static int
witness_dissect_element_interfaceInfo_state(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)489 witness_dissect_element_interfaceInfo_state(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
490 {
491 offset = witness_dissect_enum_interfaceInfo_state(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_interfaceInfo_state, 0);
492
493 return offset;
494 }
495
496 static int
witness_dissect_element_interfaceInfo_ipv4(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)497 witness_dissect_element_interfaceInfo_ipv4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
498 {
499 offset=PIDL_dissect_ipv4address(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_interfaceInfo_ipv4, PIDL_SET_COL_INFO);
500
501 return offset;
502 }
503
504 static int
witness_dissect_element_interfaceInfo_ipv6(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)505 witness_dissect_element_interfaceInfo_ipv6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
506 {
507 offset=PIDL_dissect_ipv6address(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_interfaceInfo_ipv6, PIDL_SET_COL_INFO);
508
509 return offset;
510 }
511
512 static int
witness_dissect_element_interfaceInfo_flags(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)513 witness_dissect_element_interfaceInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
514 {
515 offset = witness_dissect_bitmap_interfaceInfo_flags(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_interfaceInfo_flags, 0);
516
517 return offset;
518 }
519
520 int
witness_dissect_struct_interfaceInfo(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)521 witness_dissect_struct_interfaceInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
522 {
523 proto_item *item = NULL;
524 proto_tree *tree = NULL;
525 int old_offset;
526
527 ALIGN_TO_4_BYTES;
528
529 old_offset = offset;
530
531 if (parent_tree) {
532 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
533 tree = proto_item_add_subtree(item, ett_witness_witness_interfaceInfo);
534 }
535
536 offset = witness_dissect_element_interfaceInfo_group_name(tvb, offset, pinfo, tree, di, drep);
537
538 offset = witness_dissect_element_interfaceInfo_version(tvb, offset, pinfo, tree, di, drep);
539
540 offset = witness_dissect_element_interfaceInfo_state(tvb, offset, pinfo, tree, di, drep);
541
542 offset = witness_dissect_element_interfaceInfo_ipv4(tvb, offset, pinfo, tree, di, drep);
543
544 offset = witness_dissect_element_interfaceInfo_ipv6(tvb, offset, pinfo, tree, di, drep);
545
546 offset = witness_dissect_element_interfaceInfo_flags(tvb, offset, pinfo, tree, di, drep);
547
548
549 proto_item_set_len(item, offset-old_offset);
550
551
552 if (di->call_data->flags & DCERPC_IS_NDR64) {
553 ALIGN_TO_4_BYTES;
554 }
555
556 return offset;
557 }
558
559
560 /* IDL: struct { */
561 /* IDL: uint32 num_interfaces; */
562 /* IDL: [size_is(num_interfaces)] [unique(1)] witness_interfaceInfo *interfaces; */
563 /* IDL: } */
564
565 static int
witness_dissect_element_interfaceList_num_interfaces(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)566 witness_dissect_element_interfaceList_num_interfaces(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
567 {
568 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_interfaceList_num_interfaces, 0);
569
570 return offset;
571 }
572
573 static int
witness_dissect_element_interfaceList_interfaces(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)574 witness_dissect_element_interfaceList_interfaces(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
575 {
576 offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_interfaceList_interfaces_, NDR_POINTER_UNIQUE, "Pointer to Interfaces (witness_interfaceInfo)",hf_witness_witness_interfaceList_interfaces);
577
578 return offset;
579 }
580
581 static int
witness_dissect_element_interfaceList_interfaces_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)582 witness_dissect_element_interfaceList_interfaces_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
583 {
584 offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_interfaceList_interfaces__);
585
586 return offset;
587 }
588
589 static int
witness_dissect_element_interfaceList_interfaces__(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)590 witness_dissect_element_interfaceList_interfaces__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
591 {
592 offset = witness_dissect_struct_interfaceInfo(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_interfaceList_interfaces,0);
593
594 return offset;
595 }
596
597 int
witness_dissect_struct_interfaceList(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)598 witness_dissect_struct_interfaceList(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
599 {
600 proto_item *item = NULL;
601 proto_tree *tree = NULL;
602 int old_offset;
603
604 ALIGN_TO_5_BYTES;
605
606 old_offset = offset;
607
608 if (parent_tree) {
609 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
610 tree = proto_item_add_subtree(item, ett_witness_witness_interfaceList);
611 }
612
613 offset = witness_dissect_element_interfaceList_num_interfaces(tvb, offset, pinfo, tree, di, drep);
614
615 offset = witness_dissect_element_interfaceList_interfaces(tvb, offset, pinfo, tree, di, drep);
616
617
618 proto_item_set_len(item, offset-old_offset);
619
620
621 if (di->call_data->flags & DCERPC_IS_NDR64) {
622 ALIGN_TO_5_BYTES;
623 }
624
625 return offset;
626 }
627
628
629 /* IDL: enum { */
630 /* IDL: WITNESS_NOTIFY_RESOURCE_CHANGE=1, */
631 /* IDL: WITNESS_NOTIFY_CLIENT_MOVE=2, */
632 /* IDL: WITNESS_NOTIFY_SHARE_MOVE=3, */
633 /* IDL: WITNESS_NOTIFY_IP_CHANGE=4, */
634 /* IDL: } */
635
636 int
witness_dissect_enum_notifyResponse_type(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 * param _U_)637 witness_dissect_enum_notifyResponse_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
638 {
639 guint32 parameter=0;
640 if (param) {
641 parameter = *param;
642 }
643 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, ¶meter);
644 if (param) {
645 *param = parameter;
646 }
647 return offset;
648 }
649
650
651 /* IDL: enum { */
652 /* IDL: WITNESS_RESOURCE_STATE_UNKNOWN=0x00, */
653 /* IDL: WITNESS_RESOURCE_STATE_AVAILABLE=0x01, */
654 /* IDL: WITNESS_RESOURCE_STATE_UNAVAILABLE=0xff, */
655 /* IDL: } */
656
657 int
witness_dissect_enum_ResourceChange_type(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 * param _U_)658 witness_dissect_enum_ResourceChange_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
659 {
660 guint32 parameter=0;
661 if (param) {
662 parameter = *param;
663 }
664 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, ¶meter);
665 if (param) {
666 *param = parameter;
667 }
668 return offset;
669 }
670
671
672 /* IDL: struct { */
673 /* IDL: [value(ndr_size_witness_ResourceChange(r,ndr->flags))] uint32 length; */
674 /* IDL: witness_ResourceChange_type type; */
675 /* IDL: [flag(LIBNDR_FLAG_STR_NULLTERM)] string name; */
676 /* IDL: } */
677
678 static int
witness_dissect_element_ResourceChange_length(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)679 witness_dissect_element_ResourceChange_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
680 {
681 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_ResourceChange_length, 0);
682
683 return offset;
684 }
685
686 static int
witness_dissect_element_ResourceChange_type(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)687 witness_dissect_element_ResourceChange_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
688 {
689 offset = witness_dissect_enum_ResourceChange_type(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_ResourceChange_type, 0);
690
691 return offset;
692 }
693
694 static int
witness_dissect_element_ResourceChange_name(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)695 witness_dissect_element_ResourceChange_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
696 {
697 offset = dissect_null_term_wstring(tvb, offset, pinfo, tree, drep, hf_witness_witness_ResourceChange_name , 0);
698
699 return offset;
700 }
701
702 int
witness_dissect_struct_ResourceChange(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)703 witness_dissect_struct_ResourceChange(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
704 {
705 proto_item *item = NULL;
706 proto_tree *tree = NULL;
707 gboolean oldalign = di->no_align;
708 int old_offset;
709
710 di->no_align = TRUE;
711
712 old_offset = offset;
713
714 if (parent_tree) {
715 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
716 tree = proto_item_add_subtree(item, ett_witness_witness_ResourceChange);
717 }
718
719 offset = witness_dissect_element_ResourceChange_length(tvb, offset, pinfo, tree, di, drep);
720
721 offset = witness_dissect_element_ResourceChange_type(tvb, offset, pinfo, tree, di, drep);
722
723 offset = witness_dissect_element_ResourceChange_name(tvb, offset, pinfo, tree, di, drep);
724
725
726 proto_item_set_len(item, offset-old_offset);
727
728
729 di->no_align = oldalign;
730
731 return offset;
732 }
733
734
735 /* IDL: bitmap { */
736 /* IDL: WITNESS_IPADDR_V4 = 0x01 , */
737 /* IDL: WITNESS_IPADDR_V6 = 0x02 , */
738 /* IDL: WITNESS_IPADDR_ONLINE = 0x08 , */
739 /* IDL: WITNESS_IPADDR_OFFLINE = 0x10 , */
740 /* IDL: } */
741
742 int
witness_dissect_bitmap_IPaddrInfo_flags(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)743 witness_dissect_bitmap_IPaddrInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
744 {
745 proto_item *item;
746 static int * const witness_witness_IPaddrInfo_flags_fields[] = {
747 &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_V4,
748 &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_V6,
749 &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_ONLINE,
750 &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_OFFLINE,
751 NULL
752 };
753 guint32 flags;
754 ALIGN_TO_4_BYTES;
755
756 item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
757 ett_witness_witness_IPaddrInfo_flags, witness_witness_IPaddrInfo_flags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);
758
759 offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);
760
761 if (!flags)
762 proto_item_append_text(item, ": (No values set)");
763
764 if (flags & (~0x0000001b)) {
765 flags &= (~0x0000001b);
766 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
767 }
768
769 return offset;
770 }
771
772
773 /* IDL: struct { */
774 /* IDL: witness_IPaddrInfo_flags flags; */
775 /* IDL: ipv4address ipv4; */
776 /* IDL: ipv6address ipv6; */
777 /* IDL: } */
778
779 static int
witness_dissect_element_IPaddrInfo_flags(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)780 witness_dissect_element_IPaddrInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
781 {
782 offset = witness_dissect_bitmap_IPaddrInfo_flags(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_IPaddrInfo_flags, 0);
783
784 return offset;
785 }
786
787 static int
witness_dissect_element_IPaddrInfo_ipv4(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)788 witness_dissect_element_IPaddrInfo_ipv4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
789 {
790 offset=PIDL_dissect_ipv4address(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_IPaddrInfo_ipv4, PIDL_SET_COL_INFO);
791
792 return offset;
793 }
794
795 static int
witness_dissect_element_IPaddrInfo_ipv6(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)796 witness_dissect_element_IPaddrInfo_ipv6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
797 {
798 offset=PIDL_dissect_ipv6address(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_IPaddrInfo_ipv6, PIDL_SET_COL_INFO);
799
800 return offset;
801 }
802
803 int
witness_dissect_struct_IPaddrInfo(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)804 witness_dissect_struct_IPaddrInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
805 {
806 proto_item *item = NULL;
807 proto_tree *tree = NULL;
808 gboolean oldalign = di->no_align;
809 int old_offset;
810
811 di->no_align = TRUE;
812
813 old_offset = offset;
814
815 if (parent_tree) {
816 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
817 tree = proto_item_add_subtree(item, ett_witness_witness_IPaddrInfo);
818 }
819
820 offset = witness_dissect_element_IPaddrInfo_flags(tvb, offset, pinfo, tree, di, drep);
821
822 offset = witness_dissect_element_IPaddrInfo_ipv4(tvb, offset, pinfo, tree, di, drep);
823
824 offset = witness_dissect_element_IPaddrInfo_ipv6(tvb, offset, pinfo, tree, di, drep);
825
826
827 proto_item_set_len(item, offset-old_offset);
828
829
830 di->no_align = oldalign;
831
832 return offset;
833 }
834
835
836 /* IDL: struct { */
837 /* IDL: [value(r->num*ndr_size_witness_IPaddrInfo(r->addr,ndr->flags))] uint32 length; */
838 /* IDL: [value(0)] uint32 reserved; */
839 /* IDL: uint32 num; */
840 /* IDL: witness_IPaddrInfo addr[num]; */
841 /* IDL: } */
842
843 static int
witness_dissect_element_IPaddrInfoList_length(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)844 witness_dissect_element_IPaddrInfoList_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
845 {
846 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_IPaddrInfoList_length, 0);
847
848 return offset;
849 }
850
851 static int
witness_dissect_element_IPaddrInfoList_reserved(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)852 witness_dissect_element_IPaddrInfoList_reserved(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
853 {
854 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_IPaddrInfoList_reserved, 0);
855
856 return offset;
857 }
858
859 static int
witness_dissect_element_IPaddrInfoList_num(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)860 witness_dissect_element_IPaddrInfoList_num(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
861 {
862 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_IPaddrInfoList_num, 0);
863
864 return offset;
865 }
866
867
868 /* IDL: [flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN)] [nodiscriminant(1)] [public(1)] [switch_type(witness_notifyResponse_type)] union { */
869 /* IDL: [case(WITNESS_NOTIFY_RESOURCE_CHANGE)] [case(WITNESS_NOTIFY_RESOURCE_CHANGE)] witness_ResourceChange resource_change; */
870 /* IDL: [case(WITNESS_NOTIFY_CLIENT_MOVE)] [case(WITNESS_NOTIFY_CLIENT_MOVE)] witness_IPaddrInfoList client_move; */
871 /* IDL: [case(WITNESS_NOTIFY_SHARE_MOVE)] [case(WITNESS_NOTIFY_SHARE_MOVE)] witness_IPaddrInfoList share_move; */
872 /* IDL: [case(WITNESS_NOTIFY_IP_CHANGE)] [case(WITNESS_NOTIFY_IP_CHANGE)] witness_IPaddrInfoList ip_change; */
873 /* IDL: [default] ; */
874 /* IDL: } */
875
876 static int
witness_dissect_element_notifyResponse_message_resource_change(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)877 witness_dissect_element_notifyResponse_message_resource_change(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
878 {
879 offset = witness_dissect_struct_ResourceChange(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_notifyResponse_message_resource_change,0);
880
881 return offset;
882 }
883
884 static int
witness_dissect_element_notifyResponse_message_client_move(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)885 witness_dissect_element_notifyResponse_message_client_move(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
886 {
887 offset = witness_dissect_struct_IPaddrInfoList(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_notifyResponse_message_client_move,0);
888
889 return offset;
890 }
891
892 static int
witness_dissect_element_notifyResponse_message_share_move(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)893 witness_dissect_element_notifyResponse_message_share_move(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
894 {
895 offset = witness_dissect_struct_IPaddrInfoList(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_notifyResponse_message_share_move,0);
896
897 return offset;
898 }
899
900 static int
witness_dissect_element_notifyResponse_message_ip_change(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)901 witness_dissect_element_notifyResponse_message_ip_change(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
902 {
903 offset = witness_dissect_struct_IPaddrInfoList(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_notifyResponse_message_ip_change,0);
904
905 return offset;
906 }
907
908 static int
witness_dissect_element_notifyResponse_message_data(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)909 witness_dissect_element_notifyResponse_message_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
910 {
911 offset = dissect_ndr_datablob(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_notifyResponse_message_data, 1);
912
913 return offset;
914 }
915
916 static int
witness_dissect_notifyResponse_message(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)917 witness_dissect_notifyResponse_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
918 {
919 proto_item *item = NULL;
920 proto_tree *tree = NULL;
921 int old_offset;
922 guint32 level = param;
923
924 old_offset = offset;
925 if (parent_tree) {
926 tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_witness_witness_notifyResponse_message, &item, "witness_notifyResponse_message");
927 }
928
929 switch(level) {
930 case WITNESS_NOTIFY_RESOURCE_CHANGE:
931 offset = witness_dissect_element_notifyResponse_message_resource_change(tvb, offset, pinfo, tree, di, drep);
932 break;
933
934 case WITNESS_NOTIFY_CLIENT_MOVE:
935 offset = witness_dissect_element_notifyResponse_message_client_move(tvb, offset, pinfo, tree, di, drep);
936 break;
937
938 case WITNESS_NOTIFY_SHARE_MOVE:
939 offset = witness_dissect_element_notifyResponse_message_share_move(tvb, offset, pinfo, tree, di, drep);
940 break;
941
942 case WITNESS_NOTIFY_IP_CHANGE:
943 offset = witness_dissect_element_notifyResponse_message_ip_change(tvb, offset, pinfo, tree, di, drep);
944 break;
945
946 default:
947 offset = witness_dissect_element_notifyResponse_message_data(tvb, offset, pinfo, tree, di, drep);
948 break;
949 }
950 proto_item_set_len(item, offset-old_offset);
951
952
953 return offset;
954 }
955
956 /* IDL: struct { */
957 /* IDL: witness_notifyResponse_type type; */
958 /* IDL: [value(ndr_size_witness_notifyResponse(r,ndr->flags)-20)] uint32 length; */
959 /* IDL: uint32 num; */
960 /* IDL: [flag(LIBNDR_FLAG_REMAINING)] [subcontext(4)] [subcontext_size(length)] [switch_is(type)] witness_notifyResponse_message messages[num]; */
961 /* IDL: } */
962
963 static int
witness_dissect_element_notifyResponse_type(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,guint32 * type)964 witness_dissect_element_notifyResponse_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, guint32 *type)
965 {
966 offset = witness_dissect_enum_notifyResponse_type(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_notifyResponse_type, type);
967
968 return offset;
969 }
970
971 static int
witness_dissect_element_notifyResponse_length(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)972 witness_dissect_element_notifyResponse_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
973 {
974 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_notifyResponse_length, 0);
975
976 return offset;
977 }
978
979 static int
witness_dissect_element_notifyResponse_num(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)980 witness_dissect_element_notifyResponse_num(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
981 {
982 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_notifyResponse_num, 0);
983
984 return offset;
985 }
986
987
988 /* IDL: bitmap { */
989 /* IDL: WITNESS_REGISTER_NONE = 0x00 , */
990 /* IDL: WITNESS_REGISTER_IP_NOTIFICATION = 0x01 , */
991 /* IDL: } */
992
993 int
witness_dissect_bitmap_RegisterEx_flags(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * parent_tree _U_,dcerpc_info * di _U_,guint8 * drep _U_,int hf_index _U_,guint32 param _U_)994 witness_dissect_bitmap_RegisterEx_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
995 {
996 proto_item *item;
997 static int * const witness_witness_RegisterEx_flags_fields[] = {
998 &hf_witness_witness_RegisterEx_flags_WITNESS_REGISTER_IP_NOTIFICATION,
999 NULL
1000 };
1001 guint32 flags;
1002 ALIGN_TO_4_BYTES;
1003
1004 item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
1005 ett_witness_witness_RegisterEx_flags, witness_witness_RegisterEx_flags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);
1006
1007 offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);
1008
1009 if (!flags)
1010 proto_item_append_text(item, ": (No values set)");
1011
1012 if (flags & (~0x00000001)) {
1013 flags &= (~0x00000001);
1014 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
1015 }
1016
1017 return offset;
1018 }
1019
1020 static int
witness_dissect_element_GetInterfaceList_interface_list(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1021 witness_dissect_element_GetInterfaceList_interface_list(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1022 {
1023 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_GetInterfaceList_interface_list_, NDR_POINTER_REF, "Pointer to Interface List (witness_interfaceList)",hf_witness_witness_GetInterfaceList_interface_list);
1024
1025 return offset;
1026 }
1027
1028 static int
witness_dissect_element_GetInterfaceList_interface_list_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1029 witness_dissect_element_GetInterfaceList_interface_list_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1030 {
1031 offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_GetInterfaceList_interface_list__, NDR_POINTER_UNIQUE, "Pointer to Interface List (witness_interfaceList)",hf_witness_witness_GetInterfaceList_interface_list);
1032
1033 return offset;
1034 }
1035
1036 static int
witness_dissect_element_GetInterfaceList_interface_list__(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1037 witness_dissect_element_GetInterfaceList_interface_list__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1038 {
1039 offset = witness_dissect_struct_interfaceList(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_GetInterfaceList_interface_list,0);
1040
1041 return offset;
1042 }
1043
1044 /* IDL: WERROR witness_GetInterfaceList( */
1045 /* IDL: [out] [ref] witness_interfaceList **interface_list */
1046 /* IDL: ); */
1047
1048 static int
witness_dissect_GetInterfaceList_response(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1049 witness_dissect_GetInterfaceList_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1050 {
1051 guint32 status;
1052
1053 di->dcerpc_procedure_name="GetInterfaceList";
1054 offset = witness_dissect_element_GetInterfaceList_interface_list(tvb, offset, pinfo, tree, di, drep);
1055 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1056
1057 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_werror, &status);
1058
1059 if (status != 0)
1060 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1061
1062 return offset;
1063 }
1064
1065 static int
witness_dissect_GetInterfaceList_request(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1066 witness_dissect_GetInterfaceList_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1067 {
1068 di->dcerpc_procedure_name="GetInterfaceList";
1069 return offset;
1070 }
1071
1072 static int
witness_dissect_element_Register_context_handle(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1073 witness_dissect_element_Register_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1074 {
1075 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_Register_context_handle_, NDR_POINTER_REF, "Pointer to Context Handle (policy_handle)",hf_witness_witness_Register_context_handle);
1076
1077 return offset;
1078 }
1079
1080 static int
witness_dissect_element_Register_context_handle_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1081 witness_dissect_element_Register_context_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1082 {
1083 offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_Register_context_handle, 0);
1084
1085 return offset;
1086 }
1087
1088 static int
witness_dissect_element_Register_version(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1089 witness_dissect_element_Register_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1090 {
1091 offset = witness_dissect_enum_version(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_Register_version, 0);
1092
1093 return offset;
1094 }
1095
1096 static int
witness_dissect_element_Register_net_name(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1097 witness_dissect_element_Register_net_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1098 {
1099 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_Register_net_name_, NDR_POINTER_UNIQUE, "Pointer to Net Name (uint16)",hf_witness_witness_Register_net_name);
1100
1101 return offset;
1102 }
1103
1104 static int
witness_dissect_element_Register_net_name_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1105 witness_dissect_element_Register_net_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1106 {
1107 char *data;
1108
1109 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_witness_witness_Register_net_name, FALSE, &data);
1110 proto_item_append_text(tree, ": %s", data);
1111
1112 return offset;
1113 }
1114
1115 static int
witness_dissect_element_Register_ip_address(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1116 witness_dissect_element_Register_ip_address(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1117 {
1118 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_Register_ip_address_, NDR_POINTER_UNIQUE, "Pointer to Ip Address (uint16)",hf_witness_witness_Register_ip_address);
1119
1120 return offset;
1121 }
1122
1123 static int
witness_dissect_element_Register_ip_address_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1124 witness_dissect_element_Register_ip_address_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1125 {
1126 char *data;
1127
1128 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_witness_witness_Register_ip_address, FALSE, &data);
1129 proto_item_append_text(tree, ": %s", data);
1130
1131 return offset;
1132 }
1133
1134 static int
witness_dissect_element_Register_client_computer_name(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1135 witness_dissect_element_Register_client_computer_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1136 {
1137 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_Register_client_computer_name_, NDR_POINTER_UNIQUE, "Pointer to Client Computer Name (uint16)",hf_witness_witness_Register_client_computer_name);
1138
1139 return offset;
1140 }
1141
1142 static int
witness_dissect_element_Register_client_computer_name_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1143 witness_dissect_element_Register_client_computer_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1144 {
1145 char *data;
1146
1147 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_witness_witness_Register_client_computer_name, FALSE, &data);
1148 proto_item_append_text(tree, ": %s", data);
1149
1150 return offset;
1151 }
1152
1153 /* IDL: WERROR witness_Register( */
1154 /* IDL: [out] [ref] policy_handle *context_handle, */
1155 /* IDL: [in] witness_version version, */
1156 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *net_name, */
1157 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *ip_address, */
1158 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *client_computer_name */
1159 /* IDL: ); */
1160
1161 static int
witness_dissect_Register_response(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1162 witness_dissect_Register_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1163 {
1164 guint32 status;
1165
1166 di->dcerpc_procedure_name="Register";
1167 offset = witness_dissect_element_Register_context_handle(tvb, offset, pinfo, tree, di, drep);
1168 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1169
1170 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_werror, &status);
1171
1172 if (status != 0)
1173 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1174
1175 return offset;
1176 }
1177
1178 static int
witness_dissect_Register_request(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1179 witness_dissect_Register_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1180 {
1181 di->dcerpc_procedure_name="Register";
1182 offset = witness_dissect_element_Register_version(tvb, offset, pinfo, tree, di, drep);
1183 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1184 offset = witness_dissect_element_Register_net_name(tvb, offset, pinfo, tree, di, drep);
1185 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1186 offset = witness_dissect_element_Register_ip_address(tvb, offset, pinfo, tree, di, drep);
1187 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1188 offset = witness_dissect_element_Register_client_computer_name(tvb, offset, pinfo, tree, di, drep);
1189 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1190 return offset;
1191 }
1192
1193 static int
witness_dissect_element_UnRegister_context_handle(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1194 witness_dissect_element_UnRegister_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1195 {
1196 offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_UnRegister_context_handle, 0);
1197
1198 return offset;
1199 }
1200
1201 /* IDL: WERROR witness_UnRegister( */
1202 /* IDL: [in] policy_handle context_handle */
1203 /* IDL: ); */
1204
1205 static int
witness_dissect_UnRegister_response(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1206 witness_dissect_UnRegister_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1207 {
1208 guint32 status;
1209
1210 di->dcerpc_procedure_name="UnRegister";
1211 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_werror, &status);
1212
1213 if (status != 0)
1214 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1215
1216 return offset;
1217 }
1218
1219 static int
witness_dissect_UnRegister_request(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1220 witness_dissect_UnRegister_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1221 {
1222 di->dcerpc_procedure_name="UnRegister";
1223 offset = witness_dissect_element_UnRegister_context_handle(tvb, offset, pinfo, tree, di, drep);
1224 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1225 return offset;
1226 }
1227
1228 static int
witness_dissect_element_AsyncNotify_context_handle(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1229 witness_dissect_element_AsyncNotify_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1230 {
1231 offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_AsyncNotify_context_handle, 0);
1232
1233 return offset;
1234 }
1235
1236 static int
witness_dissect_element_AsyncNotify_response(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1237 witness_dissect_element_AsyncNotify_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1238 {
1239 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_AsyncNotify_response_, NDR_POINTER_REF, "Pointer to Response (witness_notifyResponse)",hf_witness_witness_AsyncNotify_response);
1240
1241 return offset;
1242 }
1243
1244 static int
witness_dissect_element_AsyncNotify_response_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1245 witness_dissect_element_AsyncNotify_response_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1246 {
1247 offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_AsyncNotify_response__, NDR_POINTER_UNIQUE, "Pointer to Response (witness_notifyResponse)",hf_witness_witness_AsyncNotify_response);
1248
1249 return offset;
1250 }
1251
1252 static int
witness_dissect_element_AsyncNotify_response__(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1253 witness_dissect_element_AsyncNotify_response__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1254 {
1255 offset = witness_dissect_struct_notifyResponse(tvb,offset,pinfo,tree,di,drep,hf_witness_witness_AsyncNotify_response,0);
1256
1257 return offset;
1258 }
1259
1260 /* IDL: WERROR witness_AsyncNotify( */
1261 /* IDL: [in] policy_handle context_handle, */
1262 /* IDL: [out] [ref] witness_notifyResponse **response */
1263 /* IDL: ); */
1264
1265 static int
witness_dissect_AsyncNotify_response(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1266 witness_dissect_AsyncNotify_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1267 {
1268 guint32 status;
1269
1270 di->dcerpc_procedure_name="AsyncNotify";
1271 offset = witness_dissect_element_AsyncNotify_response(tvb, offset, pinfo, tree, di, drep);
1272 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1273
1274 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_werror, &status);
1275
1276 if (status != 0)
1277 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1278
1279 return offset;
1280 }
1281
1282 static int
witness_dissect_AsyncNotify_request(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1283 witness_dissect_AsyncNotify_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1284 {
1285 di->dcerpc_procedure_name="AsyncNotify";
1286 offset = witness_dissect_element_AsyncNotify_context_handle(tvb, offset, pinfo, tree, di, drep);
1287 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1288 return offset;
1289 }
1290
1291 static int
witness_dissect_element_RegisterEx_context_handle(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1292 witness_dissect_element_RegisterEx_context_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1293 {
1294 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_RegisterEx_context_handle_, NDR_POINTER_REF, "Pointer to Context Handle (policy_handle)",hf_witness_witness_RegisterEx_context_handle);
1295
1296 return offset;
1297 }
1298
1299 static int
witness_dissect_element_RegisterEx_context_handle_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1300 witness_dissect_element_RegisterEx_context_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1301 {
1302 offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_RegisterEx_context_handle, 0);
1303
1304 return offset;
1305 }
1306
1307 static int
witness_dissect_element_RegisterEx_version(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1308 witness_dissect_element_RegisterEx_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1309 {
1310 offset = witness_dissect_enum_version(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_RegisterEx_version, 0);
1311
1312 return offset;
1313 }
1314
1315 static int
witness_dissect_element_RegisterEx_net_name(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1316 witness_dissect_element_RegisterEx_net_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1317 {
1318 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_RegisterEx_net_name_, NDR_POINTER_UNIQUE, "Pointer to Net Name (uint16)",hf_witness_witness_RegisterEx_net_name);
1319
1320 return offset;
1321 }
1322
1323 static int
witness_dissect_element_RegisterEx_net_name_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1324 witness_dissect_element_RegisterEx_net_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1325 {
1326 char *data;
1327
1328 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_witness_witness_RegisterEx_net_name, FALSE, &data);
1329 proto_item_append_text(tree, ": %s", data);
1330
1331 return offset;
1332 }
1333
1334 static int
witness_dissect_element_RegisterEx_share_name(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1335 witness_dissect_element_RegisterEx_share_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1336 {
1337 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_RegisterEx_share_name_, NDR_POINTER_UNIQUE, "Pointer to Share Name (uint16)",hf_witness_witness_RegisterEx_share_name);
1338
1339 return offset;
1340 }
1341
1342 static int
witness_dissect_element_RegisterEx_share_name_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1343 witness_dissect_element_RegisterEx_share_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1344 {
1345 char *data;
1346
1347 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_witness_witness_RegisterEx_share_name, FALSE, &data);
1348 proto_item_append_text(tree, ": %s", data);
1349
1350 return offset;
1351 }
1352
1353 static int
witness_dissect_element_RegisterEx_ip_address(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1354 witness_dissect_element_RegisterEx_ip_address(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1355 {
1356 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_RegisterEx_ip_address_, NDR_POINTER_UNIQUE, "Pointer to Ip Address (uint16)",hf_witness_witness_RegisterEx_ip_address);
1357
1358 return offset;
1359 }
1360
1361 static int
witness_dissect_element_RegisterEx_ip_address_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1362 witness_dissect_element_RegisterEx_ip_address_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1363 {
1364 char *data;
1365
1366 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_witness_witness_RegisterEx_ip_address, FALSE, &data);
1367 proto_item_append_text(tree, ": %s", data);
1368
1369 return offset;
1370 }
1371
1372 static int
witness_dissect_element_RegisterEx_client_computer_name(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1373 witness_dissect_element_RegisterEx_client_computer_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1374 {
1375 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, witness_dissect_element_RegisterEx_client_computer_name_, NDR_POINTER_UNIQUE, "Pointer to Client Computer Name (uint16)",hf_witness_witness_RegisterEx_client_computer_name);
1376
1377 return offset;
1378 }
1379
1380 static int
witness_dissect_element_RegisterEx_client_computer_name_(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1381 witness_dissect_element_RegisterEx_client_computer_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1382 {
1383 char *data;
1384
1385 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_witness_witness_RegisterEx_client_computer_name, FALSE, &data);
1386 proto_item_append_text(tree, ": %s", data);
1387
1388 return offset;
1389 }
1390
1391 static int
witness_dissect_element_RegisterEx_flags(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1392 witness_dissect_element_RegisterEx_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1393 {
1394 offset = witness_dissect_bitmap_RegisterEx_flags(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_RegisterEx_flags, 0);
1395
1396 return offset;
1397 }
1398
1399 static int
witness_dissect_element_RegisterEx_timeout(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1400 witness_dissect_element_RegisterEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1401 {
1402 offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_witness_RegisterEx_timeout, 0);
1403
1404 return offset;
1405 }
1406
1407 /* IDL: WERROR witness_RegisterEx( */
1408 /* IDL: [out] [ref] policy_handle *context_handle, */
1409 /* IDL: [in] witness_version version, */
1410 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *net_name, */
1411 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *share_name, */
1412 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *ip_address, */
1413 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *client_computer_name, */
1414 /* IDL: [in] witness_RegisterEx_flags flags, */
1415 /* IDL: [in] uint32 timeout */
1416 /* IDL: ); */
1417
1418 static int
witness_dissect_RegisterEx_response(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1419 witness_dissect_RegisterEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1420 {
1421 guint32 status;
1422
1423 di->dcerpc_procedure_name="RegisterEx";
1424 offset = witness_dissect_element_RegisterEx_context_handle(tvb, offset, pinfo, tree, di, drep);
1425 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1426
1427 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_witness_werror, &status);
1428
1429 if (status != 0)
1430 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1431
1432 return offset;
1433 }
1434
1435 static int
witness_dissect_RegisterEx_request(tvbuff_t * tvb _U_,int offset _U_,packet_info * pinfo _U_,proto_tree * tree _U_,dcerpc_info * di _U_,guint8 * drep _U_)1436 witness_dissect_RegisterEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1437 {
1438 di->dcerpc_procedure_name="RegisterEx";
1439 offset = witness_dissect_element_RegisterEx_version(tvb, offset, pinfo, tree, di, drep);
1440 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1441 offset = witness_dissect_element_RegisterEx_net_name(tvb, offset, pinfo, tree, di, drep);
1442 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1443 offset = witness_dissect_element_RegisterEx_share_name(tvb, offset, pinfo, tree, di, drep);
1444 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1445 offset = witness_dissect_element_RegisterEx_ip_address(tvb, offset, pinfo, tree, di, drep);
1446 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1447 offset = witness_dissect_element_RegisterEx_client_computer_name(tvb, offset, pinfo, tree, di, drep);
1448 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1449 offset = witness_dissect_element_RegisterEx_flags(tvb, offset, pinfo, tree, di, drep);
1450 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1451 offset = witness_dissect_element_RegisterEx_timeout(tvb, offset, pinfo, tree, di, drep);
1452 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1453 return offset;
1454 }
1455
1456
1457 static dcerpc_sub_dissector witness_dissectors[] = {
1458 { 0, "GetInterfaceList",
1459 witness_dissect_GetInterfaceList_request, witness_dissect_GetInterfaceList_response},
1460 { 1, "Register",
1461 witness_dissect_Register_request, witness_dissect_Register_response},
1462 { 2, "UnRegister",
1463 witness_dissect_UnRegister_request, witness_dissect_UnRegister_response},
1464 { 3, "AsyncNotify",
1465 witness_dissect_AsyncNotify_request, witness_dissect_AsyncNotify_response},
1466 { 4, "RegisterEx",
1467 witness_dissect_RegisterEx_request, witness_dissect_RegisterEx_response},
1468 { 0, NULL, NULL, NULL }
1469 };
1470
proto_register_dcerpc_witness(void)1471 void proto_register_dcerpc_witness(void)
1472 {
1473 static hf_register_info hf[] = {
1474 { &hf_witness_opnum,
1475 { "Operation", "witness.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
1476 { &hf_witness_werror,
1477 { "Windows Error", "witness.werror", FT_UINT32, BASE_HEX, VALS(WERR_errors), 0, NULL, HFILL }},
1478 { &hf_witness_witness_AsyncNotify_context_handle,
1479 { "Context Handle", "witness.witness_AsyncNotify.context_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1480 { &hf_witness_witness_AsyncNotify_response,
1481 { "Response", "witness.witness_AsyncNotify.response", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1482 { &hf_witness_witness_GetInterfaceList_interface_list,
1483 { "Interface List", "witness.witness_GetInterfaceList.interface_list", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1484 { &hf_witness_witness_IPaddrInfoList_addr,
1485 { "Addr", "witness.witness_IPaddrInfoList.addr", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1486 { &hf_witness_witness_IPaddrInfoList_length,
1487 { "Length", "witness.witness_IPaddrInfoList.length", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1488 { &hf_witness_witness_IPaddrInfoList_num,
1489 { "Num", "witness.witness_IPaddrInfoList.num", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1490 { &hf_witness_witness_IPaddrInfoList_reserved,
1491 { "Reserved", "witness.witness_IPaddrInfoList.reserved", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1492 { &hf_witness_witness_IPaddrInfo_flags,
1493 { "Flags", "witness.witness_IPaddrInfo.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1494 { &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_OFFLINE,
1495 { "WITNESS IPADDR OFFLINE", "witness.witness_IPaddrInfo_flags.WITNESS_IPADDR_OFFLINE", FT_BOOLEAN, 32, TFS(&witness_IPaddrInfo_flags_WITNESS_IPADDR_OFFLINE_tfs), ( 0x10 ), NULL, HFILL }},
1496 { &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_ONLINE,
1497 { "WITNESS IPADDR ONLINE", "witness.witness_IPaddrInfo_flags.WITNESS_IPADDR_ONLINE", FT_BOOLEAN, 32, TFS(&witness_IPaddrInfo_flags_WITNESS_IPADDR_ONLINE_tfs), ( 0x08 ), NULL, HFILL }},
1498 { &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_V4,
1499 { "WITNESS IPADDR V4", "witness.witness_IPaddrInfo_flags.WITNESS_IPADDR_V4", FT_BOOLEAN, 32, TFS(&witness_IPaddrInfo_flags_WITNESS_IPADDR_V4_tfs), ( 0x01 ), NULL, HFILL }},
1500 { &hf_witness_witness_IPaddrInfo_flags_WITNESS_IPADDR_V6,
1501 { "WITNESS IPADDR V6", "witness.witness_IPaddrInfo_flags.WITNESS_IPADDR_V6", FT_BOOLEAN, 32, TFS(&witness_IPaddrInfo_flags_WITNESS_IPADDR_V6_tfs), ( 0x02 ), NULL, HFILL }},
1502 { &hf_witness_witness_IPaddrInfo_ipv4,
1503 { "Ipv4", "witness.witness_IPaddrInfo.ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL }},
1504 { &hf_witness_witness_IPaddrInfo_ipv6,
1505 { "Ipv6", "witness.witness_IPaddrInfo.ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL }},
1506 { &hf_witness_witness_RegisterEx_client_computer_name,
1507 { "Client Computer Name", "witness.witness_RegisterEx.client_computer_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1508 { &hf_witness_witness_RegisterEx_context_handle,
1509 { "Context Handle", "witness.witness_RegisterEx.context_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1510 { &hf_witness_witness_RegisterEx_flags,
1511 { "Flags", "witness.witness_RegisterEx.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1512 { &hf_witness_witness_RegisterEx_flags_WITNESS_REGISTER_IP_NOTIFICATION,
1513 { "WITNESS REGISTER IP NOTIFICATION", "witness.witness_RegisterEx_flags.WITNESS_REGISTER_IP_NOTIFICATION", FT_BOOLEAN, 32, TFS(&witness_RegisterEx_flags_WITNESS_REGISTER_IP_NOTIFICATION_tfs), ( 0x01 ), NULL, HFILL }},
1514 { &hf_witness_witness_RegisterEx_ip_address,
1515 { "Ip Address", "witness.witness_RegisterEx.ip_address", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1516 { &hf_witness_witness_RegisterEx_net_name,
1517 { "Net Name", "witness.witness_RegisterEx.net_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1518 { &hf_witness_witness_RegisterEx_share_name,
1519 { "Share Name", "witness.witness_RegisterEx.share_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1520 { &hf_witness_witness_RegisterEx_timeout,
1521 { "Timeout", "witness.witness_RegisterEx.timeout", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1522 { &hf_witness_witness_RegisterEx_version,
1523 { "Version", "witness.witness_RegisterEx.version", FT_UINT32, BASE_DEC, VALS(witness_witness_version_vals), 0, NULL, HFILL }},
1524 { &hf_witness_witness_Register_client_computer_name,
1525 { "Client Computer Name", "witness.witness_Register.client_computer_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1526 { &hf_witness_witness_Register_context_handle,
1527 { "Context Handle", "witness.witness_Register.context_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1528 { &hf_witness_witness_Register_ip_address,
1529 { "Ip Address", "witness.witness_Register.ip_address", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1530 { &hf_witness_witness_Register_net_name,
1531 { "Net Name", "witness.witness_Register.net_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1532 { &hf_witness_witness_Register_version,
1533 { "Version", "witness.witness_Register.version", FT_UINT32, BASE_DEC, VALS(witness_witness_version_vals), 0, NULL, HFILL }},
1534 { &hf_witness_witness_ResourceChange_length,
1535 { "Length", "witness.witness_ResourceChange.length", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1536 { &hf_witness_witness_ResourceChange_name,
1537 { "Name", "witness.witness_ResourceChange.name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1538 { &hf_witness_witness_ResourceChange_type,
1539 { "Type", "witness.witness_ResourceChange.type", FT_UINT32, BASE_DEC, VALS(witness_witness_ResourceChange_type_vals), 0, NULL, HFILL }},
1540 { &hf_witness_witness_UnRegister_context_handle,
1541 { "Context Handle", "witness.witness_UnRegister.context_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1542 { &hf_witness_witness_interfaceInfo_flags,
1543 { "Flags", "witness.witness_interfaceInfo.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1544 { &hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_IPv4_VALID,
1545 { "WITNESS INFO IPv4 VALID", "witness.witness_interfaceInfo_flags.WITNESS_INFO_IPv4_VALID", FT_BOOLEAN, 32, TFS(&witness_interfaceInfo_flags_WITNESS_INFO_IPv4_VALID_tfs), ( 0x01 ), NULL, HFILL }},
1546 { &hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_IPv6_VALID,
1547 { "WITNESS INFO IPv6 VALID", "witness.witness_interfaceInfo_flags.WITNESS_INFO_IPv6_VALID", FT_BOOLEAN, 32, TFS(&witness_interfaceInfo_flags_WITNESS_INFO_IPv6_VALID_tfs), ( 0x02 ), NULL, HFILL }},
1548 { &hf_witness_witness_interfaceInfo_flags_WITNESS_INFO_WITNESS_IF,
1549 { "WITNESS INFO WITNESS IF", "witness.witness_interfaceInfo_flags.WITNESS_INFO_WITNESS_IF", FT_BOOLEAN, 32, TFS(&witness_interfaceInfo_flags_WITNESS_INFO_WITNESS_IF_tfs), ( 0x04 ), NULL, HFILL }},
1550 { &hf_witness_witness_interfaceInfo_group_name,
1551 { "Group Name", "witness.witness_interfaceInfo.group_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1552 { &hf_witness_witness_interfaceInfo_ipv4,
1553 { "Ipv4", "witness.witness_interfaceInfo.ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL }},
1554 { &hf_witness_witness_interfaceInfo_ipv6,
1555 { "Ipv6", "witness.witness_interfaceInfo.ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL }},
1556 { &hf_witness_witness_interfaceInfo_state,
1557 { "State", "witness.witness_interfaceInfo.state", FT_UINT16, BASE_DEC, VALS(witness_witness_interfaceInfo_state_vals), 0, NULL, HFILL }},
1558 { &hf_witness_witness_interfaceInfo_version,
1559 { "Version", "witness.witness_interfaceInfo.version", FT_UINT32, BASE_DEC, VALS(witness_witness_version_vals), 0, NULL, HFILL }},
1560 { &hf_witness_witness_interfaceList_interfaces,
1561 { "Interfaces", "witness.witness_interfaceList.interfaces", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1562 { &hf_witness_witness_interfaceList_num_interfaces,
1563 { "Num Interfaces", "witness.witness_interfaceList.num_interfaces", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1564 { &hf_witness_witness_notifyResponse_length,
1565 { "Length", "witness.witness_notifyResponse.length", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1566 { &hf_witness_witness_notifyResponse_message_client_move,
1567 { "Client Move", "witness.witness_notifyResponse_message.client_move", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1568 { &hf_witness_witness_notifyResponse_message_data,
1569 { "Data", "witness.witness_notifyResponse_message.data", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1570 { &hf_witness_witness_notifyResponse_message_ip_change,
1571 { "Ip Change", "witness.witness_notifyResponse_message.ip_change", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1572 { &hf_witness_witness_notifyResponse_message_resource_change,
1573 { "Resource Change", "witness.witness_notifyResponse_message.resource_change", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1574 { &hf_witness_witness_notifyResponse_message_share_move,
1575 { "Share Move", "witness.witness_notifyResponse_message.share_move", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1576 { &hf_witness_witness_notifyResponse_messages,
1577 { "Messages", "witness.witness_notifyResponse.messages", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1578 { &hf_witness_witness_notifyResponse_messages_,
1579 { "Messages", "witness.witness_notifyResponse.messages_", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
1580 { &hf_witness_witness_notifyResponse_num,
1581 { "Num", "witness.witness_notifyResponse.num", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1582 { &hf_witness_witness_notifyResponse_type,
1583 { "Type", "witness.witness_notifyResponse.type", FT_UINT32, BASE_DEC, VALS(witness_witness_notifyResponse_type_vals), 0, NULL, HFILL }},
1584 };
1585
1586
1587 static gint *ett[] = {
1588 &ett_dcerpc_witness,
1589 &ett_witness_witness_interfaceInfo_flags,
1590 &ett_witness_witness_interfaceInfo,
1591 &ett_witness_witness_interfaceList,
1592 &ett_witness_witness_ResourceChange,
1593 &ett_witness_witness_IPaddrInfo_flags,
1594 &ett_witness_witness_IPaddrInfo,
1595 &ett_witness_witness_IPaddrInfoList,
1596 &ett_witness_witness_notifyResponse_message,
1597 &ett_witness_witness_notifyResponse,
1598 &ett_witness_witness_RegisterEx_flags,
1599 };
1600
1601 proto_dcerpc_witness = proto_register_protocol("SMB Witness Service", "WITNESS", "witness");
1602 proto_register_field_array(proto_dcerpc_witness, hf, array_length (hf));
1603 proto_register_subtree_array(ett, array_length(ett));
1604 }
1605
proto_reg_handoff_dcerpc_witness(void)1606 void proto_reg_handoff_dcerpc_witness(void)
1607 {
1608 dcerpc_init_uuid(proto_dcerpc_witness, ett_dcerpc_witness,
1609 &uuid_dcerpc_witness, ver_dcerpc_witness,
1610 witness_dissectors, hf_witness_opnum);
1611 }
1612