GSM A DTAP: add UMTS EVS to supported codecs list IE
[metze/wireshark/wip.git] / epan / dissectors / packet-dcerpc-rs_pgo.c
index 3865f454a5dbaaf5d028aaa421b4e74f7fe90773..c1fc3cb26be4ef2b0fe46492470d99aaa7fe0bd0 100644 (file)
@@ -5,98 +5,45 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/security.tar.gz  security/idl/rs_pgo.idl
  *
- * $Id$
- *
  * Wireshark - Network traffic analyzer
  * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#include <string.h>
-
-#include <glib.h>
 #include <epan/packet.h>
 #include "packet-dcerpc.h"
 #include "packet-dcerpc-dce122.h"
-/* 
+
+void proto_register_rs_pgo (void);
+void proto_reg_handoff_rs_pgo (void);
+
+/*
 delete
 dissect_rgy_acct_user_flags_t
 */
 
 static int proto_rs_pgo = -1;
 static int hf_rs_pgo_opnum = -1;
-static int hf_rgy_name_domain = -1;
-static int hf_rgy_sec_rgy_name_max_len = -1;
-static int hf_rgy_sec_rgy_name_t_size = -1;
-static int hf_rgy_sec_rgy_name_t = -1;
-static int hf_rgy_get_rqst_name_domain = -1;
-static int hf_rgy_get_rqst_var = -1;
-static int hf_rgy_get_rqst_var2 = -1;
-static int hf_rgy_get_rqst_key_size = -1;
-static int hf_rgy_get_rqst_key_t = -1;
-static int hf_rgy_key_transfer_rqst_var1 = -1;
-static int hf_rgy_key_transfer_rqst_var2 = -1;
-static int hf_rgy_key_transfer_rqst_var3 = -1;
-static int hf_rgy_is_member_rqst_var1 = -1;
-static int hf_rgy_is_member_rqst_var2 = -1;
-static int hf_rgy_is_member_rqst_var3 = -1;
-static int hf_rgy_is_member_rqst_var4 = -1;
-static int hf_rgy_is_member_rqst_key1 = -1;
-static int hf_rgy_is_member_rqst_key2 = -1;
-static int hf_rgy_is_member_rqst_key1_size = -1;
-static int hf_rgy_is_member_rqst_key2_size = -1;
 static int hf_rs_var1 = -1;
 static int hf_rs_pgo_query_result_t = -1;
-static int hf_sec_rgy_pgo_item_t = -1;
-static int hf_rs_pgo_id_key_t = -1;
 static int hf_rs_pgo_query_t = -1;
 static int hf_rs_pgo_query_key_t = -1;
 static int hf_error_status_t = -1;
 static int hf_sec_rgy_pgo_flags_t = -1;
-static int hf_sec_passwd_version_t = -1;
-static int hf_rgy_acct_user_flags_t = -1;
 static int hf_rs_sec_rgy_pgo_item_t_quota = -1;
 static int hf_rs_sec_rgy_pgo_item_t_unix_num = -1;
 static int hf_rs_timeval = -1;
 static int hf_rs_uuid1 = -1;
-static int hf_sec_attr_component_name_t_handle = -1;
-static int hf_sec_attr_component_name_t_valid = -1;
-static int hf_sec_passwd_type_t = -1;
-static int hf_sec_rgy_acct_admin_flags = -1;
-static int hf_sec_rgy_acct_auth_flags_t = -1;
-static int hf_sec_rgy_acct_key_t = -1;
 static int hf_sec_rgy_domain_t = -1;
 static int hf_sec_rgy_name_t_principalName_string = -1;
 static int hf_sec_rgy_name_t_size = -1;
 static int hf_sec_rgy_pname_t_principalName_string = -1;
 static int hf_sec_rgy_pname_t_size = -1;
-static int hf_sec_rgy_unix_sid_t_group = -1;
-static int hf_sec_rgy_unix_sid_t_org = -1;
-static int hf_sec_rgy_unix_sid_t_person = -1;
-static int hf_sec_timeval_sec_t = -1;
 static int hf_rs_pgo_unix_num_key_t = -1;
 
 static gint ett_rs_cache_data_t = -1;
@@ -129,74 +76,66 @@ static gint ett_rs_pgo_query_result_t = -1;
 static gint ett_rs_pgo_result_t = -1;
 
 
-#define sec_rgy_acct_admin_valid  0x1
-#define sec_rgy_acct_admin_audit   0x2
-#define sec_rgy_acct_admin_server  0x4
-#define sec_rgy_acct_admin_client  0x8
-#define sec_rgy_acct_admin_flags_none  0
-#define sec_rgy_acct_auth_post_dated        0x1
-#define sec_rgy_acct_auth_forwardable       0x2
-#define sec_rgy_acct_auth_tgt               0x4
-#define sec_rgy_acct_auth_renewable         0x8
-#define sec_rgy_acct_auth_proxiable        0x10
-#define sec_rgy_acct_auth_dup_skey   0x20
-#define sec_rgy_acct_auth_user_to_user  0x40
-#define sec_rgy_acct_auth_flags_none  0
-#define sec_rgy_acct_user_passwd_valid   0x1
-#define sec_rgy_acct_user_flags_none  0
-#define rs_acct_part_user        0x1
-#define rs_acct_part_admin      0x2
-#define rs_acct_part_passwd    0x4
-#define rs_acct_part_unused     0x8
-#define rs_acct_part_login_name  0x10
-#define sec_rgy_pgo_is_an_alias   0x1
-#define sec_rgy_pgo_is_required   0x2
-#define sec_rgy_pgo_projlist_ok  0x4
-#define sec_rgy_pgo_flags_none  0
-#define sec_rgy_acct_user_passwd_valid  0x1
-#define sec_rgy_acct_user_flags_none  0
+#define sec_rgy_acct_admin_valid       0x01
+#define sec_rgy_acct_admin_audit       0x02
+#define sec_rgy_acct_admin_server      0x04
+#define sec_rgy_acct_admin_client      0x08
+#define sec_rgy_acct_admin_flags_none  0x00
+#define sec_rgy_acct_auth_post_dated   0x01
+#define sec_rgy_acct_auth_forwardable  0x02
+#define sec_rgy_acct_auth_tgt          0x04
+#define sec_rgy_acct_auth_renewable    0x08
+#define sec_rgy_acct_auth_proxiable    0x10
+#define sec_rgy_acct_auth_dup_skey     0x20
+#define sec_rgy_acct_auth_user_to_user 0x40
+#define sec_rgy_acct_auth_flags_none   0x00
+#define sec_rgy_acct_user_passwd_valid 0x01
+#define sec_rgy_acct_user_flags_none   0x00
+#define rs_acct_part_user              0x01
+#define rs_acct_part_admin             0x02
+#define rs_acct_part_passwd            0x04
+#define rs_acct_part_unused            0x08
+#define rs_acct_part_login_name        0x10
+#define sec_rgy_pgo_is_an_alias        0x01
+#define sec_rgy_pgo_is_required        0x02
+#define sec_rgy_pgo_projlist_ok        0x04
+#define sec_rgy_pgo_flags_none         0x00
+#define sec_rgy_acct_user_passwd_valid 0x01
+#define sec_rgy_acct_user_flags_none   0x00
 
 static gint ett_rs_pgo = -1;
 
