add WERR_INVALID_STATE
[wireshark-wip.git] / plugins / profinet / packet-dcom-cba.c
blobb49602afa1299c900fd9c8513919ae647849f579
1 /* packet-dcom-cba.c
2 * Routines for DCOM CBA
4 * $Id$
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #include "config.h"
27 #include <glib.h>
28 #include <epan/packet.h>
29 #include <epan/wmem/wmem.h>
30 #include <epan/expert.h>
31 #include <epan/dissectors/packet-dcerpc.h>
32 #include <epan/dissectors/packet-dcom.h>
33 #include <epan/dissectors/packet-dcom-dispatch.h>
34 #include "packet-dcom-cba-acco.h"
37 static int hf_cba_opnum = -1;
39 static int hf_cba_revision_major = -1;
40 static int hf_cba_revision_minor = -1;
41 static int hf_cba_revision_service_pack = -1;
42 static int hf_cba_revision_build = -1;
44 static int hf_cba_time = -1;
46 static int hf_cba_name = -1;
47 static int hf_cba_producer = -1;
48 static int hf_cba_product = -1;
49 static int hf_cba_production_date = -1;
50 static int hf_cba_serial_no = -1;
51 static int hf_cba_multi_app = -1;
52 static int hf_cba_profinet_dcom_stack = -1;
53 static int hf_cba_pdev_stamp = -1;
55 static int hf_cba_browse_count = -1;
56 static int hf_cba_browse_offset = -1;
57 static int hf_cba_browse_max_return = -1;
58 static int hf_cba_browse_item = -1;
59 static int hf_cba_browse_data_type = -1;
60 static int hf_cba_browse_access_right = -1;
61 static int hf_cba_browse_selector = -1;
62 static int hf_cba_browse_info1 = -1;
63 static int hf_cba_browse_info2 = -1;
65 static int hf_cba_cookie = -1;
66 static int hf_cba_state = -1;
67 static int hf_cba_new_state = -1;
68 static int hf_cba_old_state = -1;
69 static int hf_cba_grouperror = -1;
70 static int hf_cba_new_grouperror = -1;
71 static int hf_cba_old_grouperror = -1;
73 static int hf_cba_component_id = -1;
74 static int hf_cba_component_version = -1;
75 static int hf_cba_pbaddress = -1;
76 static int hf_cba_pbaddress_system_id = -1;
77 static int hf_cba_pbaddress_address = -1;
79 static int hf_cba_save_ldev_name = -1;
80 static int hf_cba_save_result = -1;
82 static expert_field ei_cba_acco_interface_pointer_unresolved = EI_INIT;
84 static e_uuid_t uuid_coclass_CBAPhysicalDevice = { 0xcba00000, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
87 /* CBA interfaces */
88 static int proto_ICBAPhysicalDevice = -1;
89 static gint ett_ICBAPhysicalDevice = -1;
90 static e_uuid_t uuid_ICBAPhysicalDevice = { 0xcba00001, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
91 static guint16 ver_ICBAPhysicalDevice = 0;
93 static int proto_ICBAPhysicalDevice2 = -1;
94 static e_uuid_t uuid_ICBAPhysicalDevice2 = { 0xcba00006, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
95 static guint16 ver_ICBAPhysicalDevice2 = 0;
97 static int proto_ICBABrowse = -1;
98 static gint ett_ICBABrowse = -1;
99 static e_uuid_t uuid_ICBABrowse = { 0xcba00002, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
100 static guint16 ver_ICBABrowse = 0;
102 static int proto_ICBABrowse2 = -1;
103 static e_uuid_t uuid_ICBABrowse2 = { 0xcba00007, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
104 static guint16 ver_ICBABrowse2 = 0;
106 static int proto_ICBAPhysicalDevicePC = -1;
107 static gint ett_ICBAPhysicalDevicePC = -1;
108 static e_uuid_t uuid_ICBAPhysicalDevicePC = { 0xcba00003, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
109 static guint16 ver_ICBAPhysicalDevicePC = 0;
111 static int proto_ICBAPhysicalDevicePCEvent = -1;
112 static gint ett_ICBAPhysicalDevicePCEvent = -1;
113 static e_uuid_t uuid_ICBAPhysicalDevicePCEvent = { 0xcba00004, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
114 static guint16 ver_ICBAPhysicalDevicePCEvent = 0;
116 static int proto_ICBAPersist = -1;
117 static gint ett_ICBAPersist = -1;
118 static e_uuid_t uuid_ICBAPersist = { 0xcba00005, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
119 static guint16 ver_ICBAPersist = 0;
121 static int proto_ICBAPersist2 = -1;
122 static e_uuid_t uuid_ICBAPersist2 = { 0xcba00008, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
123 static guint16 ver_ICBAPersist2 = 0;
125 static int proto_ICBALogicalDevice = -1;
126 static gint ett_ICBALogicalDevice = -1;
127 static e_uuid_t uuid_ICBALogicalDevice = { 0xcba00011, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
128 static guint16 ver_ICBALogicalDevice = 0;
130 static int proto_ICBALogicalDevice2 = -1;
131 static e_uuid_t uuid_ICBALogicalDevice2 = { 0xcba00017, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
132 static guint16 ver_ICBALogicalDevice2 = 0;
134 static int proto_ICBAState = -1;
135 static gint ett_ICBAState = -1;
136 static e_uuid_t uuid_ICBAState = { 0xcba00012, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
137 static guint16 ver_ICBAState = 0;
139 static int proto_ICBAStateEvent = -1;
140 static gint ett_ICBAStateEvent = -1;
141 static e_uuid_t uuid_ICBAStateEvent = { 0xcba00013, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
142 static guint16 ver_ICBAStateEvent = 0;
144 static int proto_ICBATime = -1;
145 static gint ett_ICBATime = -1;
146 static e_uuid_t uuid_ICBATime = { 0xcba00014, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
147 static guint16 ver_ICBATime = 0;
149 static int proto_ICBAGroupError = -1;
150 static gint ett_ICBAGroupError = -1;
151 static e_uuid_t uuid_ICBAGroupError = { 0xcba00015, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
152 static guint16 ver_ICBAGroupError = 0;
154 static int proto_ICBAGroupErrorEvent = -1;
155 static gint ett_ICBAGroupErrorEvent = -1;
156 static e_uuid_t uuid_ICBAGroupErrorEvent = { 0xcba00016, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
157 static guint16 ver_ICBAGroupErrorEvent = 0;
159 static int proto_ICBARTAuto = -1;
160 static gint ett_ICBARTAuto = -1;
161 static e_uuid_t uuid_ICBARTAuto = { 0xcba00051, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
162 static guint16 ver_ICBARTAuto = 0;
164 static int proto_ICBARTAuto2 = -1;
165 static e_uuid_t uuid_ICBARTAuto2 = { 0xcba00052, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
166 static guint16 ver_ICBARTAuto2 = 0;
168 static int proto_ICBASystemProperties = -1;
169 static gint ett_ICBASystemProperties = -1;
170 static e_uuid_t uuid_ICBASystemProperties = { 0xcba00062, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
171 static guint16 ver_ICBASystemProperties = 0;
174 static gint ett_PBAddress = -1;
177 static const value_string cba_state_vals[] = {
178 { 0x00, "NonExistent" },
179 { 0x01, "Initializing" },
180 { 0x02, "Ready" },
181 { 0x03, "Operating" },
182 { 0x04, "Defect" },
183 { 0, NULL }
187 static const value_string cba_grouperror_vals[] = {
188 { 0x00, "NonAccessible" },
189 { 0x01, "Okay" },
190 { 0x02, "Problem" },
191 { 0x03, "Unknown" },
192 { 0x04, "MaintenanceRequired" },
193 { 0x05, "MaintenanceDemanded" },
194 { 0x06, "MaintenanceRequiredAndDemanded" },
195 { 0x07, "ProblemAndMaintenanceRequired" },
196 { 0x08, "ProblemAndMaintenanceDemanded" },
197 { 0x09, "ProblemAndMaintenanceRequiredAndDemanded" },
198 { 0, NULL }
201 static const value_string dcom_boolean_vals[] = {
202 { 0x00, "FALSE" },
203 { 0x01, "TRUE" },
204 { 0xffff, "TRUE" },
205 { 0, NULL }
211 static int
212 dissect_ICBABrowse_get_Count_resp(tvbuff_t *tvb, int offset,
213 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
215 guint32 u32Count;
216 guint32 u32HResult;
219 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
221 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
222 hf_cba_browse_count, &u32Count);
224 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
225 &u32HResult);
227 if (u32HResult) { /* !S_OK */
228 col_append_fstr(pinfo->cinfo, COL_INFO, "-> %s",
229 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
230 } else {
231 col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u -> S_OK", u32Count);
235 return offset;
239 static int
240 dissect_ICBABrowse_BrowseItems_rqst(tvbuff_t *tvb, int offset,
241 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
243 guint32 u32Offset;
244 guint32 u32MaxReturn;
247 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
249 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
250 hf_cba_browse_offset, &u32Offset);
251 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
252 hf_cba_browse_max_return, &u32MaxReturn);
254 col_append_fstr(pinfo->cinfo, COL_INFO, " Offset=%u MaxReturn=%u",
255 u32Offset, u32MaxReturn);
257 return offset;
261 static int
262 dissect_ICBABrowse_BrowseItems_resp(tvbuff_t *tvb, int offset,
263 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
265 guint32 u32Pointer;
266 guint32 u32HResult;
269 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
271 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
272 &u32Pointer);
273 if (u32Pointer) {
274 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_browse_item);
277 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
278 &u32Pointer);
279 if (u32Pointer) {
280 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_browse_data_type);
283 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
284 &u32Pointer);
285 if (u32Pointer) {
286 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_browse_access_right);
289 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
290 &u32HResult);
292 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
293 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
295 return offset;
299 static int
300 dissect_ICBABrowse2_get_Count2_rqst(tvbuff_t *tvb, int offset,
301 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
303 guint32 u32Selector;
306 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
308 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
309 hf_cba_browse_selector, &u32Selector);
311 col_append_fstr(pinfo->cinfo, COL_INFO, " Selector=%u",
312 u32Selector);
314 return offset;
319 static int
320 dissect_ICBABrowse2_BrowseItems2_rqst(tvbuff_t *tvb, int offset,
321 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
323 guint32 u32Selector;
324 guint32 u32Offset;
325 guint32 u32MaxReturn;
328 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
330 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
331 hf_cba_browse_selector, &u32Selector);
332 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
333 hf_cba_browse_offset, &u32Offset);
334 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
335 hf_cba_browse_max_return, &u32MaxReturn);
337 col_append_fstr(pinfo->cinfo, COL_INFO, " Sel=%u Offset=%u MaxReturn=%u",
338 u32Selector, u32Offset, u32MaxReturn);
340 return offset;
344 static int
345 dissect_ICBABrowse2_BrowseItems2_resp(tvbuff_t *tvb, int offset,
346 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
348 guint32 u32Pointer;
349 guint32 u32HResult;
352 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
354 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
355 &u32Pointer);
356 if (u32Pointer) {
357 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_browse_item);
360 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
361 &u32Pointer);
362 if (u32Pointer) {
363 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_browse_info1);
366 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
367 &u32Pointer);
368 if (u32Pointer) {
369 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_browse_info2);
372 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
373 &u32HResult);
375 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
376 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
378 return offset;
382 static int
383 dissect_ICBAPersist2_Save2_resp(tvbuff_t *tvb, int offset,
384 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
386 guint32 u32Pointer;
387 guint32 u32HResult;
390 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
392 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
393 &u32Pointer);
394 if (u32Pointer) {
395 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_save_ldev_name);
398 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
399 &u32Pointer);
400 if (u32Pointer) {
401 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep, hf_cba_save_result);
404 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
405 &u32HResult);
407 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
408 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
410 return offset;
415 static int
416 dissect_get_BSTR_resp(tvbuff_t *tvb, int offset,
417 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep, int hfindex)
419 gchar szStr[1000];
420 guint32 u32MaxStr = sizeof(szStr);
421 guint32 u32Pointer;
422 guint32 u32HResult;
425 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
427 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
428 &u32Pointer);
429 if (u32Pointer) {
430 offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, di, drep,
431 hfindex, szStr, u32MaxStr);
434 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
435 &u32HResult);
437 col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\" -> %s", szStr,
438 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
440 return offset;
444 static int
445 dissect_get_ProductionDate_resp(tvbuff_t *tvb, int offset,
446 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
448 guint32 u32HResult;
449 gdouble r8Date;
452 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
454 offset = dissect_dcom_DATE(tvb, offset, pinfo, tree, di, drep,
455 hf_cba_production_date, &r8Date);
457 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
458 &u32HResult);
460 col_append_fstr(pinfo->cinfo, COL_INFO, ": Date: %g -> %s",
461 r8Date,
462 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
464 return offset;
468 static int
469 dissect_get_SerialNo_resp(tvbuff_t *tvb, int offset,
470 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
472 guint32 u32HResult;
473 guint32 u32Pointer;
476 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
478 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
479 &u32Pointer);
480 if (u32Pointer) {
481 offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, di, drep,
482 hf_cba_serial_no);
485 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
486 &u32HResult);
488 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
489 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
491 return offset;
495 static int
496 dissect_ICBATime_get_Time_resp(tvbuff_t *tvb, int offset,
497 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
499 guint32 u32HResult;
500 gdouble r8Date;
503 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
505 offset = dissect_dcom_DATE(tvb, offset, pinfo, tree, di, drep,
506 hf_cba_time, &r8Date);
508 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
509 &u32HResult);
511 col_append_fstr(pinfo->cinfo, COL_INFO, ": Time: %g -> %s",
512 r8Date,
513 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
515 return offset;
519 static int
520 dissect_ICBATime_put_Time_rqst(tvbuff_t *tvb, int offset,
521 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
523 gdouble r8Date;
526 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
528 offset = dissect_dcom_DATE(tvb, offset, pinfo, tree, di, drep,
529 hf_cba_time, &r8Date);
531 return offset;
535 static int
536 dissect_get_Producer_resp(tvbuff_t *tvb, int offset,
537 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
540 return dissect_get_BSTR_resp(tvb, offset, pinfo, tree, di, drep, hf_cba_producer);
544 static int
545 dissect_get_Product_resp(tvbuff_t *tvb, int offset,
546 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
549 return dissect_get_BSTR_resp(tvb, offset, pinfo, tree, di, drep, hf_cba_product);
553 static int
554 dissect_ICBAPhysicalDevice_get_LogicalDevice_rqst(tvbuff_t *tvb, int offset,
555 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
557 guint32 u32Pointer;
558 gchar szStr[1000];
559 guint32 u32MaxStr = sizeof(szStr);
560 gchar *call;
563 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
565 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
566 &u32Pointer);
567 if (u32Pointer) {
568 offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, di, drep,
569 hf_cba_name, szStr, u32MaxStr);
572 if (strlen(szStr) > 0) {
573 call = wmem_strdup(wmem_file_scope(), szStr);
574 di->call_data->private_data = call;
577 col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\"", szStr);
579 return offset;
583 static int
584 dissect_ICBAPhysicalDevice_get_LogicalDevice_resp(tvbuff_t *tvb, int offset,
585 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
587 guint32 u32HResult;
588 gchar *ldev_name = (gchar *)di->call_data->private_data;
589 dcom_interface_t *pdev_interf;
590 dcom_interface_t *ldev_interf;
591 cba_pdev_t *pdev;
592 cba_ldev_t *ldev;
595 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
597 offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, di, drep, 0, &ldev_interf);
599 /* try to read the ldev name from the request */
600 if (ldev_name != NULL && ldev_interf != NULL) {
601 /* XXX - this is a hack to create a pdev interface */
602 /* as I currently don't understand the objref process for a root interface! */
603 pdev_interf = dcom_interface_new(pinfo, (const guint8 *)pinfo->net_dst.data, &uuid_ICBAPhysicalDevice, 0, 0, &di->call_data->object_uuid);
604 if (pdev_interf != NULL) {
605 pdev = cba_pdev_add(pinfo, (const guint8 *)pinfo->net_dst.data);
606 cba_pdev_link(pinfo, pdev, pdev_interf);
608 ldev = cba_ldev_add(pinfo, pdev, ldev_name);
609 cba_ldev_link(pinfo, ldev, ldev_interf);
613 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
614 &u32HResult);
616 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
617 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
619 return offset;
623 static int
624 dissect_ICBAPhysicalDevice2_Type_resp(tvbuff_t *tvb, int offset,
625 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
627 guint16 u16MultiApp;
628 guint16 u16PROFInetDCOMStack;
629 guint32 u32HResult;
632 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
634 offset = dissect_dcom_VARIANT_BOOL(tvb, offset, pinfo, tree, di, drep,
635 hf_cba_multi_app, &u16MultiApp);
637 offset = dissect_dcom_VARIANT_BOOL(tvb, offset, pinfo, tree, di, drep,
638 hf_cba_profinet_dcom_stack, &u16PROFInetDCOMStack);
640 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
641 &u32HResult);
643 col_append_fstr(pinfo->cinfo, COL_INFO, " App=%s Stack=%s -> %s",
644 (u16MultiApp) ? "Multi" : "Single",
645 (u16PROFInetDCOMStack) ? "PN-DCOM" : "MS-DCOM",
646 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
648 return offset;
652 static int
653 dissect_PROFInetRevision_resp(tvbuff_t *tvb, int offset,
654 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
656 guint16 u16Major;
657 guint16 u16Minor;
658 guint16 u16ServicePack;
659 guint16 u16Build;
660 guint32 u32HResult;
663 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
665 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
666 hf_cba_revision_major, &u16Major);
667 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
668 hf_cba_revision_minor, &u16Minor);
669 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
670 hf_cba_revision_service_pack, &u16ServicePack);
671 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
672 hf_cba_revision_build, &u16Build);
674 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
675 &u32HResult);
677 col_append_fstr(pinfo->cinfo, COL_INFO, " Revision=%u.%u.%u.%u -> %s",
678 u16Major, u16Minor, u16ServicePack, u16Build,
679 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
681 return offset;
685 static int
686 dissect_ICBAPhysicalDevice2_get_PDevStamp_resp(tvbuff_t *tvb, int offset,
687 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
689 guint32 u32PDevStamp;
690 guint32 u32HResult;
693 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
695 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
696 hf_cba_pdev_stamp, &u32PDevStamp);
698 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
699 &u32HResult);
701 col_append_fstr(pinfo->cinfo, COL_INFO, " PDevStamp=0x%x -> %s",
702 u32PDevStamp,
703 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
705 return offset;
709 static int
710 dissect_Revision_resp(tvbuff_t *tvb, int offset,
711 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
713 guint16 u16Major;
714 guint16 u16Minor;
715 guint32 u32HResult;
718 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
720 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
721 hf_cba_revision_major, &u16Major);
723 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
724 hf_cba_revision_minor, &u16Minor);
726 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
727 &u32HResult);
729 col_append_fstr(pinfo->cinfo, COL_INFO, ": %u.%u -> %s",
730 u16Major, u16Minor,
731 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
733 return offset;
737 static int
738 dissect_ICBALogicalDevice_get_Name_resp(tvbuff_t *tvb, int offset,
739 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
741 gchar szStr[1000];
742 guint32 u32MaxStr = sizeof(szStr);
743 guint32 u32Pointer;
744 guint32 u32HResult;
747 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
749 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
750 &u32Pointer);
751 if (u32Pointer) {
752 offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, di, drep,
753 hf_cba_name, szStr, u32MaxStr);
756 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
757 &u32HResult);
759 col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\" -> %s", szStr,
760 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
762 return offset;
766 static int
767 dissect_RTAuto_get_Name_resp(tvbuff_t *tvb, int offset,
768 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
771 return dissect_get_BSTR_resp(tvb, offset, pinfo, tree, di, drep, hf_cba_name);
775 static int
776 dissect_ICBALogicalDevice_get_ACCO_resp(tvbuff_t *tvb, int offset,
777 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
779 guint32 u32HResult;
780 dcom_interface_t *acco_interf;
781 cba_ldev_t *ldev;
784 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
786 offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, di, drep, 0, &acco_interf);
787 if (acco_interf == NULL) {
788 expert_add_info(pinfo, NULL, &ei_cba_acco_interface_pointer_unresolved);
791 ldev = cba_ldev_find(pinfo, pinfo->net_src.data, &di->call_data->object_uuid);
793 /* "crosslink" interface and its object */
794 if (ldev != NULL && acco_interf != NULL) {
795 cba_ldev_link_acco(pinfo, ldev, acco_interf);
798 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep, &u32HResult);
800 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
801 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
803 return offset;
807 static int
808 dissect_ICBALogicalDevice_get_RTAuto_resp(tvbuff_t *tvb, int offset,
809 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
811 guint32 u32HResult;
814 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
816 offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, di, drep, 0, NULL);
818 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep, &u32HResult);
820 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
821 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
823 return offset;
827 static int
828 dissect_ICBALogicalDevice_Get_RTAuto_rqst(tvbuff_t *tvb, int offset,
829 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
831 gchar szStr[1000];
832 guint32 u32MaxStr = sizeof(szStr);
833 guint32 u32Pointer;
836 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
838 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
839 &u32Pointer);
840 if (u32Pointer) {
841 offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, di, drep,
842 hf_cba_name, szStr, u32MaxStr);
845 col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\"", szStr);
847 return offset;
852 static int
853 dissect_ComponentInfo_resp(tvbuff_t *tvb, int offset,
854 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
856 gchar szStr[1000];
857 guint32 u32MaxStr = sizeof(szStr);
858 gchar szStr2[1000];
859 guint32 u32MaxStr2 = sizeof(szStr2);
860 guint32 u32HResult;
861 guint32 u32Pointer;
864 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
866 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
867 &u32Pointer);
868 if (u32Pointer) {
869 offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, di, drep,
870 hf_cba_component_id, szStr, u32MaxStr);
873 offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, di, drep,
874 &u32Pointer);
875 if (u32Pointer) {
876 offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, di, drep,
877 hf_cba_component_version, szStr2, u32MaxStr2);
880 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep, &u32HResult);
882 col_append_fstr(pinfo->cinfo, COL_INFO, ": ID=\"%s\" Version=\"%s\" -> %s",
883 szStr, szStr2,
884 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
886 return offset;
890 static void
891 dissect_PBAddressInfo(tvbuff_t *tvb, gint offset, packet_info *pinfo,
892 proto_tree *tree, dcerpc_info *di, guint8 *drep,
893 guint32 u32VarType _U_, guint32 u32ArraySize)
895 guint8 u8ID;
896 guint8 u8Addr;
897 proto_item *sub_item;
898 proto_tree *sub_tree;
901 while (u32ArraySize != 0) {
902 sub_item = proto_tree_add_item(tree, hf_cba_pbaddress, tvb, offset, 2, ENC_NA);
903 sub_tree = proto_item_add_subtree(sub_item, ett_PBAddress);
905 offset = dissect_dcom_BYTE(tvb, offset, pinfo, sub_tree, di, drep,
906 hf_cba_pbaddress_system_id, &u8ID);
907 offset = dissect_dcom_BYTE(tvb, offset, pinfo, sub_tree, di, drep,
908 hf_cba_pbaddress_address, &u8Addr);
909 u32ArraySize-=2;
911 proto_item_append_text(sub_item, ": ID=0x%x Addr=%u", u8ID, u8Addr);
912 col_append_fstr(pinfo->cinfo, COL_INFO, ", ID=0x%x Addr=%u",
913 u8ID, u8Addr);
918 static int
919 dissect_PBAddressInfo_resp(tvbuff_t *tvb, int offset,
920 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
922 guint32 u32HResult;
924 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
926 offset = dissect_dcom_SAFEARRAY(tvb, offset, pinfo, tree, di, drep, 0 /*hfindex _U_ */, dissect_PBAddressInfo);
928 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep, &u32HResult);
930 col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
931 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
933 return offset;
937 static int
938 dissect_Advise_rqst(tvbuff_t *tvb, int offset,
939 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
943 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
945 offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, di, drep, 0, NULL);
947 return offset;
951 static int
952 dissect_Advise_resp(tvbuff_t *tvb, int offset,
953 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
955 guint32 u32Cookie;
956 guint32 u32HResult;
959 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
961 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
962 hf_cba_cookie, &u32Cookie);
964 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
965 &u32HResult);
967 col_append_fstr(pinfo->cinfo, COL_INFO, ": Cookie=0x%x -> %s",
968 u32Cookie,
969 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
971 return offset;
975 static int
976 dissect_Unadvise_rqst(tvbuff_t *tvb, int offset,
977 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
979 guint32 u32Cookie;
982 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
984 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
985 hf_cba_cookie, &u32Cookie);
987 col_append_fstr(pinfo->cinfo, COL_INFO, ": Cookie=0x%x",
988 u32Cookie);
990 return offset;
994 static int
995 dissect_ICBAState_get_State_resp(tvbuff_t *tvb, int offset,
996 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
998 guint16 u16State;
999 guint32 u32HResult;
1002 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
1004 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
1005 hf_cba_state, &u16State);
1007 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
1008 &u32HResult);
1010 col_append_fstr(pinfo->cinfo, COL_INFO, ": State=%s -> %s",
1011 val_to_str(u16State, cba_state_vals, "Unknown (0x%08x)"),
1012 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
1014 return offset;
1018 static int
1019 dissect_ICBAStateEvent_OnStateChanged_rqst(tvbuff_t *tvb, int offset,
1020 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
1022 guint16 u16NewState;
1023 guint16 u16OldState;
1026 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
1028 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
1029 hf_cba_new_state, &u16NewState);
1031 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
1032 hf_cba_old_state, &u16OldState);
1034 col_append_fstr(pinfo->cinfo, COL_INFO, ": NewState=%s OldState=%s",
1035 val_to_str(u16NewState, cba_state_vals, "Unknown (0x%04x)"),
1036 val_to_str(u16OldState, cba_state_vals, "Unknown (0x%04x)") );
1038 return offset;
1042 static int
1043 dissect_ICBAGroupError_OnGroupErrorChanged_rqst(tvbuff_t *tvb, int offset,
1044 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
1046 guint16 u16NewGroupError;
1047 guint16 u16OldGroupError;
1050 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
1052 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
1053 hf_cba_new_grouperror, &u16NewGroupError);
1055 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
1056 hf_cba_old_grouperror, &u16OldGroupError);
1058 col_append_fstr(pinfo->cinfo, COL_INFO, ": NewGE=%s OldGE=%s",
1059 val_to_str(u16NewGroupError, cba_grouperror_vals, "Unknown (0x%04x)"),
1060 val_to_str(u16OldGroupError, cba_grouperror_vals, "Unknown (0x%04x)") );
1062 return offset;
1066 static int
1067 dissect_ICBAPhysicalDevicePCEvent_OnLogicalDeviceAdded_rqst(tvbuff_t *tvb, int offset,
1068 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
1070 guint32 u32Cookie;
1071 guint32 u32HResult;
1074 offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
1076 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
1077 hf_cba_cookie, &u32Cookie);
1079 offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, di, drep, 0, NULL);
1081 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
1082 &u32HResult);
1084 col_append_fstr(pinfo->cinfo, COL_INFO, ": Cookie=0x%x %s",
1085 u32Cookie,
1086 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
1088 return offset;
1092 static int
1093 dissect_ICBAGroupError_GroupError_resp(tvbuff_t *tvb, int offset,
1094 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
1096 guint16 u16GroupError;
1097 guint32 u32Cookie;
1098 guint32 u32HResult;
1101 offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
1103 offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, di, drep,
1104 hf_cba_grouperror, &u16GroupError);
1106 offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, di, drep,
1107 hf_cba_cookie, &u32Cookie);
1109 offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, di, drep,
1110 &u32HResult);
1112 col_append_fstr(pinfo->cinfo, COL_INFO, ": GroupError=%s Cookie=0x%x -> %s",
1113 val_to_str(u16GroupError, cba_grouperror_vals, "Unknown (0x%08x)"),
1114 u32Cookie,
1115 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
1117 return offset;
1121 /* sub dissector table of ICBAPhysicalDevice / ICBAPhysicalDevice2 interface */
1122 static dcerpc_sub_dissector ICBAPhysicalDevice_dissectors[] = {
1123 { 0, "QueryInterface", NULL, NULL },
1124 { 1, "AddRef", NULL, NULL },
1125 { 2, "Release", NULL, NULL },
1127 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1128 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1129 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1130 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1132 { 7, "get_Producer", dissect_dcom_simple_rqst, dissect_get_Producer_resp },
1133 { 8, "get_Product", dissect_dcom_simple_rqst, dissect_get_Product_resp },
1134 { 9, "get_SerialNo", dissect_dcom_simple_rqst, dissect_get_SerialNo_resp },
1135 {10, "get_ProductionDate", dissect_dcom_simple_rqst, dissect_get_ProductionDate_resp },
1136 {11, "Revision", dissect_dcom_simple_rqst, dissect_Revision_resp },
1137 {12, "get_LogicalDevice", dissect_ICBAPhysicalDevice_get_LogicalDevice_rqst, dissect_ICBAPhysicalDevice_get_LogicalDevice_resp },
1138 /* stage 2 */
1139 {13, "Type", dissect_dcom_simple_rqst, dissect_ICBAPhysicalDevice2_Type_resp },
1140 {14, "PROFInetRevision", dissect_dcom_simple_rqst, dissect_PROFInetRevision_resp },
1141 {15, "PDevStamp", dissect_dcom_simple_rqst, dissect_ICBAPhysicalDevice2_get_PDevStamp_resp },
1142 { 0, NULL, NULL, NULL },
1146 /* sub dissector table of ICBABrowse / ICBABrowse2 interface */
1147 static dcerpc_sub_dissector ICBABrowse_dissectors[] = {
1148 { 0, "QueryInterface", NULL, NULL },
1149 { 1, "AddRef", NULL, NULL },
1150 { 2, "Release", NULL, NULL },
1152 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1153 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1154 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1155 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1157 { 7, "get_Count", dissect_dcom_simple_rqst, dissect_ICBABrowse_get_Count_resp },
1158 { 8, "BrowseItems", dissect_ICBABrowse_BrowseItems_rqst, dissect_ICBABrowse_BrowseItems_resp },
1159 /* stage 2 */
1160 { 9, "get_Count2", dissect_ICBABrowse2_get_Count2_rqst, dissect_ICBABrowse_get_Count_resp },
1161 {10, "BrowseItems2", dissect_ICBABrowse2_BrowseItems2_rqst, dissect_ICBABrowse2_BrowseItems2_resp },
1162 { 0, NULL, NULL, NULL },
1166 /* sub dissector table of ICBAPersist / ICBAPersist2 interface */
1167 static dcerpc_sub_dissector ICBAPersist_dissectors[] = {
1168 { 0, "QueryInterface", NULL, NULL },
1169 { 1, "AddRef", NULL, NULL },
1170 { 2, "Release", NULL, NULL },
1172 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1173 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1174 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1175 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1177 { 7, "Save", dissect_dcom_simple_rqst, dissect_dcom_simple_resp },
1178 /* stage 2 */
1179 { 8, "Save2", dissect_dcom_simple_rqst, dissect_ICBAPersist2_Save2_resp },
1180 { 0, NULL, NULL, NULL },
1184 /* sub dissector table of ICBAPhysicalDevicePC interface */
1185 /* (local COM interface, not to be called over network) */
1186 static dcerpc_sub_dissector ICBAPhysicalDevicePC_dissectors[] = {
1187 { 0, "QueryInterface", NULL, NULL },
1188 { 1, "AddRef", NULL, NULL },
1189 { 2, "Release", NULL, NULL },
1191 { 3, "AddLogicalDevice", dissect_Advise_rqst, dissect_Advise_resp },
1192 { 4, "RemoveLogicalDevice", dissect_Unadvise_rqst, dissect_dcom_simple_resp },
1193 { 5, "AdvisePDevPC", dissect_Advise_rqst, dissect_Advise_resp },
1194 { 6, "UnadvisePDevPC", dissect_Unadvise_rqst, dissect_dcom_simple_resp },
1195 /* stage 2 */
1196 { 7, "RegisterApplication", NULL, NULL },
1197 { 8, "UnRegisterApplication", NULL, NULL },
1198 { 9, "AddLogicalDevice2", NULL, NULL },
1199 { 0, NULL, NULL, NULL },
1203 /* sub dissector table of ICBAPhysicalDevicePCEvent interface */
1204 static dcerpc_sub_dissector ICBAPhysicalDevicePCEvent_dissectors[] = {
1205 { 0, "QueryInterface", NULL, NULL },
1206 { 1, "AddRef", NULL, NULL },
1207 { 2, "Release", NULL, NULL },
1209 { 3, "OnLogicalDeviceAdded", dissect_ICBAPhysicalDevicePCEvent_OnLogicalDeviceAdded_rqst, dissect_dcom_simple_resp },
1210 { 4, "OnLogicalDeviceRemoved", dissect_Unadvise_rqst, dissect_dcom_simple_resp },
1211 { 0, NULL, NULL, NULL },
1215 /* sub dissector table of ICBALogicalDevice / ICBALogicalDevice2 interface */
1216 static dcerpc_sub_dissector ICBALogicalDevice_dissectors[] = {
1217 { 0, "QueryInterface", NULL, NULL },
1218 { 1, "AddRef", NULL, NULL },
1219 { 2, "Release", NULL, NULL },
1221 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1222 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1223 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1224 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1226 { 7, "get_Name", dissect_dcom_simple_rqst, dissect_ICBALogicalDevice_get_Name_resp },
1227 { 8, "get_Producer", dissect_dcom_simple_rqst, dissect_get_Producer_resp },
1228 { 9, "get_Product", dissect_dcom_simple_rqst, dissect_get_Product_resp },
1229 {10, "get_SerialNo", dissect_dcom_simple_rqst, dissect_get_SerialNo_resp },
1230 {11, "get_ProductionDate", dissect_dcom_simple_rqst, dissect_get_ProductionDate_resp },
1231 {12, "Revision", dissect_dcom_simple_rqst, dissect_Revision_resp },
1232 {13, "get_ACCO", dissect_dcom_simple_rqst, dissect_ICBALogicalDevice_get_ACCO_resp },
1233 {14, "get_RTAuto", dissect_ICBALogicalDevice_Get_RTAuto_rqst, dissect_ICBALogicalDevice_get_RTAuto_resp },
1234 /* stage 2 */
1235 {15, "PROFInetRevision", dissect_dcom_simple_rqst, dissect_PROFInetRevision_resp },
1236 {16, "ComponentInfo", dissect_dcom_simple_rqst, dissect_ComponentInfo_resp },
1237 {17, "PBAddressInfo", dissect_dcom_simple_rqst, dissect_PBAddressInfo_resp },
1238 { 0, NULL, NULL, NULL },
1242 /* sub dissector table of ICBAState interface */
1243 static dcerpc_sub_dissector ICBAState_dissectors[] = {
1244 { 0, "QueryInterface", NULL, NULL },
1245 { 1, "AddRef", NULL, NULL },
1246 { 2, "Release", NULL, NULL },
1248 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1249 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1250 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1251 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1253 { 7, "get_State", dissect_dcom_simple_rqst, dissect_ICBAState_get_State_resp },
1254 { 8, "Activate", dissect_dcom_simple_rqst, dissect_dcom_simple_resp },
1255 { 9, "Deactivate", dissect_dcom_simple_rqst, dissect_dcom_simple_resp },
1256 {10, "Reset", dissect_dcom_simple_rqst, dissect_dcom_simple_resp },
1257 {11, "AdviseState", dissect_Advise_rqst, dissect_Advise_resp },
1258 {12, "UnadviseState", dissect_Unadvise_rqst, dissect_dcom_simple_resp },
1259 { 0, NULL, NULL, NULL },
1263 /* sub dissector table of ICBAStateEvent interface */
1264 static dcerpc_sub_dissector ICBAStateEvent_dissectors[] = {
1265 { 0, "QueryInterface", NULL, NULL },
1266 { 1, "AddRef", NULL, NULL },
1267 { 2, "Release", NULL, NULL },
1269 { 3, "OnStateChanged", dissect_ICBAStateEvent_OnStateChanged_rqst, dissect_dcom_simple_resp },
1270 { 0, NULL, NULL, NULL },
1274 /* sub dissector table of ICBATime interface */
1275 static dcerpc_sub_dissector ICBATime_dissectors[] = {
1276 { 0, "QueryInterface", NULL, NULL },
1277 { 1, "AddRef", NULL, NULL },
1278 { 2, "Release", NULL, NULL },
1280 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1281 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1282 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1283 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1285 { 7, "get_Time", dissect_dcom_simple_rqst, dissect_ICBATime_get_Time_resp },
1286 { 8, "put_Time", dissect_ICBATime_put_Time_rqst, dissect_dcom_simple_resp },
1287 { 0, NULL, NULL, NULL },
1291 /* sub dissector table of ICBAGroupError interface */
1292 static dcerpc_sub_dissector ICBAGroupError_dissectors[] = {
1293 { 0, "QueryInterface", NULL, NULL },
1294 { 1, "AddRef", NULL, NULL },
1295 { 2, "Release", NULL, NULL },
1297 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1298 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1299 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1300 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1302 { 7, "GroupError", dissect_dcom_simple_rqst, dissect_ICBAGroupError_GroupError_resp },
1303 { 8, "AdviseGroupError", dissect_Advise_rqst, dissect_Advise_resp },
1304 { 9, "UnadviseGroupError", dissect_Unadvise_rqst, dissect_dcom_simple_resp },
1305 { 0, NULL, NULL, NULL },
1309 /* sub dissector table of ICBAGroupErrorEvent interface */
1310 static dcerpc_sub_dissector ICBAGroupErrorEvent_dissectors[] = {
1311 { 0, "QueryInterface", NULL, NULL },
1312 { 1, "AddRef", NULL, NULL },
1313 { 2, "Release", NULL, NULL },
1315 { 3, "OnGroupErrorChanged", dissect_ICBAGroupError_OnGroupErrorChanged_rqst, dissect_dcom_simple_resp },
1316 { 0, NULL, NULL, NULL },
1320 /* sub dissector table of ICBARTAuto interface */
1321 static dcerpc_sub_dissector ICBARTAuto_dissectors[] = {
1322 { 0, "QueryInterface", NULL, NULL },
1323 { 1, "AddRef", NULL, NULL },
1324 { 2, "Release", NULL, NULL },
1326 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1327 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1328 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1329 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1331 { 7, "get_Name", dissect_dcom_simple_rqst, dissect_RTAuto_get_Name_resp },
1332 { 8, "Revision", dissect_dcom_simple_rqst, dissect_Revision_resp },
1334 /* stage 2 */
1335 { 9, "ComponentInfo", dissect_dcom_simple_rqst, dissect_ComponentInfo_resp },
1336 { 0, NULL, NULL, NULL },
1340 /* the interface ICBASystemProperties will NOT be seen on the ethernet */
1341 /* sub dissector table of ICBASystemProperties interface (stage 2 only) */
1342 /* (usually not called over network, no dissecting needed) */
1343 static dcerpc_sub_dissector ICBASystemProperties_dissectors[] = {
1344 { 0, "QueryInterface", NULL, NULL },
1345 { 1, "AddRef", NULL, NULL },
1346 { 2, "Release", NULL, NULL },
1348 { 3, "GetTypeInfoCount", dissect_dcom_simple_rqst, dissect_IDispatch_GetTypeInfoCount_resp },
1349 { 4, "GetTypeInfo", dissect_IDispatch_GetTypeInfo_rqst, dissect_IDispatch_GetTypeInfo_resp },
1350 { 5, "GetIDsOfNames", dissect_IDispatch_GetIDsOfNames_rqst, dissect_IDispatch_GetIDsOfNames_resp },
1351 { 6, "Invoke", dissect_IDispatch_Invoke_rqst, dissect_IDispatch_Invoke_resp },
1353 { 7, "StateCollection", dissect_dcom_simple_rqst, NULL },
1354 { 8, "StampCollection", dissect_dcom_simple_rqst, NULL },
1355 { 0, NULL, NULL, NULL },
1359 static void cba_reinit( void) {
1360 cba_pdevs = NULL;
1364 /* register protocol */
1365 void
1366 proto_register_dcom_cba (void)
1368 static hf_register_info hf_cba_browse_array[] = {
1369 { &hf_cba_browse_count,
1370 { "Count", "cba.browse.count",
1371 FT_UINT32, BASE_DEC, NULL, 0x0,
1372 NULL, HFILL }},
1374 { &hf_cba_browse_offset,
1375 { "Offset", "cba.browse.offset",
1376 FT_UINT32, BASE_DEC, NULL, 0x0,
1377 NULL, HFILL }},
1379 { &hf_cba_browse_max_return,
1380 { "MaxReturn", "cba.browse.max_return",
1381 FT_UINT32, BASE_DEC, NULL, 0x0,
1382 NULL, HFILL }},
1384 { &hf_cba_browse_item,
1385 { "ItemNames", "cba.browse.item",
1386 FT_NONE, BASE_NONE, NULL, 0x0,
1387 NULL, HFILL }},
1389 { &hf_cba_browse_data_type,
1390 { "DataTypes", "cba.browse.data_type",
1391 FT_NONE, BASE_NONE, NULL, 0x0,
1392 NULL, HFILL }},
1394 { &hf_cba_browse_access_right,
1395 { "AccessRights", "cba.browse.access_right",
1396 FT_NONE, BASE_NONE, NULL, 0x0,
1397 NULL, HFILL }},
1399 { &hf_cba_browse_selector,
1400 { "Selector", "cba.browse.selector",
1401 FT_UINT32, BASE_DEC, NULL, 0x0,
1402 NULL, HFILL }},
1404 { &hf_cba_browse_info1,
1405 { "Info1", "cba.browse.info1",
1406 FT_NONE, BASE_NONE, NULL, 0x0,
1407 NULL, HFILL }},
1409 { &hf_cba_browse_info2,
1410 { "Info2", "cba.browse.info2",
1411 FT_NONE, BASE_NONE, NULL, 0x0,
1412 NULL, HFILL }},
1417 static hf_register_info hf_cba_pdev_array[] = {
1418 { &hf_cba_revision_major,
1419 { "Major", "cba.revision_major",
1420 FT_UINT16, BASE_DEC, NULL, 0x0,
1421 NULL, HFILL }},
1423 { &hf_cba_revision_minor,
1424 { "Minor", "cba.revision_minor",
1425 FT_UINT16, BASE_DEC, NULL, 0x0,
1426 NULL, HFILL }},
1428 { &hf_cba_revision_service_pack,
1429 { "ServicePack", "cba.revision_service_pack",
1430 FT_UINT16, BASE_DEC, NULL, 0x0,
1431 NULL, HFILL }},
1433 { &hf_cba_revision_build,
1434 { "Build", "cba_revision_build",
1435 FT_UINT16, BASE_DEC, NULL, 0x0,
1436 NULL, HFILL }},
1438 { &hf_cba_producer,
1439 { "Producer", "cba.producer",
1440 FT_STRING, BASE_NONE, NULL, 0x0,
1441 NULL, HFILL }},
1443 { &hf_cba_product,
1444 { "Product", "cba.product",
1445 FT_STRING, BASE_NONE, NULL, 0x0,
1446 NULL, HFILL }},
1448 { &hf_cba_multi_app,
1449 { "MultiApp", "cba.multi_app",
1450 FT_UINT16, BASE_HEX, VALS(dcom_boolean_vals), 0x0,
1451 NULL, HFILL }},
1453 { &hf_cba_profinet_dcom_stack,
1454 { "PROFInetDCOMStack", "cba.profinet_dcom_stack",
1455 FT_UINT16, BASE_HEX, VALS(dcom_boolean_vals), 0x0,
1456 NULL, HFILL }},
1458 { &hf_cba_pdev_stamp,
1459 { "PDevStamp", "cba.pdev_stamp",
1460 FT_UINT32, BASE_HEX, NULL, 0x0,
1461 NULL, HFILL }},
1463 { &hf_cba_save_ldev_name,
1464 { "LDevName", "cba.save_ldev_name",
1465 FT_NONE, BASE_NONE, NULL, 0x0,
1466 NULL, HFILL }},
1468 { &hf_cba_save_result,
1469 { "PartialResult", "cba.save_result",
1470 FT_NONE, BASE_NONE, NULL, 0x0,
1471 NULL, HFILL }},
1475 static hf_register_info hf_cba_ldev_array[] = {
1476 { &hf_cba_name,
1477 { "Name", "cba.name",
1478 FT_STRING, BASE_NONE, NULL, 0x0,
1479 NULL, HFILL }},
1481 { &hf_cba_component_id,
1482 { "ComponentID", "cba.component_id",
1483 FT_STRING, BASE_NONE, NULL, 0x0,
1484 NULL, HFILL }},
1486 { &hf_cba_component_version,
1487 { "Version", "cba.component_version",
1488 FT_STRING, BASE_NONE, NULL, 0x0,
1489 NULL, HFILL }},
1491 { &hf_cba_pbaddress,
1492 { "PROFIBUS Address", "cba.pbaddress",
1493 FT_NONE, BASE_NONE, NULL, 0x0,
1494 NULL, HFILL }},
1496 { &hf_cba_pbaddress_system_id,
1497 { "SystemID", "cba.pbaddress.system_id",
1498 FT_UINT8, BASE_HEX, NULL, 0x0,
1499 NULL, HFILL }},
1501 { &hf_cba_pbaddress_address,
1502 { "Address", "cba.pbaddress.address",
1503 FT_UINT8, BASE_DEC, NULL, 0x0,
1504 NULL, HFILL }},
1508 static hf_register_info hf_cba_array[] = {
1509 { &hf_cba_opnum,
1510 { "Operation", "cba.opnum",
1511 FT_UINT16, BASE_DEC, NULL, 0x0,
1512 NULL, HFILL }},
1514 { &hf_cba_production_date,
1515 { "ProductionDate", "cba.production_date",
1516 FT_DOUBLE, BASE_NONE, NULL, 0x0,
1517 NULL, HFILL }},
1519 { &hf_cba_time,
1520 { "Time", "cba.time",
1521 FT_DOUBLE, BASE_NONE, NULL, 0x0,
1522 NULL, HFILL }},
1524 { &hf_cba_serial_no,
1525 { "SerialNo", "cba.serial_no",
1526 FT_NONE, BASE_NONE, NULL, 0x0,
1527 NULL, HFILL }},
1529 { &hf_cba_state,
1530 { "State", "cba.state",
1531 FT_UINT16, BASE_HEX, VALS(cba_state_vals), 0x0,
1532 NULL, HFILL }},
1534 { &hf_cba_new_state,
1535 { "NewState", "cba.state_new",
1536 FT_UINT16, BASE_HEX, VALS(cba_state_vals), 0x0,
1537 NULL, HFILL }},
1539 { &hf_cba_old_state,
1540 { "OldState", "cba.state_old",
1541 FT_UINT16, BASE_HEX, VALS(cba_state_vals), 0x0,
1542 NULL, HFILL }},
1544 { &hf_cba_cookie,
1545 { "Cookie", "cba.cookie",
1546 FT_UINT32, BASE_HEX, NULL, 0x0,
1547 NULL, HFILL }},
1549 { &hf_cba_grouperror,
1550 { "GroupError", "cba.grouperror",
1551 FT_UINT16, BASE_HEX, VALS(cba_grouperror_vals), 0x0,
1552 NULL, HFILL }},
1554 { &hf_cba_new_grouperror,
1555 { "NewGroupError", "cba.grouperror_new",
1556 FT_UINT16, BASE_HEX, VALS(cba_grouperror_vals), 0x0,
1557 NULL, HFILL }},
1559 { &hf_cba_old_grouperror,
1560 { "OldGroupError", "cba.grouperror_old",
1561 FT_UINT16, BASE_HEX, VALS(cba_grouperror_vals), 0x0,
1562 NULL, HFILL }},
1566 static gint *ett_cba[] = {
1567 &ett_ICBAPhysicalDevice,
1568 &ett_ICBABrowse,
1569 &ett_ICBAPhysicalDevicePC,
1570 &ett_ICBAPhysicalDevicePCEvent,
1571 &ett_ICBAPersist,
1572 &ett_ICBALogicalDevice,
1573 &ett_ICBAState,
1574 &ett_ICBAStateEvent,
1575 &ett_ICBATime,
1576 &ett_ICBAGroupError,
1577 &ett_ICBAGroupErrorEvent,
1578 &ett_ICBARTAuto,
1579 &ett_ICBASystemProperties,
1580 &ett_PBAddress
1583 static ei_register_info ei[] = {
1584 { &ei_cba_acco_interface_pointer_unresolved, { "cba.acco.interface_pointer_unresolved", PI_UNDECODED, PI_WARN, "LDev_get_ACCO: can't resolve ACCO interface pointer", EXPFILL }},
1587 expert_module_t* expert_cba_acco;
1589 proto_register_subtree_array (ett_cba, array_length (ett_cba));
1591 proto_ICBAPhysicalDevice = proto_register_protocol ("ICBAPhysicalDevice", "ICBAPDev", "cba_pdev");
1592 proto_register_field_array(proto_ICBAPhysicalDevice, hf_cba_pdev_array, array_length(hf_cba_pdev_array));
1594 /* XXX - just pick a protocol to register the expert info in */
1595 expert_cba_acco = expert_register_protocol(proto_ICBAPhysicalDevice);
1596 expert_register_field_array(expert_cba_acco, ei, array_length(ei));
1598 proto_ICBAPhysicalDevice2 = proto_register_protocol ("ICBAPhysicalDevice2", "ICBAPDev2", "cba_pdev2");
1600 proto_ICBABrowse = proto_register_protocol ("ICBABrowse", "ICBABrowse", "cba_browse");
1601 proto_register_field_array(proto_ICBABrowse, hf_cba_array, array_length(hf_cba_array));
1602 proto_register_field_array(proto_ICBABrowse, hf_cba_browse_array, array_length(hf_cba_browse_array));
1604 proto_ICBABrowse2 = proto_register_protocol ("ICBABrowse2", "ICBABrowse2", "cba_browse2");
1606 proto_ICBAPhysicalDevicePC = proto_register_protocol ("ICBAPhysicalDevicePC", "ICBAPDevPC", "cba_pdev_pc");
1608 proto_ICBAPhysicalDevicePCEvent = proto_register_protocol ("ICBAPhysicalDevicePCEvent", "ICBAPDevPCEvent", "cba_pdev_pc_event");
1610 proto_ICBAPersist = proto_register_protocol ("ICBAPersist", "ICBAPersist", "cba_persist");
1612 proto_ICBAPersist2 = proto_register_protocol ("ICBAPersist2", "ICBAPersist2", "cba_persist2");
1614 proto_ICBALogicalDevice = proto_register_protocol ("ICBALogicalDevice", "ICBALDev", "cba_ldev");
1615 proto_register_field_array(proto_ICBAPhysicalDevice, hf_cba_ldev_array, array_length(hf_cba_ldev_array));
1617 proto_ICBALogicalDevice2 = proto_register_protocol ("ICBALogicalDevice2", "ICBALDev2", "cba_ldev2");
1619 proto_ICBAState = proto_register_protocol ("ICBAState", "ICBAState", "cba_state");
1621 proto_ICBAStateEvent = proto_register_protocol ("ICBAStateEvent", "ICBAStateEvent", "cba_state_event");
1623 proto_ICBATime = proto_register_protocol ("ICBATime", "ICBATime", "cba_time");
1625 proto_ICBAGroupError = proto_register_protocol ("ICBAGroupError", "ICBAGErr", "cba_grouperror");
1627 proto_ICBAGroupErrorEvent = proto_register_protocol ("ICBAGroupErrorEvent", "ICBAGErrEvent", "cba_grouperror_event");
1629 proto_ICBARTAuto = proto_register_protocol ("ICBARTAuto", "ICBARTAuto", "cba_rtauto");
1631 proto_ICBARTAuto2 = proto_register_protocol ("ICBARTAuto2", "ICBARTAuto2", "cba_rtauto2");
1633 proto_ICBASystemProperties = proto_register_protocol ("ICBASystemProperties", "ICBASysProp", "cba_sysprop");
1635 register_init_routine(cba_reinit);
1639 /* handoff protocol */
1640 void
1641 proto_reg_handoff_dcom_cba (void)
1643 /* Register the CBA class ID */
1644 guids_add_uuid(&uuid_coclass_CBAPhysicalDevice, "CBA");
1646 /* Register the interfaces */
1647 dcerpc_init_uuid(proto_ICBAPhysicalDevice, ett_ICBAPhysicalDevice,
1648 &uuid_ICBAPhysicalDevice, ver_ICBAPhysicalDevice,
1649 ICBAPhysicalDevice_dissectors, hf_cba_opnum);
1651 dcerpc_init_uuid(proto_ICBAPhysicalDevice2, ett_ICBAPhysicalDevice,
1652 &uuid_ICBAPhysicalDevice2, ver_ICBAPhysicalDevice2,
1653 ICBAPhysicalDevice_dissectors, hf_cba_opnum);
1655 dcerpc_init_uuid(proto_ICBABrowse, ett_ICBABrowse,
1656 &uuid_ICBABrowse, ver_ICBABrowse,
1657 ICBABrowse_dissectors, hf_cba_opnum);
1659 dcerpc_init_uuid(proto_ICBABrowse2, ett_ICBABrowse,
1660 &uuid_ICBABrowse2, ver_ICBABrowse2,
1661 ICBABrowse_dissectors, hf_cba_opnum);
1663 dcerpc_init_uuid(proto_ICBAPhysicalDevicePC, ett_ICBAPhysicalDevicePC,
1664 &uuid_ICBAPhysicalDevicePC, ver_ICBAPhysicalDevicePC,
1665 ICBAPhysicalDevicePC_dissectors, hf_cba_opnum);
1667 dcerpc_init_uuid(proto_ICBAPhysicalDevicePCEvent, ett_ICBAPhysicalDevicePCEvent,
1668 &uuid_ICBAPhysicalDevicePCEvent, ver_ICBAPhysicalDevicePCEvent,
1669 ICBAPhysicalDevicePCEvent_dissectors, hf_cba_opnum);
1671 dcerpc_init_uuid(proto_ICBAPersist, ett_ICBAPersist,
1672 &uuid_ICBAPersist, ver_ICBAPersist,
1673 ICBAPersist_dissectors, hf_cba_opnum);
1675 dcerpc_init_uuid(proto_ICBAPersist2, ett_ICBAPersist,
1676 &uuid_ICBAPersist2, ver_ICBAPersist2,
1677 ICBAPersist_dissectors, hf_cba_opnum);
1679 dcerpc_init_uuid(proto_ICBALogicalDevice, ett_ICBALogicalDevice,
1680 &uuid_ICBALogicalDevice, ver_ICBALogicalDevice,
1681 ICBALogicalDevice_dissectors, hf_cba_opnum);
1683 dcerpc_init_uuid(proto_ICBALogicalDevice2, ett_ICBALogicalDevice,
1684 &uuid_ICBALogicalDevice2, ver_ICBALogicalDevice2,
1685 ICBALogicalDevice_dissectors, hf_cba_opnum);
1687 dcerpc_init_uuid(proto_ICBAState, ett_ICBAState,
1688 &uuid_ICBAState, ver_ICBAState,
1689 ICBAState_dissectors, hf_cba_opnum);
1691 dcerpc_init_uuid(proto_ICBAStateEvent, ett_ICBAStateEvent,
1692 &uuid_ICBAStateEvent, ver_ICBAStateEvent,
1693 ICBAStateEvent_dissectors, hf_cba_opnum);
1695 dcerpc_init_uuid(proto_ICBATime, ett_ICBATime,
1696 &uuid_ICBATime, ver_ICBATime,
1697 ICBATime_dissectors, hf_cba_opnum);
1699 dcerpc_init_uuid(proto_ICBAGroupError, ett_ICBAGroupError,
1700 &uuid_ICBAGroupError, ver_ICBAGroupError,
1701 ICBAGroupError_dissectors, hf_cba_opnum);
1703 dcerpc_init_uuid(proto_ICBAGroupErrorEvent, ett_ICBAGroupErrorEvent,
1704 &uuid_ICBAGroupErrorEvent, ver_ICBAGroupErrorEvent,
1705 ICBAGroupErrorEvent_dissectors, hf_cba_opnum);
1707 dcerpc_init_uuid(proto_ICBARTAuto, ett_ICBARTAuto,
1708 &uuid_ICBARTAuto, ver_ICBARTAuto,
1709 ICBARTAuto_dissectors, hf_cba_opnum);
1711 dcerpc_init_uuid(proto_ICBARTAuto2, ett_ICBARTAuto,
1712 &uuid_ICBARTAuto2, ver_ICBARTAuto2,
1713 ICBARTAuto_dissectors, hf_cba_opnum);
1715 dcerpc_init_uuid(proto_ICBASystemProperties, ett_ICBASystemProperties,
1716 &uuid_ICBASystemProperties, ver_ICBASystemProperties,
1717 ICBASystemProperties_dissectors, hf_cba_opnum);