various string related changes, mainly replace sprintf/snprintf by g_snprintf
[obnox/wireshark/wip.git] / packet-dcerpc-netlogon.c
index e2db33be785788e96c8f5bba213257123ad59589..78ed0a32fae5b68f4c0f6cae3b53f3d762f16e67 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002 structure and command dissectors by Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-netlogon.c,v 1.80 2003/05/15 04:58:53 tpot Exp $
+ * $Id: packet-dcerpc-netlogon.c,v 1.97 2004/03/05 23:12:09 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -101,8 +101,7 @@ static int hf_netlogon_pwd_can_change_time = -1;
 static int hf_netlogon_pwd_must_change_time = -1;
 static int hf_netlogon_nt_chal_resp = -1;
 static int hf_netlogon_lm_chal_resp = -1;
-static int hf_netlogon_credential_high = -1;
-static int hf_netlogon_credential_low = -1;
+static int hf_netlogon_credential = -1;
 static int hf_netlogon_acct_name = -1;
 static int hf_netlogon_acct_desc = -1;
 static int hf_netlogon_group_desc = -1;
@@ -123,6 +122,8 @@ static int hf_netlogon_group_rid = -1;
 static int hf_netlogon_logon_srv = -1;
 static int hf_netlogon_principal = -1;
 static int hf_netlogon_logon_dom = -1;
+static int hf_netlogon_resourcegroupdomainsid = -1;
+static int hf_netlogon_resourcegroupcount = -1;
 static int hf_netlogon_downlevel_domain_name = -1;
 static int hf_netlogon_dns_domain_name = -1;
 static int hf_netlogon_domain_name = -1;
@@ -260,7 +261,7 @@ static guint16 ver_dcerpc_netlogon = 1;
 static int
 netlogon_dissect_LOGONSRV_HANDLE(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_UNIQUE, "Server Handle", 
@@ -291,7 +292,7 @@ netlogon_dissect_LOGONSRV_HANDLE(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_VALIDATION_UAS_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        dcerpc_info *di;
 
@@ -358,7 +359,7 @@ netlogon_dissect_VALIDATION_UAS_INFO(tvbuff_t *tvb, int offset,
 }
 
 /*
- * IDL long NetLogonUasLogon(
+ * IDL long NetrLogonUasLogon(
  * IDL      [in][unique][string] wchar_t *ServerName,
  * IDL      [in][ref][string] wchar_t *UserName,
  * IDL      [in][ref][string] wchar_t *Workstation,
@@ -366,8 +367,8 @@ netlogon_dissect_VALIDATION_UAS_INFO(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogonuaslogon_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonuaslogon_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -383,8 +384,8 @@ netlogon_dissect_netlogonuaslogon_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_netlogonuaslogon_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonuaslogon_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_VALIDATION_UAS_INFO, NDR_POINTER_UNIQUE,
@@ -405,7 +406,7 @@ netlogon_dissect_netlogonuaslogon_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_LOGOFF_UAS_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        dcerpc_info *di;
 
@@ -425,7 +426,7 @@ netlogon_dissect_LOGOFF_UAS_INFO(tvbuff_t *tvb, int offset,
 }
 
 /*
- * IDL long NetLogonUasLogoff(
+ * IDL long NetrLogonUasLogoff(
  * IDL      [in][unique][string] wchar_t *ServerName,
  * IDL      [in][ref][string] wchar_t *UserName,
  * IDL      [in][ref][string] wchar_t *Workstation,
@@ -433,8 +434,8 @@ netlogon_dissect_LOGOFF_UAS_INFO(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogonuaslogoff_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonuaslogoff_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -450,8 +451,8 @@ netlogon_dissect_netlogonuaslogoff_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_netlogonuaslogoff_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonuaslogoff_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_LOGOFF_UAS_INFO, NDR_POINTER_REF,
@@ -478,7 +479,7 @@ netlogon_dissect_netlogonuaslogoff_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_LOGON_IDENTITY_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -531,7 +532,7 @@ netlogon_dissect_LOGON_IDENTITY_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_LM_OWF_PASSWORD(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -564,7 +565,7 @@ netlogon_dissect_LM_OWF_PASSWORD(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_NT_OWF_PASSWORD(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -600,7 +601,7 @@ netlogon_dissect_NT_OWF_PASSWORD(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_INTERACTIVE_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = netlogon_dissect_LOGON_IDENTITY_INFO(tvb, offset,
                pinfo, tree, drep);
@@ -622,7 +623,7 @@ netlogon_dissect_INTERACTIVE_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CHALLENGE(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        dcerpc_info *di;
 
@@ -672,7 +673,7 @@ static void dissect_nt_chal_resp_cb(packet_info *pinfo _U_, proto_tree *tree,
 static int
 netlogon_dissect_NETWORK_INFO(tvbuff_t *tvb, int offset,
                packet_info *pinfo, proto_tree *tree,
-               char *drep)
+               guint8 *drep)
 {
        offset = netlogon_dissect_LOGON_IDENTITY_INFO(tvb, offset,
                pinfo, tree, drep);
@@ -700,7 +701,7 @@ netlogon_dissect_NETWORK_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_SERVICE_INFO(tvbuff_t *tvb, int offset,
                packet_info *pinfo, proto_tree *tree,
-               char *drep)
+               guint8 *drep)
 {
        offset = netlogon_dissect_LOGON_IDENTITY_INFO(tvb, offset,
                pinfo, tree, drep);
@@ -724,7 +725,7 @@ netlogon_dissect_SERVICE_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_LEVEL(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        guint16 level;
 
@@ -761,7 +762,7 @@ netlogon_dissect_LEVEL(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CREDENTIAL(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        dcerpc_info *di;
 
@@ -771,13 +772,9 @@ netlogon_dissect_CREDENTIAL(tvbuff_t *tvb, int offset,
                return offset;
        }
 
-       proto_tree_add_item(
-               tree, hf_netlogon_credential_low, tvb, offset, 4, TRUE);
-       offset += 4;
-
-       proto_tree_add_item(
-               tree, hf_netlogon_credential_high, tvb, offset, 4, TRUE);
-       offset += 4;
+       proto_tree_add_item(tree, hf_netlogon_credential, tvb, offset, 8,
+               FALSE);
+       offset += 8;
 
        return offset;
 }
@@ -792,7 +789,7 @@ netlogon_dissect_CREDENTIAL(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_AUTHENTICATOR(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        dcerpc_info *di;
        nstime_t ts;
@@ -832,7 +829,7 @@ netlogon_dissect_AUTHENTICATOR(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_GROUP_MEMBERSHIP(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -844,7 +841,7 @@ netlogon_dissect_GROUP_MEMBERSHIP(tvbuff_t *tvb, int offset,
        }
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_user_rid, NULL);
+               hf_netlogon_group_rid, NULL);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_attrs, NULL);
@@ -855,7 +852,7 @@ netlogon_dissect_GROUP_MEMBERSHIP(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_GROUP_MEMBERSHIP_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_GROUP_MEMBERSHIP);
@@ -871,7 +868,7 @@ netlogon_dissect_GROUP_MEMBERSHIP_ARRAY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_USER_SESSION_KEY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        dcerpc_info *di;
 
@@ -919,7 +916,7 @@ netlogon_dissect_USER_SESSION_KEY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_VALIDATION_SAM_INFO(tvbuff_t *tvb, int offset,
                packet_info *pinfo, proto_tree *tree,
-               char *drep)
+               guint8 *drep)
 {
        int i;
 
@@ -991,7 +988,7 @@ netlogon_dissect_VALIDATION_SAM_INFO(tvbuff_t *tvb, int offset,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        for(i=0;i<10;i++){
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1036,7 +1033,7 @@ netlogon_dissect_VALIDATION_SAM_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        int i;
 
@@ -1108,8 +1105,138 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
+               pinfo, tree, drep, -1);
+
+       for(i=0;i<10;i++){
+               offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+                       hf_netlogon_unknown_long, NULL);
+       }
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_num_other_groups, NULL);
+
+        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+               dissect_ndr_nt_SID_AND_ATTRIBUTES_ARRAY, NDR_POINTER_UNIQUE,
+               "SID_AND_ATTRIBUTES_ARRAY:", -1);
+
+       return offset;
+}
+
+
+
+
+
+/*
+ * IDL typedef struct {
+ * IDL   uint64 LogonTime;
+ * IDL   uint64 LogoffTime;
+ * IDL   uint64 KickOffTime;
+ * IDL   uint64 PasswdLastSet;
+ * IDL   uint64 PasswdCanChange;
+ * IDL   uint64 PasswdMustChange;
+ * IDL   unicodestring effectivename;
+ * IDL   unicodestring fullname;
+ * IDL   unicodestring logonscript;
+ * IDL   unicodestring profilepath;
+ * IDL   unicodestring homedirectory;
+ * IDL   unicodestring homedirectorydrive;
+ * IDL   short LogonCount;
+ * IDL   short BadPasswdCount;
+ * IDL   long userid;
+ * IDL   long primarygroup;
+ * IDL   long groupcount;
+ * IDL   [unique] GROUP_MEMBERSHIP *groupids;
+ * IDL   long userflags;
+ * IDL   USER_SESSION_KEY key;
+ * IDL   unicodestring logonserver;
+ * IDL   unicodestring domainname;
+ * IDL   [unique] SID logondomainid;
+ * IDL   long expansionroom[10];
+ * IDL   long sidcount;
+ * IDL   [unique] SID_AND_ATTRIBS;
+ * IDL   [unique] SID resourcegroupdomainsid;
+ * IDL   long resourcegroupcount;
+qqq
+ * IDL } PAC_LOGON_INFO;
+ */
+int
+netlogon_dissect_PAC_LOGON_INFO(tvbuff_t *tvb, int offset,
+                       packet_info *pinfo, proto_tree *tree,
+                       guint8 *drep)
+{
+       int i;
+       guint32 rgc;
+
+       offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_logon_time);
+
+       offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_logoff_time);
+
+       offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_kickoff_time);
+
+       offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_pwd_last_set_time);
+
+       offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_pwd_can_change_time);
+
+       offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_pwd_must_change_time);
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_acct_name, 0);
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_full_name, 0);
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_logon_script, 0);
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_profile_path, 0);
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_home_dir, 0);
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_dir_drive, 0);
+
+       offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_logon_count16, NULL);
+
+       offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_bad_pw_count16, NULL);
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_user_rid, NULL);
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_group_rid, NULL);
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_num_rids, NULL);
+
+        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_GROUP_MEMBERSHIP_ARRAY, NDR_POINTER_UNIQUE,
+               "GROUP_MEMBERSHIP_ARRAY", -1);
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_user_flags, NULL);
+
+       offset = netlogon_dissect_USER_SESSION_KEY(tvb, offset,
                pinfo, tree, drep);
 
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_logon_srv, 0);
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_logon_dom, 0);
+
+       offset = dissect_ndr_nt_PSID(tvb, offset,
+               pinfo, tree, drep, -1);
+
        for(i=0;i<10;i++){
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_unknown_long, NULL);
@@ -1122,6 +1249,16 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
                dissect_ndr_nt_SID_AND_ATTRIBUTES_ARRAY, NDR_POINTER_UNIQUE,
                "SID_AND_ATTRIBUTES_ARRAY:", -1);
 
