1 /* packet-dcerpc-browser.c
2 * Routines for DCERPC Browser packet disassembly
3 * Copyright 2001, Ronnie Sahlberg
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 /* The IDL file for this interface can be extracted by grepping for idl
35 #include <epan/packet.h>
36 #include "packet-dcerpc.h"
37 #include "packet-dcerpc-browser.h"
38 #include "packet-dcerpc-nt.h"
39 #include "packet-windows-common.h"
41 static int proto_dcerpc_browser = -1;
42 static int hf_browser_opnum = -1;
43 static int hf_browser_rc = -1;
44 static int hf_browser_unknown_long = -1;
45 static int hf_browser_unknown_hyper = -1;
46 static int hf_browser_unknown_bytes = -1;
47 static int hf_browser_unknown_string = -1;
50 static gint ett_dcerpc_browser = -1;
54 dissect_browser_long_pointer(tvbuff_t *tvb, int offset,
55 packet_info *pinfo, proto_tree *tree,
60 di=pinfo->private_data;
61 offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
69 IDL [ uuid(6bffd098-a112-3610-9833-012892020162),
71 IDL implicit_handle(handle_t rpc_binding)
72 IDL ] interface browser
76 static e_uuid_t uuid_dcerpc_browser = {
77 0x6bffd098, 0xa112, 0x3610,
78 { 0x98, 0x33, 0x01, 0x28, 0x92, 0x02, 0x01, 0x62 }
81 static guint16 ver_dcerpc_browser = 0;
87 IDL [size_is(element_7)] [unique] byte *element_8;
91 dissect_browser_TYPE_4_data(tvbuff_t *tvb, int offset,
92 packet_info *pinfo, proto_tree *tree,
97 int old_offset = offset;
99 di=pinfo->private_data;
100 if(di->conformant_run){
101 /* this call is to make wireshark eat the array header for the conformant run */
102 offset =dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, NULL);
106 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
107 hf_browser_unknown_long, &len);
109 proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len,
112 if (offset < old_offset)
113 THROW(ReportedBoundsError);
118 dissect_browser_TYPE_4(tvbuff_t *tvb, int offset,
119 packet_info *pinfo, proto_tree *tree,
122 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
123 hf_browser_unknown_long, NULL);
125 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
126 dissect_browser_TYPE_4_data, NDR_POINTER_UNIQUE,
127 "unknown TYPE_4", -1);
136 IDL [size_is(element_5)] [unique] byte *element_6;
140 dissect_browser_TYPE_3_data(tvbuff_t *tvb, int offset,
141 packet_info *pinfo, proto_tree *tree,
146 int old_offset = offset;
148 di=pinfo->private_data;
149 if(di->conformant_run){
150 /* this call is to make wireshark eat the array header for the conformant run */
151 offset =dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, NULL);
156 /* this is really the length of the encoded data */
157 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
158 hf_browser_unknown_long, &len);
159 proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len,
162 if (offset < old_offset)
163 THROW(ReportedBoundsError);
168 dissect_browser_TYPE_3(tvbuff_t *tvb, int offset,
169 packet_info *pinfo, proto_tree *tree,
172 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
173 hf_browser_unknown_long, NULL);
175 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
176 dissect_browser_TYPE_3_data, NDR_POINTER_UNIQUE,
177 "unknown TYPE_3", -1);
185 IDL typedef [switch_type(long)] union {
186 IDL [case(100)] [unique] TYPE_3 *element_3;
187 IDL [case(101)] [unique] TYPE_4 *element_4;
191 dissect_browser_TYPE_2(tvbuff_t *tvb, int offset,
192 packet_info *pinfo, proto_tree *tree,
197 /* this is really the union switch arm */
198 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
199 hf_browser_unknown_long, &level);
205 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
206 dissect_browser_TYPE_3, NDR_POINTER_UNIQUE,
207 "unknown TYPE_3", -1);
210 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
211 dissect_browser_TYPE_4, NDR_POINTER_UNIQUE,
212 "unknown TYPE_4", -1);
223 IDL TYPE_2 element_2;
227 dissect_browser_TYPE_1(tvbuff_t *tvb, int offset,
228 packet_info *pinfo, proto_tree *tree,
231 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
232 hf_browser_unknown_long, NULL);
234 offset = dissect_browser_TYPE_2(tvb, offset, pinfo, tree, drep);
242 IDL long BrowserrServerEnum(
243 IDL [in] [unique] [string] wchar_t *element_9,
244 IDL [in] [unique] [string] wchar_t *element_10,
245 IDL [in] [unique] [string] wchar_t *element_11,
246 IDL [in,out] [ref] TYPE_1 *element_12,
247 IDL [in] long element_13,
248 IDL [out] long element_14,
249 IDL [in] long element_15,
250 IDL [in] [unique] [string] wchar_t *element_16,
251 IDL [in,out] [unique] long *element_17
255 dissect_browser_browserr_server_enum_rqst(tvbuff_t *tvb, int offset,
256 packet_info *pinfo, proto_tree *tree,
259 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
260 NDR_POINTER_UNIQUE, "unknown string",
261 hf_browser_unknown_string, 0);
263 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
264 NDR_POINTER_UNIQUE, "unknown string",
265 hf_browser_unknown_string, 0);
267 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
268 NDR_POINTER_UNIQUE, "unknown string",
269 hf_browser_unknown_string, 0);
271 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
272 dissect_browser_TYPE_1, NDR_POINTER_REF,
273 "unknown TYPE_1", -1);
275 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
276 hf_browser_unknown_long, NULL);
278 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
279 hf_browser_unknown_long, NULL);
281 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
282 NDR_POINTER_UNIQUE, "unknown string",
283 hf_browser_unknown_string, 0);
285 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
286 dissect_browser_long_pointer, NDR_POINTER_UNIQUE,
287 "unknown long", hf_browser_unknown_long);
292 dissect_browser_browserr_server_enum_reply(tvbuff_t *tvb, int offset,
293 packet_info *pinfo, proto_tree *tree,
296 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
297 dissect_browser_TYPE_1, NDR_POINTER_REF,
298 "unknown TYPE_1", -1);
300 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
301 hf_browser_unknown_long, NULL);
303 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
304 dissect_browser_long_pointer, NDR_POINTER_UNIQUE,
305 "unknown long", hf_browser_unknown_long);
307 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
308 hf_browser_rc, NULL);
314 IDL long BrowserrDebugCall(
315 IDL [in] [unique] [string] wchar_t *element_18,
316 IDL [in] long element_19,
317 IDL [in] long element_20
321 dissect_browser_browserr_debug_call_rqst(tvbuff_t *tvb, int offset,
322 packet_info *pinfo, proto_tree *tree,
325 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
326 NDR_POINTER_UNIQUE, "unknown string",
327 hf_browser_unknown_string, 0);
329 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
330 hf_browser_unknown_long, NULL);
332 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
333 hf_browser_unknown_long, NULL);
338 dissect_browser_browserr_debug_call_reply(tvbuff_t *tvb, int offset,
339 packet_info *pinfo, proto_tree *tree,
342 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
343 hf_browser_rc, NULL);
350 IDL long BrowserrQueryOtherDomains(
351 IDL [in] [unique] [string] wchar_t *element_21,
352 IDL [in,out] [ref] TYPE_1 *element_22,
353 IDL [out] long element_23
357 dissect_browser_browserr_query_other_domains_rqst(tvbuff_t *tvb, int offset,
358 packet_info *pinfo, proto_tree *tree,
361 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
362 NDR_POINTER_UNIQUE, "unknown string",
363 hf_browser_unknown_string, 0);
365 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
366 dissect_browser_TYPE_1, NDR_POINTER_REF,
367 "unknown TYPE_1", -1);
372 dissect_browser_browserr_query_other_domains_reply(tvbuff_t *tvb, int offset,
373 packet_info *pinfo, proto_tree *tree,
376 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
377 hf_browser_unknown_long, NULL);
379 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
380 hf_browser_rc, NULL);
387 IDL long BrowserrResetNetlogonState(
388 IDL [in] [unique] [string] wchar_t *element_24
392 dissect_browser_browserr_reset_netlogon_state_rqst(tvbuff_t *tvb, int offset,
393 packet_info *pinfo, proto_tree *tree,
396 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
397 NDR_POINTER_UNIQUE, "unknown string",
398 hf_browser_unknown_string, 0);
403 dissect_browser_browserr_reset_netlogon_state_reply(tvbuff_t *tvb, int offset,
404 packet_info *pinfo, proto_tree *tree,
407 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
408 hf_browser_rc, NULL);
415 IDL long BrowserrDebugTrace(
416 IDL [in] [unique] [string] wchar_t *element_25,
417 IDL [in] [string] char element_26
421 dissect_browser_browserr_debug_trace_rqst(tvbuff_t *tvb, int offset,
422 packet_info *pinfo, proto_tree *tree,
425 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
426 NDR_POINTER_UNIQUE, "unknown string",
427 hf_browser_unknown_string, 0);
429 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
430 NDR_POINTER_REF, "unknown string",
431 hf_browser_unknown_string, 0);
436 dissect_browser_browserr_debug_trace_reply(tvbuff_t *tvb, int offset,
437 packet_info *pinfo, proto_tree *tree,
440 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
441 hf_browser_rc, NULL);
450 IDL TYPE_6 element_27;
451 IDL TYPE_6 element_28;
452 IDL TYPE_6 element_29;
468 IDL TYPE_6 element_45;
472 IDL hyper element_46;
476 dissect_browser_TYPE_5(tvbuff_t *tvb, int offset,
477 packet_info *pinfo, proto_tree *tree,
480 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
481 hf_browser_unknown_hyper, NULL);
483 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
484 hf_browser_unknown_hyper, NULL);
486 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
487 hf_browser_unknown_hyper, NULL);
489 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
490 hf_browser_unknown_long, NULL);
492 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
493 hf_browser_unknown_long, NULL);
495 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
496 hf_browser_unknown_long, NULL);
498 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
499 hf_browser_unknown_long, NULL);
501 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
502 hf_browser_unknown_long, NULL);
504 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
505 hf_browser_unknown_long, NULL);
507 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
508 hf_browser_unknown_long, NULL);
510 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
511 hf_browser_unknown_long, NULL);
513 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
514 hf_browser_unknown_long, NULL);
516 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
517 hf_browser_unknown_long, NULL);
519 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
520 hf_browser_unknown_long, NULL);
522 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
523 hf_browser_unknown_long, NULL);
525 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
526 hf_browser_unknown_long, NULL);
528 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
529 hf_browser_unknown_long, NULL);
531 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
532 hf_browser_unknown_long, NULL);
534 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
535 hf_browser_unknown_hyper, NULL);
542 IDL long BrowserrQueryStatistics(
543 IDL [in] [unique] [string] wchar_t *element_47,
544 IDL [out] [ref] TYPE_5 **element_48
548 dissect_browser_browserr_query_statistics_rqst(tvbuff_t *tvb, int offset,
549 packet_info *pinfo, proto_tree *tree,
552 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
553 NDR_POINTER_UNIQUE, "unknown string",
554 hf_browser_unknown_string, 0);
559 dissect_browser_browserr_query_statistics_reply(tvbuff_t *tvb, int offset,
560 packet_info *pinfo, proto_tree *tree,
563 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
564 dissect_browser_TYPE_5, NDR_POINTER_UNIQUE,
565 "unknown TYPE_5", -1);
567 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
568 hf_browser_rc, NULL);
575 IDL long BrowserrResetStatistics(
576 IDL [in] [unique] [string] wchar_t *element_49
580 dissect_browser_browserr_reset_statistics_rqst(tvbuff_t *tvb, int offset,
581 packet_info *pinfo, proto_tree *tree,
584 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
585 NDR_POINTER_UNIQUE, "unknown string",
586 hf_browser_unknown_string, 0);
591 dissect_browser_browserr_reset_statistics_reply(tvbuff_t *tvb, int offset,
592 packet_info *pinfo, proto_tree *tree,
595 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
596 hf_browser_rc, NULL);
603 IDL long NetrBrowserStatisticsClear(
604 IDL [in] [unique] [string] wchar_t *element_49
608 dissect_browser_netr_browser_statistics_clear_rqst(tvbuff_t *tvb, int offset,
609 packet_info *pinfo, proto_tree *tree,
612 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
613 NDR_POINTER_UNIQUE, "unknown string",
614 hf_browser_unknown_string, 0);
619 dissect_browser_netr_browser_statistics_clear_reply(tvbuff_t *tvb, int offset,
620 packet_info *pinfo, proto_tree *tree,
623 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
624 hf_browser_rc, NULL);
632 IDL TYPE_6 element_59;
633 IDL TYPE_6 element_60;
634 IDL TYPE_6 element_61;
638 IDL TYPE_6 element_65;
651 dissect_browser_TYPE_11(tvbuff_t *tvb, int offset,
652 packet_info *pinfo, proto_tree *tree,
655 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
656 hf_browser_unknown_hyper, NULL);
658 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
659 hf_browser_unknown_hyper, NULL);
661 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
662 hf_browser_unknown_hyper, NULL);
664 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
665 hf_browser_unknown_long, NULL);
667 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
668 hf_browser_unknown_long, NULL);
670 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
671 hf_browser_unknown_long, NULL);
673 offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep,
674 hf_browser_unknown_hyper, NULL);
676 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
677 hf_browser_unknown_long, NULL);
679 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
680 hf_browser_unknown_long, NULL);
682 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
683 hf_browser_unknown_long, NULL);
685 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
686 hf_browser_unknown_long, NULL);
688 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
689 hf_browser_unknown_long, NULL);
691 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
692 hf_browser_unknown_long, NULL);
694 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
695 hf_browser_unknown_long, NULL);
697 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
698 hf_browser_unknown_long, NULL);
700 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
701 hf_browser_unknown_long, NULL);
709 IDL [size_is(element_57)] [unique] TYPE_11 *element_58;
713 dissect_browser_TYPE_11_array(tvbuff_t *tvb, int offset,
714 packet_info *pinfo, proto_tree *tree,
717 offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
718 dissect_browser_TYPE_11);
724 dissect_browser_TYPE_10(tvbuff_t *tvb, int offset,
725 packet_info *pinfo, proto_tree *tree,
728 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
729 hf_browser_unknown_long, NULL);
731 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
732 dissect_browser_TYPE_11_array, NDR_POINTER_UNIQUE,
733 "unknown TYPE_11_ARRAY", -1);
742 IDL [size_is(element_55)] [unique] byte *element_56;
746 dissect_browser_TYPE_9_data(tvbuff_t *tvb, int offset,
747 packet_info *pinfo, proto_tree *tree,
752 int old_offset = offset;
754 di=pinfo->private_data;
755 if(di->conformant_run){
756 /* this call is to make wireshark eat the array header for the conformant run */
757 offset =dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, NULL);
762 /* this is really the length of the encoded data */
763 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
764 hf_browser_unknown_long, &len);
766 proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len,
769 if (offset < old_offset)
770 THROW(ReportedBoundsError);
775 dissect_browser_TYPE_9(tvbuff_t *tvb, int offset,
776 packet_info *pinfo, proto_tree *tree,
779 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
780 hf_browser_unknown_long, NULL);
782 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
783 dissect_browser_TYPE_9_data, NDR_POINTER_UNIQUE,
784 "unknown TYPE_9", -1);
791 IDL typedef [switch_type(long)] union {
792 IDL [case(100)] [unique] TYPE_9 *element_53;
793 IDL [case(101)] [unique] TYPE_10 *element_54;
797 dissect_browser_TYPE_8(tvbuff_t *tvb, int offset,
798 packet_info *pinfo, proto_tree *tree,
803 /* this is really the union switch arm */
804 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
805 hf_browser_unknown_long, &level);
811 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
812 dissect_browser_TYPE_9, NDR_POINTER_UNIQUE,
813 "unknown TYPE_9", -1);
816 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
817 dissect_browser_TYPE_10, NDR_POINTER_UNIQUE,
818 "unknown TYPE_10", -1);
829 IDL TYPE_8 element_52;
833 dissect_browser_TYPE_7(tvbuff_t *tvb, int offset,
834 packet_info *pinfo, proto_tree *tree,
837 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
838 hf_browser_unknown_long, NULL);
840 offset = dissect_browser_TYPE_8(tvb, offset, pinfo, tree, drep);
847 IDL long NetrBrowserStatisticsGet(
848 IDL [in] [unique] [string] wchar_t *element_75,
849 IDL [in] long element_76,
850 IDL [in,out] [ref] TYPE_7 *element_77
854 dissect_browser_netr_browser_statistics_get_rqst(tvbuff_t *tvb, int offset,
855 packet_info *pinfo, proto_tree *tree,
858 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
859 NDR_POINTER_UNIQUE, "unknown string",
860 hf_browser_unknown_string, 0);
862 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
863 hf_browser_unknown_long, NULL);
865 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
866 dissect_browser_TYPE_7, NDR_POINTER_REF,
867 "unknown TYPE_7", -1);
872 dissect_browser_netr_browser_statistics_get_reply(tvbuff_t *tvb, int offset,
873 packet_info *pinfo, proto_tree *tree,
876 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
877 dissect_browser_TYPE_7, NDR_POINTER_REF,
878 "unknown TYPE_7", -1);
880 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
881 hf_browser_rc, NULL);
888 IDL long BrowserrSetNetlogonState(
889 IDL [in] [unique] [string] wchar_t *element_78,
890 IDL [in] [ref] [string] wchar_t *element_79,
891 IDL [in] [unique] [string] wchar_t *element_80,
892 IDL [in] long element_81
896 dissect_browser_browserr_set_netlogon_state_rqst(tvbuff_t *tvb, int offset,
897 packet_info *pinfo, proto_tree *tree,
900 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
901 NDR_POINTER_UNIQUE, "unknown string",
902 hf_browser_unknown_string, 0);
904 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
905 NDR_POINTER_REF, "unknown string",
906 hf_browser_unknown_string, 0);
908 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
909 NDR_POINTER_UNIQUE, "unknown string",
910 hf_browser_unknown_string, 0);
912 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
913 hf_browser_unknown_long, NULL);
918 dissect_browser_browserr_set_netlogon_state_reply(tvbuff_t *tvb, int offset,
919 packet_info *pinfo, proto_tree *tree,
922 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
923 hf_browser_rc, NULL);
934 IDL [size_is(element_82)] [unique] byte *element_83;
938 dissect_browser_TYPE_12_data(tvbuff_t *tvb, int offset,
939 packet_info *pinfo, proto_tree *tree,
944 int old_offset = offset;
946 di=pinfo->private_data;
947 if(di->conformant_run){
948 /* this call is to make wireshark eat the array header for the conformant run */
949 offset =dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, NULL);
954 /* this is really the length of the encoded data */
955 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
956 hf_browser_unknown_long, &len);
958 proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len,
961 if (offset < old_offset)
962 THROW(ReportedBoundsError);
967 dissect_browser_TYPE_12(tvbuff_t *tvb, int offset,
968 packet_info *pinfo, proto_tree *tree,
971 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
972 hf_browser_unknown_long, NULL);
974 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
975 dissect_browser_TYPE_12_data, NDR_POINTER_UNIQUE,
976 "unknown TYPE_12", -1);
983 IDL long BrowserrQueryEmulatedDomains(
984 IDL [in] [unique] [string] wchar_t *element_84,
985 IDL [in,out] [ref] TYPE_12 *element_85
989 dissect_browser_browserr_query_emulated_domains_rqst(tvbuff_t *tvb, int offset,
990 packet_info *pinfo, proto_tree *tree,
993 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
994 NDR_POINTER_UNIQUE, "unknown string",
995 hf_browser_unknown_string, 0);
997 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
998 dissect_browser_TYPE_12, NDR_POINTER_REF,
999 "unknown TYPE_12", -1);
1004 dissect_browser_browserr_query_emulated_domains_reply(tvbuff_t *tvb, int offset,
1005 packet_info *pinfo, proto_tree *tree,
1008 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
1009 dissect_browser_TYPE_12, NDR_POINTER_REF,
1010 "unknown TYPE_12", -1);
1012 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
1013 hf_browser_rc, NULL);
1020 IDL long BrowserrServerEnumEx(
1021 IDL [in] [unique] [string] wchar_t *element_86,
1022 IDL [in] [unique] [string] wchar_t *element_87,
1023 IDL [in] [unique] [string] wchar_t *element_88,
1024 IDL [in,out] [ref] TYPE_1 *element_89,
1025 IDL [in] long element_90,
1026 IDL [out] long element_91,
1027 IDL [in] long element_92,
1028 IDL [in] [unique] [string] wchar_t *element_93,
1029 IDL [in] [unique] [string] wchar_t *element_94
1033 dissect_browser_browserr_server_enum_ex_rqst(tvbuff_t *tvb, int offset,
1034 packet_info *pinfo, proto_tree *tree,
1037 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
1038 NDR_POINTER_UNIQUE, "unknown string",
1039 hf_browser_unknown_string, 0);
1041 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
1042 NDR_POINTER_UNIQUE, "unknown string",
1043 hf_browser_unknown_string, 0);
1045 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
1046 NDR_POINTER_UNIQUE, "unknown string",
1047 hf_browser_unknown_string, 0);
1049 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
1050 dissect_browser_TYPE_1, NDR_POINTER_REF,
1051 "unknown TYPE_1", -1);
1053 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
1054 hf_browser_unknown_long, NULL);
1056 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
1057 hf_browser_unknown_long, NULL);
1059 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
1060 NDR_POINTER_UNIQUE, "unknown string",
1061 hf_browser_unknown_string, 0);
1063 offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
1064 NDR_POINTER_UNIQUE, "unknown string",
1065 hf_browser_unknown_string, 0);
1070 dissect_browser_browserr_server_enum_ex_reply(tvbuff_t *tvb, int offset,
1071 packet_info *pinfo, proto_tree *tree,
1074 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
1075 dissect_browser_TYPE_1, NDR_POINTER_REF,
1076 "unknown TYPE_1", -1);
1078 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
1079 hf_browser_unknown_long, NULL);
1081 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
1082 hf_browser_rc, NULL);
1092 static dcerpc_sub_dissector dcerpc_browser_dissectors[] = {
1093 { BROWSER_BROWSERR_SERVER_ENUM, "BrowserrServerEnum",
1094 dissect_browser_browserr_server_enum_rqst,
1095 dissect_browser_browserr_server_enum_reply },
1096 { BROWSER_BROWSERR_DEBUG_CALL, "BrowserrDebugCall",
1097 dissect_browser_browserr_debug_call_rqst,
1098 dissect_browser_browserr_debug_call_reply },
1099 { BROWSER_BROWSERR_QUERY_OTHER_DOMAINS,
1100 "BrowserrQueryOtherDomains",
1101 dissect_browser_browserr_query_other_domains_rqst,
1102 dissect_browser_browserr_query_other_domains_reply },
1103 { BROWSER_BROWSERR_RESET_NETLOGON_STATE,
1104 "BrowserrResetNetlogonState",
1105 dissect_browser_browserr_reset_netlogon_state_rqst,
1106 dissect_browser_browserr_reset_netlogon_state_reply },
1107 { BROWSER_BROWSERR_DEBUG_TRACE,
1108 "BrowserrDebugTrace",
1109 dissect_browser_browserr_debug_trace_rqst,
1110 dissect_browser_browserr_debug_trace_reply },
1111 { BROWSER_BROWSERR_QUERY_STATISTICS,
1112 "BrowserrQueryStatistics",
1113 dissect_browser_browserr_query_statistics_rqst,
1114 dissect_browser_browserr_query_statistics_reply },
1115 { BROWSER_BROWSERR_RESET_STATISTICS,
1116 "BrowserrResetStatistics",
1117 dissect_browser_browserr_reset_statistics_rqst,
1118 dissect_browser_browserr_reset_statistics_reply },
1119 { BROWSER_NETR_BROWSER_STATISTICS_CLEAR,
1120 "NetrBrowserStatisticsClear",
1121 dissect_browser_netr_browser_statistics_clear_rqst,
1122 dissect_browser_netr_browser_statistics_clear_reply },
1123 { BROWSER_NETR_BROWSER_STATISTICS_GET,
1124 "NetrBrowserStatisticsGet",
1125 dissect_browser_netr_browser_statistics_get_rqst,
1126 dissect_browser_netr_browser_statistics_get_reply },
1127 { BROWSER_BROWSERR_SET_NETLOGON_STATE,
1128 "BrowserrSetNetlogonState",
1129 dissect_browser_browserr_set_netlogon_state_rqst,
1130 dissect_browser_browserr_set_netlogon_state_reply },
1131 { BROWSER_BROWSERR_QUERY_EMULATED_DOMAINS,
1132 "BrowserrQueryEmulatedDomains",
1133 dissect_browser_browserr_query_emulated_domains_rqst,
1134 dissect_browser_browserr_query_emulated_domains_reply },
1135 { BROWSER_BROWSERR_SERVER_ENUM_EX,
1136 "BrowserrServerEnumEx",
1137 dissect_browser_browserr_server_enum_ex_rqst,
1138 dissect_browser_browserr_server_enum_ex_reply },
1140 {0, NULL, NULL, NULL }
1144 proto_register_dcerpc_browser(void)
1146 static hf_register_info hf[] = {
1148 { &hf_browser_opnum, {
1149 "Operation", "rpc_browser.opnum", FT_UINT16, BASE_DEC,
1150 NULL, 0x0, NULL, HFILL }},
1153 "Return code", "rpc_browser.rc", FT_UINT32, BASE_HEX,
1154 VALS(NT_errors), 0x0, "Browser return code", HFILL }},
1156 { &hf_browser_unknown_long, {
1157 "Unknown long", "rpc_browser.unknown.long", FT_UINT32, BASE_HEX,
1158 NULL, 0x0, "Unknown long. If you know what this is, contact wireshark developers.", HFILL }},
1160 { &hf_browser_unknown_hyper, {
1161 "Unknown hyper", "rpc_browser.unknown.hyper", FT_UINT64, BASE_HEX,
1162 NULL, 0x0, "Unknown hyper. If you know what this is, contact wireshark developers.", HFILL }},
1164 { &hf_browser_unknown_bytes, {
1165 "Unknown bytes", "rpc_browser.unknown.bytes", FT_BYTES, BASE_NONE,
1166 NULL, 0x0, "Unknown bytes. If you know what this is, contact wireshark developers.", HFILL }},
1168 { &hf_browser_unknown_string, {
1169 "Unknown string", "rpc_browser.unknown.string", FT_STRING, BASE_NONE,
1170 NULL, 0x0, "Unknown string. If you know what this is, contact wireshark developers.", HFILL }}
1173 static gint *ett[] = {
1177 proto_dcerpc_browser = proto_register_protocol(
1178 "RPC Browser", "RPC_BROWSER", "rpc_browser");
1180 proto_register_field_array(proto_dcerpc_browser, hf,
1182 proto_register_subtree_array(ett, array_length(ett));
1186 proto_reg_handoff_dcerpc_browser(void)
1188 /* Register protocol as dcerpc */
1190 dcerpc_init_uuid(proto_dcerpc_browser, ett_dcerpc_browser,
1191 &uuid_dcerpc_browser, ver_dcerpc_browser,
1192 dcerpc_browser_dissectors, hf_browser_opnum);