FT_STRING -> FT_GUID
[metze/wireshark/wip.git] / epan / dissectors / packet-dcerpc-rs_pgo.c
1 /* packet-dcerpc-rs_pgo.c
2  *
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
7  *
8  * $Id$
9  *
10  * Wireshark - Network traffic analyzer
11  * By Gerald Combs <gerald@wireshark.org>
12  * Copyright 1998 Gerald Combs
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version 2
17  * of the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27  */
28
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32
33
34 #ifdef HAVE_SYS_TYPES_H
35 #include <sys/types.h>
36 #endif
37
38 #include <string.h>
39
40 #include <glib.h>
41 #include <epan/packet.h>
42 #include "packet-dcerpc.h"
43 #include "packet-dcerpc-dce122.h"
44 /* 
45 delete
46 dissect_rgy_acct_user_flags_t
47 */
48
49 static int proto_rs_pgo = -1;
50 static int hf_rs_pgo_opnum = -1;
51 static int hf_rgy_name_domain = -1;
52 static int hf_rgy_sec_rgy_name_max_len = -1;
53 static int hf_rgy_sec_rgy_name_t_size = -1;
54 static int hf_rgy_sec_rgy_name_t = -1;
55 static int hf_rgy_get_rqst_name_domain = -1;
56 static int hf_rgy_get_rqst_var = -1;
57 static int hf_rgy_get_rqst_var2 = -1;
58 static int hf_rgy_get_rqst_key_size = -1;
59 static int hf_rgy_get_rqst_key_t = -1;
60 static int hf_rgy_key_transfer_rqst_var1 = -1;
61 static int hf_rgy_key_transfer_rqst_var2 = -1;
62 static int hf_rgy_key_transfer_rqst_var3 = -1;
63 static int hf_rgy_is_member_rqst_var1 = -1;
64 static int hf_rgy_is_member_rqst_var2 = -1;
65 static int hf_rgy_is_member_rqst_var3 = -1;
66 static int hf_rgy_is_member_rqst_var4 = -1;
67 static int hf_rgy_is_member_rqst_key1 = -1;
68 static int hf_rgy_is_member_rqst_key2 = -1;
69 static int hf_rgy_is_member_rqst_key1_size = -1;
70 static int hf_rgy_is_member_rqst_key2_size = -1;
71 static int hf_rs_var1 = -1;
72 static int hf_rs_pgo_query_result_t = -1;
73 static int hf_sec_rgy_pgo_item_t = -1;
74 static int hf_rs_pgo_id_key_t = -1;
75 static int hf_rs_pgo_query_t = -1;
76 static int hf_rs_pgo_query_key_t = -1;
77 static int hf_error_status_t = -1;
78 static int hf_sec_rgy_pgo_flags_t = -1;
79 static int hf_sec_passwd_version_t = -1;
80 static int hf_rgy_acct_user_flags_t = -1;
81 static int hf_rs_sec_rgy_pgo_item_t_quota = -1;
82 static int hf_rs_sec_rgy_pgo_item_t_unix_num = -1;
83 static int hf_rs_timeval = -1;
84 static int hf_rs_uuid1 = -1;
85 static int hf_sec_attr_component_name_t_handle = -1;
86 static int hf_sec_attr_component_name_t_valid = -1;
87 static int hf_sec_passwd_type_t = -1;
88 static int hf_sec_rgy_acct_admin_flags = -1;
89 static int hf_sec_rgy_acct_auth_flags_t = -1;
90 static int hf_sec_rgy_acct_key_t = -1;
91 static int hf_sec_rgy_domain_t = -1;
92 static int hf_sec_rgy_name_t_principalName_string = -1;
93 static int hf_sec_rgy_name_t_size = -1;
94 static int hf_sec_rgy_pname_t_principalName_string = -1;
95 static int hf_sec_rgy_pname_t_size = -1;
96 static int hf_sec_rgy_unix_sid_t_group = -1;
97 static int hf_sec_rgy_unix_sid_t_org = -1;
98 static int hf_sec_rgy_unix_sid_t_person = -1;
99 static int hf_sec_timeval_sec_t = -1;
100 static int hf_rs_pgo_unix_num_key_t = -1;
101
102 static gint ett_rs_cache_data_t = -1;
103 static gint ett_sec_rgy_domain_t = -1;
104 static gint ett_rgy_acct_user_flags_t = -1;
105 static gint ett_sec_attr_component_name_t = -1;
106 static gint ett_sec_passwd_type_t = -1;
107 static gint ett_sec_rgy_acct_admin_flags_t = -1;
108 static gint ett_sec_rgy_acct_admin_t = -1;
109 static gint ett_sec_rgy_acct_auth_flags_t = -1;
110 static gint ett_sec_rgy_acct_key_t = -1;
111 static gint ett_sec_rgy_acct_user_t = -1;
112 static gint ett_sec_rgy_cursor_t = -1;
113 static gint ett_sec_rgy_foreign_id_t = -1;
114 static gint ett_sec_rgy_login_name_t = -1;
115 static gint ett_sec_rgy_name_t = -1;
116 static gint ett_sec_rgy_pgo_item_t = -1;
117 static gint ett_sec_rgy_pname_t = -1;
118 static gint ett_sec_rgy_sid_t = -1;
119 static gint ett_sec_rgy_unix_passwd_buf_t = -1;
120 static gint ett_sec_rgy_unix_sid_t = -1;
121 static gint ett_sec_timeval_sec_t = -1;
122 static gint ett_sec_rgy_pgo_flags_t = -1;
123 static gint ett_error_status_t = -1;
124 static gint ett_rs_pgo_query_t = -1;
125 static gint ett_rs_pgo_query_key_t = -1;
126 static gint ett_rs_pgo_id_key_t = -1;
127 static gint ett_rs_pgo_unix_num_key_t = -1;
128 static gint ett_rs_pgo_query_result_t = -1;
129 static gint ett_rs_pgo_result_t = -1;
130
131
132 #define sec_rgy_acct_admin_valid  0x1
133 #define sec_rgy_acct_admin_audit   0x2
134 #define sec_rgy_acct_admin_server  0x4
135 #define sec_rgy_acct_admin_client  0x8
136 #define sec_rgy_acct_admin_flags_none  0
137 #define sec_rgy_acct_auth_post_dated        0x1
138 #define sec_rgy_acct_auth_forwardable       0x2
139 #define sec_rgy_acct_auth_tgt               0x4
140 #define sec_rgy_acct_auth_renewable         0x8
141 #define sec_rgy_acct_auth_proxiable        0x10
142 #define sec_rgy_acct_auth_dup_skey   0x20
143 #define sec_rgy_acct_auth_user_to_user  0x40
144 #define sec_rgy_acct_auth_flags_none  0
145 #define sec_rgy_acct_user_passwd_valid   0x1
146 #define sec_rgy_acct_user_flags_none  0
147 #define rs_acct_part_user        0x1
148 #define rs_acct_part_admin      0x2
149 #define rs_acct_part_passwd    0x4
150 #define rs_acct_part_unused     0x8
151 #define rs_acct_part_login_name  0x10
152 #define sec_rgy_pgo_is_an_alias   0x1
153 #define sec_rgy_pgo_is_required   0x2
154 #define sec_rgy_pgo_projlist_ok  0x4
155 #define sec_rgy_pgo_flags_none  0
156 #define sec_rgy_acct_user_passwd_valid  0x1
157 #define sec_rgy_acct_user_flags_none  0
158
159 static gint ett_rs_pgo = -1;
160
161 static e_uuid_t uuid_rs_pgo =
162   { 0x4c878280, 0x3000, 0x0000, {0x0d, 0x00, 0x02, 0x87, 0x14, 0x00, 0x00,
163                                  0x00}
164 };
165 static guint16 ver_rs_pgo = 1;
166
167
168 static int
169 dissect_error_status_t (tvbuff_t * tvb, int offset,
170                         packet_info * pinfo, proto_tree * parent_tree,
171                         guint8 * drep)
172 {
173   proto_item *item = NULL;
174   proto_tree *tree = NULL;
175   int old_offset = offset;
176   guint32 st;
177   dcerpc_info *di;
178   const char *st_str;
179
180   di = pinfo->private_data;
181   if (di->conformant_run)
182     {
183       return offset;
184     }
185
186   if (parent_tree)
187     {
188       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
189                                   "error_status_t");
190       tree = proto_item_add_subtree (item, ett_error_status_t);
191     }
192
193   offset =
194     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_error_status_t,
195                         &st);
196   st_str = val_to_str (st, dce_error_vals, "%u");
197
198   if (check_col (pinfo->cinfo, COL_INFO))
199     col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
200
201   proto_item_set_len (item, offset - old_offset);
202   return offset;
203 }
204
205
206 static int
207 dissect_sec_rgy_pname_t (tvbuff_t * tvb, int offset,
208                          packet_info * pinfo, proto_tree * parent_tree,
209                          guint8 * drep)
210 {
211
212
213   proto_item *item = NULL;
214   proto_tree *tree = NULL;
215   int old_offset = offset;
216 #define    sec_rgy_pname_t_size 257
217 /*
218 dissect    sec_rgy_pname const signed32        sec_rgy_pname_t_size  = 257; * Include final '\0' *
219           typedef [string] char sec_rgy_pname_t[sec_rgy_pname_t_size];
220 */
221   guint32 string_size;
222   const guint8 *namestring;
223   dcerpc_info *di;
224
225   di = pinfo->private_data;
226   if (di->conformant_run)
227     {
228       return offset;
229     }
230
231
232   if (parent_tree)
233     {
234       item =
235         proto_tree_add_text (parent_tree, tvb, offset, -1, "sec_rgy_pname_t");
236       tree = proto_item_add_subtree (item, ett_sec_rgy_pname_t);
237     }
238
239   offset =
240     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
241                         hf_sec_rgy_pname_t_size, &string_size);
242   if (check_col (pinfo->cinfo, COL_INFO))
243     col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
244   if (string_size < sec_rgy_pname_t_size)
245     {
246 /* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
247
248       proto_tree_add_string (tree, hf_sec_rgy_pname_t_principalName_string,
249                              tvb, offset, string_size, tvb_get_ptr (tvb,
250                                                                     offset,
251                                                                     string_size));
252       if (string_size > 1)
253         {
254           namestring = tvb_get_ptr (tvb, offset, string_size);
255           if (check_col (pinfo->cinfo, COL_INFO))
256             col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
257                              namestring);
258         }
259       offset += string_size;
260     }
261   else
262     {
263       if (check_col (pinfo->cinfo, COL_INFO))
264         col_append_fstr (pinfo->cinfo, COL_INFO,
265                          " :FIXME!: Invalid string length of  %u",
266                          string_size);
267     }
268
269   proto_item_set_len (item, offset - old_offset);
270   return offset;
271 }
272
273 static int
274 dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
275                              packet_info * pinfo, proto_tree * parent_tree,
276                              guint8 * drep)
277 {
278
279 /*
280
281 */
282
283   proto_item *item = NULL;
284   proto_tree *tree = NULL;
285   int old_offset = offset;
286   dcerpc_info *di;
287   guint32 flags;
288
289 /*
290     typedef bitset  sec_rgy_pgo_flags_t;
291 */
292
293   di = pinfo->private_data;
294   if (di->conformant_run)
295     {
296       return offset;
297     }
298
299
300   if (parent_tree)
301     {
302       item =
303         proto_tree_add_text (parent_tree, tvb, offset, -1,
304                              "sec_rgy_pgo_flags_t ");
305       tree = proto_item_add_subtree (item, ett_sec_rgy_pgo_flags_t);
306     }
307
308   offset =
309     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
310                         hf_sec_rgy_pgo_flags_t, &flags);
311
312 /*
313      *
314      * s e c _ r g y _ p g o _ f l a g s _ t
315      *
316
317         * pgo item is an alias *
318         const unsigned32 sec_rgy_pgo_is_an_alias  = 0x1;
319
320         * pgo item is required - cannot be deleted *
321         const unsigned32 sec_rgy_pgo_is_required  = 0x2;
322
323         *
324          * projlist_ok: on person items indicates person can have a concurrent
325          * group set on group items indicates this group can appear on a
326          * concurrent group set.  On org items this flag is undefined.
327          *
328         const unsigned32 sec_rgy_pgo_projlist_ok = 0x4;
329
330         *
331         * bits 4-32 unused
332         *
333         const unsigned32 sec_rgy_pgo_flags_none = 0;
334 */
335 #define sec_rgy_pgo_is_an_alias   0x1
336 #define sec_rgy_pgo_is_required    0x2
337 #define sec_rgy_pgo_projlist_ok 0x4
338 #define sec_rgy_pgo_flags_none  0
339
340
341   if (check_col (pinfo->cinfo, COL_INFO))
342     col_append_str (pinfo->cinfo, COL_INFO, " PgoFlags=");
343   if ((flags & sec_rgy_pgo_is_an_alias) == sec_rgy_pgo_is_an_alias)
344     {
345       if (check_col (pinfo->cinfo, COL_INFO))
346         col_append_str (pinfo->cinfo, COL_INFO, ":IS_AN_ALIAS");
347     }
348   if ((flags & sec_rgy_pgo_is_required) == sec_rgy_pgo_is_required)
349     {
350       if (check_col (pinfo->cinfo, COL_INFO))
351         col_append_str (pinfo->cinfo, COL_INFO, ":IS_REQUIRED");
352     }
353   if ((flags & sec_rgy_pgo_projlist_ok) == sec_rgy_pgo_projlist_ok)
354     {
355       if (check_col (pinfo->cinfo, COL_INFO))
356         col_append_str (pinfo->cinfo, COL_INFO, ":PROJLIST_OK");
357     }
358   if ((flags & sec_rgy_acct_admin_client) == sec_rgy_acct_admin_client)
359     {
360       if (check_col (pinfo->cinfo, COL_INFO))
361         col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
362     }
363   if ((flags & sec_rgy_pgo_flags_none) == sec_rgy_pgo_flags_none)
364     {
365       if (check_col (pinfo->cinfo, COL_INFO))
366         col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
367     }
368
369   proto_item_set_len (item, offset - old_offset);
370   return offset;
371 }
372
373
374
375
376 static int
377 dissect_rs_cache_data_t (tvbuff_t * tvb, int offset,
378                          packet_info * pinfo, proto_tree * parent_tree,
379                          guint8 * drep)
380 {
381
382 /*
383     typedef struct {
384         uuid_t              site_id;
385         sec_timeval_sec_t   person_dtm;
386         sec_timeval_sec_t   group_dtm;
387         sec_timeval_sec_t   org_dtm;
388     } rs_cache_data_t;
389 */
390
391
392   proto_item *item = NULL;
393   proto_tree *tree = NULL;
394   int old_offset = offset;
395   dcerpc_info *di;
396   guint32 person_dtm, group_dtm, org_dtm;
397   e_uuid_t uuid1;
398
399
400   di = pinfo->private_data;
401   if (di->conformant_run)
402     {
403       return offset;
404     }
405
406
407   if (parent_tree)
408     {
409       item =
410         proto_tree_add_text (parent_tree, tvb, offset, -1, "rs_cache_data_t");
411       tree = proto_item_add_subtree (item, ett_rs_cache_data_t);
412     }
413
414
415   offset =
416     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &uuid1);
417   offset =
418     dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
419                            &person_dtm);
420   offset =
421     dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
422                            &group_dtm);
423   offset =
424     dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
425                            &org_dtm);
426
427   if (check_col (pinfo->cinfo, COL_INFO))
428     col_append_fstr (pinfo->cinfo, COL_INFO,
429                      " siteid %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x person_dtm:%u group_dtm:%u org_dtm:%u",
430                      uuid1.Data1, uuid1.Data2, uuid1.Data3, uuid1.Data4[0],
431                      uuid1.Data4[1], uuid1.Data4[2], uuid1.Data4[3],
432                      uuid1.Data4[4], uuid1.Data4[5], uuid1.Data4[6],
433                      uuid1.Data4[7], person_dtm, group_dtm, org_dtm);
434
435   proto_item_set_len (item, offset - old_offset);
436   return offset;
437 }
438
439
440
441 static int
442 dissect_sec_rgy_name_t (tvbuff_t * tvb, int offset,
443                         packet_info * pinfo, proto_tree * parent_tree,
444                         guint8 * drep)
445 {
446
447
448   proto_item *item = NULL;
449   proto_tree *tree = NULL;
450   int old_offset = offset;
451 #define    sec_rgy_name_t_size  1025
452 /*    typedef [string] char sec_rgy_name_t[sec_rgy_name_t_size]; */
453   guint32 string_size;
454   const guint8 *namestring;
455   dcerpc_info *di;
456
457   di = pinfo->private_data;
458   if (di->conformant_run)
459     {
460       return offset;
461     }
462
463
464   if (parent_tree)
465     {
466       item =
467         proto_tree_add_text (parent_tree, tvb, offset, -1, "sec_rgy_name_t");
468       tree = proto_item_add_subtree (item, ett_sec_rgy_name_t);
469     }
470
471   offset =
472     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
473                         hf_sec_rgy_name_t_size, &string_size);
474   if (check_col (pinfo->cinfo, COL_INFO))
475     col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
476   if (string_size < sec_rgy_name_t_size)
477     {
478 /* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
479
480       proto_tree_add_string (tree, hf_sec_rgy_name_t_principalName_string,
481                              tvb, offset, string_size, tvb_get_ptr (tvb,
482                                                                     offset,
483                                                                     string_size));
484       if (string_size > 1)
485         {
486           namestring = tvb_get_ptr (tvb, offset, string_size);
487           if (check_col (pinfo->cinfo, COL_INFO))
488             col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
489                              namestring);
490         }
491       offset += string_size;
492     }
493   else
494     {
495       if (check_col (pinfo->cinfo, COL_INFO))
496         col_append_fstr (pinfo->cinfo, COL_INFO,
497                          " :FIXME!: Invalid string length of  %u",
498                          string_size);
499     }
500
501   proto_item_set_len (item, offset - old_offset);
502   return offset;
503 }
504
505
506 static int
507 dissect_sec_rgy_domain_t (tvbuff_t * tvb, int offset,
508                           packet_info * pinfo, proto_tree * parent_tree,
509                           guint8 * drep)
510 {
511
512 /*
513     typedef signed32    sec_rgy_domain_t;
514 */
515
516   proto_item *item = NULL;
517   proto_tree *tree = NULL;
518   int old_offset = offset;
519   dcerpc_info *di;
520   guint32 domain_t;
521
522   di = pinfo->private_data;
523   if (di->conformant_run)
524     {
525       return offset;
526     }
527
528
529   if (parent_tree)
530     {
531       item =
532         proto_tree_add_text (parent_tree, tvb, offset, -1, "sec_rgy_domain_t");
533       tree = proto_item_add_subtree (item, ett_sec_rgy_domain_t);
534     }
535
536
537   offset =
538     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_sec_rgy_domain_t,
539                         &domain_t);
540
541   if (check_col (pinfo->cinfo, COL_INFO))
542     col_append_fstr (pinfo->cinfo, COL_INFO, " sec_rgy_domain_t:%u",
543                      domain_t);
544
545
546   proto_item_set_len (item, offset - old_offset);
547   return offset;
548 }
549
550 static int
551 dissect_sec_rgy_pgo_item_t (tvbuff_t * tvb, int offset,
552                             packet_info * pinfo, proto_tree * parent_tree,
553                             guint8 * drep)
554 {
555
556 /*
557     typedef struct {
558         uuid_t              id;
559         signed32            unix_num;
560         signed32            quota;
561         sec_rgy_pgo_flags_t flags;
562         sec_rgy_pname_t     fullname;
563     }               sec_rgy_pgo_item_t;
564
565 */
566
567   proto_item *item = NULL;
568   proto_tree *tree = NULL;
569   int old_offset = offset;
570   dcerpc_info *di;
571   e_uuid_t id;
572   guint32 unix_num, quota;
573
574   di = pinfo->private_data;
575   if (di->conformant_run)
576     {
577       return offset;
578     }
579
580
581   if (parent_tree)
582     {
583       item =
584         proto_tree_add_text (parent_tree, tvb, offset, -1,
585                              " sec_rgy_pgo_item_t ");
586       tree = proto_item_add_subtree (item, ett_sec_rgy_pgo_item_t);
587     }
588
589   offset =
590     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &id);
591   offset =
592     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
593                         hf_rs_sec_rgy_pgo_item_t_unix_num, &unix_num);
594   offset =
595     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
596                         hf_rs_sec_rgy_pgo_item_t_quota, &quota);
597   offset = dissect_sec_rgy_pgo_flags_t (tvb, offset, pinfo, tree, drep);
598   offset += 4;                  /* XXX */
599   offset = dissect_sec_rgy_pname_t (tvb, offset, pinfo, tree, drep);
600
601   if (check_col (pinfo->cinfo, COL_INFO))
602     col_append_fstr (pinfo->cinfo, COL_INFO,
603                      " sec_rgy_pgo_item_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x unix_num:%u quota:%u",
604                      id.Data1, id.Data2, id.Data3, id.Data4[0],
605                      id.Data4[1], id.Data4[2], id.Data4[3],
606                      id.Data4[4], id.Data4[5], id.Data4[6],
607                      id.Data4[7], unix_num, quota);
608
609   proto_item_set_len (item, offset - old_offset);
610   return offset;
611 }
612
613
614 static int
615 dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
616                           packet_info * pinfo, proto_tree * parent_tree,
617                           guint8 * drep)
618 {
619
620 /*
621      * Database cursor for iterative operations
622      *
623     typedef struct {
624         uuid_t          source;
625         signed32        handle;
626         boolean32       valid;
627     }               sec_rgy_cursor_t;
628
629  
630 */
631
632   proto_item *item = NULL;
633   proto_tree *tree = NULL;
634   int old_offset = offset;
635   dcerpc_info *di;
636   e_uuid_t source;
637   guint32 handle, valid;
638
639   di = pinfo->private_data;
640   if (di->conformant_run)
641     {
642       return offset;
643     }
644
645
646   if (parent_tree)
647     {
648       item =
649         proto_tree_add_text (parent_tree, tvb, offset, -1,
650                              " sec_rgy_cursor_t ");
651       tree = proto_item_add_subtree (item, ett_sec_rgy_cursor_t);
652     }
653
654   offset =
655     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &source);
656   offset =
657     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
658                         hf_rs_sec_rgy_pgo_item_t_unix_num, &handle);
659   offset =
660     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
661                         hf_rs_sec_rgy_pgo_item_t_quota, &valid);
662
663   if (check_col (pinfo->cinfo, COL_INFO))
664     col_append_fstr (pinfo->cinfo, COL_INFO,
665                      " sec_rgy_cursor_t - source %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x handle:%u valid:%u",
666                      source.Data1, source.Data2, source.Data3,
667                      source.Data4[0], source.Data4[1], source.Data4[2],
668                      source.Data4[3], source.Data4[4], source.Data4[5],
669                      source.Data4[6], source.Data4[7], handle, valid);
670
671   proto_item_set_len (item, offset - old_offset);
672   return offset;
673 }
674
675 static int
676 dissect_rs_pgo_query_t (tvbuff_t * tvb, int offset,
677                         packet_info * pinfo, proto_tree * parent_tree,
678                         guint8 * drep)
679 {
680
681   typedef enum
682   {
683     rs_pgo_query_name,
684     rs_pgo_query_id,
685     rs_pgo_query_unix_num,
686     rs_pgo_query_next,
687     rs_pgo_query_none
688   } rs_pgo_query_t;
689
690
691   proto_item *item = NULL;
692   proto_tree *tree = NULL;
693   int old_offset = offset;
694   dcerpc_info *di;
695   guint8 query_t;
696
697   di = pinfo->private_data;
698   if (di->conformant_run)
699     {
700       return offset;
701     }
702
703
704   if (parent_tree)
705     {
706       item =
707         proto_tree_add_text (parent_tree, tvb, offset, -1, "rs_pgo_query_t ");
708       tree = proto_item_add_subtree (item, ett_rs_pgo_query_t);
709     }
710   offset =
711     dissect_ndr_uint8 (tvb, offset, pinfo, tree, drep, hf_rs_pgo_query_t,
712                        &query_t);
713   if (check_col (pinfo->cinfo, COL_INFO))
714     col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_t:");
715
716   switch (query_t)
717     {
718     case rs_pgo_query_name:
719       if (check_col (pinfo->cinfo, COL_INFO))
720         col_append_str (pinfo->cinfo, COL_INFO, "NAME");
721       break;
722     case rs_pgo_query_id:
723       if (check_col (pinfo->cinfo, COL_INFO))
724         col_append_str (pinfo->cinfo, COL_INFO, "ID");
725       break;
726     case rs_pgo_query_unix_num:
727       if (check_col (pinfo->cinfo, COL_INFO))
728         col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
729       break;
730     case rs_pgo_query_next:
731       if (check_col (pinfo->cinfo, COL_INFO))
732         col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
733       break;
734     case rs_pgo_query_none:
735       if (check_col (pinfo->cinfo, COL_INFO))
736         col_append_str (pinfo->cinfo, COL_INFO, "NONE");
737       break;
738     default:
739       if (check_col (pinfo->cinfo, COL_INFO))
740         col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
741       break;
742       ;
743     }
744
745
746   proto_item_set_len (item, offset - old_offset);
747   return offset;
748 }
749 static int
750 dissect_rs_pgo_id_key_t (tvbuff_t * tvb, int offset,
751                          packet_info * pinfo, proto_tree * parent_tree,
752                          guint8 * drep)
753 {
754
755 /*
756     typedef struct {
757         uuid_t          id;
758         sec_rgy_name_t  scope;
759     } rs_pgo_id_key_t;
760
761 */
762
763   proto_item *item = NULL;
764   proto_tree *tree = NULL;
765   int old_offset = offset;
766   dcerpc_info *di;
767   e_uuid_t id;
768
769   di = pinfo->private_data;
770   if (di->conformant_run)
771     {
772       return offset;
773     }
774
775
776   if (parent_tree)
777     {
778       item =
779         proto_tree_add_text (parent_tree, tvb, offset, -1,
780                              "rs_pgo_id_key_t ");
781       tree = proto_item_add_subtree (item, ett_rs_pgo_id_key_t);
782     }
783
784   offset =
785     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &id);
786   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
787
788   if (check_col (pinfo->cinfo, COL_INFO))
789     col_append_fstr (pinfo->cinfo, COL_INFO,
790                      " rs_pgo_id_key_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
791                      id.Data1, id.Data2, id.Data3, id.Data4[0],
792                      id.Data4[1], id.Data4[2], id.Data4[3],
793                      id.Data4[4], id.Data4[5], id.Data4[6], id.Data4[7]);
794
795   proto_item_set_len (item, offset - old_offset);
796   return offset;
797 }
798
799
800 static int
801 dissect_rs_pgo_result_t (tvbuff_t * tvb, int offset,
802                          packet_info * pinfo, proto_tree * parent_tree,
803                          guint8 * drep)
804 {
805
806 /*
807     typedef struct {
808         sec_rgy_name_t      name;
809         sec_rgy_pgo_item_t  item;
810     } rs_pgo_result_t;
811
812
813 */
814
815   proto_item *item = NULL;
816   proto_tree *tree = NULL;
817   int old_offset = offset;
818   dcerpc_info *di;
819
820   di = pinfo->private_data;
821   if (di->conformant_run)
822     {
823       return offset;
824     }
825
826   if (parent_tree)
827     {
828       item =
829         proto_tree_add_text (parent_tree, tvb, offset, -1,
830                              "rs_pgo_result_t ");
831       tree = proto_item_add_subtree (item, ett_rs_pgo_result_t);
832     }
833
834   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
835   offset = dissect_sec_rgy_pgo_item_t (tvb, offset, pinfo, tree, drep);
836
837   proto_item_set_len (item, offset - old_offset);
838   return offset;
839 }
840
841
842
843 static int
844 dissect_rs_pgo_unix_num_key_t (tvbuff_t * tvb, int offset,
845                                packet_info * pinfo, proto_tree * parent_tree,
846                                guint8 * drep)
847 {
848
849 /*
850     typedef struct {
851         signed32        unix_num;
852         sec_rgy_name_t  scope;
853     } rs_pgo_unix_num_key_t;
854
855
856 r
857
858 */
859
860   proto_item *item = NULL;
861   proto_tree *tree = NULL;
862   int old_offset = offset;
863   dcerpc_info *di;
864   guint32 rs_pgo_unix_num_key_t;
865
866   di = pinfo->private_data;
867   if (di->conformant_run)
868     {
869       return offset;
870     }
871
872
873   if (parent_tree)
874     {
875       item =
876         proto_tree_add_text (parent_tree, tvb, offset, -1,
877                              " rs_pgo_unix_num_key_t ");
878       tree = proto_item_add_subtree (item, ett_rs_pgo_unix_num_key_t);
879     }
880
881   offset =
882     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
883                         hf_rs_pgo_unix_num_key_t, &rs_pgo_unix_num_key_t);
884   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
885
886   if (check_col (pinfo->cinfo, COL_INFO))
887     col_append_fstr (pinfo->cinfo, COL_INFO,
888                      " rs_pgo_unix_num_key_t:%u", rs_pgo_unix_num_key_t);
889
890   proto_item_set_len (item, offset - old_offset);
891   return offset;
892 }
893
894
895 static int
896 dissect_rs_pgo_query_key_t (tvbuff_t * tvb, int offset,
897                             packet_info * pinfo, proto_tree * parent_tree,
898                             guint8 * drep)
899 {
900
901   typedef enum
902   {
903     rs_pgo_query_name,
904     rs_pgo_query_id,
905     rs_pgo_query_unix_num,
906     rs_pgo_query_next,
907     rs_pgo_query_none
908   } rs_pgo_query_t;
909 /*
910     typedef union switch (rs_pgo_query_t query) tagged_union {
911         case rs_pgo_query_name:
912             sec_rgy_name_t              name;
913
914         case rs_pgo_query_id:
915             rs_pgo_id_key_t             id_key;
916
917         case rs_pgo_query_unix_num:
918             rs_pgo_unix_num_key_t       unix_num_key;
919
920         case rs_pgo_query_next:
921             sec_rgy_name_t              scope;
922
923         default:
924             ;                       * empty branch of union *
925
926     } rs_pgo_query_key_t;
927 */
928
929
930   proto_item *item = NULL;
931   proto_tree *tree = NULL;
932   int old_offset = offset;
933   dcerpc_info *di;
934   guint16 query_t;
935
936   di = pinfo->private_data;
937   if (di->conformant_run)
938     {
939       return offset;
940     }
941
942
943   if (parent_tree)
944     {
945       item =
946         proto_tree_add_text (parent_tree, tvb, offset, -1,
947                              "rs_pgo_query_key_t ");
948       tree = proto_item_add_subtree (item, ett_rs_pgo_query_key_t);
949     }
950   offset =
951     dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, hf_rs_pgo_query_key_t,
952                         &query_t);
953   if (check_col (pinfo->cinfo, COL_INFO))
954     col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_key_t:");
955   offset += 4;
956   switch (query_t)
957     {
958     case rs_pgo_query_name:
959       if (check_col (pinfo->cinfo, COL_INFO))
960         col_append_str (pinfo->cinfo, COL_INFO, "NAME");
961       offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
962       break;
963     case rs_pgo_query_id:
964       if (check_col (pinfo->cinfo, COL_INFO))
965         col_append_str (pinfo->cinfo, COL_INFO, "ID");
966       offset = dissect_rs_pgo_id_key_t (tvb, offset, pinfo, tree, drep);
967       break;
968     case rs_pgo_query_unix_num:
969       if (check_col (pinfo->cinfo, COL_INFO))
970         col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
971       offset = dissect_rs_pgo_unix_num_key_t (tvb, offset, pinfo, tree, drep);
972       break;
973     case rs_pgo_query_next:
974       if (check_col (pinfo->cinfo, COL_INFO))
975         col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
976       offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
977       break;
978     case rs_pgo_query_none:
979       if (check_col (pinfo->cinfo, COL_INFO))
980         col_append_str (pinfo->cinfo, COL_INFO, "NONE");
981       break;
982
983     default:
984       if (check_col (pinfo->cinfo, COL_INFO))
985         col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
986       ;
987     }
988
989   proto_item_set_len (item, offset - old_offset);
990   return offset;
991 }
992
993
994 static int
995 dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset,
996                                packet_info * pinfo, proto_tree * parent_tree,
997                                guint8 * drep)
998 {
999   proto_item *item = NULL;
1000   proto_tree *tree = NULL;
1001   int old_offset = offset;
1002   guint32 st;
1003   dcerpc_info *di;
1004   const char *status;
1005 #define error_status_ok 0
1006
1007   /*
1008      typedef union switch (signed32 status) tagged_union {
1009      case error_status_ok:
1010      rs_pgo_result_t     result;
1011
1012      default:
1013      ;                      * empty branch of union *
1014
1015      } rs_pgo_query_result_t;
1016    */
1017
1018   di = pinfo->private_data;
1019   if (di->conformant_run)
1020     {
1021       return offset;
1022     }
1023
1024   if (parent_tree)
1025     {
1026       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
1027                                   "rs_pgo_query_result_t");
1028       tree = proto_item_add_subtree (item, ett_rs_pgo_query_result_t);
1029     }
1030
1031   offset =
1032     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1033                         hf_rs_pgo_query_result_t, &st);
1034   status = val_to_str (st, dce_error_vals, "%u");
1035
1036   if (check_col (pinfo->cinfo, COL_INFO))
1037     col_append_fstr (pinfo->cinfo, COL_INFO, " status:%s ", status);
1038
1039   offset += 4;                  /* XXX */
1040
1041   switch (st)
1042     {
1043     case error_status_ok:
1044       offset = dissect_rs_pgo_result_t (tvb, offset, pinfo, tree, drep);
1045       break;
1046     default:
1047       ;
1048
1049     }
1050
1051   proto_item_set_len (item, offset - old_offset);
1052   return offset;
1053 }
1054
1055
1056
1057 static int
1058 rs_pgo_dissect_add_rqst (tvbuff_t * tvb, int offset,
1059                          packet_info * pinfo, proto_tree * tree,
1060                          guint8 * drep)
1061 {
1062   dcerpc_info *di;
1063
1064   di = pinfo->private_data;
1065   if (di->conformant_run)
1066     {
1067       return offset;
1068     }
1069
1070 /*
1071         [in]        sec_rgy_domain_t    name_domain,
1072         [in]        sec_rgy_name_t      pgo_name,
1073         [in]        sec_rgy_pgo_item_t  *pgo_item,
1074 */
1075
1076   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1077   offset += 4;
1078   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1079   offset =
1080     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1081                          dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
1082                          "sec_rgy_pgo_item_t: ", -1);
1083
1084   return offset;
1085 }
1086 static int
1087 rs_pgo_dissect_add_resp (tvbuff_t * tvb, int offset,
1088                          packet_info * pinfo, proto_tree * tree,
1089                          guint8 * drep)
1090 {
1091   dcerpc_info *di;
1092   guint32 buff_remain;
1093
1094   di = pinfo->private_data;
1095   if (di->conformant_run)
1096     {
1097       return offset;
1098     }
1099
1100 /*
1101         [out]       rs_cache_data_t     *cache_info,
1102         [out]       error_status_t      *status
1103 */
1104
1105  buff_remain = tvb_length_remaining(tvb, offset);
1106
1107 /* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
1108 if (buff_remain > 8) {
1109   offset =
1110     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1111                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1112                          "cache_info: ", -1);
1113 }
1114   offset =
1115     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1116                          dissect_error_status_t, NDR_POINTER_REF, "status: ",
1117                          -1);
1118   return offset;
1119 }
1120
1121 static int
1122 rs_pgo_dissect_delete_rqst (tvbuff_t * tvb, int offset,
1123                             packet_info * pinfo, proto_tree * tree,
1124                             guint8 * drep)
1125 {
1126   dcerpc_info *di;
1127
1128   di = pinfo->private_data;
1129   if (di->conformant_run)
1130     {
1131       return offset;
1132     }
1133
1134 /*
1135         [in]        sec_rgy_domain_t    name_domain,
1136         [in]        sec_rgy_name_t      pgo_name,
1137 */
1138   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1139   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1140
1141   return offset;
1142 }
1143
1144 static int
1145 rs_pgo_dissect_delete_resp (tvbuff_t * tvb, int offset,
1146                             packet_info * pinfo, proto_tree * tree,
1147                             guint8 * drep)
1148 {
1149   dcerpc_info *di;
1150   guint32 buff_remain;
1151
1152   di = pinfo->private_data;
1153   if (di->conformant_run)
1154     {
1155       return offset;
1156     }
1157
1158 /*
1159         [out]       rs_cache_data_t     *cache_info,
1160         [out]       error_status_t      *status
1161 */
1162  buff_remain = tvb_length_remaining(tvb, offset);
1163
1164 /* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
1165  
1166   if (buff_remain > 8) {
1167   offset =
1168     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1169                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1170                          "cache_info:", -1);
1171   }
1172
1173   offset =
1174     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1175                          dissect_error_status_t, NDR_POINTER_REF, "status:",
1176                          -1);
1177
1178   return offset;
1179 }
1180
1181 static int
1182 rs_pgo_dissect_replace_rqst (tvbuff_t * tvb, int offset,
1183                              packet_info * pinfo, proto_tree * tree,
1184                              guint8 * drep)
1185 {
1186   dcerpc_info *di;
1187
1188   di = pinfo->private_data;
1189   if (di->conformant_run)
1190     {
1191       return offset;
1192     }
1193
1194 /*
1195         [in]        sec_rgy_domain_t    name_domain,
1196         [in]        sec_rgy_name_t      pgo_name,
1197         [in]        sec_rgy_pgo_item_t  *pgo_item,
1198 */
1199   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1200   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1201   offset =
1202     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1203                          dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
1204                          "pgo_item:", -1);
1205
1206   return offset;
1207 }
1208
1209 static int
1210 rs_pgo_dissect_replace_resp (tvbuff_t * tvb, int offset,
1211                              packet_info * pinfo, proto_tree * tree,
1212                              guint8 * drep)
1213 {
1214   dcerpc_info *di;
1215
1216   di = pinfo->private_data;
1217   if (di->conformant_run)
1218     {
1219       return offset;
1220     }
1221
1222 /*
1223         [out]       rs_cache_data_t     *cache_info,
1224         [out]       error_status_t      *status
1225   
1226 */
1227
1228   offset =
1229     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1230                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1231                          "cache_info:", -1);
1232   offset =
1233     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1234                          dissect_error_status_t, NDR_POINTER_REF, "status:",
1235                          -1);
1236
1237   return offset;
1238 }
1239
1240
1241 static int
1242 rs_pgo_dissect_add_member_rqst (tvbuff_t * tvb, int offset,
1243                                 packet_info * pinfo, proto_tree * tree,
1244                                 guint8 * drep)
1245 {
1246
1247   dcerpc_info *di;
1248
1249   di = pinfo->private_data;
1250   if (di->conformant_run)
1251     {
1252       return offset;
1253     }
1254
1255
1256
1257 /*
1258         [in]        sec_rgy_domain_t    name_domain,
1259         [in]        sec_rgy_name_t      go_name,
1260         [in]        sec_rgy_name_t      person_name,
1261 */
1262
1263   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1264   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1265   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1266
1267
1268   return offset;
1269
1270 }
1271 static int
1272 rs_pgo_dissect_rename_rqst (tvbuff_t * tvb, int offset,
1273                             packet_info * pinfo, proto_tree * tree,
1274                             guint8 * drep)
1275 {
1276   dcerpc_info *di;
1277
1278   di = pinfo->private_data;
1279   if (di->conformant_run)
1280     {
1281       return offset;
1282     }
1283
1284 /*
1285         [in]        sec_rgy_domain_t    name_domain,
1286         [in]        sec_rgy_name_t      old_name,
1287         [in]        sec_rgy_name_t      new_name,
1288 */
1289   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1290   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1291   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1292
1293
1294   return offset;
1295 }
1296
1297 static int
1298 rs_pgo_dissect_rename_resp (tvbuff_t * tvb, int offset,
1299                             packet_info * pinfo, proto_tree * tree,
1300                             guint8 * drep)
1301 {
1302   dcerpc_info *di;
1303
1304   di = pinfo->private_data;
1305   if (di->conformant_run)
1306     {
1307       return offset;
1308     }
1309
1310 /*
1311         [out]       rs_cache_data_t     *cache_info,
1312         [out]       error_status_t      *status
1313 */
1314   offset =
1315     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1316                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1317                          "cache_info:", -1);
1318   offset =
1319     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1320                          dissect_error_status_t, NDR_POINTER_REF, "status:",
1321                          -1);
1322
1323   return offset;
1324 }
1325
1326
1327 static int
1328 rs_pgo_dissect_add_member_resp (tvbuff_t * tvb, int offset,
1329                                 packet_info * pinfo, proto_tree * tree,
1330                                 guint8 * drep)
1331 {
1332   dcerpc_info *di;
1333   guint32 buff_remain;
1334
1335   di = pinfo->private_data;
1336   if (di->conformant_run)
1337     {
1338       return offset;
1339     }
1340
1341 /*
1342         [out]       rs_cache_data_t     *cache_info,
1343         [out]       error_status_t      *status
1344 */
1345
1346  buff_remain = tvb_length_remaining(tvb, offset);
1347
1348 /* found several add responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
1349 if (buff_remain > 8) {
1350
1351   offset =
1352     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1353                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1354                          "cache_info:", -1);
1355 }
1356   offset =
1357     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1358                          dissect_error_status_t, NDR_POINTER_REF, "status:",
1359                          -1);
1360
1361
1362   return offset;
1363 }
1364
1365 static int
1366 rs_pgo_dissect_delete_member_rqst (tvbuff_t * tvb, int offset,
1367                                    packet_info * pinfo, proto_tree * tree,
1368                                    guint8 * drep)
1369 {
1370   dcerpc_info *di;
1371
1372   di = pinfo->private_data;
1373   if (di->conformant_run)
1374     {
1375       return offset;
1376     }
1377
1378 /*
1379     void rs_pgo_delete_member (
1380         [in]        sec_rgy_domain_t    name_domain,
1381         [in]        sec_rgy_name_t      go_name,
1382         [in]        sec_rgy_name_t      person_name,
1383     );
1384 */
1385
1386   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1387   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1388   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1389
1390   return offset;
1391
1392 }
1393
1394
1395 static int
1396 rs_pgo_dissect_get_members_rqst (tvbuff_t * tvb, int offset,
1397                                  packet_info * pinfo, proto_tree * tree,
1398                                  guint8 * drep)
1399 {
1400
1401   guint32 max_members;
1402   dcerpc_info *di;
1403
1404   di = pinfo->private_data;
1405   if (di->conformant_run)
1406     {
1407       return offset;
1408     }
1409
1410 /*
1411         [in]        sec_rgy_domain_t        name_domain,
1412         [in]        sec_rgy_name_t          go_name,
1413         [in, out]   sec_rgy_cursor_t        *member_cursor,
1414         [in]        signed32                max_members,
1415 */
1416
1417   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1418   offset += 4;
1419   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1420   offset =
1421     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1422                          dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
1423                          "member_cursor:", -1);
1424   offset =
1425     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rs_var1,
1426                         &max_members);
1427
1428   if (check_col (pinfo->cinfo, COL_INFO))
1429     col_append_fstr (pinfo->cinfo, COL_INFO, " :max_members:%u", max_members);
1430
1431   return offset;
1432 }
1433
1434 static int
1435 rs_pgo_dissect_key_transfer_rqst (tvbuff_t * tvb, int offset,
1436                                   packet_info * pinfo, proto_tree * tree,
1437                                   guint8 * drep)
1438 {
1439   dcerpc_info *di;
1440
1441   di = pinfo->private_data;
1442   if (di->conformant_run)
1443     {
1444       return offset;
1445     }
1446
1447 /*
1448         [in]        sec_rgy_domain_t    name_domain,
1449         [in]        rs_pgo_query_t      requested_result_type,
1450         [in, out]   rs_pgo_query_key_t  *key,
1451 */
1452
1453   offset += 4;
1454   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1455   offset = dissect_rs_pgo_query_t (tvb, offset, pinfo, tree, drep);
1456   offset =
1457     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1458                          dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
1459                          -1);
1460
1461   return offset;
1462 }
1463
1464 static int
1465 rs_pgo_dissect_key_transfer_resp (tvbuff_t * tvb, int offset,
1466                                   packet_info * pinfo, proto_tree * tree,
1467                                   guint8 * drep)
1468 {
1469   dcerpc_info *di;
1470
1471   di = pinfo->private_data;
1472   if (di->conformant_run)
1473     {
1474       return offset;
1475     }
1476
1477 /*
1478         [in, out]   rs_pgo_query_key_t  *key,
1479         [out]       rs_cache_data_t     *cache_info,
1480         [out]       error_status_t      *status
1481 */
1482
1483   offset =
1484     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1485                          dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
1486                          -1);
1487   offset =
1488     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1489                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1490                          "cache_info:", -1);
1491   offset =
1492     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1493                          dissect_error_status_t, NDR_POINTER_REF, "status:",
1494                          -1);
1495
1496   return offset;
1497 }
1498
1499
1500 static int
1501 rs_pgo_dissect_is_member_resp (tvbuff_t * tvb, int offset,
1502                                packet_info * pinfo, proto_tree * tree,
1503                                guint8 * drep)
1504 {
1505   dcerpc_info *di;
1506
1507   di = pinfo->private_data;
1508   if (di->conformant_run)
1509     {
1510       return offset;
1511     }
1512
1513 /*
1514         [out]       rs_cache_data_t     *cache_info,
1515         [out]       error_status_t      *status
1516 */
1517   offset =
1518     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1519                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1520                          "cache_info:", -1);
1521   offset =
1522     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1523                          dissect_error_status_t, NDR_POINTER_REF, "status:",
1524                          -1);
1525
1526   return offset;
1527 }
1528
1529 static int
1530 rs_pgo_dissect_is_member_rqst (tvbuff_t * tvb, int offset,
1531                                packet_info * pinfo, proto_tree * tree,
1532                                guint8 * drep)
1533 {
1534   dcerpc_info *di;
1535 /*
1536         [in]        sec_rgy_domain_t    name_domain,
1537         [in]        sec_rgy_name_t      go_name,
1538         [in]        sec_rgy_name_t      person_name,
1539 */
1540
1541
1542   di = pinfo->private_data;
1543   if (di->conformant_run)
1544     {
1545       return offset;
1546     }
1547
1548   offset += 4;
1549   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1550   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1551   offset += 4;
1552   offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
1553
1554
1555   return offset;
1556
1557 }
1558
1559
1560 static int
1561 rs_pgo_dissect_get_rqst (tvbuff_t * tvb, int offset,
1562                          packet_info * pinfo, proto_tree * tree,
1563                          guint8 * drep)
1564 {
1565   dcerpc_info *di;
1566   guint32 allow_aliases;
1567
1568   di = pinfo->private_data;
1569   if (di->conformant_run)
1570     {
1571       return offset;
1572     }
1573
1574 /*
1575         [in]        sec_rgy_domain_t        name_domain,
1576         [in]        rs_pgo_query_key_t      *key,
1577         [in]        boolean32               allow_aliases,
1578         [in, out]   sec_rgy_cursor_t        *item_cursor,
1579 */
1580
1581   offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
1582   offset =
1583     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1584                          dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
1585                          -1);
1586   offset =
1587     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rs_var1,
1588                         &allow_aliases);
1589
1590   if (check_col (pinfo->cinfo, COL_INFO))
1591     col_append_fstr (pinfo->cinfo, COL_INFO, " :allow_aliases:%u",
1592                      allow_aliases);
1593
1594
1595   offset += 4;                  /* XXX */
1596
1597   offset =
1598     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1599                          dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
1600                          "item_cursor:", -1);
1601   return offset;
1602
1603 }
1604
1605 static int
1606 rs_pgo_dissect_get_resp (tvbuff_t * tvb, int offset,
1607                          packet_info * pinfo, proto_tree * tree,
1608                          guint8 * drep)
1609 {
1610
1611   dcerpc_info *di;
1612
1613   di = pinfo->private_data;
1614   if (di->conformant_run)
1615     {
1616       return offset;
1617     }
1618
1619 /*
1620         [in, out]   sec_rgy_cursor_t        *item_cursor,
1621         [out]       rs_cache_data_t         *cache_info,
1622         [out]       rs_pgo_query_result_t   *result
1623 */
1624
1625   offset =
1626     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1627                          dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
1628                          "item_cursor:", -1);
1629   offset =
1630     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1631                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1632                          "cache_info:", -1);
1633   offset =
1634     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1635                          dissect_rs_pgo_query_result_t, NDR_POINTER_REF,
1636                          "result:", -1);
1637
1638   return offset;
1639
1640 }
1641
1642 static int
1643 rs_pgo_dissect_delete_member_resp (tvbuff_t * tvb, int offset,
1644                                    packet_info * pinfo, proto_tree * tree,
1645                                    guint8 * drep)
1646 {
1647
1648   dcerpc_info *di;
1649
1650   di = pinfo->private_data;
1651   if (di->conformant_run)
1652     {
1653       return offset;
1654     }
1655
1656 /*
1657         [out]       rs_cache_data_t     *cache_info,
1658         [out]       error_status_t      *status
1659  
1660 */
1661
1662   offset =
1663     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1664                          dissect_rs_cache_data_t, NDR_POINTER_REF,
1665                          "cache_info:", -1);
1666   offset =
1667     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
1668                          dissect_error_status_t, NDR_POINTER_REF, "status:",
1669                          -1);
1670
1671   return offset;
1672
1673 }
1674
1675
1676 static dcerpc_sub_dissector rs_pgo_dissectors[] = {
1677   {0, "add", rs_pgo_dissect_add_rqst, rs_pgo_dissect_add_resp},
1678   {1, "delete", rs_pgo_dissect_delete_rqst, rs_pgo_dissect_delete_resp},
1679   {2, "replace", rs_pgo_dissect_replace_rqst, rs_pgo_dissect_replace_resp},
1680   {3, "rename", rs_pgo_dissect_rename_rqst, rs_pgo_dissect_rename_resp},
1681   {4, "get", rs_pgo_dissect_get_rqst, rs_pgo_dissect_get_resp},
1682   {5, "key_transfer", rs_pgo_dissect_key_transfer_rqst,
1683    rs_pgo_dissect_key_transfer_resp},
1684   {6, "add_member", rs_pgo_dissect_add_member_rqst,
1685    rs_pgo_dissect_add_member_resp}, 
1686   {7, "delete_member", rs_pgo_dissect_delete_member_rqst,
1687    rs_pgo_dissect_delete_member_resp},
1688   {8, "is_member", rs_pgo_dissect_is_member_rqst,
1689    rs_pgo_dissect_is_member_resp},
1690   {9, "get_members", rs_pgo_dissect_get_members_rqst, NULL},
1691   {0, NULL, NULL, NULL},
1692 };
1693
1694
1695 void
1696 proto_register_rs_pgo (void)
1697 {
1698   static hf_register_info hf[] = {
1699     {&hf_rs_pgo_opnum,
1700      {"Operation", "rs_pgo.opnum", FT_UINT16, BASE_DEC, NULL, 0x0,
1701       "Operation", HFILL}},
1702     {&hf_error_status_t,
1703      {"hf_error_status_t", "hf_error_status_t", FT_UINT32, BASE_DEC, NULL,
1704       0x0, "", HFILL}},
1705     {&hf_rgy_acct_user_flags_t,
1706      {"hf_rgy_acct_user_flags_t", "hf_rgy_acct_user_flags_t", FT_UINT32,
1707       BASE_DEC, NULL, 0x0, "", HFILL}},
1708     {&hf_rgy_get_rqst_key_size,
1709      {"hf_rgy_get_rqst_key_size", "hf_rgy_get_rqst_key_size", FT_UINT32,
1710       BASE_DEC, NULL, 0x0, "", HFILL}},
1711     {&hf_rgy_get_rqst_key_t,
1712      {"hf_rgy_get_rqst_key_t", "hf_rgy_get_rqst_key_t", FT_UINT32, BASE_DEC,
1713       NULL, 0x0, "", HFILL}},
1714     {&hf_rgy_get_rqst_name_domain,
1715      {"hf_rgy_get_rqst_name_domain", "hf_rgy_get_rqst_name_domain",
1716       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1717     {&hf_rgy_get_rqst_var,
1718      {"hf_rgy_get_rqst_var", "hf_rgy_get_rqst_var", FT_UINT32, BASE_DEC,
1719       NULL, 0x0, "", HFILL}},
1720     {&hf_rgy_get_rqst_var2,
1721      {"hf_rgy_get_rqst_var2", "hf_rgy_get_rqst_var2", FT_UINT32, BASE_DEC,
1722       NULL, 0x0, "", HFILL}},
1723     {&hf_rgy_is_member_rqst_key1,
1724      {"hf_rgy_is_member_rqst_key1", "hf_rgy_is_member_rqst_key1", FT_UINT32,
1725       BASE_DEC, NULL, 0x0, "", HFILL}},
1726     {&hf_rgy_is_member_rqst_key1_size,
1727      {"hf_rgy_is_member_rqst_key1_size", "hf_rgy_is_member_rqst_key1_size",
1728       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1729     {&hf_rgy_is_member_rqst_key2,
1730      {"hf_rgy_is_member_rqst_key2", "hf_rgy_is_member_rqst_key2", FT_UINT32,
1731       BASE_DEC, NULL, 0x0, "", HFILL}},
1732     {&hf_rgy_is_member_rqst_key2_size,
1733      {"hf_rgy_is_member_rqst_key2_size", "hf_rgy_is_member_rqst_key2_size",
1734       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1735     {&hf_rgy_is_member_rqst_var1,
1736      {"hf_rgy_is_member_rqst_var1", "hf_rgy_is_member_rqst_var1", FT_UINT32,
1737       BASE_DEC, NULL, 0x0, "", HFILL}},
1738     {&hf_rgy_is_member_rqst_var2,
1739      {"hf_rgy_is_member_rqst_var2", "hf_rgy_is_member_rqst_var2", FT_UINT32,
1740       BASE_DEC, NULL, 0x0, "", HFILL}},
1741     {&hf_rgy_is_member_rqst_var3,
1742      {"hf_rgy_is_member_rqst_var3", "hf_rgy_is_member_rqst_var3", FT_UINT32,
1743       BASE_DEC, NULL, 0x0, "", HFILL}},
1744     {&hf_rgy_is_member_rqst_var4,
1745      {"hf_rgy_is_member_rqst_var4", "hf_rgy_is_member_rqst_var4", FT_UINT32,
1746       BASE_DEC, NULL, 0x0, "", HFILL}},
1747     {&hf_rgy_key_transfer_rqst_var1,
1748      {"hf_rgy_key_transfer_rqst_var1", "hf_rgy_key_transfer_rqst_var1",
1749       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1750     {&hf_rgy_key_transfer_rqst_var2,
1751      {"hf_rgy_key_transfer_rqst_var2", "hf_rgy_key_transfer_rqst_var2",
1752       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1753     {&hf_rgy_key_transfer_rqst_var3,
1754      {"hf_rgy_key_transfer_rqst_var3", "hf_rgy_key_transfer_rqst_var3",
1755       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1756     {&hf_rgy_name_domain,
1757      {"hf_rgy_name_domain", "hf_rgy_name_domain", FT_UINT32, BASE_DEC, NULL,
1758       0x0, "", HFILL}},
1759     {&hf_rgy_sec_rgy_name_max_len,
1760      {"hf_rgy_sec_rgy_name_max_len", "hf_rgy_sec_rgy_name_max_len",
1761       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1762     {&hf_rgy_sec_rgy_name_t,
1763      {"hf_rgy_sec_rgy_name_t", "hf_rgy_sec_rgy_name_t", FT_UINT32, BASE_DEC,
1764       NULL, 0x0, "", HFILL}},
1765     {&hf_rgy_sec_rgy_name_t_size,
1766      {"hf_rgy_sec_rgy_name_t_size", "hf_rgy_sec_rgy_name_t_size", FT_UINT32,
1767       BASE_DEC, NULL, 0x0, "", HFILL}},
1768     {&hf_rs_pgo_id_key_t,
1769      {"hf_rs_pgo_id_key_t", "hf_rs_pgo_id_key_t", FT_UINT32, BASE_DEC, NULL,
1770       0x0, "", HFILL}},
1771     {&hf_rs_pgo_query_key_t,
1772      {"hf_rs_pgo_query_key_t", "hf_rs_pgo_query_key_t", FT_UINT32, BASE_DEC,
1773       NULL, 0x0, "", HFILL}},
1774     {&hf_rs_pgo_query_result_t,
1775      {"hf_rs_pgo_query_result_t", "hf_rs_pgo_query_result_t", FT_UINT32,
1776       BASE_DEC, NULL, 0x0, "", HFILL}},
1777     {&hf_rs_pgo_query_t,
1778      {"hf_rs_pgo_query_t", "hf_rs_pgo_query_t", FT_UINT32, BASE_DEC, NULL,
1779       0x0, "", HFILL}},
1780     {&hf_rs_sec_rgy_pgo_item_t_quota,
1781      {"hf_rs_sec_rgy_pgo_item_t_quota", "hf_rs_sec_rgy_pgo_item_t_quota",
1782       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1783     {&hf_rs_sec_rgy_pgo_item_t_unix_num,
1784      {"hf_rs_sec_rgy_pgo_item_t_unix_num",
1785       "hf_rs_sec_rgy_pgo_item_t_unix_num", FT_UINT32, BASE_DEC, NULL, 0x0, "",
1786       HFILL}},
1787     {&hf_rs_timeval,
1788      {"hf_rs_timeval", "hf_rs_timeval", FT_RELATIVE_TIME, BASE_DEC, NULL,
1789       0x0, "", HFILL}},
1790     {&hf_rs_uuid1,
1791      {"hf_rs_uuid1", "hf_rs_uuid1", FT_GUID, BASE_NONE, NULL, 0x0, "UUID",
1792       HFILL}},
1793     {&hf_rs_var1,
1794      {"hf_rs_var1", "hf_rs_var1", FT_UINT32, BASE_DEC, NULL, 0x0, "",
1795       HFILL}},
1796     {&hf_sec_attr_component_name_t_handle,
1797      {"hf_sec_attr_component_name_t_handle",
1798       "hf_sec_attr_component_name_t_handle", FT_UINT32, BASE_DEC, NULL, 0x0,
1799       "", HFILL}},
1800     {&hf_sec_attr_component_name_t_valid,
1801      {"hf_sec_attr_component_name_t_valid",
1802       "hf_sec_attr_component_name_t_valid", FT_UINT32, BASE_DEC, NULL, 0x0,
1803       "", HFILL}},
1804     {&hf_sec_passwd_type_t,
1805      {"hf_sec_passwd_type_t", "hf_sec_passwd_type_t", FT_UINT32, BASE_DEC,
1806       NULL, 0x0, "", HFILL}},
1807     {&hf_sec_passwd_version_t,
1808      {"hf_sec_passwd_version_t", "hf_sec_passwd_version_t", FT_UINT32,
1809       BASE_DEC, NULL, 0x0, "", HFILL}},
1810     {&hf_sec_rgy_acct_admin_flags,
1811      {"hf_sec_rgy_acct_admin_flags", "hf_sec_rgy_acct_admin_flags",
1812       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1813     {&hf_sec_rgy_acct_auth_flags_t,
1814      {"hf_sec_rgy_acct_auth_flags_t", "hf_sec_rgy_acct_auth_flags_t",
1815       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1816     {&hf_sec_rgy_acct_key_t,
1817      {"hf_sec_rgy_acct_key_t", "hf_sec_rgy_acct_key_t", FT_UINT32, BASE_DEC,
1818       NULL, 0x0, "", HFILL}},
1819     {&hf_sec_rgy_domain_t,
1820      {"hf_sec_rgy_domain_t", "hf_sec_rgy_domain_t", FT_UINT32, BASE_DEC,
1821       NULL, 0x0, "", HFILL}},
1822     {&hf_sec_rgy_name_t_principalName_string,
1823      {"hf_sec_rgy_name_t_principalName_string",
1824       "hf_sec_rgy_name_t_principalName_string", FT_STRING, BASE_NONE, NULL,
1825       0x0, "", HFILL}},
1826     {&hf_sec_rgy_name_t_size,
1827      {"hf_sec_rgy_name_t_size", "hf_sec_rgy_name_t_size", FT_UINT32,
1828       BASE_DEC, NULL, 0x0, "", HFILL}},
1829     {&hf_sec_rgy_pgo_flags_t,
1830      {"hf_sec_rgy_pgo_flags_t", "hf_sec_rgy_pgo_flags_t", FT_UINT32,
1831       BASE_HEX, NULL, 0x0, "", HFILL}},
1832     {&hf_sec_rgy_pgo_item_t,
1833      {"hf_sec_rgy_pgo_item_t", "hf_sec_rgy_pgo_item_t", FT_UINT32, BASE_DEC,
1834       NULL, 0x0, "", HFILL}},
1835     {&hf_sec_rgy_pname_t_size,
1836      {"hf_sec_rgy_pname_t_size",
1837       "hf_sec_rgy_pname_t_size", FT_UINT32, BASE_DEC, NULL,
1838       0x0, "", HFILL}},
1839     {&hf_sec_rgy_pname_t_principalName_string,
1840      {"hf_sec_rgy_pname_t_principalName_string",
1841       "hf_sec_rgy_pname_t_principalName_string", FT_STRING, BASE_NONE, NULL,
1842       0x0, "", HFILL}},
1843     {&hf_sec_rgy_unix_sid_t_group,
1844      {"hf_sec_rgy_unix_sid_t_group", "hf_sec_rgy_unix_sid_t_group",
1845       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1846     {&hf_sec_rgy_unix_sid_t_org,
1847      {"hf_sec_rgy_unix_sid_t_org", "hf_sec_rgy_unix_sid_t_org", FT_UINT32,
1848       BASE_DEC, NULL, 0x0, "", HFILL}},
1849     {&hf_sec_rgy_unix_sid_t_person,
1850      {"hf_sec_rgy_unix_sid_t_person", "hf_sec_rgy_unix_sid_t_person",
1851       FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}},
1852     {&hf_sec_timeval_sec_t,
1853      {"hf_sec_timeval_sec_t", "hf_sec_timeval_sec_t", FT_UINT32, BASE_DEC,
1854       NULL, 0x0, "", HFILL}},
1855     {&hf_rs_pgo_unix_num_key_t,
1856      {"hf_rs_pgo_unix_num_key_t", "hf_rs_pgo_unix_num_key_t", FT_UINT32,
1857       BASE_DEC,
1858       NULL, 0x0, "", HFILL}},
1859
1860   };
1861
1862   static gint *ett[] = {
1863     &ett_error_status_t,
1864     &ett_rgy_acct_user_flags_t,
1865     &ett_rs_pgo,
1866     &ett_rs_pgo_id_key_t,
1867     &ett_rs_pgo_query_key_t,
1868     &ett_rs_pgo_query_result_t,
1869     &ett_rs_pgo_query_t,
1870     &ett_rs_pgo_result_t,
1871     &ett_rs_pgo_unix_num_key_t,
1872     &ett_sec_attr_component_name_t,
1873     &ett_sec_passwd_type_t,
1874     &ett_sec_rgy_acct_admin_flags_t,
1875     &ett_sec_rgy_acct_admin_t,
1876     &ett_sec_rgy_acct_auth_flags_t,
1877     &ett_sec_rgy_acct_key_t,
1878     &ett_sec_rgy_acct_user_t,
1879     &ett_sec_rgy_cursor_t,
1880     &ett_sec_rgy_foreign_id_t,
1881     &ett_sec_rgy_login_name_t,
1882     &ett_sec_rgy_name_t,
1883     &ett_sec_rgy_domain_t,
1884     &ett_sec_rgy_pgo_flags_t,
1885     &ett_sec_rgy_pgo_item_t,
1886     &ett_sec_rgy_pname_t,
1887     &ett_sec_rgy_sid_t,
1888     &ett_sec_rgy_unix_passwd_buf_t,
1889     &ett_sec_rgy_unix_sid_t,
1890     &ett_sec_timeval_sec_t,
1891     &ett_rs_cache_data_t,
1892   };
1893   proto_rs_pgo =
1894     proto_register_protocol ("DCE Name Service", "RS_PGO", "rs_pgo");
1895   proto_register_field_array (proto_rs_pgo, hf, array_length (hf));
1896   proto_register_subtree_array (ett, array_length (ett));
1897 }
1898
1899 void
1900 proto_reg_handoff_rs_pgo (void)
1901 {
1902   /* Register the protocol as dcerpc */
1903   dcerpc_init_uuid (proto_rs_pgo, ett_rs_pgo, &uuid_rs_pgo, ver_rs_pgo,
1904                     rs_pgo_dissectors, hf_rs_pgo_opnum);
1905 }