-static e_uuid_t uuid_rs_pgo =
+static e_guid_t uuid_rs_pgo =
   { 0x4c878280, 0x3000, 0x0000, {0x0d, 0x00, 0x02, 0x87, 0x14, 0x00, 0x00,
-                                0x00}
+                                 0x00}
 };
 static guint16 ver_rs_pgo = 1;
 
 
 static int
 dissect_error_status_t (tvbuff_t * tvb, int offset,
-                       packet_info * pinfo, proto_tree * parent_tree,
-                       guint8 * drep)
+                        packet_info * pinfo, proto_tree * parent_tree,
+                        dcerpc_info *di, guint8 * drep)
 {
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
+  proto_item *item;
+  proto_tree *tree;
   int old_offset = offset;
   guint32 st;
-  dcerpc_info *di;
   const char *st_str;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
-    {
-      return offset;
-    }
+  {
+    return offset;
+  }
 
-  if (parent_tree)
-    {
-      item = proto_tree_add_text (parent_tree, tvb, offset, -1,
-                                 "error_status_t");
-      tree = proto_item_add_subtree (item, ett_error_status_t);
-    }
+  tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_error_status_t, &item, "error_status_t");
 
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_error_status_t,
-                       &st);
-  st_str = val_to_str (st, dce_error_vals, "%u");
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_error_status_t,
+                        &st);
+  st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u");
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
+  col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
 
   proto_item_set_len (item, offset - old_offset);
   return offset;
@@ -205,65 +144,50 @@ dissect_error_status_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_sec_rgy_pname_t (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * parent_tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * parent_tree,
+                         dcerpc_info *di, guint8 * drep)
 {
 
 
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
+  proto_item *item;
+  proto_tree *tree;
   int old_offset = offset;
+  const guint8 *principal;
 #define    sec_rgy_pname_t_size 257
 /*
 dissect    sec_rgy_pname const signed32        sec_rgy_pname_t_size  = 257; * Include final '\0' *
           typedef [string] char sec_rgy_pname_t[sec_rgy_pname_t_size];
 */
   guint32 string_size;
-  const guint8 *namestring;
-  dcerpc_info *di;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
     }
 
 
-  if (parent_tree)
-    {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1, "sec_rgy_pname_t");
-      tree = proto_item_add_subtree (item, ett_sec_rgy_pname_t);
-    }
+  tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_sec_rgy_pname_t, &item, "sec_rgy_pname_t");
 
-  offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_sec_rgy_pname_t_size, &string_size);
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
+  offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+                               hf_sec_rgy_pname_t_size, &string_size);
+  col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
   if (string_size < sec_rgy_pname_t_size)
     {
 /* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
 
-      proto_tree_add_string (tree, hf_sec_rgy_pname_t_principalName_string,
-                            tvb, offset, string_size, tvb_get_ptr (tvb,
-                                                                   offset,
-                                                                   string_size));
+      proto_tree_add_item_ret_string(tree, hf_sec_rgy_pname_t_principalName_string,
+                           tvb, offset, string_size, ENC_ASCII|ENC_NA, wmem_packet_scope(), &principal);
       if (string_size > 1)
-       {
-         namestring = tvb_get_ptr (tvb, offset, string_size);
-         if (check_col (pinfo->cinfo, COL_INFO))
-           col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
-                            namestring);
-       }
+        {
+          col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", principal);
+        }
       offset += string_size;
     }
   else
     {
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_fstr (pinfo->cinfo, COL_INFO,
-                        " :FIXME!: Invalid string length of  %u",
-                        string_size);
+        col_append_fstr (pinfo->cinfo, COL_INFO,
+                         " :FIXME!: Invalid string length of  %u",
+                         string_size);
     }
 
   proto_item_set_len (item, offset - old_offset);
@@ -272,8 +196,8 @@ dissect    sec_rgy_pname const signed32        sec_rgy_pname_t_size  = 257; * In
 
 static int
 dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
-                            packet_info * pinfo, proto_tree * parent_tree,
-                            guint8 * drep)
+                             packet_info * pinfo, proto_tree * parent_tree,
+                             dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -283,14 +207,12 @@ dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
   guint32 flags;
 
 /*
     typedef bitset  sec_rgy_pgo_flags_t;
 */
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -299,15 +221,14 @@ dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1,
-                            "sec_rgy_pgo_flags_t ");
-      tree = proto_item_add_subtree (item, ett_sec_rgy_pgo_flags_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                             ett_sec_rgy_pgo_flags_t, &item, "sec_rgy_pgo_flags_t ");
     }
 
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_sec_rgy_pgo_flags_t, &flags);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_sec_rgy_pgo_flags_t, &flags);
 
 /*
      *
@@ -332,38 +253,32 @@ dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
         *
         const unsigned32 sec_rgy_pgo_flags_none = 0;
 */
-#define sec_rgy_pgo_is_an_alias   0x1
-#define sec_rgy_pgo_is_required    0x2
-#define sec_rgy_pgo_projlist_ok 0x4
-#define sec_rgy_pgo_flags_none  0
+#define sec_rgy_pgo_is_an_alias   0x01
+#define sec_rgy_pgo_is_required   0x02
+#define sec_rgy_pgo_projlist_ok   0x04
+#define sec_rgy_pgo_flags_none    0x00
 
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_str (pinfo->cinfo, COL_INFO, " PgoFlags=");
+  col_append_str (pinfo->cinfo, COL_INFO, " PgoFlags=");
   if ((flags & sec_rgy_pgo_is_an_alias) == sec_rgy_pgo_is_an_alias)
     {
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, ":IS_AN_ALIAS");
+      col_append_str (pinfo->cinfo, COL_INFO, ":IS_AN_ALIAS");
     }
   if ((flags & sec_rgy_pgo_is_required) == sec_rgy_pgo_is_required)
     {
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, ":IS_REQUIRED");
+      col_append_str (pinfo->cinfo, COL_INFO, ":IS_REQUIRED");
     }
   if ((flags & sec_rgy_pgo_projlist_ok) == sec_rgy_pgo_projlist_ok)
     {
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, ":PROJLIST_OK");
+      col_append_str (pinfo->cinfo, COL_INFO, ":PROJLIST_OK");
     }
   if ((flags & sec_rgy_acct_admin_client) == sec_rgy_acct_admin_client)
     {
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
+      col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
     }
   if ((flags & sec_rgy_pgo_flags_none) == sec_rgy_pgo_flags_none)
     {
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
+      col_append_str (pinfo->cinfo, COL_INFO, ":NONE");
     }
 
   proto_item_set_len (item, offset - old_offset);
@@ -375,8 +290,8 @@ dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_rs_cache_data_t (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * parent_tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * parent_tree,
+                         dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -392,12 +307,10 @@ dissect_rs_cache_data_t (tvbuff_t * tvb, int offset,
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
   guint32 person_dtm, group_dtm, org_dtm;
-  e_uuid_t uuid1;
+  e_guid_t uuid1;
 
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -406,31 +319,29 @@ dissect_rs_cache_data_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1, "rs_cache_data_t");
-      tree = proto_item_add_subtree (item, ett_rs_cache_data_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_rs_cache_data_t, &item, "rs_cache_data_t");
     }
 
 
   offset =
-    dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &uuid1);
+    dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &uuid1);
   offset =
     dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
-                          &person_dtm);
+                           &person_dtm);
   offset =
     dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
-                          &group_dtm);
+                           &group_dtm);
   offset =
     dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep, hf_rs_timeval,
-                          &org_dtm);
+                           &org_dtm);
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO,
-                    " siteid %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x person_dtm:%u group_dtm:%u org_dtm:%u",
-                    uuid1.Data1, uuid1.Data2, uuid1.Data3, uuid1.Data4[0],
-                    uuid1.Data4[1], uuid1.Data4[2], uuid1.Data4[3],
-                    uuid1.Data4[4], uuid1.Data4[5], uuid1.Data4[6],
-                    uuid1.Data4[7], person_dtm, group_dtm, org_dtm);
+  col_append_fstr (pinfo->cinfo, COL_INFO,
+                     " siteid %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x person_dtm:%u group_dtm:%u org_dtm:%u",
+                     uuid1.data1, uuid1.data2, uuid1.data3, uuid1.data4[0],
+                     uuid1.data4[1], uuid1.data4[2], uuid1.data4[3],
+                     uuid1.data4[4], uuid1.data4[5], uuid1.data4[6],
+                     uuid1.data4[7], person_dtm, group_dtm, org_dtm);
 
   proto_item_set_len (item, offset - old_offset);
   return offset;
@@ -440,62 +351,48 @@ dissect_rs_cache_data_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_sec_rgy_name_t (tvbuff_t * tvb, int offset,
-                       packet_info * pinfo, proto_tree * parent_tree,
-                       guint8 * drep)
+                        packet_info * pinfo, proto_tree * parent_tree,
+                        dcerpc_info *di, guint8 * drep)
 {
 
 
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
+  proto_item *item;
+  proto_tree *tree;
   int old_offset = offset;
+  const guint8 *principal;
 #define    sec_rgy_name_t_size  1025
 /*    typedef [string] char sec_rgy_name_t[sec_rgy_name_t_size]; */
   guint32 string_size;
-  const guint8 *namestring;
-  dcerpc_info *di;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
     }
 
 
-  if (parent_tree)
-    {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1, "sec_rgy_name_t");
-      tree = proto_item_add_subtree (item, ett_sec_rgy_name_t);
-    }
+  tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_sec_rgy_name_t, &item, "sec_rgy_name_t");
 
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_sec_rgy_name_t_size, &string_size);
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_sec_rgy_name_t_size, &string_size);
+  col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
   if (string_size < sec_rgy_name_t_size)
     {
 /* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
 
-      proto_tree_add_string (tree, hf_sec_rgy_name_t_principalName_string,
-                            tvb, offset, string_size, tvb_get_ptr (tvb,
-                                                                   offset,
-                                                                   string_size));
+      proto_tree_add_item_ret_string(tree, hf_sec_rgy_name_t_principalName_string,
+                           tvb, offset, string_size, ENC_ASCII|ENC_NA, wmem_packet_scope(), &principal);
       if (string_size > 1)
-       {
-         namestring = tvb_get_ptr (tvb, offset, string_size);
-         if (check_col (pinfo->cinfo, COL_INFO))
-           col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
-                            namestring);
-       }
+        {
+          col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", principal);
+        }
       offset += string_size;
     }
   else
     {
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_fstr (pinfo->cinfo, COL_INFO,
-                        " :FIXME!: Invalid string length of  %u",
-                        string_size);
+        col_append_fstr (pinfo->cinfo, COL_INFO,
+                         " :FIXME!: Invalid string length of  %u",
+                         string_size);
     }
 
   proto_item_set_len (item, offset - old_offset);
@@ -505,8 +402,8 @@ dissect_sec_rgy_name_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_sec_rgy_domain_t (tvbuff_t * tvb, int offset,
-                         packet_info * pinfo, proto_tree * parent_tree,
-                         guint8 * drep)
+                          packet_info * pinfo, proto_tree * parent_tree,
+                          dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -516,10 +413,8 @@ dissect_sec_rgy_domain_t (tvbuff_t * tvb, int offset,
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
   guint32 domain_t;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -528,19 +423,17 @@ dissect_sec_rgy_domain_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1, "sec_rgy_domain_t");
-      tree = proto_item_add_subtree (item, ett_sec_rgy_domain_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_sec_rgy_domain_t, &item, "sec_rgy_domain_t");
     }
 
 
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_sec_rgy_domain_t,
-                       &domain_t);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_sec_rgy_domain_t,
+                        &domain_t);
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, " sec_rgy_domain_t:%u",
-                    domain_t);
+  col_append_fstr (pinfo->cinfo, COL_INFO, " sec_rgy_domain_t:%u",
+                     domain_t);
 
 
   proto_item_set_len (item, offset - old_offset);
@@ -549,8 +442,8 @@ dissect_sec_rgy_domain_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_sec_rgy_pgo_item_t (tvbuff_t * tvb, int offset,
-                           packet_info * pinfo, proto_tree * parent_tree,
-                           guint8 * drep)
+                            packet_info * pinfo, proto_tree * parent_tree,
+                            dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -567,11 +460,9 @@ dissect_sec_rgy_pgo_item_t (tvbuff_t * tvb, int offset,
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
-  e_uuid_t id;
+  e_guid_t id;
   guint32 unix_num, quota;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -580,31 +471,29 @@ dissect_sec_rgy_pgo_item_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1,
-                            " sec_rgy_pgo_item_t ");
-      tree = proto_item_add_subtree (item, ett_sec_rgy_pgo_item_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                             ett_sec_rgy_pgo_item_t, &item, " sec_rgy_pgo_item_t ");
     }
 
   offset =
-    dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &id);
+    dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &id);
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_rs_sec_rgy_pgo_item_t_unix_num, &unix_num);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_rs_sec_rgy_pgo_item_t_unix_num, &unix_num);
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_rs_sec_rgy_pgo_item_t_quota, &quota);
-  offset = dissect_sec_rgy_pgo_flags_t (tvb, offset, pinfo, tree, drep);
-  offset += 4;                 /* XXX */
-  offset = dissect_sec_rgy_pname_t (tvb, offset, pinfo, tree, drep);
-
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO,
-                    " sec_rgy_pgo_item_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x unix_num:%u quota:%u",
-                    id.Data1, id.Data2, id.Data3, id.Data4[0],
-                    id.Data4[1], id.Data4[2], id.Data4[3],
-                    id.Data4[4], id.Data4[5], id.Data4[6],
-                    id.Data4[7], unix_num, quota);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_rs_sec_rgy_pgo_item_t_quota, &quota);
+  offset = dissect_sec_rgy_pgo_flags_t (tvb, offset, pinfo, tree, di, drep);
+  offset += 4;                  /* XXX */
+  offset = dissect_sec_rgy_pname_t (tvb, offset, pinfo, tree, di, drep);
+
+  col_append_fstr (pinfo->cinfo, COL_INFO,
+                     " sec_rgy_pgo_item_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x unix_num:%u quota:%u",
+                     id.data1, id.data2, id.data3, id.data4[0],
+                     id.data4[1], id.data4[2], id.data4[3],
+                     id.data4[4], id.data4[5], id.data4[6],
+                     id.data4[7], unix_num, quota);
 
   proto_item_set_len (item, offset - old_offset);
   return offset;
@@ -613,8 +502,8 @@ dissect_sec_rgy_pgo_item_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
-                         packet_info * pinfo, proto_tree * parent_tree,
-                         guint8 * drep)
+                          packet_info * pinfo, proto_tree * parent_tree,
+                          dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -626,17 +515,15 @@ dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
         boolean32       valid;
     }               sec_rgy_cursor_t;
 
+
 */
 
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
-  e_uuid_t source;
+  e_guid_t source;
   guint32 handle, valid;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -645,28 +532,26 @@ dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1,
-                            " sec_rgy_cursor_t ");
-      tree = proto_item_add_subtree (item, ett_sec_rgy_cursor_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                             ett_sec_rgy_cursor_t, &item, " sec_rgy_cursor_t ");
     }
 
   offset =
-    dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &source);
+    dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &source);
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_rs_sec_rgy_pgo_item_t_unix_num, &handle);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_rs_sec_rgy_pgo_item_t_unix_num, &handle);
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_rs_sec_rgy_pgo_item_t_quota, &valid);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_rs_sec_rgy_pgo_item_t_quota, &valid);
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO,
-                    " sec_rgy_cursor_t - source %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x handle:%u valid:%u",
-                    source.Data1, source.Data2, source.Data3,
-                    source.Data4[0], source.Data4[1], source.Data4[2],
-                    source.Data4[3], source.Data4[4], source.Data4[5],
-                    source.Data4[6], source.Data4[7], handle, valid);
+  col_append_fstr (pinfo->cinfo, COL_INFO,
+                     " sec_rgy_cursor_t - source %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x handle:%u valid:%u",
+                     source.data1, source.data2, source.data3,
+                     source.data4[0], source.data4[1], source.data4[2],
+                     source.data4[3], source.data4[4], source.data4[5],
+                     source.data4[6], source.data4[7], handle, valid);
 
   proto_item_set_len (item, offset - old_offset);
   return offset;
@@ -674,27 +559,25 @@ dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_rs_pgo_query_t (tvbuff_t * tvb, int offset,
-                       packet_info * pinfo, proto_tree * parent_tree,
-                       guint8 * drep)
+                        packet_info * pinfo, proto_tree * parent_tree,
+                        dcerpc_info *di, guint8 * drep)
 {
 
-  typedef enum
+  enum
   {
     rs_pgo_query_name,
     rs_pgo_query_id,
     rs_pgo_query_unix_num,
     rs_pgo_query_next,
     rs_pgo_query_none
-  } rs_pgo_query_t;
+  };
 
 
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
   guint8 query_t;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -703,41 +586,33 @@ dissect_rs_pgo_query_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1, "rs_pgo_query_t ");
-      tree = proto_item_add_subtree (item, ett_rs_pgo_query_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_rs_pgo_query_t, &item, "rs_pgo_query_t ");
     }
   offset =
-    dissect_ndr_uint8 (tvb, offset, pinfo, tree, drep, hf_rs_pgo_query_t,
-                      &query_t);
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_t:");
+    dissect_ndr_uint8 (tvb, offset, pinfo, tree, di, drep, hf_rs_pgo_query_t,
+                       &query_t);
+  col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_t:");
 
   switch (query_t)
     {
     case rs_pgo_query_name:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "NAME");
+      col_append_str (pinfo->cinfo, COL_INFO, "NAME");
       break;
     case rs_pgo_query_id:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "ID");
+      col_append_str (pinfo->cinfo, COL_INFO, "ID");
       break;
     case rs_pgo_query_unix_num:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
+      col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
       break;
     case rs_pgo_query_next:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
+      col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
       break;
     case rs_pgo_query_none:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "NONE");
+      col_append_str (pinfo->cinfo, COL_INFO, "NONE");
       break;
     default:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
+          col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
       break;
       ;
     }
@@ -748,8 +623,8 @@ dissect_rs_pgo_query_t (tvbuff_t * tvb, int offset,
 }
 static int
 dissect_rs_pgo_id_key_t (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * parent_tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * parent_tree,
+                         dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -763,10 +638,8 @@ dissect_rs_pgo_id_key_t (tvbuff_t * tvb, int offset,
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
-  e_uuid_t id;
+  e_guid_t id;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -775,22 +648,20 @@ dissect_rs_pgo_id_key_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1,
-                            "rs_pgo_id_key_t ");
-      tree = proto_item_add_subtree (item, ett_rs_pgo_id_key_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                             ett_rs_pgo_id_key_t, &item, "rs_pgo_id_key_t ");
     }
 
   offset =
-    dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_rs_uuid1, &id);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+    dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_rs_uuid1, &id);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO,
-                    " rs_pgo_id_key_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
-                    id.Data1, id.Data2, id.Data3, id.Data4[0],
-                    id.Data4[1], id.Data4[2], id.Data4[3],
-                    id.Data4[4], id.Data4[5], id.Data4[6], id.Data4[7]);
+  col_append_fstr (pinfo->cinfo, COL_INFO,
+                     " rs_pgo_id_key_t - id %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+                     id.data1, id.data2, id.data3, id.data4[0],
+                     id.data4[1], id.data4[2], id.data4[3],
+                     id.data4[4], id.data4[5], id.data4[6], id.data4[7]);
 
   proto_item_set_len (item, offset - old_offset);
   return offset;
@@ -799,8 +670,8 @@ dissect_rs_pgo_id_key_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_rs_pgo_result_t (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * parent_tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * parent_tree,
+                         dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -815,9 +686,7 @@ dissect_rs_pgo_result_t (tvbuff_t * tvb, int offset,
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -825,14 +694,13 @@ dissect_rs_pgo_result_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1,
-                            "rs_pgo_result_t ");
-      tree = proto_item_add_subtree (item, ett_rs_pgo_result_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                             ett_rs_pgo_result_t, &item, "rs_pgo_result_t ");
     }
 
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_pgo_item_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_pgo_item_t (tvb, offset, pinfo, tree, di, drep);
 
   proto_item_set_len (item, offset - old_offset);
   return offset;
@@ -842,8 +710,8 @@ dissect_rs_pgo_result_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_rs_pgo_unix_num_key_t (tvbuff_t * tvb, int offset,
-                              packet_info * pinfo, proto_tree * parent_tree,
-                              guint8 * drep)
+                               packet_info * pinfo, proto_tree * parent_tree,
+                               dcerpc_info *di, guint8 * drep)
 {
 
 /*
@@ -860,10 +728,8 @@ r
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
   guint32 rs_pgo_unix_num_key_t;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -872,20 +738,18 @@ r
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1,
-                            " rs_pgo_unix_num_key_t ");
-      tree = proto_item_add_subtree (item, ett_rs_pgo_unix_num_key_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                             ett_rs_pgo_unix_num_key_t, &item, " rs_pgo_unix_num_key_t ");
     }
 
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_rs_pgo_unix_num_key_t, &rs_pgo_unix_num_key_t);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_rs_pgo_unix_num_key_t, &rs_pgo_unix_num_key_t);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO,
-                    " rs_pgo_unix_num_key_t:%u", rs_pgo_unix_num_key_t);
+  col_append_fstr (pinfo->cinfo, COL_INFO,
+                     " rs_pgo_unix_num_key_t:%u", rs_pgo_unix_num_key_t);
 
   proto_item_set_len (item, offset - old_offset);
   return offset;
@@ -894,18 +758,18 @@ r
 
 static int
 dissect_rs_pgo_query_key_t (tvbuff_t * tvb, int offset,
-                           packet_info * pinfo, proto_tree * parent_tree,
-                           guint8 * drep)
+                            packet_info * pinfo, proto_tree * parent_tree,
+                            dcerpc_info *di, guint8 * drep)
 {
 
-  typedef enum
+  enum
   {
     rs_pgo_query_name,
     rs_pgo_query_id,
     rs_pgo_query_unix_num,
     rs_pgo_query_next,
     rs_pgo_query_none
-  } rs_pgo_query_t;
+  };
 /*
     typedef union switch (rs_pgo_query_t query) tagged_union {
         case rs_pgo_query_name:
@@ -930,10 +794,8 @@ dissect_rs_pgo_query_key_t (tvbuff_t * tvb, int offset,
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
-  dcerpc_info *di;
   guint16 query_t;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -942,48 +804,40 @@ dissect_rs_pgo_query_key_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item =
-       proto_tree_add_text (parent_tree, tvb, offset, -1,
-                            "rs_pgo_query_key_t ");
-      tree = proto_item_add_subtree (item, ett_rs_pgo_query_key_t);
+      tree =
+        proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                             ett_rs_pgo_query_key_t, &item, "rs_pgo_query_key_t ");
     }
   offset =
-    dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, hf_rs_pgo_query_key_t,
-                       &query_t);
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_key_t:");
+    dissect_ndr_uint16 (tvb, offset, pinfo, tree, di, drep, hf_rs_pgo_query_key_t,
+                        &query_t);
+  col_append_str (pinfo->cinfo, COL_INFO, " rs_pgo_query_key_t:");
   offset += 4;
   switch (query_t)
     {
     case rs_pgo_query_name:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "NAME");
-      offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+      col_append_str (pinfo->cinfo, COL_INFO, "NAME");
+      offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
       break;
     case rs_pgo_query_id:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "ID");
-      offset = dissect_rs_pgo_id_key_t (tvb, offset, pinfo, tree, drep);
+      col_append_str (pinfo->cinfo, COL_INFO, "ID");
+      offset = dissect_rs_pgo_id_key_t (tvb, offset, pinfo, tree, di, drep);
       break;
     case rs_pgo_query_unix_num:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
-      offset = dissect_rs_pgo_unix_num_key_t (tvb, offset, pinfo, tree, drep);
+      col_append_str (pinfo->cinfo, COL_INFO, "UNIX_NUM");
+      offset = dissect_rs_pgo_unix_num_key_t (tvb, offset, pinfo, tree, di, drep);
       break;
     case rs_pgo_query_next:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
-      offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+      col_append_str (pinfo->cinfo, COL_INFO, "NEXT");
+      offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
       break;
     case rs_pgo_query_none:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_str (pinfo->cinfo, COL_INFO, "NONE");
+      col_append_str (pinfo->cinfo, COL_INFO, "NONE");
       break;
 
     default:
-      if (check_col (pinfo->cinfo, COL_INFO))
-       col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
-      ;
+      col_append_fstr (pinfo->cinfo, COL_INFO, " unknown:%u", query_t);
+      break;
     }
 
   proto_item_set_len (item, offset - old_offset);
@@ -993,14 +847,13 @@ dissect_rs_pgo_query_key_t (tvbuff_t * tvb, int offset,
 
 static int
 dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset,
-                              packet_info * pinfo, proto_tree * parent_tree,
-                              guint8 * drep)
+                               packet_info * pinfo, proto_tree * parent_tree,
+                               dcerpc_info *di, guint8 * drep)
 {
   proto_item *item = NULL;
   proto_tree *tree = NULL;
   int old_offset = offset;
   guint32 st;
-  dcerpc_info *di;
   const char *status;
 #define error_status_ok 0
 
@@ -1015,7 +868,6 @@ dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset,
      } rs_pgo_query_result_t;
    */
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1023,25 +875,23 @@ dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset,
 
   if (parent_tree)
     {
-      item = proto_tree_add_text (parent_tree, tvb, offset, -1,
-                                 "rs_pgo_query_result_t");
-      tree = proto_item_add_subtree (item, ett_rs_pgo_query_result_t);
+      tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1,
+                                  ett_rs_pgo_query_result_t, &item, "rs_pgo_query_result_t");
     }
 
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
-                       hf_rs_pgo_query_result_t, &st);
-  status = val_to_str (st, dce_error_vals, "%u");
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
+                        hf_rs_pgo_query_result_t, &st);
+  status = val_to_str_ext (st, &dce_error_vals_ext, "%u");
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, " status:%s ", status);
+  col_append_fstr (pinfo->cinfo, COL_INFO, " status:%s ", status);
 
-  offset += 4;                 /* XXX */
+  offset += 4;                  /* XXX */
 
   switch (st)
     {
     case error_status_ok:
-      offset = dissect_rs_pgo_result_t (tvb, offset, pinfo, tree, drep);
+      offset = dissect_rs_pgo_result_t (tvb, offset, pinfo, tree, di, drep);
       break;
     default:
       ;
@@ -1056,12 +906,9 @@ dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_add_rqst (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * tree,
+                         dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1073,25 +920,23 @@ rs_pgo_dissect_add_rqst (tvbuff_t * tvb, int offset,
         [in]        sec_rgy_pgo_item_t  *pgo_item,
 */
 
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
   offset += 4;
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
-                        "sec_rgy_pgo_item_t: ", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
+                         "sec_rgy_pgo_item_t: ", -1);
 
   return offset;
 }
 static int
 rs_pgo_dissect_add_resp (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * tree,
+                         dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-  guint32 buff_remain;
+  gint         buff_remain;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1102,30 +947,27 @@ rs_pgo_dissect_add_resp (tvbuff_t * tvb, int offset,
         [out]       error_status_t      *status
 */
 
- buff_remain = tvb_length_remaining(tvb, offset);
+ buff_remain = tvb_captured_length_remaining(tvb, offset);
 
 /* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
 if (buff_remain > 8) {
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info: ", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info: ", -1);
 }
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status: ",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status: ",
+                         -1);
   return offset;
 }
 
 static int
 rs_pgo_dissect_delete_rqst (tvbuff_t * tvb, int offset,
-                           packet_info * pinfo, proto_tree * tree,
-                           guint8 * drep)
+                            packet_info * pinfo, proto_tree * tree,
+                            dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1135,21 +977,19 @@ rs_pgo_dissect_delete_rqst (tvbuff_t * tvb, int offset,
         [in]        sec_rgy_domain_t    name_domain,
         [in]        sec_rgy_name_t      pgo_name,
 */
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
 
   return offset;
 }
 
 static int
 rs_pgo_dissect_delete_resp (tvbuff_t * tvb, int offset,
-                           packet_info * pinfo, proto_tree * tree,
-                           guint8 * drep)
+                            packet_info * pinfo, proto_tree * tree,
+                            dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-  guint32 buff_remain;
+  gint         buff_remain;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1159,33 +999,30 @@ rs_pgo_dissect_delete_resp (tvbuff_t * tvb, int offset,
         [out]       rs_cache_data_t     *cache_info,
         [out]       error_status_t      *status
 */
- buff_remain = tvb_length_remaining(tvb, offset);
+ buff_remain = tvb_captured_length_remaining(tvb, offset);
 
 /* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
+
   if (buff_remain > 8) {
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
   }
 
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status:",
+                         -1);
 
   return offset;
 }
 
 static int
 rs_pgo_dissect_replace_rqst (tvbuff_t * tvb, int offset,
-                            packet_info * pinfo, proto_tree * tree,
-                            guint8 * drep)
+                             packet_info * pinfo, proto_tree * tree,
+                             dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1196,24 +1033,21 @@ rs_pgo_dissect_replace_rqst (tvbuff_t * tvb, int offset,
         [in]        sec_rgy_name_t      pgo_name,
         [in]        sec_rgy_pgo_item_t  *pgo_item,
 */
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
-                        "pgo_item:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_sec_rgy_pgo_item_t, NDR_POINTER_REF,
+                         "pgo_item:", -1);
 
   return offset;
 }
 
 static int
 rs_pgo_dissect_replace_resp (tvbuff_t * tvb, int offset,
-                            packet_info * pinfo, proto_tree * tree,
-                            guint8 * drep)
+                             packet_info * pinfo, proto_tree * tree,
+                             dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1222,17 +1056,17 @@ rs_pgo_dissect_replace_resp (tvbuff_t * tvb, int offset,
 /*
         [out]       rs_cache_data_t     *cache_info,
         [out]       error_status_t      *status
-  
+
 */
 
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status:",
+                         -1);
 
   return offset;
 }
@@ -1240,13 +1074,9 @@ rs_pgo_dissect_replace_resp (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_add_member_rqst (tvbuff_t * tvb, int offset,
-                               packet_info * pinfo, proto_tree * tree,
-                               guint8 * drep)
+                                packet_info * pinfo, proto_tree * tree,
+                                dcerpc_info *di, guint8 * drep)
 {
-
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1260,9 +1090,9 @@ rs_pgo_dissect_add_member_rqst (tvbuff_t * tvb, int offset,
         [in]        sec_rgy_name_t      person_name,
 */
 
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
 
 
   return offset;
@@ -1270,12 +1100,9 @@ rs_pgo_dissect_add_member_rqst (tvbuff_t * tvb, int offset,
 }
 static int
 rs_pgo_dissect_rename_rqst (tvbuff_t * tvb, int offset,
-                           packet_info * pinfo, proto_tree * tree,
-                           guint8 * drep)
+                            packet_info * pinfo, proto_tree * tree,
+                            dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1286,9 +1113,9 @@ rs_pgo_dissect_rename_rqst (tvbuff_t * tvb, int offset,
         [in]        sec_rgy_name_t      old_name,
         [in]        sec_rgy_name_t      new_name,
 */
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
 
 
   return offset;
@@ -1296,12 +1123,9 @@ rs_pgo_dissect_rename_rqst (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_rename_resp (tvbuff_t * tvb, int offset,
-                           packet_info * pinfo, proto_tree * tree,
-                           guint8 * drep)
+                            packet_info * pinfo, proto_tree * tree,
+                            dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1312,13 +1136,13 @@ rs_pgo_dissect_rename_resp (tvbuff_t * tvb, int offset,
         [out]       error_status_t      *status
 */
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status:",
+                         -1);
 
   return offset;
 }
@@ -1326,13 +1150,11 @@ rs_pgo_dissect_rename_resp (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_add_member_resp (tvbuff_t * tvb, int offset,
-                               packet_info * pinfo, proto_tree * tree,
-                               guint8 * drep)
+                                packet_info * pinfo, proto_tree * tree,
+                                dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-  guint32 buff_remain;
+  gint         buff_remain;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1343,20 +1165,20 @@ rs_pgo_dissect_add_member_resp (tvbuff_t * tvb, int offset,
         [out]       error_status_t      *status
 */
 
- buff_remain = tvb_length_remaining(tvb, offset);
+ buff_remain = tvb_captured_length_remaining(tvb, offset);
 
 /* found several add responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
 if (buff_remain > 8) {
 
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
 }
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status:",
+                         -1);
 
 
   return offset;
@@ -1364,12 +1186,9 @@ if (buff_remain > 8) {
 
 static int
 rs_pgo_dissect_delete_member_rqst (tvbuff_t * tvb, int offset,
-                                  packet_info * pinfo, proto_tree * tree,
-                                  guint8 * drep)
+                                   packet_info * pinfo, proto_tree * tree,
+                                   dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1383,9 +1202,9 @@ rs_pgo_dissect_delete_member_rqst (tvbuff_t * tvb, int offset,
     );
 */
 
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
 
   return offset;
 
@@ -1394,14 +1213,12 @@ rs_pgo_dissect_delete_member_rqst (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_get_members_rqst (tvbuff_t * tvb, int offset,
-                                packet_info * pinfo, proto_tree * tree,
-                                guint8 * drep)
+                                 packet_info * pinfo, proto_tree * tree,
+                                 dcerpc_info *di, guint8 * drep)
 {
 
   guint32 max_members;
-  dcerpc_info *di;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1414,31 +1231,28 @@ rs_pgo_dissect_get_members_rqst (tvbuff_t * tvb, int offset,
         [in]        signed32                max_members,
 */
 
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
   offset += 4;
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
-                        "member_cursor:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
+                         "member_cursor:", -1);
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rs_var1,
-                       &max_members);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_rs_var1,
+                        &max_members);
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, " :max_members:%u", max_members);
+  col_append_fstr (pinfo->cinfo, COL_INFO, " :max_members:%u", max_members);
 
   return offset;
 }
 
 static int
 rs_pgo_dissect_key_transfer_rqst (tvbuff_t * tvb, int offset,
-                                 packet_info * pinfo, proto_tree * tree,
-                                 guint8 * drep)
+                                  packet_info * pinfo, proto_tree * tree,
+                                  dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1451,24 +1265,21 @@ rs_pgo_dissect_key_transfer_rqst (tvbuff_t * tvb, int offset,
 */
 
   offset += 4;
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_rs_pgo_query_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_rs_pgo_query_t (tvb, offset, pinfo, tree, di, drep);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
+                         -1);
 
   return offset;
 }
 
 static int
 rs_pgo_dissect_key_transfer_resp (tvbuff_t * tvb, int offset,
-                                 packet_info * pinfo, proto_tree * tree,
-                                 guint8 * drep)
+                                  packet_info * pinfo, proto_tree * tree,
+                                  dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1481,17 +1292,17 @@ rs_pgo_dissect_key_transfer_resp (tvbuff_t * tvb, int offset,
 */
 
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
+                         -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status:",
+                         -1);
 
   return offset;
 }
@@ -1499,12 +1310,10 @@ rs_pgo_dissect_key_transfer_resp (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_is_member_resp (tvbuff_t * tvb, int offset,
-                              packet_info * pinfo, proto_tree * tree,
-                              guint8 * drep)
+                               packet_info * pinfo, proto_tree * tree,
+                               dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1515,41 +1324,38 @@ rs_pgo_dissect_is_member_resp (tvbuff_t * tvb, int offset,
         [out]       error_status_t      *status
 */
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status:",
+                         -1);
 
   return offset;
 }
 
 static int
 rs_pgo_dissect_is_member_rqst (tvbuff_t * tvb, int offset,
-                              packet_info * pinfo, proto_tree * tree,
-                              guint8 * drep)
+                               packet_info * pinfo, proto_tree * tree,
+                               dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
 /*
         [in]        sec_rgy_domain_t    name_domain,
         [in]        sec_rgy_name_t      go_name,
         [in]        sec_rgy_name_t      person_name,
 */
 
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
     }
 
   offset += 4;
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
   offset += 4;
-  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_name_t (tvb, offset, pinfo, tree, di, drep);
 
 
   return offset;
@@ -1559,13 +1365,11 @@ rs_pgo_dissect_is_member_rqst (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_get_rqst (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * tree,
+                         dcerpc_info *di, guint8 * drep)
 {
-  dcerpc_info *di;
   guint32 allow_aliases;
 
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1578,39 +1382,34 @@ rs_pgo_dissect_get_rqst (tvbuff_t * tvb, int offset,
         [in, out]   sec_rgy_cursor_t        *item_cursor,
 */
 
-  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, drep);
+  offset = dissect_sec_rgy_domain_t (tvb, offset, pinfo, tree, di, drep);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_pgo_query_key_t, NDR_POINTER_REF, "key:",
+                         -1);
   offset =
-    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rs_var1,
-                       &allow_aliases);
+    dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_rs_var1,
+                        &allow_aliases);
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, " :allow_aliases:%u",
-                    allow_aliases);
+  col_append_fstr (pinfo->cinfo, COL_INFO, " :allow_aliases:%u",
+                     allow_aliases);
 
 
-  offset += 4;                 /* XXX */
+  offset += 4;                  /* XXX */
 
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
-                        "item_cursor:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
+                         "item_cursor:", -1);
   return offset;
 
 }
 
 static int
 rs_pgo_dissect_get_resp (tvbuff_t * tvb, int offset,
-                        packet_info * pinfo, proto_tree * tree,
-                        guint8 * drep)
+                         packet_info * pinfo, proto_tree * tree,
+                         dcerpc_info *di, guint8 * drep)
 {
-
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1623,17 +1422,17 @@ rs_pgo_dissect_get_resp (tvbuff_t * tvb, int offset,
 */
 
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
-                        "item_cursor:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_sec_rgy_cursor_t, NDR_POINTER_REF,
+                         "item_cursor:", -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_pgo_query_result_t, NDR_POINTER_REF,
-                        "result:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_pgo_query_result_t, NDR_POINTER_REF,
+                         "result:", -1);
 
   return offset;
 
@@ -1641,13 +1440,10 @@ rs_pgo_dissect_get_resp (tvbuff_t * tvb, int offset,
 
 static int
 rs_pgo_dissect_delete_member_resp (tvbuff_t * tvb, int offset,
-                                  packet_info * pinfo, proto_tree * tree,
-                                  guint8 * drep)
+                                   packet_info * pinfo, proto_tree * tree,
+                                   dcerpc_info *di, guint8 * drep)
 {
 
-  dcerpc_info *di;
-
-  di = pinfo->private_data;
   if (di->conformant_run)
     {
       return offset;
@@ -1656,17 +1452,17 @@ rs_pgo_dissect_delete_member_resp (tvbuff_t * tvb, int offset,
 /*
         [out]       rs_cache_data_t     *cache_info,
         [out]       error_status_t      *status
+
 */
 
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_rs_cache_data_t, NDR_POINTER_REF,
-                        "cache_info:", -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_rs_cache_data_t, NDR_POINTER_REF,
+                         "cache_info:", -1);
   offset =
-    dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
-                        dissect_error_status_t, NDR_POINTER_REF, "status:",
-                        -1);
+    dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
+                         dissect_error_status_t, NDR_POINTER_REF, "status:",
+                         -1);
 
   return offset;
 
@@ -1682,7 +1478,7 @@ static dcerpc_sub_dissector rs_pgo_dissectors[] = {
   {5, "key_transfer", rs_pgo_dissect_key_transfer_rqst,
    rs_pgo_dissect_key_transfer_resp},
   {6, "add_member", rs_pgo_dissect_add_member_rqst,
-   rs_pgo_dissect_add_member_resp}, 
+   rs_pgo_dissect_add_member_resp},
   {7, "delete_member", rs_pgo_dissect_delete_member_rqst,
    rs_pgo_dissect_delete_member_resp},
   {8, "is_member", rs_pgo_dissect_is_member_rqst,
@@ -1700,163 +1496,54 @@ proto_register_rs_pgo (void)
      {"Operation", "rs_pgo.opnum", FT_UINT16, BASE_DEC, NULL, 0x0,
       NULL, HFILL}},
     {&hf_error_status_t,
-     {"hf_error_status_t", "hf_error_status_t", FT_UINT32, BASE_DEC, NULL,
-      0x0, NULL, HFILL}},
-    {&hf_rgy_acct_user_flags_t,
-     {"hf_rgy_acct_user_flags_t", "hf_rgy_acct_user_flags_t", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_get_rqst_key_size,
-     {"hf_rgy_get_rqst_key_size", "hf_rgy_get_rqst_key_size", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_get_rqst_key_t,
-     {"hf_rgy_get_rqst_key_t", "hf_rgy_get_rqst_key_t", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_get_rqst_name_domain,
-     {"hf_rgy_get_rqst_name_domain", "hf_rgy_get_rqst_name_domain",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_get_rqst_var,
-     {"hf_rgy_get_rqst_var", "hf_rgy_get_rqst_var", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_get_rqst_var2,
-     {"hf_rgy_get_rqst_var2", "hf_rgy_get_rqst_var2", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_key1,
-     {"hf_rgy_is_member_rqst_key1", "hf_rgy_is_member_rqst_key1", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_key1_size,
-     {"hf_rgy_is_member_rqst_key1_size", "hf_rgy_is_member_rqst_key1_size",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_key2,
-     {"hf_rgy_is_member_rqst_key2", "hf_rgy_is_member_rqst_key2", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_key2_size,
-     {"hf_rgy_is_member_rqst_key2_size", "hf_rgy_is_member_rqst_key2_size",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_var1,
-     {"hf_rgy_is_member_rqst_var1", "hf_rgy_is_member_rqst_var1", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_var2,
-     {"hf_rgy_is_member_rqst_var2", "hf_rgy_is_member_rqst_var2", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_var3,
-     {"hf_rgy_is_member_rqst_var3", "hf_rgy_is_member_rqst_var3", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_is_member_rqst_var4,
-     {"hf_rgy_is_member_rqst_var4", "hf_rgy_is_member_rqst_var4", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_key_transfer_rqst_var1,
-     {"hf_rgy_key_transfer_rqst_var1", "hf_rgy_key_transfer_rqst_var1",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_key_transfer_rqst_var2,
-     {"hf_rgy_key_transfer_rqst_var2", "hf_rgy_key_transfer_rqst_var2",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_key_transfer_rqst_var3,
-     {"hf_rgy_key_transfer_rqst_var3", "hf_rgy_key_transfer_rqst_var3",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_name_domain,
-     {"hf_rgy_name_domain", "hf_rgy_name_domain", FT_UINT32, BASE_DEC, NULL,
-      0x0, NULL, HFILL}},
-    {&hf_rgy_sec_rgy_name_max_len,
-     {"hf_rgy_sec_rgy_name_max_len", "hf_rgy_sec_rgy_name_max_len",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_sec_rgy_name_t,
-     {"hf_rgy_sec_rgy_name_t", "hf_rgy_sec_rgy_name_t", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
-    {&hf_rgy_sec_rgy_name_t_size,
-     {"hf_rgy_sec_rgy_name_t_size", "hf_rgy_sec_rgy_name_t_size", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_rs_pgo_id_key_t,
-     {"hf_rs_pgo_id_key_t", "hf_rs_pgo_id_key_t", FT_UINT32, BASE_DEC, NULL,
+     {"Error status", "rs_pgo.error_status", FT_UINT32, BASE_DEC, NULL,
       0x0, NULL, HFILL}},
     {&hf_rs_pgo_query_key_t,
-     {"hf_rs_pgo_query_key_t", "hf_rs_pgo_query_key_t", FT_UINT32, BASE_DEC,
+     {"Query key", "rs_pgo.query_key", FT_UINT32, BASE_DEC,
       NULL, 0x0, NULL, HFILL}},
     {&hf_rs_pgo_query_result_t,
-     {"hf_rs_pgo_query_result_t", "hf_rs_pgo_query_result_t", FT_UINT32,
+     {"Query result", "rs_pgo.query_result", FT_UINT32,
       BASE_DEC, NULL, 0x0, NULL, HFILL}},
     {&hf_rs_pgo_query_t,
-     {"hf_rs_pgo_query_t", "hf_rs_pgo_query_t", FT_UINT32, BASE_DEC, NULL,
+     {"Query", "rs_pgo.query", FT_UINT32, BASE_DEC, NULL,
       0x0, NULL, HFILL}},
     {&hf_rs_sec_rgy_pgo_item_t_quota,
-     {"hf_rs_sec_rgy_pgo_item_t_quota", "hf_rs_sec_rgy_pgo_item_t_quota",
+     {"Quota", "rs_pgo.quota",
       FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
     {&hf_rs_sec_rgy_pgo_item_t_unix_num,
-     {"hf_rs_sec_rgy_pgo_item_t_unix_num",
-      "hf_rs_sec_rgy_pgo_item_t_unix_num", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
+     {"Unix num",
+      "rs_pgo.unix_num", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
       HFILL}},
     {&hf_rs_timeval,
-     {"hf_rs_timeval", "hf_rs_timeval", FT_RELATIVE_TIME, BASE_NONE, NULL,
+     {"Timeval", "rs_pgo.timeval", FT_RELATIVE_TIME, BASE_NONE, NULL,
       0x0, NULL, HFILL}},
     {&hf_rs_uuid1,
-     {"hf_rs_uuid1", "hf_rs_uuid1", FT_GUID, BASE_NONE, NULL, 0x0, "UUID",
-      HFILL}},
+     {"Uuid1", "rs_pgo.uuid1", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL}},
     {&hf_rs_var1,
-     {"hf_rs_var1", "hf_rs_var1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
+     {"Var1", "rs_pgo.var1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
       HFILL}},
-    {&hf_sec_attr_component_name_t_handle,
-     {"hf_sec_attr_component_name_t_handle",
-      "hf_sec_attr_component_name_t_handle", FT_UINT32, BASE_DEC, NULL, 0x0,
-      NULL, HFILL}},
-    {&hf_sec_attr_component_name_t_valid,
-     {"hf_sec_attr_component_name_t_valid",
-      "hf_sec_attr_component_name_t_valid", FT_UINT32, BASE_DEC, NULL, 0x0,
-      NULL, HFILL}},
-    {&hf_sec_passwd_type_t,
-     {"hf_sec_passwd_type_t", "hf_sec_passwd_type_t", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_passwd_version_t,
-     {"hf_sec_passwd_version_t", "hf_sec_passwd_version_t", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_rgy_acct_admin_flags,
-     {"hf_sec_rgy_acct_admin_flags", "hf_sec_rgy_acct_admin_flags",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_rgy_acct_auth_flags_t,
-     {"hf_sec_rgy_acct_auth_flags_t", "hf_sec_rgy_acct_auth_flags_t",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_rgy_acct_key_t,
-     {"hf_sec_rgy_acct_key_t", "hf_sec_rgy_acct_key_t", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
     {&hf_sec_rgy_domain_t,
-     {"hf_sec_rgy_domain_t", "hf_sec_rgy_domain_t", FT_UINT32, BASE_DEC,
+     {"Domain", "rs_pgo.domain", FT_UINT32, BASE_DEC,
       NULL, 0x0, NULL, HFILL}},
     {&hf_sec_rgy_name_t_principalName_string,
-     {"hf_sec_rgy_name_t_principalName_string",
-      "hf_sec_rgy_name_t_principalName_string", FT_STRING, BASE_NONE, NULL,
+     {"Name principalName", "rs_pgo.name_principalName", FT_STRING, BASE_NONE, NULL,
       0x0, NULL, HFILL}},
     {&hf_sec_rgy_name_t_size,
-     {"hf_sec_rgy_name_t_size", "hf_sec_rgy_name_t_size", FT_UINT32,
+     {"Name_t size", "rs_pgo.name_t_size", FT_UINT32,
       BASE_DEC, NULL, 0x0, NULL, HFILL}},
     {&hf_sec_rgy_pgo_flags_t,
-     {"hf_sec_rgy_pgo_flags_t", "hf_sec_rgy_pgo_flags_t", FT_UINT32,
+     {"Flags", "rs_pgo.flags", FT_UINT32,
       BASE_HEX, NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_rgy_pgo_item_t,
-     {"hf_sec_rgy_pgo_item_t", "hf_sec_rgy_pgo_item_t", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
     {&hf_sec_rgy_pname_t_size,
-     {"hf_sec_rgy_pname_t_size",
-      "hf_sec_rgy_pname_t_size", FT_UINT32, BASE_DEC, NULL,
+     {"Pname_t size", "rs_pgo.pname_t_size", FT_UINT32, BASE_DEC, NULL,
       0x0, NULL, HFILL}},
     {&hf_sec_rgy_pname_t_principalName_string,
-     {"hf_sec_rgy_pname_t_principalName_string",
-      "hf_sec_rgy_pname_t_principalName_string", FT_STRING, BASE_NONE, NULL,
-      0x0, NULL, HFILL}},
-    {&hf_sec_rgy_unix_sid_t_group,
-     {"hf_sec_rgy_unix_sid_t_group", "hf_sec_rgy_unix_sid_t_group",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_rgy_unix_sid_t_org,
-     {"hf_sec_rgy_unix_sid_t_org", "hf_sec_rgy_unix_sid_t_org", FT_UINT32,
-      BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_rgy_unix_sid_t_person,
-     {"hf_sec_rgy_unix_sid_t_person", "hf_sec_rgy_unix_sid_t_person",
-      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    {&hf_sec_timeval_sec_t,
-     {"hf_sec_timeval_sec_t", "hf_sec_timeval_sec_t", FT_UINT32, BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
+     {"Pname principalName", "rs_pgo.pname_principalName", FT_STRING,
+      BASE_NONE, NULL, 0x0, NULL, HFILL}},
     {&hf_rs_pgo_unix_num_key_t,
-     {"hf_rs_pgo_unix_num_key_t", "hf_rs_pgo_unix_num_key_t", FT_UINT32,
+     {"Unix num key", "rs_pgo.unix_num_key_t", FT_UINT32,
       BASE_DEC,
-      NULL, 0x0, NULL, HFILL}},
-
+      NULL, 0x0, NULL, HFILL}}
   };
 
   static gint *ett[] = {
@@ -1901,5 +1588,18 @@ proto_reg_handoff_rs_pgo (void)
 {
   /* Register the protocol as dcerpc */
   dcerpc_init_uuid (proto_rs_pgo, ett_rs_pgo, &uuid_rs_pgo, ver_rs_pgo,
-                   rs_pgo_dissectors, hf_rs_pgo_opnum);
+                    rs_pgo_dissectors, hf_rs_pgo_opnum);
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */