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