+       offset = dissect_ndr_nt_PSID(tvb, offset,
+               pinfo, tree, drep, hf_netlogon_resourcegroupdomainsid);
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_resourcegroupcount, &rgc);
+
+        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_GROUP_MEMBERSHIP_ARRAY, NDR_POINTER_UNIQUE,
+               "ResourceGroupIDs", -1);
+
        return offset;
 }
 
@@ -1130,7 +1267,7 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_PAC(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        dcerpc_info *di;
        guint32 pac_size;
@@ -1154,7 +1291,7 @@ netlogon_dissect_PAC(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_AUTH(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        dcerpc_info *di;
        guint32 auth_size;
@@ -1196,7 +1333,7 @@ netlogon_dissect_AUTH(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_VALIDATION_PAC_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        int i;
 
@@ -1256,7 +1393,7 @@ netlogon_dissect_VALIDATION_PAC_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_VALIDATION(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        guint16 level;
 
@@ -1292,7 +1429,7 @@ netlogon_dissect_VALIDATION(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetLogonSamLogon(
+ * IDL long NetrLogonSamLogon(
  * IDL      [in][unique][string] wchar_t *ServerName,
  * IDL      [in][unique][string] wchar_t *Workstation,
  * IDL      [in][unique] AUTHENTICATOR *credential,
@@ -1305,8 +1442,8 @@ netlogon_dissect_VALIDATION(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogonsamlogon_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsamlogon_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -1337,8 +1474,8 @@ netlogon_dissect_netlogonsamlogon_rqst(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_netlogonsamlogon_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsamlogon_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
@@ -1359,7 +1496,7 @@ netlogon_dissect_netlogonsamlogon_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetLogonSamLogoff(
+ * IDL long NetrLogonSamLogoff(
  * IDL      [in][unique][string] wchar_t *ServerName,
  * IDL      [in][unique][string] wchar_t *ComputerName,
  * IDL      [in][unique] AUTHENTICATOR credential,
@@ -1369,8 +1506,8 @@ netlogon_dissect_netlogonsamlogon_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogonsamlogoff_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsamlogoff_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -1397,8 +1534,8 @@ netlogon_dissect_netlogonsamlogoff_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netlogonsamlogoff_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsamlogoff_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
@@ -1413,7 +1550,7 @@ netlogon_dissect_netlogonsamlogoff_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetServerReqChallenge(
+ * IDL long NetrServerReqChallenge(
  * IDL      [in][unique][string] wchar_t *ServerName,
  * IDL      [in][ref][string] wchar_t *ComputerName,
  * IDL      [in][ref] CREDENTIAL client_credential,
@@ -1421,8 +1558,8 @@ netlogon_dissect_netlogonsamlogoff_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -1441,8 +1578,8 @@ netlogon_dissect_netserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netserverreqchallenge_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverreqchallenge_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
@@ -1458,7 +1595,7 @@ netlogon_dissect_netserverreqchallenge_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_secure_channel_type, NULL);
@@ -1468,7 +1605,7 @@ netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetServerAuthenticate(
+ * IDL long NetrServerAuthenticate(
  * IDL      [in][unique][string] wchar_t *ServerName,
  * IDL      [in][ref][string] wchar_t *UserName,
  * IDL      [in] short secure_challenge_type,
@@ -1478,8 +1615,8 @@ netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netserverauthenticate_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverauthenticate_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -1500,8 +1637,8 @@ netlogon_dissect_netserverauthenticate_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netserverauthenticate_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverauthenticate_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
@@ -1523,7 +1660,7 @@ netlogon_dissect_netserverauthenticate_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_ENCRYPTED_LM_OWF_PASSWORD(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep _U_)
+                       guint8 *drep _U_)
 {
        dcerpc_info *di;
 
@@ -1541,7 +1678,7 @@ netlogon_dissect_ENCRYPTED_LM_OWF_PASSWORD(tvbuff_t *tvb, int offset,
 }
 
 /*
- * IDL long NetServerPasswordSet(
+ * IDL long NetrServerPasswordSet(
  * IDL      [in][unique][string] wchar_t *ServerName,
  * IDL      [in][ref][string] wchar_t *UserName,
  * IDL      [in] short secure_challenge_type,
@@ -1552,8 +1689,8 @@ netlogon_dissect_ENCRYPTED_LM_OWF_PASSWORD(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netserverpasswordset_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverpasswordset_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -1578,8 +1715,8 @@ netlogon_dissect_netserverpasswordset_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netserverpasswordset_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverpasswordset_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -1608,7 +1745,7 @@ netlogon_dissect_netserverpasswordset_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_DELETE_USER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_UNIQUE, "Account Name", hf_netlogon_acct_name, 0);
@@ -1651,7 +1788,7 @@ netlogon_dissect_DELTA_DELETE_USER(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_SENSITIVE_DATA(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        dcerpc_info *di;
        guint32 data_len;
@@ -1674,7 +1811,7 @@ netlogon_dissect_SENSITIVE_DATA(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_USER_PRIVATE_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                hf_netlogon_sensitive_data_flag, NULL);
@@ -1733,10 +1870,10 @@ netlogon_dissect_USER_PRIVATE_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_USER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_acct_name, 0);
+               hf_netlogon_acct_name, 3);
 
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_full_name, 0);
@@ -1874,10 +2011,10 @@ netlogon_dissect_DELTA_USER(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_DOMAIN(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_domain_name, 1);
+               hf_netlogon_domain_name, 3);
 
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_oem_info, 0);
@@ -1957,10 +2094,10 @@ netlogon_dissect_DELTA_DOMAIN(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_GROUP(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_group_name, 0);
+               hf_netlogon_group_name, 3);
 
        offset = netlogon_dissect_GROUP_MEMBERSHIP(tvb, offset,
                pinfo, tree, drep);
@@ -2019,7 +2156,7 @@ netlogon_dissect_DELTA_GROUP(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_RENAME(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        dcerpc_info *di;
 
@@ -2062,7 +2199,7 @@ netlogon_dissect_DELTA_RENAME(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_RID(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                                hf_netlogon_user_rid, NULL);
@@ -2073,7 +2210,7 @@ netlogon_dissect_RID(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_RID_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_RID);
@@ -2084,7 +2221,7 @@ netlogon_dissect_RID_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_ATTRIB(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_attrs, NULL);
@@ -2095,7 +2232,7 @@ netlogon_dissect_ATTRIB(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_ATTRIB_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_ATTRIB);
@@ -2117,7 +2254,7 @@ netlogon_dissect_ATTRIB_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_GROUP_MEMBER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_RID_array, NDR_POINTER_UNIQUE,
@@ -2165,7 +2302,7 @@ netlogon_dissect_DELTA_GROUP_MEMBER(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_ALIAS(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_alias_name, 0);
@@ -2219,7 +2356,7 @@ netlogon_dissect_DELTA_ALIAS(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_ALIAS_MEMBER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_nt_PSID_ARRAY(tvb, offset, pinfo, tree, drep);
 
@@ -2242,7 +2379,7 @@ netlogon_dissect_DELTA_ALIAS_MEMBER(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_EVENT_AUDIT_OPTION(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_event_audit_option, NULL);
@@ -2253,7 +2390,7 @@ netlogon_dissect_EVENT_AUDIT_OPTION(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_EVENT_AUDIT_OPTIONS_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_EVENT_AUDIT_OPTION);
@@ -2275,7 +2412,7 @@ netlogon_dissect_EVENT_AUDIT_OPTIONS_ARRAY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_QUOTA_LIMITS(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -2337,7 +2474,7 @@ netlogon_dissect_QUOTA_LIMITS(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_POLICY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_max_log_size, NULL);
@@ -2359,7 +2496,7 @@ netlogon_dissect_DELTA_POLICY(tvbuff_t *tvb, int offset,
                hf_netlogon_domain_name, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        offset = netlogon_dissect_QUOTA_LIMITS(tvb, offset,
                pinfo, tree, drep);
@@ -2407,7 +2544,7 @@ netlogon_dissect_DELTA_POLICY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CONTROLLER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dc_name, 0);
@@ -2418,7 +2555,7 @@ netlogon_dissect_CONTROLLER(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CONTROLLER_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROLLER);
@@ -2447,7 +2584,7 @@ netlogon_dissect_CONTROLLER_ARRAY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_TRUSTED_DOMAINS(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_domain_name, 0);
@@ -2496,7 +2633,7 @@ netlogon_dissect_DELTA_TRUSTED_DOMAINS(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_PRIV_ATTR(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_attrs, NULL);
@@ -2507,7 +2644,7 @@ netlogon_dissect_PRIV_ATTR(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_PRIV_ATTR_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_PRIV_ATTR);
@@ -2518,7 +2655,7 @@ netlogon_dissect_PRIV_ATTR_ARRAY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_PRIV_NAME(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_privilege_name, 1);
@@ -2529,7 +2666,7 @@ netlogon_dissect_PRIV_NAME(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_PRIV_NAME_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_PRIV_NAME);
@@ -2561,7 +2698,7 @@ netlogon_dissect_PRIV_NAME_ARRAY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_ACCOUNTS(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_privilege_entries, NULL);
@@ -2626,7 +2763,7 @@ netlogon_dissect_DELTA_ACCOUNTS(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CIPHER_VALUE_DATA(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        dcerpc_info *di;
        guint32 data_len;
@@ -2655,7 +2792,7 @@ netlogon_dissect_CIPHER_VALUE_DATA(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CIPHER_VALUE(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep, char *name, int hf_index)
+                       guint8 *drep, char *name, int hf_index)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -2702,7 +2839,7 @@ netlogon_dissect_CIPHER_VALUE(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_SECRET(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = netlogon_dissect_CIPHER_VALUE(tvb, offset,
                pinfo, tree, drep,
@@ -2762,7 +2899,7 @@ netlogon_dissect_DELTA_SECRET(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_MODIFIED_COUNT(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, drep,
                hf_netlogon_modify_count, NULL);
@@ -2829,7 +2966,7 @@ static const value_string delta_type_vals[] = {
 static int
 netlogon_dissect_DELTA_UNION(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -2963,7 +3100,7 @@ netlogon_dissect_DELTA_UNION(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_ID_UNION(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -2977,13 +3114,13 @@ netlogon_dissect_DELTA_ID_UNION(tvbuff_t *tvb, int offset,
        }
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_level16, &level);
+               hf_netlogon_delta_type, &level);
 
        ALIGN_TO_4_BYTES;
        switch(level){
        case 1:
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-                       hf_netlogon_user_rid, NULL);
+                       hf_netlogon_group_rid, NULL);
                break;
        case 2:
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -3031,23 +3168,23 @@ netlogon_dissect_DELTA_ID_UNION(tvbuff_t *tvb, int offset,
                break;
        case 13:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 14:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 15:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 16:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 17:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 18:
                offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, 
@@ -3083,11 +3220,12 @@ netlogon_dissect_DELTA_ID_UNION(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_ENUM(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
        int old_offset=offset;
+       guint16 type;
 
        if(parent_tree){
                item = proto_tree_add_text(parent_tree, tvb, offset, 0,
@@ -3096,7 +3234,10 @@ netlogon_dissect_DELTA_ENUM(tvbuff_t *tvb, int offset,
        }
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_delta_type, NULL);
+               hf_netlogon_delta_type, &type);
+
+       proto_item_append_text(item, val_to_str(
+                                      type, delta_type_vals, "Unknown"));
 
        offset = netlogon_dissect_DELTA_ID_UNION(tvb, offset,
                pinfo, tree, drep);
@@ -3111,7 +3252,7 @@ netlogon_dissect_DELTA_ENUM(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_ENUM_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DELTA_ENUM);
@@ -3128,7 +3269,7 @@ netlogon_dissect_DELTA_ENUM_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DELTA_ENUM_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_num_deltas, NULL);
@@ -3142,7 +3283,7 @@ netlogon_dissect_DELTA_ENUM_ARRAY(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetDatabaseDeltas(
+ * IDL long NetrDatabaseDeltas(
  * IDL      [in][string][ref] wchar_t *logonserver, # REF!!!
  * IDL      [in][string][ref] wchar_t *computername,
  * IDL      [in][ref] AUTHENTICATOR credential,
@@ -3154,8 +3295,8 @@ netlogon_dissect_DELTA_ENUM_ARRAY(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netsamdeltas_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabasedeltas_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
@@ -3184,8 +3325,8 @@ netlogon_dissect_netsamdeltas_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netsamdeltas_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabasedeltas_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -3207,7 +3348,7 @@ netlogon_dissect_netsamdeltas_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetDatabaseSync(
+ * IDL long NetrDatabaseSync(
  * IDL      [in][string][ref] wchar_t *logonserver, # REF!!!
  * IDL      [in][string][ref] wchar_t *computername,
  * IDL      [in][ref] AUTHENTICATOR credential,
@@ -3219,8 +3360,8 @@ netlogon_dissect_netsamdeltas_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogondatabasesync_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabasesync_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
@@ -3250,8 +3391,8 @@ netlogon_dissect_netlogondatabasesync_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_netlogondatabasesync_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabasesync_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -3280,7 +3421,7 @@ netlogon_dissect_netlogondatabasesync_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_UAS_INFO_0(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        dcerpc_info *di;
 
@@ -3306,7 +3447,7 @@ netlogon_dissect_UAS_INFO_0(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_BYTE_byte(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
                offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_unknown_char, NULL);
@@ -3317,7 +3458,7 @@ netlogon_dissect_BYTE_byte(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_BYTE_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_byte);
@@ -3326,7 +3467,7 @@ netlogon_dissect_BYTE_array(tvbuff_t *tvb, int offset,
 }
 
 /*
- * IDL long NetAccountDelta(
+ * IDL long NetrAccountDeltas(
  * IDL      [in][string][unique] wchar_t *logonserver,
  * IDL      [in][string][ref] wchar_t *computername,
  * IDL      [in][ref] AUTHENTICATOR credential,
@@ -3341,8 +3482,8 @@ netlogon_dissect_BYTE_array(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogonaccountdeltas_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netraccountdeltas_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -3374,8 +3515,8 @@ netlogon_dissect_netlogonaccountdeltas_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netlogonaccountdeltas_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netraccountdeltas_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -3403,7 +3544,7 @@ netlogon_dissect_netlogonaccountdeltas_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetAccountDelta(
+ * IDL long NetrAccountSync(
  * IDL      [in][string][unique] wchar_t *logonserver,
  * IDL      [in][string][ref] wchar_t *computername,
  * IDL      [in][ref] AUTHENTICATOR credential,
@@ -3419,8 +3560,8 @@ netlogon_dissect_netlogonaccountdeltas_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogonaccountsync_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netraccountsync_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -3448,8 +3589,8 @@ netlogon_dissect_netlogonaccountsync_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netlogonaccountsync_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netraccountsync_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -3480,15 +3621,15 @@ netlogon_dissect_netlogonaccountsync_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetGetDCName(
+ * IDL long NetrGetDcName(
  * IDL    [in][ref][string] wchar_t *logon_server,
  * IDL    [in][unique][string] wchar_t *domainname,
  * IDL    [out][unique][string] wchar_t *dcname,
  * IDL };
  */
 static int
-netlogon_dissect_netlogongetdcname_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrgetdcname_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
@@ -3499,8 +3640,8 @@ netlogon_dissect_netlogongetdcname_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netlogongetdcname_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrgetdcname_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_UNIQUE, "Domain", hf_netlogon_dc_name, 0);
@@ -3522,7 +3663,7 @@ netlogon_dissect_netlogongetdcname_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_NETLOGON_INFO_1(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_flags, NULL);
@@ -3545,7 +3686,7 @@ netlogon_dissect_NETLOGON_INFO_1(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_NETLOGON_INFO_2(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_flags, NULL);
@@ -3578,7 +3719,7 @@ netlogon_dissect_NETLOGON_INFO_2(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_NETLOGON_INFO_3(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_flags, NULL);
@@ -3615,7 +3756,7 @@ netlogon_dissect_NETLOGON_INFO_3(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CONTROL_QUERY_INFORMATION(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        guint32 level;
 
@@ -3646,7 +3787,7 @@ netlogon_dissect_CONTROL_QUERY_INFORMATION(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetLogonControl(
+ * IDL long NetrLogonControl(
  * IDL      [in][string][unique] wchar_t *logonserver,
  * IDL      [in] long function_code,
  * IDL      [in] long level,
@@ -3654,8 +3795,8 @@ netlogon_dissect_CONTROL_QUERY_INFORMATION(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogoncontrol_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncontrol_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -3669,8 +3810,8 @@ netlogon_dissect_netlogoncontrol_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netlogoncontrol_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncontrol_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_QUERY_INFORMATION, NDR_POINTER_REF,
@@ -3684,15 +3825,15 @@ netlogon_dissect_netlogoncontrol_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetGetDCName(
+ * IDL long NetrGetAnyDCName(
  * IDL    [in][unique][string] wchar_t *logon_server,
  * IDL    [in][unique][string] wchar_t *domainname,
  * IDL    [out][unique][string] wchar_t *dcname,
  * IDL };
  */
 static int
-netlogon_dissect_netlogongetanydcname_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrgetanydcname_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_UNIQUE, "Server Handle", 
@@ -3704,8 +3845,8 @@ netlogon_dissect_netlogongetanydcname_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_netlogongetanydcname_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrgetanydcname_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_UNIQUE, "Domain", hf_netlogon_dc_name, 0);
@@ -3735,7 +3876,7 @@ netlogon_dissect_netlogongetanydcname_reply(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_CONTROL_DATA_INFORMATION(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        guint32 level;
 
@@ -3770,7 +3911,7 @@ netlogon_dissect_CONTROL_DATA_INFORMATION(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetLogonControl2(
+ * IDL long NetrLogonControl2(
  * IDL      [in][string][unique] wchar_t *logonserver,
  * IDL      [in] long function_code,
  * IDL      [in] long level,
@@ -3779,8 +3920,8 @@ netlogon_dissect_CONTROL_DATA_INFORMATION(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogoncontrol2_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncontrol2_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -3799,8 +3940,8 @@ netlogon_dissect_netlogoncontrol2_rqst(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_netlogoncontrol2_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncontrol2_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_QUERY_INFORMATION, NDR_POINTER_REF,
@@ -3814,7 +3955,7 @@ netlogon_dissect_netlogoncontrol2_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetServerAuthenticate2(
+ * IDL long NetrServerAuthenticate2(
  * IDL      [in][string][unique] wchar_t *logonserver,
  * IDL      [in][ref][string] wchar_t *username,
  * IDL      [in] short secure_channel_type,
@@ -3825,8 +3966,8 @@ netlogon_dissect_netlogoncontrol2_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netserverauthenticate2_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverauthenticate2_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -3854,8 +3995,8 @@ netlogon_dissect_netserverauthenticate2_rqst(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_netserverauthenticate2_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverauthenticate2_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
@@ -3872,7 +4013,7 @@ netlogon_dissect_netserverauthenticate2_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetDatabaseSync2(
+ * IDL long NetrDatabaseSync2(
  * IDL      [in][string][ref] wchar_t *logonserver, # REF!!!
  * IDL      [in][string][ref] wchar_t *computername,
  * IDL      [in][ref] AUTHENTICATOR credential,
@@ -3885,8 +4026,8 @@ netlogon_dissect_netserverauthenticate2_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netdatabasesync2_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabasesync2_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
@@ -3918,8 +4059,8 @@ netlogon_dissect_netdatabasesync2_rqst(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_netdatabasesync2_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabasesync2_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -3940,7 +4081,7 @@ netlogon_dissect_netdatabasesync2_reply(tvbuff_t *tvb, int offset,
 
 
 /*
- * IDL long NetDatabaseRedo(
+ * IDL long NetrDatabaseRedo(
  * IDL      [in][string][ref] wchar_t *logonserver, # REF!!!
  * IDL      [in][string][ref] wchar_t *computername,
  * IDL      [in][ref] AUTHENTICATOR credential,
@@ -3951,8 +4092,8 @@ netlogon_dissect_netdatabasesync2_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_netlogondatabaseredo_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabaseredo_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
@@ -3979,8 +4120,8 @@ netlogon_dissect_netlogondatabaseredo_rqst(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_netlogondatabaseredo_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrdatabaseredo_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -3997,12 +4138,8 @@ netlogon_dissect_netlogondatabaseredo_reply(tvbuff_t *tvb, int offset,
 }
 
 
-/* XXX NetMon does not recognize this as a valid function. Muddle however
- * tells us what parameters it takes but not their names.
- * It looks similar to logoncontrol2.  perhaps it is logoncontrol3?
- */
 /*
- * IDL long NetFunction_12(
+ * IDL long NetrLogonControl2Ex(
  * IDL      [in][string][unique] wchar_t *logonserver,
  * IDL      [in] long function_code,
  * IDL      [in] long level,
@@ -4011,8 +4148,8 @@ netlogon_dissect_netlogondatabaseredo_reply(tvbuff_t *tvb, int offset,
  * IDL );
  */
 static int
-netlogon_dissect_function_12_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncontrol2ex_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -4030,8 +4167,8 @@ netlogon_dissect_function_12_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 static int
-netlogon_dissect_function_12_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncontrol2ex_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_QUERY_INFORMATION, NDR_POINTER_REF,
@@ -4046,9 +4183,6 @@ netlogon_dissect_function_12_reply(tvbuff_t *tvb, int offset,
 
 
 
-/*qqq*/
-/* Updated above this line */
-
 static const value_string trust_type_vals[] = {
        { 1,                            "DOWNLEVEL" },
        { 2,                            "UPLEVEL" },
@@ -4098,7 +4232,7 @@ static const true_false_string trust_tree_root = {
 };
 static int
 netlogon_dissect_DOMAIN_TRUST_FLAGS(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *parent_tree, char *drep)
+       packet_info *pinfo, proto_tree *parent_tree, guint8 *drep)
 {
        guint32 mask;
        proto_item *item = NULL;
@@ -4224,7 +4358,7 @@ static const true_false_string get_dcname_request_flags_return_flat_name = {
 };
 static int
 netlogon_dissect_GET_DCNAME_REQUEST_FLAGS(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *parent_tree, char *drep)
+       packet_info *pinfo, proto_tree *parent_tree, guint8 *drep)
 {
        guint32 mask;
        proto_item *item = NULL;
@@ -4353,7 +4487,7 @@ static const true_false_string dc_flags_dns_forest_flag = {
 };
 static int
 netlogon_dissect_DC_FLAGS(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *parent_tree, char *drep)
+       packet_info *pinfo, proto_tree *parent_tree, guint8 *drep)
 {
        guint32 mask;
        proto_item *item = NULL;
@@ -4410,7 +4544,7 @@ netlogon_dissect_DC_FLAGS(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_pointer_long(tvbuff_t *tvb, int offset,
                              packet_info *pinfo, proto_tree *tree,
-                             char *drep)
+                             guint8 *drep)
 {
        dcerpc_info *di;
 
@@ -4423,7 +4557,7 @@ netlogon_dissect_pointer_long(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_pointer_char(tvbuff_t *tvb, int offset,
                              packet_info *pinfo, proto_tree *tree,
-                             char *drep)
+                             guint8 *drep)
 {
        dcerpc_info *di;
 
@@ -4433,43 +4567,10 @@ netlogon_dissect_pointer_char(tvbuff_t *tvb, int offset,
        return offset;
 }
 
-static int
-netlogon_dissect_UNICODE_STRING(tvbuff_t *tvb, int offset,
-                       packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep, int type, int hf_index, dcerpc_callback_fnct_t *callback)
-{
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
-       int old_offset=offset;
-       dcerpc_info *di;
-       char *name;
-
-       di=pinfo->private_data;
-       if(di->conformant_run){
-               /*just a run to handle conformant arrays, nothing to dissect */
-               return offset;
-       }
-
-       name = proto_registrar_get_name(hf_index);
-       if(parent_tree){
-               item = proto_tree_add_text(parent_tree, tvb, offset, -1,
-                       "%s", name);
-               tree = proto_item_add_subtree(item, ett_nt_unicode_string);
-       }
-
-       offset = dissect_ndr_pointer_cb(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_wchar_cvstring, type,
-                       name, hf_index, callback, NULL);
-
-       proto_item_set_len(item, offset-old_offset);
-       return offset;
-}
-
-
 static int
 netlogon_dissect_UNICODE_MULTI_byte(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
                offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_unknown_char, NULL);
@@ -4480,7 +4581,7 @@ netlogon_dissect_UNICODE_MULTI_byte(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_UNICODE_MULTI_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_UNICODE_MULTI_byte);
@@ -4491,7 +4592,7 @@ netlogon_dissect_UNICODE_MULTI_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_UNICODE_MULTI(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -4517,7 +4618,7 @@ netlogon_dissect_UNICODE_MULTI(tvbuff_t *tvb, int offset,
 int
 dissect_nt_GUID(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset=dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_netlogon_guid, NULL);
 
@@ -4527,7 +4628,7 @@ dissect_nt_GUID(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DOMAIN_CONTROLLER_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -4573,7 +4674,7 @@ netlogon_dissect_DOMAIN_CONTROLLER_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_BLOB_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        guint32 len;
        dcerpc_info *di;
@@ -4597,7 +4698,7 @@ netlogon_dissect_BLOB_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_BLOB(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -4621,7 +4722,7 @@ netlogon_dissect_BLOB(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DOMAIN_TRUST_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -4668,7 +4769,7 @@ netlogon_dissect_DOMAIN_TRUST_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DOMAIN_TRUST_INFO_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_TRUST_INFO);
@@ -4679,7 +4780,7 @@ netlogon_dissect_DOMAIN_TRUST_INFO_ARRAY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DOMAIN_QUERY_1(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = netlogon_dissect_BLOB(tvb, offset,
                pinfo, tree, drep);
@@ -4734,7 +4835,7 @@ netlogon_dissect_DOMAIN_QUERY_1(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DOMAIN_INFO_1(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = netlogon_dissect_DOMAIN_TRUST_INFO(tvb, offset, pinfo, tree, drep);
 
@@ -4784,7 +4885,7 @@ netlogon_dissect_DOMAIN_INFO_1(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DOMAIN_INFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        guint32 level;
 
@@ -4806,7 +4907,7 @@ netlogon_dissect_DOMAIN_INFO(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_UNICODE_STRING_512(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -4834,7 +4935,7 @@ netlogon_dissect_UNICODE_STRING_512(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_element_844_byte(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
                offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_unknown_char, NULL);
@@ -4845,7 +4946,7 @@ netlogon_dissect_element_844_byte(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_element_844_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_element_844_byte);
@@ -4856,7 +4957,7 @@ netlogon_dissect_element_844_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_TYPE_50(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -4882,7 +4983,7 @@ netlogon_dissect_TYPE_50(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_TYPE_50_ptr(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_50, NDR_POINTER_UNIQUE,
@@ -4893,7 +4994,7 @@ netlogon_dissect_TYPE_50_ptr(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_DS_DOMAIN_TRUSTS(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *parent_tree, char *drep)
+       packet_info *pinfo, proto_tree *parent_tree, guint8 *drep)
 {
        guint32 tmp;
        proto_item *item=NULL;
@@ -4928,7 +5029,7 @@ netlogon_dissect_DS_DOMAIN_TRUSTS(tvbuff_t *tvb, int offset,
                hf_netlogon_trust_attribs, &tmp);
 
        /* SID pointer */
-       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep);
+       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep, -1);
 
        /* GUID */
        offset = dissect_nt_GUID(tvb, offset, pinfo, tree, drep);
@@ -4940,7 +5041,7 @@ netlogon_dissect_DS_DOMAIN_TRUSTS(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DS_DOMAIN_TRUSTS_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DS_DOMAIN_TRUSTS);
@@ -4951,7 +5052,7 @@ netlogon_dissect_DS_DOMAIN_TRUSTS_ARRAY(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_element_865_byte(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
                offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_unknown_char, NULL);
@@ -4962,7 +5063,7 @@ netlogon_dissect_element_865_byte(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_element_865_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_element_865_byte);
@@ -4973,7 +5074,7 @@ netlogon_dissect_element_865_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_element_866_byte(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
                offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_unknown_char, NULL);
@@ -4984,7 +5085,7 @@ netlogon_dissect_element_866_byte(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_element_866_array(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_element_866_byte);
@@ -4995,7 +5096,7 @@ netlogon_dissect_element_866_array(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_TYPE_52(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -5025,7 +5126,7 @@ netlogon_dissect_TYPE_52(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_TYPE_52_ptr(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_52, NDR_POINTER_UNIQUE,
@@ -5037,7 +5138,7 @@ netlogon_dissect_TYPE_52_ptr(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_TYPE_44(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
-                       char *drep)
+                       guint8 *drep)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -5068,7 +5169,7 @@ netlogon_dissect_TYPE_44(tvbuff_t *tvb, int offset,
 static int
 netlogon_dissect_DOMAIN_QUERY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
-                       char *drep)
+                       guint8 *drep)
 {
        guint32 level;
 
@@ -5093,8 +5194,8 @@ netlogon_dissect_DOMAIN_QUERY(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_nettrusteddomainlist_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrenumeratetrusteddomains_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5104,8 +5205,8 @@ netlogon_dissect_nettrusteddomainlist_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_nettrusteddomainlist_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrenumeratetrusteddomains_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_UNICODE_MULTI, NDR_POINTER_REF,
@@ -5118,8 +5219,8 @@ netlogon_dissect_nettrusteddomainlist_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_dsrgetdcname2_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrgetdcname_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5143,8 +5244,8 @@ netlogon_dissect_dsrgetdcname2_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_dsrgetdcname2_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrgetdcname_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_CONTROLLER_INFO, NDR_POINTER_UNIQUE,
@@ -5157,8 +5258,8 @@ netlogon_dissect_dsrgetdcname2_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_15_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogondummyroutine1_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5183,8 +5284,8 @@ netlogon_dissect_function_15_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_15_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogondummyroutine1_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
@@ -5201,8 +5302,8 @@ netlogon_dissect_function_15_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_16_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsetservicebits_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5218,8 +5319,8 @@ netlogon_dissect_function_16_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_16_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsetservicebits_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5227,9 +5328,10 @@ netlogon_dissect_function_16_reply(tvbuff_t *tvb, int offset,
        return offset;
 }
 
+
 static int
-netlogon_dissect_function_17_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogongettrustrid_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5243,8 +5345,8 @@ netlogon_dissect_function_17_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_17_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogongettrustrid_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_pointer_long, NDR_POINTER_UNIQUE,
@@ -5256,9 +5358,10 @@ netlogon_dissect_function_17_reply(tvbuff_t *tvb, int offset,
        return offset;
 }
 
+
 static int
-netlogon_dissect_function_18_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncomputeserverdigest_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5278,7 +5381,7 @@ netlogon_dissect_function_18_rqst(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_BYTE_16_array(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        int i;
 
@@ -5291,8 +5394,8 @@ netlogon_dissect_BYTE_16_array(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_18_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncomputeserverdigest_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_16_array, NDR_POINTER_UNIQUE,
@@ -5305,8 +5408,8 @@ netlogon_dissect_function_18_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_19_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncomputeclientdigest_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5327,8 +5430,8 @@ netlogon_dissect_function_19_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_19_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogoncomputeclientdigest_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_16_array, NDR_POINTER_UNIQUE,
@@ -5341,8 +5444,8 @@ netlogon_dissect_function_19_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_netserverauthenticate3_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverauthenticate3_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5368,8 +5471,8 @@ netlogon_dissect_netserverauthenticate3_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_netserverauthenticate3_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverauthenticate3_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
@@ -5389,8 +5492,8 @@ netlogon_dissect_netserverauthenticate3_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_dsrgetdcname_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrgetdcnameex_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5412,8 +5515,8 @@ netlogon_dissect_dsrgetdcname_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_dsrgetdcname_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrgetdcnameex_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_CONTROLLER_INFO, NDR_POINTER_UNIQUE,
@@ -5427,7 +5530,7 @@ netlogon_dissect_dsrgetdcname_reply(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_dsrgetsitename_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5438,11 +5541,16 @@ netlogon_dissect_dsrgetsitename_rqst(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_dsrgetsitename_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
 
-       offset = netlogon_dissect_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-               NDR_POINTER_REF, hf_netlogon_site_name, 0);
+       /* XXX hmmm this does not really look like a UNIQUE pointer but
+          will do for now.   I think it is really a 32bit integer followed by
+          a REF pointer to a unicode string */
+       offset = dissect_ndr_pointer_cb(tvb, offset, pinfo, tree, drep,
+               dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE, "Site Name", 
+               hf_netlogon_site_name, cb_wstr_postprocess, 
+               GINT_TO_POINTER(CB_STR_COL_INFO | 1));
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5452,7 +5560,7 @@ netlogon_dissect_dsrgetsitename_reply(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_netrlogongetdomaininfo_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        /* Unlike the other NETLOGON RPCs, this is not a unique pointer. */
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
@@ -5483,7 +5591,7 @@ netlogon_dissect_netrlogongetdomaininfo_rqst(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_netrlogongetdomaininfo_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -5500,8 +5608,8 @@ netlogon_dissect_netrlogongetdomaininfo_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_1e_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverpasswordset2_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5529,8 +5637,8 @@ netlogon_dissect_function_1e_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_1e_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverpasswordset2_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
@@ -5543,8 +5651,8 @@ netlogon_dissect_function_1e_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_netserverpasswordset2_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverpasswordget_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5568,8 +5676,8 @@ netlogon_dissect_netserverpasswordset2_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_netserverpasswordset2_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrserverpasswordget_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
@@ -5586,8 +5694,8 @@ netlogon_dissect_netserverpasswordset2_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_20_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsendtosam_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5612,8 +5720,8 @@ netlogon_dissect_function_20_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_20_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsendtosam_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
@@ -5626,8 +5734,8 @@ netlogon_dissect_function_20_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_21_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsraddresstositenamesw_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5644,8 +5752,8 @@ netlogon_dissect_function_21_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_21_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsraddresstositenamesw_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_50_ptr, NDR_POINTER_UNIQUE,
@@ -5658,8 +5766,8 @@ netlogon_dissect_function_21_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_22_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrgetdcnameex2_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5691,8 +5799,8 @@ netlogon_dissect_function_22_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_22_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrgetdcnameex2_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_CONTROLLER_INFO, NDR_POINTER_UNIQUE,
@@ -5705,8 +5813,8 @@ netlogon_dissect_function_22_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_23_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogongettimeserviceparentdomain_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5716,8 +5824,8 @@ netlogon_dissect_function_23_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_23_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogongettimeserviceparentdomain_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_UNIQUE, "unknown string", 
@@ -5734,8 +5842,8 @@ netlogon_dissect_function_23_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_24_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrenumeratetrusteddomainsex_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5744,8 +5852,8 @@ netlogon_dissect_function_24_rqst(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_24_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrenumeratetrusteddomainsex_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_entries, NULL);
@@ -5761,8 +5869,8 @@ netlogon_dissect_function_24_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_function_25_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsraddresstositenamesexw_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5779,8 +5887,8 @@ netlogon_dissect_function_25_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_25_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsraddresstositenamesexw_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_52_ptr, NDR_POINTER_UNIQUE,
@@ -5794,24 +5902,58 @@ netlogon_dissect_function_25_reply(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_function_26_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_site_name_item(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
-               NDR_POINTER_UNIQUE, "unknown string", 
-               hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_counted_string_cb(
+               tvb, offset, pinfo, tree, drep, hf_netlogon_site_name,
+               cb_wstr_postprocess, 
+               GINT_TO_POINTER(CB_STR_COL_INFO | 1));
 
        return offset;
 }
+static int
+netlogon_dissect_site_name_array(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+{
+       offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_site_name_item);
 
+       return offset;
+}
 
 static int
-netlogon_dissect_function_26_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_site_names(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_TYPE_50_ptr, NDR_POINTER_UNIQUE,
-               "TYPE_50** pointer: unknown_TYPE_50", -1);
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_count, NULL);
+
+        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_site_name_array, NDR_POINTER_UNIQUE,
+               "Site name array", -1);
+
+       return offset;
+}
+
+static int
+netlogon_dissect_dsrgetdcsitecoveragew_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+{
+       offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
+               pinfo, tree, drep);
+
+       return offset;
+}
+
+
+static int
+netlogon_dissect_dsrgetdcsitecoveragew_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+{
+        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_site_names, NDR_POINTER_UNIQUE,
+               "Site names", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5820,8 +5962,8 @@ netlogon_dissect_function_26_reply(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_logonsamlogonex_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsamlogonex_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
                NDR_POINTER_UNIQUE, "unknown string", 
@@ -5849,8 +5991,8 @@ netlogon_dissect_logonsamlogonex_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_logonsamlogonex_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_netrlogonsamlogonex_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_VALIDATION, NDR_POINTER_UNIQUE,
@@ -5872,8 +6014,8 @@ netlogon_dissect_logonsamlogonex_reply(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_dsenumeratetrusteddomains_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrenumeratedomaintrusts_rqst(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5885,8 +6027,8 @@ netlogon_dissect_dsenumeratetrusteddomains_rqst(tvbuff_t *tvb, int offset,
 
 
 static int
-netlogon_dissect_dsenumeratetrusteddomains_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+netlogon_dissect_dsrenumeratedomaintrusts_reply(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_entries, NULL);
@@ -5903,7 +6045,7 @@ netlogon_dissect_dsenumeratetrusteddomains_reply(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_dsrderegisterdnshostrecords_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
@@ -5920,7 +6062,7 @@ netlogon_dissect_dsrderegisterdnshostrecords_rqst(tvbuff_t *tvb, int offset,
                "GUID pointer: dsa_guid", -1);
 
        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
-               NDR_POINTER_UNIQUE, "dns_host", hf_netlogon_dns_host, 0);
+               NDR_POINTER_REF, "dns_host", hf_netlogon_dns_host, 0);
 
        return offset;
 }
@@ -5928,7 +6070,7 @@ netlogon_dissect_dsrderegisterdnshostrecords_rqst(tvbuff_t *tvb, int offset,
 
 static int
 netlogon_dissect_dsrderegisterdnshostrecords_reply(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *drep)
+       packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5946,22 +6088,21 @@ static int hf_netlogon_secchan_bind_ack_unknown1 = -1;
 static int hf_netlogon_secchan_bind_ack_unknown2 = -1;
 static int hf_netlogon_secchan_bind_ack_unknown3 = -1;
 
-static gint ett_secchan = -1;
+static gint ett_secchan_verf = -1;
 static gint ett_secchan_bind_creds = -1;
 static gint ett_secchan_bind_ack_creds = -1;
 
-int netlogon_dissect_secchan_bind_creds(tvbuff_t *tvb, int offset,
-                                       packet_info *pinfo, proto_tree *tree,
-                                       char *drep)
+static int dissect_secchan_bind_creds(tvbuff_t *tvb, int offset,
+                                     packet_info *pinfo, 
+                                     proto_tree *tree, guint8 *drep)
 {
-       int start_offset = offset;
        proto_item *item = NULL;
        proto_tree *subtree = NULL;
        int len;
 
        if (tree) {
                item = proto_tree_add_text(
-                       tree, tvb, offset, 0,
+                       tree, tvb, offset, -1,
                        "Secure Channel Bind Credentials");
                subtree = proto_item_add_subtree(
                        item, ett_secchan_bind_creds);
@@ -5993,21 +6134,19 @@ int netlogon_dissect_secchan_bind_creds(tvbuff_t *tvb, int offset,
 
        offset += len;
 
-       proto_item_set_len(item, offset - start_offset);
-
        return offset;
 }
 
-int netlogon_dissect_secchan_bind_ack_creds(tvbuff_t *tvb, int offset,
-                                           packet_info *pinfo, 
-                                           proto_tree *tree, char *drep)
+static int dissect_secchan_bind_ack_creds(tvbuff_t *tvb, int offset,
+                                         packet_info *pinfo, 
+                                         proto_tree *tree, guint8 *drep)
 {
        proto_item *item = NULL;
        proto_tree *subtree = NULL;
 
        if (tree) {
                item = proto_tree_add_text(
-                       tree, tvb, offset, 0,
+                       tree, tvb, offset, -1,
                        "Secure Channel Bind ACK Credentials");
                subtree = proto_item_add_subtree(
                        item, ett_secchan_bind_ack_creds);
@@ -6030,217 +6169,192 @@ int netlogon_dissect_secchan_bind_ack_creds(tvbuff_t *tvb, int offset,
        return offset;
 }
 
-static int hf_netlogon_secchan = -1;
-static int hf_netlogon_secchan_sig = -1;
-static int hf_netlogon_secchan_unk = -1;
-static int hf_netlogon_secchan_seq = -1;
-static int hf_netlogon_secchan_nonce = -1;
-
-int netlogon_dissect_secchan_verf(tvbuff_t *tvb, int offset, 
-                                 packet_info *pinfo _U_, proto_tree *tree, 
-                                 char *drep _U_)
-{
-       proto_item *vf;
-       proto_tree *sec_chan_tree;
-       /*
-         * Create a new tree, and split into 4 components ...
-         */
-       vf = proto_tree_add_item(tree, hf_netlogon_secchan, tvb, 
-                                offset, -1, FALSE);
-       sec_chan_tree = proto_item_add_subtree(vf, ett_secchan);
-       
-       proto_tree_add_item(sec_chan_tree, hf_netlogon_secchan_sig, tvb, 
-                           offset, 8, FALSE);
-       
-       proto_tree_add_item(sec_chan_tree, hf_netlogon_secchan_unk, tvb, 
-                           offset + 8, 8, FALSE);
-       
-       proto_tree_add_item(sec_chan_tree, hf_netlogon_secchan_seq, tvb, 
-                           offset + 16, 8, FALSE);
-       
-       proto_tree_add_item(sec_chan_tree, hf_netlogon_secchan_nonce, tvb, 
-                           offset + 24, 8, FALSE);
-       
-       return offset;
-}
-
 /* Subdissectors */
 
 static dcerpc_sub_dissector dcerpc_netlogon_dissectors[] = {
-       { NETLOGON_UASLOGON, "UasLogon",
-               netlogon_dissect_netlogonuaslogon_rqst,
-               netlogon_dissect_netlogonuaslogon_reply },
-       { NETLOGON_UASLOGOFF, "UasLogoff",
-               netlogon_dissect_netlogonuaslogoff_rqst,
-               netlogon_dissect_netlogonuaslogoff_reply },
-       { NETLOGON_NETLOGONSAMLOGON, "SamLogon",
-               netlogon_dissect_netlogonsamlogon_rqst,
-               netlogon_dissect_netlogonsamlogon_reply },
-       { NETLOGON_NETLOGONSAMLOGOFF, "SamLogoff",
-               netlogon_dissect_netlogonsamlogoff_rqst,
-               netlogon_dissect_netlogonsamlogoff_reply },
-       { NETLOGON_NETSERVERREQCHALLENGE, "ServerReqChallenge",
-               netlogon_dissect_netserverreqchallenge_rqst,
-               netlogon_dissect_netserverreqchallenge_reply },
-       { NETLOGON_NETSERVERAUTHENTICATE, "ServerAuthenticate",
-               netlogon_dissect_netserverauthenticate_rqst,
-               netlogon_dissect_netserverauthenticate_reply },
-       { NETLOGON_NETSERVERPASSWORDSET, "ServerPasswdSet",
-               netlogon_dissect_netserverpasswordset_rqst,
-               netlogon_dissect_netserverpasswordset_reply },
-       { NETLOGON_NETSAMDELTAS, "DatabaseDeltas",
-               netlogon_dissect_netsamdeltas_rqst,
-               netlogon_dissect_netsamdeltas_reply },
-       { NETLOGON_DATABASESYNC, "DatabaseSync",
-               netlogon_dissect_netlogondatabasesync_rqst,
-               netlogon_dissect_netlogondatabasesync_reply },
-       { NETLOGON_ACCOUNTDELTAS, "AccountDeltas",
-               netlogon_dissect_netlogonaccountdeltas_rqst,
-               netlogon_dissect_netlogonaccountdeltas_reply },
-       { NETLOGON_ACCOUNTSYNC, "AccountSync",
-               netlogon_dissect_netlogonaccountsync_rqst,
-               netlogon_dissect_netlogonaccountsync_reply },
-       { NETLOGON_GETDCNAME, "GetDCName",
-               netlogon_dissect_netlogongetdcname_rqst,
-               netlogon_dissect_netlogongetdcname_reply },
-       { NETLOGON_NETLOGONCONTROL, "LogonControl",
-               netlogon_dissect_netlogoncontrol_rqst,
-               netlogon_dissect_netlogoncontrol_reply },
-       { NETLOGON_GETANYDCNAME, "GetAnyDCName",
-               netlogon_dissect_netlogongetanydcname_rqst,
-               netlogon_dissect_netlogongetanydcname_reply },
-       { NETLOGON_NETLOGONCONTROL2, "LogonControl2",
-               netlogon_dissect_netlogoncontrol2_rqst,
-               netlogon_dissect_netlogoncontrol2_reply },
-       { NETLOGON_NETSERVERAUTHENTICATE2, "ServerAuthenticate2",
-               netlogon_dissect_netserverauthenticate2_rqst,
-               netlogon_dissect_netserverauthenticate2_reply },
-       { NETLOGON_NETDATABASESYNC2, "DatabaseSync2",
-               netlogon_dissect_netdatabasesync2_rqst,
-               netlogon_dissect_netdatabasesync2_reply },
-       { NETLOGON_DATABASEREDO, "DatabaseRedo",
-               netlogon_dissect_netlogondatabaseredo_rqst,
-               netlogon_dissect_netlogondatabaseredo_reply },
-       { NETLOGON_FUNCTION_12, "Function_0x12",
-               netlogon_dissect_function_12_rqst,
-               netlogon_dissect_function_12_reply },
-       { NETLOGON_NETTRUSTEDDOMAINLIST, "TrustedDomainList",
-               netlogon_dissect_nettrusteddomainlist_rqst,
-               netlogon_dissect_nettrusteddomainlist_reply },
-       { NETLOGON_DSRGETDCNAME2, "DsrGetDCName2",
-               netlogon_dissect_dsrgetdcname2_rqst,
-               netlogon_dissect_dsrgetdcname2_reply },
-       { NETLOGON_FUNCTION_15, "Function 0x15",
-               netlogon_dissect_function_15_rqst,
-               netlogon_dissect_function_15_reply },
-       { NETLOGON_FUNCTION_16, "Function 0x16",
-               netlogon_dissect_function_16_rqst,
-               netlogon_dissect_function_16_reply },
-       { NETLOGON_FUNCTION_17, "Function 0x17",
-               netlogon_dissect_function_17_rqst,
-               netlogon_dissect_function_17_reply },
-       { NETLOGON_FUNCTION_18, "Function 0x18",
-               netlogon_dissect_function_18_rqst,
-               netlogon_dissect_function_18_reply },
-       { NETLOGON_FUNCTION_19, "Function 0x19",
-               netlogon_dissect_function_19_rqst,
-               netlogon_dissect_function_19_reply },
-       { NETLOGON_NETSERVERAUTHENTICATE3, "ServerAuthenticate3",
-               netlogon_dissect_netserverauthenticate3_rqst,
-               netlogon_dissect_netserverauthenticate3_reply },
-       { NETLOGON_DSRGETDCNAME, "DsrGetDCName",
+       { NETLOGON_NETRLOGONUASLOGON, "NetrLogonUasLogon",
+               netlogon_dissect_netrlogonuaslogon_rqst,
+               netlogon_dissect_netrlogonuaslogon_reply },
+       { NETLOGON_NETRLOGONUASLOGOFF, "NetrLogonUasLogoff",
+               netlogon_dissect_netrlogonuaslogoff_rqst,
+               netlogon_dissect_netrlogonuaslogoff_reply },
+       { NETLOGON_NETRLOGONSAMLOGON, "NetrLogonSamLogon",
+               netlogon_dissect_netrlogonsamlogon_rqst,
+               netlogon_dissect_netrlogonsamlogon_reply },
+       { NETLOGON_NETRLOGONSAMLOGOFF, "NetrLogonSamLogoff",
+               netlogon_dissect_netrlogonsamlogoff_rqst,
+               netlogon_dissect_netrlogonsamlogoff_reply },
+       { NETLOGON_NETRSERVERREQCHALLENGE, "NetrServerReqChallenge",
+               netlogon_dissect_netrserverreqchallenge_rqst,
+               netlogon_dissect_netrserverreqchallenge_reply },
+       { NETLOGON_NETRSERVERAUTHENTICATE, "NetrServerAuthenticate",
+               netlogon_dissect_netrserverauthenticate_rqst,
+               netlogon_dissect_netrserverauthenticate_reply },
+       { NETLOGON_NETRSERVERPASSWORDSET, "NetrServerPasswordSet",
+               netlogon_dissect_netrserverpasswordset_rqst,
+               netlogon_dissect_netrserverpasswordset_reply },
+       { NETLOGON_NETRDATABASEDELTAS, "NetrDatabaseDeltas",
+               netlogon_dissect_netrdatabasedeltas_rqst,
+               netlogon_dissect_netrdatabasedeltas_reply },
+       { NETLOGON_NETRDATABASESYNC, "NetrDatabaseSync",
+               netlogon_dissect_netrdatabasesync_rqst,
+               netlogon_dissect_netrdatabasesync_reply },
+       { NETLOGON_NETRACCOUNTDELTAS, "NetrAccountDeltas",
+               netlogon_dissect_netraccountdeltas_rqst,
+               netlogon_dissect_netraccountdeltas_reply },
+       { NETLOGON_NETRACCOUNTSYNC, "NetrAccountSync",
+               netlogon_dissect_netraccountsync_rqst,
+               netlogon_dissect_netraccountsync_reply },
+       { NETLOGON_NETRGETDCNAME, "NetrGetDCName",
+               netlogon_dissect_netrgetdcname_rqst,
+               netlogon_dissect_netrgetdcname_reply },
+       { NETLOGON_NETRLOGONCONTROL, "NetrLogonControl",
+               netlogon_dissect_netrlogoncontrol_rqst,
+               netlogon_dissect_netrlogoncontrol_reply },
+       { NETLOGON_NETRGETANYDCNAME, "NetrGetAnyDCName",
+               netlogon_dissect_netrgetanydcname_rqst,
+               netlogon_dissect_netrgetanydcname_reply },
+       { NETLOGON_NETRLOGONCONTROL2, "NetrLogonControl2",
+               netlogon_dissect_netrlogoncontrol2_rqst,
+               netlogon_dissect_netrlogoncontrol2_reply },
+       { NETLOGON_NETRSERVERAUTHENTICATE2, "NetrServerAuthenticate2",
+               netlogon_dissect_netrserverauthenticate2_rqst,
+               netlogon_dissect_netrserverauthenticate2_reply },
+       { NETLOGON_NETRDATABASESYNC2, "NetrDatabaseSync2",
+               netlogon_dissect_netrdatabasesync2_rqst,
+               netlogon_dissect_netrdatabasesync2_reply },
+       { NETLOGON_NETRDATABASEREDO, "NetrDatabaseRedo",
+               netlogon_dissect_netrdatabaseredo_rqst,
+               netlogon_dissect_netrdatabaseredo_reply },
+       { NETLOGON_NETRLOGONCONTROL2EX, "NetrLogonControl2Ex",
+               netlogon_dissect_netrlogoncontrol2ex_rqst,
+               netlogon_dissect_netrlogoncontrol2ex_reply },
+       { NETLOGON_NETRENUMERATETRUSTEDDOMAINS, "NetrEnumerateTrustedDomains",
+               netlogon_dissect_netrenumeratetrusteddomains_rqst,
+               netlogon_dissect_netrenumeratetrusteddomains_reply },
+       { NETLOGON_DSRGETDCNAME, "DsrGetDcName",
                netlogon_dissect_dsrgetdcname_rqst,
                netlogon_dissect_dsrgetdcname_reply },
+       { NETLOGON_NETRLOGONDUMMYROUTINE1, "NetrLogonDummyRoutine1",
+               netlogon_dissect_netrlogondummyroutine1_rqst,
+               netlogon_dissect_netrlogondummyroutine1_reply },
+       { NETLOGON_NETRLOGONSETSERVICEBITS, "NetrLogonSetServiceBits",
+               netlogon_dissect_netrlogonsetservicebits_rqst,
+               netlogon_dissect_netrlogonsetservicebits_reply },
+       { NETLOGON_NETRLOGONGETTRUSTRID, "NetrLogonGetTrustRid",
+               netlogon_dissect_netrlogongettrustrid_rqst,
+               netlogon_dissect_netrlogongettrustrid_reply },
+       { NETLOGON_NETRLOGONCOMPUTESERVERDIGEST, "NetrLogonComputeServerDigest",
+               netlogon_dissect_netrlogoncomputeserverdigest_rqst,
+               netlogon_dissect_netrlogoncomputeserverdigest_reply },
+       { NETLOGON_NETRLOGONCOMPUTECLIENTDIGEST, "NetrLogonComputeClientDigest",
+               netlogon_dissect_netrlogoncomputeclientdigest_rqst,
+               netlogon_dissect_netrlogoncomputeclientdigest_reply },
+       { NETLOGON_NETRSERVERAUTHENTICATE3, "NetrServerAuthenticate3",
+               netlogon_dissect_netrserverauthenticate3_rqst,
+               netlogon_dissect_netrserverauthenticate3_reply },
+       { NETLOGON_DSRGETDCNAMEX, "DsrGetDcNameEx",
+               netlogon_dissect_dsrgetdcnameex_rqst,
+               netlogon_dissect_dsrgetdcnameex_reply },
        { NETLOGON_DSRGETSITENAME, "DsrGetSiteName",
                netlogon_dissect_dsrgetsitename_rqst,
                netlogon_dissect_dsrgetsitename_reply },
        { NETLOGON_NETRLOGONGETDOMAININFO, "NetrLogonGetDomainInfo",
                netlogon_dissect_netrlogongetdomaininfo_rqst,
                netlogon_dissect_netrlogongetdomaininfo_reply },
-       { NETLOGON_FUNCTION_1E, "Function_0x1E",
-               netlogon_dissect_function_1e_rqst,
-               netlogon_dissect_function_1e_reply },
-       { NETLOGON_NETSERVERPASSWORDSET2, "ServerPasswordSet2",
-               netlogon_dissect_netserverpasswordset2_rqst,
-               netlogon_dissect_netserverpasswordset2_reply },
-       { NETLOGON_FUNCTION_20, "Function_0x20",
-               netlogon_dissect_function_20_rqst,
-               netlogon_dissect_function_20_reply },
-       { NETLOGON_FUNCTION_21, "Function_0x21",
-               netlogon_dissect_function_21_rqst,
-               netlogon_dissect_function_21_reply },
-       { NETLOGON_FUNCTION_22, "Function_0x22",
-               netlogon_dissect_function_22_rqst,
-               netlogon_dissect_function_22_reply },
-       { NETLOGON_FUNCTION_23, "Function_0x23",
-               netlogon_dissect_function_23_rqst,
-               netlogon_dissect_function_23_reply },
-       { NETLOGON_FUNCTION_24, "Function_0x24",
-               netlogon_dissect_function_24_rqst,
-               netlogon_dissect_function_24_reply },
-       { NETLOGON_FUNCTION_25, "Function_0x25",
-               netlogon_dissect_function_25_rqst,
-               netlogon_dissect_function_25_reply },
-       { NETLOGON_FUNCTION_26, "Function_0x26",
-               netlogon_dissect_function_26_rqst,
-               netlogon_dissect_function_26_reply },
-       { NETLOGON_LOGONSAMLOGONEX, "LogonSamLogonEx",
-               netlogon_dissect_logonsamlogonex_rqst,
-               netlogon_dissect_logonsamlogonex_reply },
-       { NETLOGON_DSENUMERATETRUSTEDDOMAINS, "DSEnumerateTrustedDomains",
-               netlogon_dissect_dsenumeratetrusteddomains_rqst,
-               netlogon_dissect_dsenumeratetrusteddomains_reply },
-       { NETLOGON_DSRDEREGISTERDNSHOSTRECORDS, "DsrDeregisterDNSHostRecords",
+       { NETLOGON_NETRSERVERPASSWORDSET2, "NetrServerPasswordSet2",
+               netlogon_dissect_netrserverpasswordset2_rqst,
+               netlogon_dissect_netrserverpasswordset2_reply },
+       { NETLOGON_NETRSERVERPASSWORDGET, "NetrServerPasswordGet",
+               netlogon_dissect_netrserverpasswordget_rqst,
+               netlogon_dissect_netrserverpasswordget_reply },
+       { NETLOGON_NETRLOGONSENDTOSAM, "NetrLogonSendToSam",
+               netlogon_dissect_netrlogonsendtosam_rqst,
+               netlogon_dissect_netrlogonsendtosam_reply },
+       { NETLOGON_DSRADDRESSTOSITENAMESW, "DsrAddressToSiteNamesW",
+               netlogon_dissect_dsraddresstositenamesw_rqst,
+               netlogon_dissect_dsraddresstositenamesw_reply },
+       { NETLOGON_DSRGETDCNAMEEX2, "DsrGetDcNameEx2",
+               netlogon_dissect_dsrgetdcnameex2_rqst,
+               netlogon_dissect_dsrgetdcnameex2_reply },
+       { NETLOGON_NETRLOGONGETTIMESERVICEPARENTDOMAIN, 
+               "NetrLogonGetTimeServiceParentDomain",
+               netlogon_dissect_netrlogongettimeserviceparentdomain_rqst,
+               netlogon_dissect_netrlogongettimeserviceparentdomain_reply },
+       { NETLOGON_NETRENUMERATETRUSTEDDOMAINSEX, "NetrEnumerateTrustedDomainsEx",
+               netlogon_dissect_netrenumeratetrusteddomainsex_rqst,
+               netlogon_dissect_netrenumeratetrusteddomainsex_reply },
+       { NETLOGON_DSRADDRESSTOSITENAMESEXW, "DsrAddressToSiteNamesExW",
+               netlogon_dissect_dsraddresstositenamesexw_rqst,
+               netlogon_dissect_dsraddresstositenamesexw_reply },
+       { NETLOGON_DSRGETDCSITECOVERAGEW, "DsrGetDcSiteCoverageW",
+               netlogon_dissect_dsrgetdcsitecoveragew_rqst,
+               netlogon_dissect_dsrgetdcsitecoveragew_reply },
+       { NETLOGON_NETRLOGONSAMLOGONEX, "NetrLogonSamLogonEx",
+               netlogon_dissect_netrlogonsamlogonex_rqst,
+               netlogon_dissect_netrlogonsamlogonex_reply },
+       { NETLOGON_DSRENUMERATEDOMAINTRUSTS, "DsrEnumerateDomainTrusts",
+               netlogon_dissect_dsrenumeratedomaintrusts_rqst,
+               netlogon_dissect_dsrenumeratedomaintrusts_reply },
+       { NETLOGON_DSRDEREGISTERDNSHOSTRECORDS, "DsrDeregisterDnsHostRecords",
                netlogon_dissect_dsrderegisterdnshostrecords_rqst,
                netlogon_dissect_dsrderegisterdnshostrecords_reply },
+       { NETLOGON_NETRSERVERTRUSTPASSWORDSGET, "NetrServerTrustPasswordsGet",
+               NULL, NULL },
+       { NETLOGON_DSRGETFORESTTRUSTINFORMATION, "DsrGetForestTrustInformation",
+               NULL, NULL },
+       { NETLOGON_NETRGETFORESTTRUSTINFORMATION, "NetrGetForestTrustInformation",
+               NULL, NULL },
+       { NETLOGON_NETRLOGONSAMLOGONWITHFLAGS, "NetrLogonSamLogonWithFlags", 
+               NULL, NULL },
+       { NETLOGON_NETRSERVERGETTRUSTINFO, "NetrServerGetTrustInfo",
+               NULL, NULL },
         {0, NULL, NULL,  NULL }
 };
 
-static const value_string netlogon_opnum_vals[] = {
-       { NETLOGON_UASLOGON, "UasLogon" },
-       { NETLOGON_UASLOGOFF, "UasLogoff" },
-       { NETLOGON_NETLOGONSAMLOGON, "SamLogon" },
-       { NETLOGON_NETLOGONSAMLOGOFF, "SamLogoff" },
-       { NETLOGON_NETSERVERREQCHALLENGE, "ServerReqChallenge" },
-       { NETLOGON_NETSERVERAUTHENTICATE, "ServerAuthenticate" },
-       { NETLOGON_NETSERVERPASSWORDSET, "ServerPasswdSet" },
-       { NETLOGON_NETSAMDELTAS, "DatabaseDeltas" },
-       { NETLOGON_DATABASESYNC, "DatabaseSync" },
-       { NETLOGON_ACCOUNTDELTAS, "AccountDeltas" },
-       { NETLOGON_ACCOUNTSYNC, "AccountSync" },
-       { NETLOGON_GETDCNAME, "GetDCName" },
-       { NETLOGON_NETLOGONCONTROL, "LogonControl" },
-       { NETLOGON_GETANYDCNAME, "GetAnyDCName" },
-       { NETLOGON_NETLOGONCONTROL2, "LogonControl2" },
-       { NETLOGON_NETSERVERAUTHENTICATE2, "ServerAuthenticate2" },
-       { NETLOGON_NETDATABASESYNC2, "DatabaseSync2" },
-       { NETLOGON_DATABASEREDO, "DatabaseRedo" },
-       { NETLOGON_FUNCTION_12, "Function_0x12" },
-       { NETLOGON_NETTRUSTEDDOMAINLIST, "TrustedDomainList" },
-       { NETLOGON_DSRGETDCNAME2, "DsrGetDCName2" },
-       { NETLOGON_FUNCTION_15, "Function_0x15" },
-       { NETLOGON_FUNCTION_16, "Function_0x16" },
-       { NETLOGON_FUNCTION_17, "Function_0x17" },
-       { NETLOGON_FUNCTION_18, "Function_0x18" },
-       { NETLOGON_FUNCTION_19, "Function_0x19" },
-       { NETLOGON_NETSERVERAUTHENTICATE3, "ServerAuthenticate3" },
-       { NETLOGON_DSRGETDCNAME, "DsrGetDCName" },
-       { NETLOGON_DSRGETSITENAME, "DsrGetSiteName" },
-       { NETLOGON_NETRLOGONGETDOMAININFO, "NetrLogonGetDomainInfo" },
-       { NETLOGON_FUNCTION_1E, "Function_0x1E" },
-       { NETLOGON_NETSERVERPASSWORDSET2, "ServerPasswordSet2" },
-       { NETLOGON_FUNCTION_20, "Function_0x20" },
-       { NETLOGON_FUNCTION_21, "Function_0x21" },
-       { NETLOGON_FUNCTION_22, "Function_0x22" },
-       { NETLOGON_FUNCTION_23, "Function_0x23" },
-       { NETLOGON_FUNCTION_24, "Function_0x24" },
-       { NETLOGON_FUNCTION_25, "Function_0x25" },
-       { NETLOGON_FUNCTION_26, "Function_0x26" },
-       { NETLOGON_LOGONSAMLOGONEX, "LogonSamLogonEx" },
-       { NETLOGON_DSENUMERATETRUSTEDDOMAINS, "DSEnumerateTrustedDomains" },
-       { NETLOGON_DSRDEREGISTERDNSHOSTRECORDS, "DsrDeregisterDNSHostRecords" },
-       { 0, NULL }
-};
+static int hf_netlogon_secchan_verf = -1;
+static int hf_netlogon_secchan_verf_sig = -1;
+static int hf_netlogon_secchan_verf_unk = -1;
+static int hf_netlogon_secchan_verf_seq = -1;
+static int hf_netlogon_secchan_verf_nonce = -1;
+
+static int
+dissect_secchan_verf(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, 
+                    proto_tree *tree, guint8 *drep _U_)
+{
+          proto_item *vf = NULL;
+          proto_tree *subtree = NULL;
+         
+          /*
+           * Create a new tree, and split into 4 components ...
+           */
+          vf = proto_tree_add_item(tree, hf_netlogon_secchan_verf, tvb,
+              offset, -1, FALSE);
+          subtree = proto_item_add_subtree(vf, ett_secchan_verf);
+
+          proto_tree_add_item(subtree, hf_netlogon_secchan_verf_sig, tvb,
+              offset, 8, FALSE);
+         offset += 8;
+
+          proto_tree_add_item(subtree, hf_netlogon_secchan_verf_unk, tvb,
+              offset, 8, FALSE);
+         offset += 8;
+
+          proto_tree_add_item(subtree, hf_netlogon_secchan_verf_seq, tvb,
+              offset, 8, FALSE);
+         offset += 8;
+
+         /* In some cases the nonce isn't present although it isn't clear
+            why this is so. */
+
+         if (tvb_bytes_exist(tvb, offset, 8)) {
+                 proto_tree_add_item(subtree, hf_netlogon_secchan_verf_nonce,
+                                     tvb, offset, 8, FALSE);
+                 offset += 8;
+         }
+
+         return offset;
+}
 
 /* Secure channel types */
 
@@ -6258,7 +6372,7 @@ proto_register_dcerpc_netlogon(void)
 static hf_register_info hf[] = {
        { &hf_netlogon_opnum,
          { "Operation", "netlogon.opnum", FT_UINT16, BASE_DEC,
-           VALS(netlogon_opnum_vals), 0x0, "Operation", HFILL }},
+           NULL, 0x0, "Operation", HFILL }},
 
        { &hf_netlogon_rc, {
                "Return code", "netlogon.rc", FT_UINT32, BASE_HEX,
@@ -6288,13 +6402,9 @@ static hf_register_info hf[] = {
                "Entries", "netlogon.entries", FT_UINT32, BASE_DEC,
                NULL, 0x0, "", HFILL }},
 
-       { &hf_netlogon_credential_low, {
-               "Credential low", "netlogon.credential.low", FT_UINT32, 
-               BASE_HEX, NULL, 0x0, "Netlogon credential (low)", HFILL }},
-
-       { &hf_netlogon_credential_high, {
-               "Credential high", "netlogon.credential.high", FT_UINT32, 
-               BASE_HEX, NULL, 0x0, "Netlogon credential (high)", HFILL }},
+       { &hf_netlogon_credential, {
+               "Credential", "netlogon.credential", FT_BYTES, BASE_HEX,
+               NULL, 0x0, "Netlogon Credential", HFILL }},
 
        { &hf_netlogon_challenge, {
                "Challenge", "netlogon.challenge", FT_BYTES, BASE_HEX,
@@ -6497,6 +6607,14 @@ static hf_register_info hf[] = {
                { "Domain", "netlogon.domain", FT_STRING, BASE_NONE,
                NULL, 0, "Domain", HFILL }},
 
+       { &hf_netlogon_resourcegroupdomainsid,
+               { "ResourceGroupDomainSID", "netlogon.resourcegroupdomainsid", FT_STRING, BASE_NONE,
+               NULL, 0, "Resource Group Domain SID", HFILL }},
+
+       { &hf_netlogon_resourcegroupcount,
+               { "ResourceGroup count", "netlogon.resourcegroupcount", FT_UINT32, BASE_DEC,
+               NULL, 0, "Number of Resource Groups", HFILL }},
+
        { &hf_netlogon_computer_name,
                { "Computer Name", "netlogon.computer_name", FT_STRING, BASE_NONE,
                NULL, 0, "Computer Name", HFILL }},
@@ -7063,26 +7181,25 @@ static hf_register_info hf[] = {
          { "Unknown3", "netlogon.secchan.bind_ack.unknown3", FT_UINT32, 
            BASE_HEX, NULL, 0x0, "", HFILL }},
 
-        { &hf_netlogon_secchan,
-          { "Verifier", "netlogon.secchan.verifier", FT_NONE, BASE_NONE, 
+        { &hf_netlogon_secchan_verf,
+          { "Secure Channel Verifier", "netlogon.secchan.verifier", FT_NONE, BASE_NONE, 
            NULL, 0x0, "Verifier", HFILL }},
 
-        { &hf_netlogon_secchan_sig,
+        { &hf_netlogon_secchan_verf_sig,
           { "Signature", "netlogon.secchan.sig", FT_BYTES, BASE_HEX, NULL, 
            0x0, "Signature", HFILL }}, 
 
-        { &hf_netlogon_secchan_unk,
+        { &hf_netlogon_secchan_verf_unk,
           { "Unknown", "netlogon.secchan.unk", FT_BYTES, BASE_HEX, NULL, 
           0x0, "Unknown", HFILL }}, 
 
-        { &hf_netlogon_secchan_seq,
+        { &hf_netlogon_secchan_verf_seq,
           { "Sequence No", "netlogon.secchan.seq", FT_BYTES, BASE_HEX, NULL, 
           0x0, "Sequence No", HFILL }}, 
 
-        { &hf_netlogon_secchan_nonce,
+        { &hf_netlogon_secchan_verf_nonce,
           { "Nonce", "netlogon.secchan.nonce", FT_BYTES, BASE_HEX, NULL, 
           0x0, "Nonce", HFILL }}, 
-
        };
 
         static gint *ett[] = {
@@ -7110,7 +7227,7 @@ static hf_register_info hf[] = {
                &ett_dc_flags,
                &ett_secchan_bind_creds,
                &ett_secchan_bind_ack_creds,
-               &ett_secchan,
+               &ett_secchan_verf
         };
 
         proto_dcerpc_netlogon = proto_register_protocol(
@@ -7121,6 +7238,16 @@ static hf_register_info hf[] = {
         proto_register_subtree_array(ett, array_length(ett));
 }
 
+static dcerpc_auth_subdissector_fns secchan_auth_fns = {
+       dissect_secchan_bind_creds,             /* Bind */
+       dissect_secchan_bind_ack_creds,         /* Bind ACK */
+       NULL,                                   /* AUTH3 */
+       dissect_secchan_verf,                   /* Request verifier */
+       dissect_secchan_verf,                   /* Response verifier */
+       NULL,                                   /* Request data */
+       NULL                                    /* Response data */
+};
+
 void
 proto_reg_handoff_dcerpc_netlogon(void)
 {
@@ -7129,4 +7256,11 @@ proto_reg_handoff_dcerpc_netlogon(void)
         dcerpc_init_uuid(proto_dcerpc_netlogon, ett_dcerpc_netlogon,
                          &uuid_dcerpc_netlogon, ver_dcerpc_netlogon,
                          dcerpc_netlogon_dissectors, hf_netlogon_opnum);
+
+       register_dcerpc_auth_subdissector(DCE_C_AUTHN_LEVEL_PKT_INTEGRITY,
+                                         DCE_C_RPC_AUTHN_PROTOCOL_SEC_CHAN,
+                                         &secchan_auth_fns);   
+       register_dcerpc_auth_subdissector(DCE_C_AUTHN_LEVEL_PKT_PRIVACY,
+                                         DCE_C_RPC_AUTHN_PROTOCOL_SEC_CHAN,
+                                         &secchan_auth_fns);   
 }