Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-dcerpc-rs_pgo.c
blob72c7fa761e9dfe85801eddb0d02e772f68e693df
1 /* packet-dcerpc-rs_pgo.c
3 * Routines for dcerpc Afs4Int dissection
4 * Copyright 2002, Jaime Fournier <Jaime.Fournier@hush.com>
5 * This information is based off the released idl files from opengroup.
6 * ftp://ftp.opengroup.org/pub/dce122/dce/src/security.tar.gz security/idl/rs_pgo.idl
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include "config.h"
18 #include <epan/packet.h>
19 #include "packet-dcerpc.h"
20 #include "packet-dcerpc-dce122.h"
22 void proto_register_rs_pgo (void);
23 void proto_reg_handoff_rs_pgo (void);
26 delete
27 dissect_rgy_acct_user_flags_t
30 static int proto_rs_pgo;
31 static int hf_rs_pgo_opnum;
32 static int hf_rs_var1;
33 static int hf_rs_pgo_query_result_t;
34 static int hf_rs_pgo_query_t;
35 static int hf_rs_pgo_query_key_t;
36 static int hf_error_status_t;
37 static int hf_sec_rgy_pgo_flags_t;
38 static int hf_rs_sec_rgy_pgo_item_t_quota;
39 static int hf_rs_sec_rgy_pgo_item_t_unix_num;
40 static int hf_rs_timeval;
41 static int hf_rs_uuid1;
42 static int hf_sec_rgy_domain_t;
43 static int hf_sec_rgy_name_t_principalName_string;
44 static int hf_sec_rgy_name_t_size;
45 static int hf_sec_rgy_pname_t_principalName_string;
46 static int hf_sec_rgy_pname_t_size;
47 static int hf_rs_pgo_unix_num_key_t;
49 static int ett_rs_cache_data_t;
50 static int ett_sec_rgy_domain_t;
51 static int ett_rgy_acct_user_flags_t;
52 static int ett_sec_attr_component_name_t;
53 static int ett_sec_passwd_type_t;
54 static int ett_sec_rgy_acct_admin_flags_t;
55 static int ett_sec_rgy_acct_admin_t;
56 static int ett_sec_rgy_acct_auth_flags_t;
57 static int ett_sec_rgy_acct_key_t;
58 static int ett_sec_rgy_acct_user_t;
59 static int ett_sec_rgy_cursor_t;
60 static int ett_sec_rgy_foreign_id_t;
61 static int ett_sec_rgy_login_name_t;
62 static int ett_sec_rgy_name_t;
63 static int ett_sec_rgy_pgo_item_t;
64 static int ett_sec_rgy_pname_t;
65 static int ett_sec_rgy_sid_t;
66 static int ett_sec_rgy_unix_passwd_buf_t;
67 static int ett_sec_rgy_unix_sid_t;
68 static int ett_sec_timeval_sec_t;
69 static int ett_sec_rgy_pgo_flags_t;
70 static int ett_error_status_t;
71 static int ett_rs_pgo_query_t;
72 static int ett_rs_pgo_query_key_t;
73 static int ett_rs_pgo_id_key_t;
74 static int ett_rs_pgo_unix_num_key_t;
75 static int ett_rs_pgo_query_result_t;
76 static int ett_rs_pgo_result_t;
79 #define sec_rgy_acct_admin_valid 0x01
80 #define sec_rgy_acct_admin_audit 0x02
81 #define sec_rgy_acct_admin_server 0x04
82 #define sec_rgy_acct_admin_client 0x08
83 #define sec_rgy_acct_admin_flags_none 0x00
84 #define sec_rgy_acct_auth_post_dated 0x01
85 #define sec_rgy_acct_auth_forwardable 0x02
86 #define sec_rgy_acct_auth_tgt 0x04
87 #define sec_rgy_acct_auth_renewable 0x08
88 #define sec_rgy_acct_auth_proxiable 0x10
89 #define sec_rgy_acct_auth_dup_skey 0x20
90 #define sec_rgy_acct_auth_user_to_user 0x40
91 #define sec_rgy_acct_auth_flags_none 0x00
92 #define sec_rgy_acct_user_passwd_valid 0x01
93 #define sec_rgy_acct_user_flags_none 0x00
94 #define rs_acct_part_user 0x01
95 #define rs_acct_part_admin 0x02
96 #define rs_acct_part_passwd 0x04
97 #define rs_acct_part_unused 0x08
98 #define rs_acct_part_login_name 0x10
99 #define sec_rgy_pgo_is_an_alias 0x01
100 #define sec_rgy_pgo_is_required 0x02
101 #define sec_rgy_pgo_projlist_ok 0x04
102 #define sec_rgy_pgo_flags_none 0x00
103 #define sec_rgy_acct_user_passwd_valid 0x01
104 #define sec_rgy_acct_user_flags_none 0x00
106 static int ett_rs_pgo;
108 static e_guid_t uuid_rs_pgo =
109 { 0x4c878280, 0x3000, 0x0000, {0x0d, 0x00, 0x02, 0x87, 0x14, 0x00, 0x00,
110 0x00}
112 static uint16_t ver_rs_pgo = 1;
115 static int
116 dissect_error_status_t (tvbuff_t * tvb, int offset,
117 packet_info * pinfo, proto_tree * parent_tree,
118 dcerpc_info *di, uint8_t * drep)
120 proto_item *item;
121 proto_tree *tree;
122 int old_offset = offset;
123 uint32_t st;
124 const char *st_str;
126 if (di->conformant_run)
128 return offset;
131 tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_error_status_t, &item, "error_status_t");
133 offset =
134 dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_error_status_t,
135 &st);
136 st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u");
138 col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
140 proto_item_set_len (item, offset - old_offset);
141 return offset;
145 static int
146 dissect_sec_rgy_pname_t (tvbuff_t * tvb, int offset,
147 packet_info * pinfo, proto_tree * parent_tree,
148 dcerpc_info *di, uint8_t * drep)
152 proto_item *item;
153 proto_tree *tree;
154 int old_offset = offset;
155 const uint8_t *principal;
156 #define sec_rgy_pname_t_size 257
158 dissect sec_rgy_pname const signed32 sec_rgy_pname_t_size = 257; * Include final '\0' *
159 typedef [string] char sec_rgy_pname_t[sec_rgy_pname_t_size];
161 uint32_t string_size;
163 if (di->conformant_run)
165 return offset;
169 tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_sec_rgy_pname_t, &item, "sec_rgy_pname_t");
171 offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
172 hf_sec_rgy_pname_t_size, &string_size);
173 col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
174 if (string_size < sec_rgy_pname_t_size)
176 /* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
178 proto_tree_add_item_ret_string(tree, hf_sec_rgy_pname_t_principalName_string,
179 tvb, offset, string_size, ENC_ASCII|ENC_NA, pinfo->pool, &principal);
180 if (string_size > 1)
182 col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", principal);
184 offset += string_size;
186 else
188 col_append_fstr (pinfo->cinfo, COL_INFO,
189 " :FIXME!: Invalid string length of %u",
190 string_size);
193 proto_item_set_len (item, offset - old_offset);
194 return offset;
197 static int
198 dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
199 packet_info * pinfo, proto_tree * parent_tree,
200 dcerpc_info *di, uint8_t * drep)
207 proto_item *item = NULL;
208 proto_tree *tree = NULL;
209 int old_offset = offset;
210 uint32_t flags;
213 typedef bitset sec_rgy_pgo_flags_t;
216 if (di->conformant_run)
218 return offset;
222 if (parent_tree)
224 tree =
225 proto_tree_add_subtree(parent_tree, tvb, offset, -1,
226 ett_sec_rgy_pgo_flags_t, &item, "sec_rgy_pgo_flags_t ");
229 offset =
230 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
231 hf_sec_rgy_pgo_flags_t, &flags);
235 * s e c _ r g y _ p g o _ f l a g s _ t
238 * pgo item is an alias *
239 const unsigned32 sec_rgy_pgo_is_an_alias = 0x1;
241 * pgo item is required - cannot be deleted *
242 const unsigned32 sec_rgy_pgo_is_required = 0x2;
245 * projlist_ok: on person items indicates person can have a concurrent
246 * group set on group items indicates this group can appear on a
247 * concurrent group set. On org items this flag is undefined.
249 const unsigned32 sec_rgy_pgo_projlist_ok = 0x4;
252 * bits 4-32 unused
254 const unsigned32 sec_rgy_pgo_flags_none = 0;
256 #define sec_rgy_pgo_is_an_alias 0x01
257 #define sec_rgy_pgo_is_required 0x02
258 #define sec_rgy_pgo_projlist_ok 0x04
259 #define sec_rgy_pgo_flags_none 0x00
262 col_append_str (pinfo->cinfo, COL_INFO, " PgoFlags=");
263 if ((flags & sec_rgy_pgo_is_an_alias) == sec_rgy_pgo_is_an_alias)
265 col_append_str (pinfo->cinfo, COL_INFO, ":IS_AN_ALIAS");
267 if ((flags & sec_rgy_pgo_is_required) == sec_rgy_pgo_is_required)
269 col_append_str (pinfo->cinfo, COL_INFO, ":IS_REQUIRED");
271 if ((flags & sec_rgy_pgo_projlist_ok) == sec_rgy_pgo_projlist_ok)
273 col_append_str (pinfo->cinfo, COL_INFO, ":PROJLIST_OK");
275 if ((flags & sec_rgy_acct_admin_client) == sec_rgy_acct_admin_client)
277 col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
279 if ((flags & sec_rgy_pgo_flags_none) == sec_rgy_pgo_flags_none)
281 col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
284 proto_item_set_len (item, offset - old_offset);
285 return offset;
291 static int
292 dissect_rs_cache_data_t (tvbuff_t * tvb, int offset,
293 packet_info * pinfo, proto_tree * parent_tree,
294 dcerpc_info *di, uint8_t * drep)
298 typedef struct {
299 uuid_t site_id;
300 sec_timeval_sec_t person_dtm;
301 sec_timeval_sec_t group_dtm;
302 sec_timeval_sec_t org_dtm;
303 } rs_cache_data_t;
307 proto_item *item = NULL;
308 proto_tree *tree = NULL;
309 int old_offset = offset;
310 uint32_t person_dtm, group_dtm, org_dtm;
311 e_guid_t uuid1;
314 if (di->conformant_run)
316 return offset;
320 if (parent_tree)
322 tree =
323 proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_rs_cache_data_t, &item, "rs_cache_data_t");
327 offset =
328 dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &uuid1);
329 offset =
330 dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
331 &person_dtm);
332 offset =
333 dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
334 &group_dtm);
335 offset =
336 dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
337 &org_dtm);
339 col_append_fstr (pinfo->cinfo, COL_INFO,
340 " siteid %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x person_dtm:%u group_dtm:%u org_dtm:%u",
341 uuid1.data1, uuid1.data2, uuid1.data3, uuid1.data4[0],
342 uuid1.data4[1], uuid1.data4[2], uuid1.data4[3],
343 uuid1.data4[4], uuid1.data4[5], uuid1.data4[6],
344 uuid1.data4[7], person_dtm, group_dtm, org_dtm);
346 proto_item_set_len (item, offset - old_offset);
347 return offset;
352 static int
353 dissect_sec_rgy_name_t (tvbuff_t * tvb, int offset,
354 packet_info * pinfo, proto_tree * parent_tree,
355 dcerpc_info *di, uint8_t * drep)
359 proto_item *item;
360 proto_tree *tree;
361 int old_offset = offset;
362 const uint8_t *principal;
363 #define sec_rgy_name_t_size 1025
364 /* typedef [string] char sec_rgy_name_t[sec_rgy_name_t_size]; */
365 uint32_t string_size;
367 if (di->conformant_run)
369 return offset;
373 tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_sec_rgy_name_t, &item, "sec_rgy_name_t");
375 offset =
376 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
377 hf_sec_rgy_name_t_size, &string_size);
378 col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
379 if (string_size < sec_rgy_name_t_size)
381 /* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
383 proto_tree_add_item_ret_string(tree, hf_sec_rgy_name_t_principalName_string,
384 tvb, offset, string_size, ENC_ASCII|ENC_NA, pinfo->pool, &principal);
385 if (string_size > 1)
387 col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", principal);
389 offset += string_size;
391 else
393 col_append_fstr (pinfo->cinfo, COL_INFO,
394 " :FIXME!: Invalid string length of %u",
395 string_size);
398 proto_item_set_len (item, offset - old_offset);
399 return offset;
403 static int
404 dissect_sec_rgy_domain_t (tvbuff_t * tvb, int offset,
405 packet_info * pinfo, proto_tree * parent_tree,
406 dcerpc_info *di, uint8_t * drep)
410 typedef signed32 sec_rgy_domain_t;
413 proto_item *item = NULL;
414 proto_tree *tree = NULL;
415 int old_offset = offset;
416 uint32_t domain_t;
418 if (di->conformant_run)
420 return offset;
424 if (parent_tree)
426 tree =
427 proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_sec_rgy_domain_t, &item, "sec_rgy_domain_t");
431 offset =
432 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_sec_rgy_domain_t,
433 &domain_t);
435 col_append_fstr (pinfo->cinfo, COL_INFO, " sec_rgy_domain_t:%u",
436 domain_t);
439 proto_item_set_len (item, offset - old_offset);
440 return offset;
443 static int
444 dissect_sec_rgy_pgo_item_t (tvbuff_t * tvb, int offset,
445 packet_info * pinfo, proto_tree * parent_tree,
446 dcerpc_info *di, uint8_t * drep)
450 typedef struct {
451 uuid_t id;
452 signed32 unix_num;
453 signed32 quota;
454 sec_rgy_pgo_flags_t flags;
455 sec_rgy_pname_t fullname;
456 } sec_rgy_pgo_item_t;
460 proto_item *item = NULL;
461 proto_tree *tree = NULL;
462 int old_offset = offset;
463 e_guid_t id;
464 uint32_t unix_num, quota;
466 if (di->conformant_run)
468 return offset;
472 if (parent_tree)
474 tree =
475 proto_tree_add_subtree(parent_tree, tvb, offset, -1,
476 ett_sec_rgy_pgo_item_t, &item, " sec_rgy_pgo_item_t ");
479 offset =
480 dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &id);
481 offset =
482 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
483 hf_rs_sec_rgy_pgo_item_t_unix_num, &unix_num);
484 offset =
485 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
486 hf_rs_sec_rgy_pgo_item_t_quota, &quota);
487 offset = dissect_sec_rgy_pgo_flags_t (tvb, offset, pinfo, tree, di, drep);
488 offset += 4; /* XXX */
489 offset = dissect_sec_rgy_pname_t (tvb, offset, pinfo, tree, di, drep);
491 col_append_fstr (pinfo->cinfo, COL_INFO,
492 " sec_rgy_pgo_item_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x unix_num:%u quota:%u",
493 id.data1, id.data2, id.data3, id.data4[0],
494 id.data4[1], id.data4[2], id.data4[3],
495 id.data4[4], id.data4[5], id.data4[6],
496 id.data4[7], unix_num, quota);
498 proto_item_set_len (item, offset - old_offset);
499 return offset;
503 static int
504 dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
505 packet_info * pinfo, proto_tree * parent_tree,
506 dcerpc_info *di, uint8_t * drep)
510 * Database cursor for iterative operations
512 typedef struct {
513 uuid_t source;
514 signed32 handle;
515 boolean32 valid;
516 } sec_rgy_cursor_t;
521 proto_item *item = NULL;
522 proto_tree *tree = NULL;
523 int old_offset = offset;
524 e_guid_t source;
525 uint32_t handle, valid;
527 if (di->conformant_run)
529 return offset;
533 if (parent_tree)
535 tree =
536 proto_tree_add_subtree(parent_tree, tvb, offset, -1,
537 ett_sec_rgy_cursor_t, &item, " sec_rgy_cursor_t ");
540 offset =
541 dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &source);
542 offset =
543 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
544 hf_rs_sec_rgy_pgo_item_t_unix_num, &handle);
545 offset =
546 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
547 hf_rs_sec_rgy_pgo_item_t_quota, &valid);
549 col_append_fstr (pinfo->cinfo, COL_INFO,
550 " sec_rgy_cursor_t - source %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x handle:%u valid:%u",
551 source.data1, source.data2, source.data3,
552 source.data4[0], source.data4[1], source.data4[2],
553 source.data4[3], source.data4[4], source.data4[5],
554 source.data4[6], source.data4[7], handle, valid);
556 proto_item_set_len (item, offset - old_offset);
557 return offset;
560 static int
561 dissect_rs_pgo_query_t (tvbuff_t * tvb, int offset,
562 packet_info * pinfo, proto_tree * parent_tree,
563 dcerpc_info *di, uint8_t * drep)
566 enum
568 rs_pgo_query_name,
569 rs_pgo_query_id,
570 rs_pgo_query_unix_num,
571 rs_pgo_query_next,
572 rs_pgo_query_none
576 proto_item *item = NULL;
577 proto_tree *tree = NULL;
578 int old_offset = offset;
579 uint8_t query_t;
581 if (di->conformant_run)
583 return offset;
587 if (parent_tree)
589 tree =
590 proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_rs_pgo_query_t, &item, "rs_pgo_query_t ");
592 offset =
593 dissect_ndr_uint8 (tvb, offset, pinfo, tree, di, drep, hf_rs_pgo_query_t,
594 &query_t);
595 col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_t:");
597 switch (query_t)
599 case rs_pgo_query_name:
600 col_append_str (pinfo->cinfo, COL_INFO, "NAME");
601 break;
602 case rs_pgo_query_id:
603 col_append_str (pinfo->cinfo, COL_INFO, "ID");
604 break;
605 case rs_pgo_query_unix_num:
606 col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
607 break;
608 case rs_pgo_query_next:
609 col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
610 break;
611 case rs_pgo_query_none:
612 col_append_str (pinfo->cinfo, COL_INFO, "NONE");
613 break;
614 default:
615 col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
616 break;
621 proto_item_set_len (item, offset - old_offset);
622 return offset;
624 static int
625 dissect_rs_pgo_id_key_t (tvbuff_t * tvb, int offset,
626 packet_info * pinfo, proto_tree * parent_tree,
627 dcerpc_info *di, uint8_t * drep)
631 typedef struct {
632 uuid_t id;
633 sec_rgy_name_t scope;
634 } rs_pgo_id_key_t;
638 proto_item *item = NULL;
639 proto_tree *tree = NULL;
640 int old_offset = offset;
641 e_guid_t id;
643 if (di->conformant_run)
645 return offset;
649 if (parent_tree)
651 tree =
652 proto_tree_add_subtree(parent_tree, tvb, offset, -1,
653 ett_rs_pgo_id_key_t, &item, "rs_pgo_id_key_t ");
656 offset =
657 dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &id);
658 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
660 col_append_fstr (pinfo->cinfo, COL_INFO,
661 " rs_pgo_id_key_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
662 id.data1, id.data2, id.data3, id.data4[0],
663 id.data4[1], id.data4[2], id.data4[3],
664 id.data4[4], id.data4[5], id.data4[6], id.data4[7]);
666 proto_item_set_len (item, offset - old_offset);
667 return offset;
671 static int
672 dissect_rs_pgo_result_t (tvbuff_t * tvb, int offset,
673 packet_info * pinfo, proto_tree * parent_tree,
674 dcerpc_info *di, uint8_t * drep)
678 typedef struct {
679 sec_rgy_name_t name;
680 sec_rgy_pgo_item_t item;
681 } rs_pgo_result_t;
686 proto_item *item = NULL;
687 proto_tree *tree = NULL;
688 int old_offset = offset;
690 if (di->conformant_run)
692 return offset;
695 if (parent_tree)
697 tree =
698 proto_tree_add_subtree(parent_tree, tvb, offset, -1,
699 ett_rs_pgo_result_t, &item, "rs_pgo_result_t ");
702 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
703 offset = dissect_sec_rgy_pgo_item_t (tvb, offset, pinfo, tree, di, drep);
705 proto_item_set_len (item, offset - old_offset);
706 return offset;
711 static int
712 dissect_rs_pgo_unix_num_key_t (tvbuff_t * tvb, int offset,
713 packet_info * pinfo, proto_tree * parent_tree,
714 dcerpc_info *di, uint8_t * drep)
718 typedef struct {
719 signed32 unix_num;
720 sec_rgy_name_t scope;
721 } rs_pgo_unix_num_key_t;
728 proto_item *item = NULL;
729 proto_tree *tree = NULL;
730 int old_offset = offset;
731 uint32_t rs_pgo_unix_num_key_t;
733 if (di->conformant_run)
735 return offset;
739 if (parent_tree)
741 tree =
742 proto_tree_add_subtree(parent_tree, tvb, offset, -1,
743 ett_rs_pgo_unix_num_key_t, &item, " rs_pgo_unix_num_key_t ");
746 offset =
747 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
748 hf_rs_pgo_unix_num_key_t, &rs_pgo_unix_num_key_t);
749 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
751 col_append_fstr (pinfo->cinfo, COL_INFO,
752 " rs_pgo_unix_num_key_t:%u", rs_pgo_unix_num_key_t);
754 proto_item_set_len (item, offset - old_offset);
755 return offset;
759 static int
760 dissect_rs_pgo_query_key_t (tvbuff_t * tvb, int offset,
761 packet_info * pinfo, proto_tree * parent_tree,
762 dcerpc_info *di, uint8_t * drep)
765 enum
767 rs_pgo_query_name,
768 rs_pgo_query_id,
769 rs_pgo_query_unix_num,
770 rs_pgo_query_next,
771 rs_pgo_query_none
774 typedef union switch (rs_pgo_query_t query) tagged_union {
775 case rs_pgo_query_name:
776 sec_rgy_name_t name;
778 case rs_pgo_query_id:
779 rs_pgo_id_key_t id_key;
781 case rs_pgo_query_unix_num:
782 rs_pgo_unix_num_key_t unix_num_key;
784 case rs_pgo_query_next:
785 sec_rgy_name_t scope;
787 default:
788 ; * empty branch of union *
790 } rs_pgo_query_key_t;
794 proto_item *item = NULL;
795 proto_tree *tree = NULL;
796 int old_offset = offset;
797 uint16_t query_t;
799 if (di->conformant_run)
801 return offset;
805 if (parent_tree)
807 tree =
808 proto_tree_add_subtree(parent_tree, tvb, offset, -1,
809 ett_rs_pgo_query_key_t, &item, "rs_pgo_query_key_t ");
811 offset =
812 dissect_ndr_uint16 (tvb, offset, pinfo, tree, di, drep, hf_rs_pgo_query_key_t,
813 &query_t);
814 col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_key_t:");
815 offset += 4;
816 switch (query_t)
818 case rs_pgo_query_name:
819 col_append_str (pinfo->cinfo, COL_INFO, "NAME");
820 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
821 break;
822 case rs_pgo_query_id:
823 col_append_str (pinfo->cinfo, COL_INFO, "ID");
824 offset = dissect_rs_pgo_id_key_t (tvb, offset, pinfo, tree, di, drep);
825 break;
826 case rs_pgo_query_unix_num:
827 col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
828 offset = dissect_rs_pgo_unix_num_key_t (tvb, offset, pinfo, tree, di, drep);
829 break;
830 case rs_pgo_query_next:
831 col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
832 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
833 break;
834 case rs_pgo_query_none:
835 col_append_str (pinfo->cinfo, COL_INFO, "NONE");
836 break;
838 default:
839 col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
840 break;
843 proto_item_set_len (item, offset - old_offset);
844 return offset;
848 static int
849 dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset,
850 packet_info * pinfo, proto_tree * parent_tree,
851 dcerpc_info *di, uint8_t * drep)
853 proto_item *item = NULL;
854 proto_tree *tree = NULL;
855 int old_offset = offset;
856 uint32_t st;
857 const char *status;
858 #define error_status_ok 0
861 typedef union switch (signed32 status) tagged_union {
862 case error_status_ok:
863 rs_pgo_result_t result;
865 default:
866 ; * empty branch of union *
868 } rs_pgo_query_result_t;
871 if (di->conformant_run)
873 return offset;
876 if (parent_tree)
878 tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1,
879 ett_rs_pgo_query_result_t, &item, "rs_pgo_query_result_t");
882 offset =
883 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
884 hf_rs_pgo_query_result_t, &st);
885 status = val_to_str_ext (st, &dce_error_vals_ext, "%u");
887 col_append_fstr (pinfo->cinfo, COL_INFO, " status:%s ", status);
889 offset += 4; /* XXX */
891 switch (st)
893 case error_status_ok:
894 offset = dissect_rs_pgo_result_t (tvb, offset, pinfo, tree, di, drep);
895 break;
896 default:
901 proto_item_set_len (item, offset - old_offset);
902 return offset;
907 static int
908 rs_pgo_dissect_add_rqst (tvbuff_t * tvb, int offset,
909 packet_info * pinfo, proto_tree * tree,
910 dcerpc_info *di, uint8_t * drep)
912 if (di->conformant_run)
914 return offset;
918 [in] sec_rgy_domain_t name_domain,
919 [in] sec_rgy_name_t pgo_name,
920 [in] sec_rgy_pgo_item_t *pgo_item,
923 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
924 offset += 4;
925 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
926 offset =
927 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
928 dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
929 "sec_rgy_pgo_item_t: ", -1);
931 return offset;
933 static int
934 rs_pgo_dissect_add_resp (tvbuff_t * tvb, int offset,
935 packet_info * pinfo, proto_tree * tree,
936 dcerpc_info *di, uint8_t * drep)
938 int buff_remain;
940 if (di->conformant_run)
942 return offset;
946 [out] rs_cache_data_t *cache_info,
947 [out] error_status_t *status
950 buff_remain = tvb_captured_length_remaining(tvb, offset);
952 /* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
953 if (buff_remain > 8) {
954 offset =
955 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
956 dissect_rs_cache_data_t, NDR_POINTER_REF,
957 "cache_info: ", -1);
959 offset =
960 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
961 dissect_error_status_t, NDR_POINTER_REF, "status: ",
962 -1);
963 return offset;
966 static int
967 rs_pgo_dissect_delete_rqst (tvbuff_t * tvb, int offset,
968 packet_info * pinfo, proto_tree * tree,
969 dcerpc_info *di, uint8_t * drep)
971 if (di->conformant_run)
973 return offset;
977 [in] sec_rgy_domain_t name_domain,
978 [in] sec_rgy_name_t pgo_name,
980 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
981 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
983 return offset;
986 static int
987 rs_pgo_dissect_delete_resp (tvbuff_t * tvb, int offset,
988 packet_info * pinfo, proto_tree * tree,
989 dcerpc_info *di, uint8_t * drep)
991 int buff_remain;
993 if (di->conformant_run)
995 return offset;
999 [out] rs_cache_data_t *cache_info,
1000 [out] error_status_t *status
1002 buff_remain = tvb_captured_length_remaining(tvb, offset);
1004 /* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
1006 if (buff_remain > 8) {
1007 offset =
1008 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1009 dissect_rs_cache_data_t, NDR_POINTER_REF,
1010 "cache_info:", -1);
1013 offset =
1014 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1015 dissect_error_status_t, NDR_POINTER_REF, "status:",
1016 -1);
1018 return offset;
1021 static int
1022 rs_pgo_dissect_replace_rqst (tvbuff_t * tvb, int offset,
1023 packet_info * pinfo, proto_tree * tree,
1024 dcerpc_info *di, uint8_t * drep)
1026 if (di->conformant_run)
1028 return offset;
1032 [in] sec_rgy_domain_t name_domain,
1033 [in] sec_rgy_name_t pgo_name,
1034 [in] sec_rgy_pgo_item_t *pgo_item,
1036 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1037 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1038 offset =
1039 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1040 dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
1041 "pgo_item:", -1);
1043 return offset;
1046 static int
1047 rs_pgo_dissect_replace_resp (tvbuff_t * tvb, int offset,
1048 packet_info * pinfo, proto_tree * tree,
1049 dcerpc_info *di, uint8_t * drep)
1051 if (di->conformant_run)
1053 return offset;
1057 [out] rs_cache_data_t *cache_info,
1058 [out] error_status_t *status
1062 offset =
1063 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1064 dissect_rs_cache_data_t, NDR_POINTER_REF,
1065 "cache_info:", -1);
1066 offset =
1067 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1068 dissect_error_status_t, NDR_POINTER_REF, "status:",
1069 -1);
1071 return offset;
1075 static int
1076 rs_pgo_dissect_add_member_rqst (tvbuff_t * tvb, int offset,
1077 packet_info * pinfo, proto_tree * tree,
1078 dcerpc_info *di, uint8_t * drep)
1080 if (di->conformant_run)
1082 return offset;
1088 [in] sec_rgy_domain_t name_domain,
1089 [in] sec_rgy_name_t go_name,
1090 [in] sec_rgy_name_t person_name,
1093 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1094 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1095 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1098 return offset;
1101 static int
1102 rs_pgo_dissect_rename_rqst (tvbuff_t * tvb, int offset,
1103 packet_info * pinfo, proto_tree * tree,
1104 dcerpc_info *di, uint8_t * drep)
1106 if (di->conformant_run)
1108 return offset;
1112 [in] sec_rgy_domain_t name_domain,
1113 [in] sec_rgy_name_t old_name,
1114 [in] sec_rgy_name_t new_name,
1116 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1117 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1118 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1121 return offset;
1124 static int
1125 rs_pgo_dissect_rename_resp (tvbuff_t * tvb, int offset,
1126 packet_info * pinfo, proto_tree * tree,
1127 dcerpc_info *di, uint8_t * drep)
1129 if (di->conformant_run)
1131 return offset;
1135 [out] rs_cache_data_t *cache_info,
1136 [out] error_status_t *status
1138 offset =
1139 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1140 dissect_rs_cache_data_t, NDR_POINTER_REF,
1141 "cache_info:", -1);
1142 offset =
1143 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1144 dissect_error_status_t, NDR_POINTER_REF, "status:",
1145 -1);
1147 return offset;
1151 static int
1152 rs_pgo_dissect_add_member_resp (tvbuff_t * tvb, int offset,
1153 packet_info * pinfo, proto_tree * tree,
1154 dcerpc_info *di, uint8_t * drep)
1156 int buff_remain;
1158 if (di->conformant_run)
1160 return offset;
1164 [out] rs_cache_data_t *cache_info,
1165 [out] error_status_t *status
1168 buff_remain = tvb_captured_length_remaining(tvb, offset);
1170 /* found several add responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
1171 if (buff_remain > 8) {
1173 offset =
1174 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1175 dissect_rs_cache_data_t, NDR_POINTER_REF,
1176 "cache_info:", -1);
1178 offset =
1179 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1180 dissect_error_status_t, NDR_POINTER_REF, "status:",
1181 -1);
1184 return offset;
1187 static int
1188 rs_pgo_dissect_delete_member_rqst (tvbuff_t * tvb, int offset,
1189 packet_info * pinfo, proto_tree * tree,
1190 dcerpc_info *di, uint8_t * drep)
1192 if (di->conformant_run)
1194 return offset;
1198 void rs_pgo_delete_member (
1199 [in] sec_rgy_domain_t name_domain,
1200 [in] sec_rgy_name_t go_name,
1201 [in] sec_rgy_name_t person_name,
1205 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1206 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1207 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1209 return offset;
1214 static int
1215 rs_pgo_dissect_get_members_rqst (tvbuff_t * tvb, int offset,
1216 packet_info * pinfo, proto_tree * tree,
1217 dcerpc_info *di, uint8_t * drep)
1220 uint32_t max_members;
1222 if (di->conformant_run)
1224 return offset;
1228 [in] sec_rgy_domain_t name_domain,
1229 [in] sec_rgy_name_t go_name,
1230 [in, out] sec_rgy_cursor_t *member_cursor,
1231 [in] signed32 max_members,
1234 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1235 offset += 4;
1236 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1237 offset =
1238 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1239 dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
1240 "member_cursor:", -1);
1241 offset =
1242 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_rs_var1,
1243 &max_members);
1245 col_append_fstr (pinfo->cinfo, COL_INFO, " :max_members:%u", max_members);
1247 return offset;
1250 static int
1251 rs_pgo_dissect_key_transfer_rqst (tvbuff_t * tvb, int offset,
1252 packet_info * pinfo, proto_tree * tree,
1253 dcerpc_info *di, uint8_t * drep)
1256 if (di->conformant_run)
1258 return offset;
1262 [in] sec_rgy_domain_t name_domain,
1263 [in] rs_pgo_query_t requested_result_type,
1264 [in, out] rs_pgo_query_key_t *key,
1267 offset += 4;
1268 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1269 offset = dissect_rs_pgo_query_t (tvb, offset, pinfo, tree, di, drep);
1270 offset =
1271 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1272 dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
1273 -1);
1275 return offset;
1278 static int
1279 rs_pgo_dissect_key_transfer_resp (tvbuff_t * tvb, int offset,
1280 packet_info * pinfo, proto_tree * tree,
1281 dcerpc_info *di, uint8_t * drep)
1283 if (di->conformant_run)
1285 return offset;
1289 [in, out] rs_pgo_query_key_t *key,
1290 [out] rs_cache_data_t *cache_info,
1291 [out] error_status_t *status
1294 offset =
1295 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1296 dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
1297 -1);
1298 offset =
1299 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1300 dissect_rs_cache_data_t, NDR_POINTER_REF,
1301 "cache_info:", -1);
1302 offset =
1303 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1304 dissect_error_status_t, NDR_POINTER_REF, "status:",
1305 -1);
1307 return offset;
1311 static int
1312 rs_pgo_dissect_is_member_resp (tvbuff_t * tvb, int offset,
1313 packet_info * pinfo, proto_tree * tree,
1314 dcerpc_info *di, uint8_t * drep)
1317 if (di->conformant_run)
1319 return offset;
1323 [out] rs_cache_data_t *cache_info,
1324 [out] error_status_t *status
1326 offset =
1327 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1328 dissect_rs_cache_data_t, NDR_POINTER_REF,
1329 "cache_info:", -1);
1330 offset =
1331 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1332 dissect_error_status_t, NDR_POINTER_REF, "status:",
1333 -1);
1335 return offset;
1338 static int
1339 rs_pgo_dissect_is_member_rqst (tvbuff_t * tvb, int offset,
1340 packet_info * pinfo, proto_tree * tree,
1341 dcerpc_info *di, uint8_t * drep)
1344 [in] sec_rgy_domain_t name_domain,
1345 [in] sec_rgy_name_t go_name,
1346 [in] sec_rgy_name_t person_name,
1349 if (di->conformant_run)
1351 return offset;
1354 offset += 4;
1355 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1356 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1357 offset += 4;
1358 offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
1361 return offset;
1366 static int
1367 rs_pgo_dissect_get_rqst (tvbuff_t * tvb, int offset,
1368 packet_info * pinfo, proto_tree * tree,
1369 dcerpc_info *di, uint8_t * drep)
1371 uint32_t allow_aliases;
1373 if (di->conformant_run)
1375 return offset;
1379 [in] sec_rgy_domain_t name_domain,
1380 [in] rs_pgo_query_key_t *key,
1381 [in] boolean32 allow_aliases,
1382 [in, out] sec_rgy_cursor_t *item_cursor,
1385 offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
1386 offset =
1387 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1388 dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
1389 -1);
1390 offset =
1391 dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_rs_var1,
1392 &allow_aliases);
1394 col_append_fstr (pinfo->cinfo, COL_INFO, " :allow_aliases:%u",
1395 allow_aliases);
1398 offset += 4; /* XXX */
1400 offset =
1401 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1402 dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
1403 "item_cursor:", -1);
1404 return offset;
1408 static int
1409 rs_pgo_dissect_get_resp (tvbuff_t * tvb, int offset,
1410 packet_info * pinfo, proto_tree * tree,
1411 dcerpc_info *di, uint8_t * drep)
1413 if (di->conformant_run)
1415 return offset;
1419 [in, out] sec_rgy_cursor_t *item_cursor,
1420 [out] rs_cache_data_t *cache_info,
1421 [out] rs_pgo_query_result_t *result
1424 offset =
1425 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1426 dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
1427 "item_cursor:", -1);
1428 offset =
1429 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1430 dissect_rs_cache_data_t, NDR_POINTER_REF,
1431 "cache_info:", -1);
1432 offset =
1433 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1434 dissect_rs_pgo_query_result_t, NDR_POINTER_REF,
1435 "result:", -1);
1437 return offset;
1441 static int
1442 rs_pgo_dissect_delete_member_resp (tvbuff_t * tvb, int offset,
1443 packet_info * pinfo, proto_tree * tree,
1444 dcerpc_info *di, uint8_t * drep)
1447 if (di->conformant_run)
1449 return offset;
1453 [out] rs_cache_data_t *cache_info,
1454 [out] error_status_t *status
1458 offset =
1459 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1460 dissect_rs_cache_data_t, NDR_POINTER_REF,
1461 "cache_info:", -1);
1462 offset =
1463 dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
1464 dissect_error_status_t, NDR_POINTER_REF, "status:",
1465 -1);
1467 return offset;
1472 static const dcerpc_sub_dissector rs_pgo_dissectors[] = {
1473 {0, "add", rs_pgo_dissect_add_rqst, rs_pgo_dissect_add_resp},
1474 {1, "delete", rs_pgo_dissect_delete_rqst, rs_pgo_dissect_delete_resp},
1475 {2, "replace", rs_pgo_dissect_replace_rqst, rs_pgo_dissect_replace_resp},
1476 {3, "rename", rs_pgo_dissect_rename_rqst, rs_pgo_dissect_rename_resp},
1477 {4, "get", rs_pgo_dissect_get_rqst, rs_pgo_dissect_get_resp},
1478 {5, "key_transfer", rs_pgo_dissect_key_transfer_rqst,
1479 rs_pgo_dissect_key_transfer_resp},
1480 {6, "add_member", rs_pgo_dissect_add_member_rqst,
1481 rs_pgo_dissect_add_member_resp},
1482 {7, "delete_member", rs_pgo_dissect_delete_member_rqst,
1483 rs_pgo_dissect_delete_member_resp},
1484 {8, "is_member", rs_pgo_dissect_is_member_rqst,
1485 rs_pgo_dissect_is_member_resp},
1486 {9, "get_members", rs_pgo_dissect_get_members_rqst, NULL},
1487 {0, NULL, NULL, NULL},
1491 void
1492 proto_register_rs_pgo (void)
1494 static hf_register_info hf[] = {
1495 {&hf_rs_pgo_opnum,
1496 {"Operation", "rs_pgo.opnum", FT_UINT16, BASE_DEC, NULL, 0x0,
1497 NULL, HFILL}},
1498 {&hf_error_status_t,
1499 {"Error status", "rs_pgo.error_status", FT_UINT32, BASE_DEC, NULL,
1500 0x0, NULL, HFILL}},
1501 {&hf_rs_pgo_query_key_t,
1502 {"Query key", "rs_pgo.query_key", FT_UINT32, BASE_DEC,
1503 NULL, 0x0, NULL, HFILL}},
1504 {&hf_rs_pgo_query_result_t,
1505 {"Query result", "rs_pgo.query_result", FT_UINT32,
1506 BASE_DEC, NULL, 0x0, NULL, HFILL}},
1507 {&hf_rs_pgo_query_t,
1508 {"Query", "rs_pgo.query", FT_UINT32, BASE_DEC, NULL,
1509 0x0, NULL, HFILL}},
1510 {&hf_rs_sec_rgy_pgo_item_t_quota,
1511 {"Quota", "rs_pgo.quota",
1512 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1513 {&hf_rs_sec_rgy_pgo_item_t_unix_num,
1514 {"Unix num",
1515 "rs_pgo.unix_num", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
1516 HFILL}},
1517 {&hf_rs_timeval,
1518 {"Timeval", "rs_pgo.timeval", FT_RELATIVE_TIME, BASE_NONE, NULL,
1519 0x0, NULL, HFILL}},
1520 {&hf_rs_uuid1,
1521 {"Uuid1", "rs_pgo.uuid1", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1522 {&hf_rs_var1,
1523 {"Var1", "rs_pgo.var1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
1524 HFILL}},
1525 {&hf_sec_rgy_domain_t,
1526 {"Domain", "rs_pgo.domain", FT_UINT32, BASE_DEC,
1527 NULL, 0x0, NULL, HFILL}},
1528 {&hf_sec_rgy_name_t_principalName_string,
1529 {"Name principalName", "rs_pgo.name_principalName", FT_STRING, BASE_NONE, NULL,
1530 0x0, NULL, HFILL}},
1531 {&hf_sec_rgy_name_t_size,
1532 {"Name_t size", "rs_pgo.name_t_size", FT_UINT32,
1533 BASE_DEC, NULL, 0x0, NULL, HFILL}},
1534 {&hf_sec_rgy_pgo_flags_t,
1535 {"Flags", "rs_pgo.flags", FT_UINT32,
1536 BASE_HEX, NULL, 0x0, NULL, HFILL}},
1537 {&hf_sec_rgy_pname_t_size,
1538 {"Pname_t size", "rs_pgo.pname_t_size", FT_UINT32, BASE_DEC, NULL,
1539 0x0, NULL, HFILL}},
1540 {&hf_sec_rgy_pname_t_principalName_string,
1541 {"Pname principalName", "rs_pgo.pname_principalName", FT_STRING,
1542 BASE_NONE, NULL, 0x0, NULL, HFILL}},
1543 {&hf_rs_pgo_unix_num_key_t,
1544 {"Unix num key", "rs_pgo.unix_num_key_t", FT_UINT32,
1545 BASE_DEC,
1546 NULL, 0x0, NULL, HFILL}}
1549 static int *ett[] = {
1550 &ett_error_status_t,
1551 &ett_rgy_acct_user_flags_t,
1552 &ett_rs_pgo,
1553 &ett_rs_pgo_id_key_t,
1554 &ett_rs_pgo_query_key_t,
1555 &ett_rs_pgo_query_result_t,
1556 &ett_rs_pgo_query_t,
1557 &ett_rs_pgo_result_t,
1558 &ett_rs_pgo_unix_num_key_t,
1559 &ett_sec_attr_component_name_t,
1560 &ett_sec_passwd_type_t,
1561 &ett_sec_rgy_acct_admin_flags_t,
1562 &ett_sec_rgy_acct_admin_t,
1563 &ett_sec_rgy_acct_auth_flags_t,
1564 &ett_sec_rgy_acct_key_t,
1565 &ett_sec_rgy_acct_user_t,
1566 &ett_sec_rgy_cursor_t,
1567 &ett_sec_rgy_foreign_id_t,
1568 &ett_sec_rgy_login_name_t,
1569 &ett_sec_rgy_name_t,
1570 &ett_sec_rgy_domain_t,
1571 &ett_sec_rgy_pgo_flags_t,
1572 &ett_sec_rgy_pgo_item_t,
1573 &ett_sec_rgy_pname_t,
1574 &ett_sec_rgy_sid_t,
1575 &ett_sec_rgy_unix_passwd_buf_t,
1576 &ett_sec_rgy_unix_sid_t,
1577 &ett_sec_timeval_sec_t,
1578 &ett_rs_cache_data_t,
1580 proto_rs_pgo =
1581 proto_register_protocol ("DCE Name Service", "RS_PGO", "rs_pgo");
1582 proto_register_field_array (proto_rs_pgo, hf, array_length (hf));
1583 proto_register_subtree_array (ett, array_length (ett));
1586 void
1587 proto_reg_handoff_rs_pgo (void)
1589 /* Register the protocol as dcerpc */
1590 dcerpc_init_uuid (proto_rs_pgo, ett_rs_pgo, &uuid_rs_pgo, ver_rs_pgo,
1591 rs_pgo_dissectors, hf_rs_pgo_opnum);
1595 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1597 * Local Variables:
1598 * c-basic-offset: 2
1599 * tab-width: 8
1600 * indent-tabs-mode: nil
1601 * End:
1603 * ex: set shiftwidth=2 tabstop=8 expandtab:
1604 * :indentSize=2:tabSize=8:noTabs=true: