Rename "proto_alloc_dfilter_string()" to
[obnox/wireshark/wip.git] / packet-dcerpc-netlogon.c
index ea75aa0dd4dd89cdbef92c66b100c39e9bdc0335..7bddecf788b722fc8fdb7819e0d5df03d081290c 100644 (file)
@@ -1,9 +1,9 @@
 /* packet-dcerpc-netlogon.c
- * Routines for SMB \\PIPE\\NETLOGON packet disassembly
- * Copyright 2001, Tim Potter <tpot@samba.org>
+ * Routines for SMB \PIPE\NETLOGON packet disassembly
+ * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002 structure and command dissectors by Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-netlogon.c,v 1.60 2002/11/04 09:06:15 sahlberg Exp $
+ * $Id: packet-dcerpc-netlogon.c,v 1.77 2003/04/27 00:49:13 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -133,6 +133,7 @@ static int hf_netlogon_db_create_time = -1;
 static int hf_netlogon_oem_info = -1;
 static int hf_netlogon_serial_number = -1;
 static int hf_netlogon_num_rids = -1;
+static int hf_netlogon_num_trusts = -1;
 static int hf_netlogon_num_controllers = -1;
 static int hf_netlogon_num_other_groups = -1;
 static int hf_netlogon_computer_name = -1;
@@ -154,6 +155,16 @@ static int hf_netlogon_alias_name = -1;
 static int hf_netlogon_country = -1;
 static int hf_netlogon_codepage = -1;
 static int hf_netlogon_flags = -1;
+static int hf_netlogon_trust_attribs = -1;
+static int hf_netlogon_trust_type = -1;
+static int hf_netlogon_trust_flags = -1;
+static int hf_netlogon_trust_flags_inbound = -1;
+static int hf_netlogon_trust_flags_outbound = -1;
+static int hf_netlogon_trust_flags_in_forest = -1;
+static int hf_netlogon_trust_flags_native_mode = -1;
+static int hf_netlogon_trust_flags_primary = -1;
+static int hf_netlogon_trust_flags_tree_root = -1;
+static int hf_netlogon_trust_parent_index = -1;
 static int hf_netlogon_user_flags = -1;
 static int hf_netlogon_auth_flags = -1;
 static int hf_netlogon_pwd_expired = -1;
@@ -180,6 +191,38 @@ static int hf_netlogon_authoritative = -1;
 static int hf_netlogon_secure_channel_type = -1;
 static int hf_netlogon_logonsrv_handle = -1;
 static int hf_netlogon_delta_type = -1;
+static int hf_netlogon_get_dcname_request_flags = -1;
+static int hf_netlogon_get_dcname_request_flags_force_rediscovery = -1;
+static int hf_netlogon_get_dcname_request_flags_directory_service_required = -1;
+static int hf_netlogon_get_dcname_request_flags_directory_service_preferred = -1;
+static int hf_netlogon_get_dcname_request_flags_gc_server_required = -1;
+static int hf_netlogon_get_dcname_request_flags_pdc_required = -1;
+static int hf_netlogon_get_dcname_request_flags_background_only = -1;
+static int hf_netlogon_get_dcname_request_flags_ip_required = -1;
+static int hf_netlogon_get_dcname_request_flags_kdc_required = -1;
+static int hf_netlogon_get_dcname_request_flags_timeserv_required = -1;
+static int hf_netlogon_get_dcname_request_flags_writable_required = -1;
+static int hf_netlogon_get_dcname_request_flags_good_timeserv_preferred = -1;
+static int hf_netlogon_get_dcname_request_flags_avoid_self = -1;
+static int hf_netlogon_get_dcname_request_flags_only_ldap_needed = -1;
+static int hf_netlogon_get_dcname_request_flags_is_flat_name = -1;
+static int hf_netlogon_get_dcname_request_flags_is_dns_name = -1;
+static int hf_netlogon_get_dcname_request_flags_return_dns_name = -1;
+static int hf_netlogon_get_dcname_request_flags_return_flat_name = -1;
+static int hf_netlogon_dc_flags = -1;
+static int hf_netlogon_dc_flags_pdc_flag = -1;
+static int hf_netlogon_dc_flags_gc_flag = -1;
+static int hf_netlogon_dc_flags_ldap_flag = -1;
+static int hf_netlogon_dc_flags_ds_flag = -1;
+static int hf_netlogon_dc_flags_kdc_flag = -1;
+static int hf_netlogon_dc_flags_timeserv_flag = -1;
+static int hf_netlogon_dc_flags_closest_flag = -1;
+static int hf_netlogon_dc_flags_writable_flag = -1;
+static int hf_netlogon_dc_flags_good_timeserv_flag = -1;
+static int hf_netlogon_dc_flags_ndnc_flag = -1;
+static int hf_netlogon_dc_flags_dns_controller_flag = -1;
+static int hf_netlogon_dc_flags_dns_domain_flag = -1;
+static int hf_netlogon_dc_flags_dns_forest_flag = -1;
 
 static gint ett_dcerpc_netlogon = -1;
 static gint ett_QUOTA_LIMITS = -1;
@@ -198,7 +241,11 @@ static gint ett_LM_OWF_PASSWORD = -1;
 static gint ett_NT_OWF_PASSWORD = -1;
 static gint ett_GROUP_MEMBERSHIP = -1;
 static gint ett_BLOB = -1;
-static gint ett_DSROLE_DOMAIN_INFO_EX = -1;
+static gint ett_DS_DOMAIN_TRUSTS = -1;
+static gint ett_DOMAIN_TRUST_INFO = -1;
+static gint ett_trust_flags = -1;
+static gint ett_get_dcname_request_flags = -1;
+static gint ett_dc_flags = -1;
 
 static e_uuid_t uuid_dcerpc_netlogon = {
         0x12345678, 0x1234, 0xabcd,
@@ -214,9 +261,9 @@ netlogon_dissect_LOGONSRV_HANDLE(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Server Handle", hf_netlogon_logonsrv_handle, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Server Handle", 
+               hf_netlogon_logonsrv_handle, 0);
 
        return offset;
 }
@@ -253,9 +300,9 @@ netlogon_dissect_VALIDATION_UAS_INFO(tvbuff_t *tvb, int offset,
                return offset;
        }
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Effective Account", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Effective Account", 
+               hf_netlogon_acct_name, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_priv, NULL);
@@ -294,17 +341,14 @@ netlogon_dissect_VALIDATION_UAS_INFO(tvbuff_t *tvb, int offset,
        proto_tree_add_text(tree, tvb, offset, 4, "PW Must Change: unknown time format");
        offset+= 4;
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Computer", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Computer", hf_netlogon_computer_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_domain_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_domain_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Script", hf_netlogon_logon_script, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Script", hf_netlogon_logon_script, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_reserved, NULL);
@@ -327,13 +371,11 @@ netlogon_dissect_netlogonuaslogon_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Account", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Account", hf_netlogon_acct_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Workstation", hf_netlogon_workstation, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Workstation", hf_netlogon_workstation, 0);
 
        return offset;
 }
@@ -345,7 +387,7 @@ netlogon_dissect_netlogonuaslogon_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_VALIDATION_UAS_INFO, NDR_POINTER_UNIQUE,
-               "VALIDATION_UAS_INFO", -1, 0);
+               "VALIDATION_UAS_INFO", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -396,13 +438,11 @@ netlogon_dissect_netlogonuaslogoff_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Account", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Account", hf_netlogon_acct_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Workstation", hf_netlogon_workstation, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Workstation", hf_netlogon_workstation, 0);
 
        return offset;
 }
@@ -414,7 +454,7 @@ netlogon_dissect_netlogonuaslogoff_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_LOGOFF_UAS_INFO, NDR_POINTER_REF,
-               "LOGOFF_UAS_INFO", -1, 0);
+               "LOGOFF_UAS_INFO", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -449,7 +489,10 @@ netlogon_dissect_LOGON_IDENTITY_INFO(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_IDENTITY_INFO);
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       /* XXX: It would be nice to get the domain and account name 
+           displayed in COL_INFO. */
+
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -458,10 +501,10 @@ netlogon_dissect_LOGON_IDENTITY_INFO(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_id, NULL);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_acct_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_workstation, 0);
 
 #ifdef REMOVED
@@ -614,11 +657,11 @@ netlogon_dissect_NETWORK_INFO(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_CHALLENGE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_nt_chal_resp, 0);
+       offset = dissect_ndr_counted_byte_array(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_nt_chal_resp);
 
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_lm_chal_resp, 0);
+       offset = dissect_ndr_counted_byte_array(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_lm_chal_resp);
 
        return offset;
 }
@@ -669,17 +712,17 @@ netlogon_dissect_LEVEL(tvbuff_t *tvb, int offset,
        case 1:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_INTERACTIVE_INFO, NDR_POINTER_UNIQUE,
-                       "INTERACTIVE_INFO:", -1, 0);
+                       "INTERACTIVE_INFO:", -1);
                break;
        case 2:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_NETWORK_INFO, NDR_POINTER_UNIQUE,
-                       "NETWORK_INFO:", -1, 0);
+                       "NETWORK_INFO:", -1);
                break;
        case 3:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_SERVICE_INFO, NDR_POINTER_UNIQUE,
-                       "SERVICE_INFO:", -1, 0);
+                       "SERVICE_INFO:", -1);
                break;
        }
 
@@ -870,22 +913,22 @@ netlogon_dissect_VALIDATION_SAM_INFO(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
                hf_netlogon_pwd_must_change_time);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_acct_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_full_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_script, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_profile_path, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_home_dir, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dir_drive, 0);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
@@ -905,7 +948,7 @@ netlogon_dissect_VALIDATION_SAM_INFO(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_GROUP_MEMBERSHIP_ARRAY, NDR_POINTER_UNIQUE,
-               "GROUP_MEMBERSHIP_ARRAY", -1, 0);
+               "GROUP_MEMBERSHIP_ARRAY", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_user_flags, NULL);
@@ -913,10 +956,10 @@ netlogon_dissect_VALIDATION_SAM_INFO(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_USER_SESSION_KEY(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_srv, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
@@ -987,22 +1030,22 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
                hf_netlogon_pwd_must_change_time);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_acct_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_full_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_script, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_profile_path, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_home_dir, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dir_drive, 0);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
@@ -1022,7 +1065,7 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_GROUP_MEMBERSHIP_ARRAY, NDR_POINTER_UNIQUE,
-               "GROUP_MEMBERSHIP_ARRAY", -1, 0);
+               "GROUP_MEMBERSHIP_ARRAY", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_user_flags, NULL);
@@ -1030,10 +1073,10 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_USER_SESSION_KEY(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_srv, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
@@ -1049,7 +1092,7 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                dissect_ndr_nt_SID_AND_ATTRIBUTES_ARRAY, NDR_POINTER_UNIQUE,
-               "SID_AND_ATTRIBUTES_ARRAY:", -1, 0);
+               "SID_AND_ATTRIBUTES_ARRAY:", -1);
 
        return offset;
 }
@@ -1133,24 +1176,22 @@ netlogon_dissect_VALIDATION_PAC_INFO(tvbuff_t *tvb, int offset,
                hf_netlogon_pac_size, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_PAC, NDR_POINTER_UNIQUE,
-               "PAC:", -1, 0);
+               netlogon_dissect_PAC, NDR_POINTER_UNIQUE, "PAC:", -1);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_dom, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_srv, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_principal, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_auth_size, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_AUTH, NDR_POINTER_UNIQUE,
-               "AUTH:", -1, 0);
+               netlogon_dissect_AUTH, NDR_POINTER_UNIQUE, "AUTH:", -1);
 
        offset = netlogon_dissect_USER_SESSION_KEY(tvb, offset,
                pinfo, tree, drep);
@@ -1160,16 +1201,16 @@ netlogon_dissect_VALIDATION_PAC_INFO(tvbuff_t *tvb, int offset,
                        hf_netlogon_unknown_long, NULL);
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        return offset;
@@ -1199,22 +1240,22 @@ netlogon_dissect_VALIDATION(tvbuff_t *tvb, int offset,
        case 2:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_VALIDATION_SAM_INFO, NDR_POINTER_UNIQUE,
-                       "VALIDATION_SAM_INFO:", -1, 0);
+                       "VALIDATION_SAM_INFO:", -1);
                break;
        case 3:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_VALIDATION_SAM_INFO2, NDR_POINTER_UNIQUE,
-                       "VALIDATION_SAM_INFO2:", -1, 0);
+                       "VALIDATION_SAM_INFO2:", -1);
                break;
        case 4:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_VALIDATION_PAC_INFO, NDR_POINTER_UNIQUE,
-                       "VALIDATION_PAC_INFO:", -1, 0);
+                       "VALIDATION_PAC_INFO:", -1);
                break;
        case 5:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_VALIDATION_PAC_INFO, NDR_POINTER_UNIQUE,
-                       "VALIDATION_PAC_INFO:", -1, 0);
+                       "VALIDATION_PAC_INFO:", -1);
                break;
        }
 
@@ -1242,24 +1283,24 @@ netlogon_dissect_netlogonsamlogon_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Computer Name", 
+               hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                hf_netlogon_level16, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_LEVEL, NDR_POINTER_REF,
-               "LEVEL: LogonLevel", -1, 0);
+               "LEVEL: LogonLevel", -1);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                hf_netlogon_validation_level, NULL);
@@ -1273,11 +1314,11 @@ netlogon_dissect_netlogonsamlogon_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_VALIDATION, NDR_POINTER_REF,
-               "VALIDATION:", -1, 0);
+               "VALIDATION:", -1);
 
        offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                hf_netlogon_authoritative, NULL);
@@ -1306,24 +1347,24 @@ netlogon_dissect_netlogonsamlogoff_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Computer Name", 
+               hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                hf_netlogon_level16, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_LEVEL, NDR_POINTER_REF,
-               "LEVEL: logoninformation", -1, 0);
+               "LEVEL: logoninformation", -1);
 
        return offset;
 }
@@ -1334,7 +1375,7 @@ netlogon_dissect_netlogonsamlogoff_reply(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -1358,13 +1399,16 @@ netlogon_dissect_netserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_pointer_cb(
+               tvb, offset, pinfo, tree, drep, 
+               dissect_ndr_wchar_cvstring, NDR_POINTER_REF, 
+               "Computer Name", hf_netlogon_computer_name, 
+               cb_wstr_postprocess, 
+               GINT_TO_POINTER(CB_STR_COL_INFO | 1));
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL: client challenge", -1, 0);
+               "CREDENTIAL: client challenge", -1);
 
        return offset;
 }
@@ -1374,7 +1418,7 @@ netlogon_dissect_netserverreqchallenge_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL: server credential", -1, 0);
+               "CREDENTIAL: server credential", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -1412,20 +1456,18 @@ netlogon_dissect_netserverauthenticate_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "User Name", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "User Name", hf_netlogon_acct_name, 0);
 
        offset = netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL: client challenge", -1, 0);
+               "CREDENTIAL: client challenge", -1);
 
        return offset;
 }
@@ -1435,7 +1477,7 @@ netlogon_dissect_netserverauthenticate_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL: server challenge", -1, 0);
+               "CREDENTIAL: server challenge", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -1488,24 +1530,22 @@ netlogon_dissect_netserverpasswordset_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "User Name", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "User Name", hf_netlogon_acct_name, 0);
 
        offset = netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_ENCRYPTED_LM_OWF_PASSWORD, NDR_POINTER_REF,
-               "ENCRYPTED_LM_OWF_PASSWORD: hashed_pwd", -1, 0);
+               "ENCRYPTED_LM_OWF_PASSWORD: hashed_pwd", -1);
 
        return offset;
 }
@@ -1515,7 +1555,7 @@ netlogon_dissect_netserverpasswordset_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -1542,20 +1582,19 @@ netlogon_dissect_DELTA_DELETE_USER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Account Name", hf_netlogon_acct_name, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Account Name", hf_netlogon_acct_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1617,7 +1656,7 @@ netlogon_dissect_USER_PRIVATE_INFO(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_SENSITIVE_DATA, NDR_POINTER_UNIQUE,
-               "SENSITIVE_DATA", -1, 0);
+               "SENSITIVE_DATA", -1);
 
        return offset;
 }
@@ -1668,10 +1707,10 @@ netlogon_dissect_DELTA_USER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_acct_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_full_name, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1680,19 +1719,19 @@ netlogon_dissect_DELTA_USER(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_group_rid, NULL);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_home_dir, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dir_drive, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_script, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_acct_desc, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_workstations, 0);
 
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
@@ -1732,10 +1771,10 @@ netlogon_dissect_DELTA_USER(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep,
                hf_netlogon_pwd_expired, NULL);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_comment, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_parameters, 0);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
@@ -1753,16 +1792,16 @@ netlogon_dissect_DELTA_USER(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1809,10 +1848,10 @@ netlogon_dissect_DELTA_DOMAIN(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_domain_name, 1);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_oem_info, 0);
 
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
@@ -1842,16 +1881,16 @@ netlogon_dissect_DELTA_DOMAIN(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1892,13 +1931,13 @@ netlogon_dissect_DELTA_GROUP(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_group_name, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_group_name, 0);
 
        offset = netlogon_dissect_GROUP_MEMBERSHIP(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_group_desc, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1907,16 +1946,16 @@ netlogon_dissect_DELTA_GROUP(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1958,22 +1997,22 @@ netlogon_dissect_DELTA_RENAME(tvbuff_t *tvb, int offset,
 
        di=pinfo->private_data;
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-               di->hf_index, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               di->hf_index, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-               di->hf_index, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               di->hf_index, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2054,11 +2093,11 @@ netlogon_dissect_DELTA_GROUP_MEMBER(tvbuff_t *tvb, int offset,
 {
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_RID_array, NDR_POINTER_UNIQUE,
-               "RIDs:", -1, 0);
+               "RIDs:", -1);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_ATTRIB_array, NDR_POINTER_UNIQUE,
-               "Attribs:", -1, 0);
+               "Attribs:", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_num_rids, NULL);
@@ -2100,8 +2139,8 @@ netlogon_dissect_DELTA_ALIAS(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_alias_name, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_alias_name, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_alias_rid, NULL);
@@ -2112,16 +2151,16 @@ netlogon_dissect_DELTA_ALIAS(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2286,9 +2325,9 @@ netlogon_dissect_DELTA_POLICY(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_EVENT_AUDIT_OPTIONS_ARRAY, NDR_POINTER_UNIQUE,
-               "Event Audit Options:", -1, 0);
+               "Event Audit Options:", -1);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_domain_name, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
@@ -2309,16 +2348,16 @@ netlogon_dissect_DELTA_POLICY(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2342,8 +2381,8 @@ netlogon_dissect_CONTROLLER(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_dc_name, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_dc_name, 0);
 
        return offset;
 }
@@ -2382,7 +2421,7 @@ netlogon_dissect_DELTA_TRUSTED_DOMAINS(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_domain_name, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2390,7 +2429,7 @@ netlogon_dissect_DELTA_TRUSTED_DOMAINS(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROLLER_ARRAY, NDR_POINTER_UNIQUE,
-               "Domain Controllers:", -1, 0);
+               "Domain Controllers:", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_security_information, NULL);
@@ -2398,16 +2437,16 @@ netlogon_dissect_DELTA_TRUSTED_DOMAINS(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2453,7 +2492,7 @@ netlogon_dissect_PRIV_NAME(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_privilege_name, 1);
 
        return offset;
@@ -2504,11 +2543,11 @@ netlogon_dissect_DELTA_ACCOUNTS(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_PRIV_ATTR_ARRAY, NDR_POINTER_UNIQUE,
-               "PRIV_ATTR_ARRAY:", -1, 0);
+               "PRIV_ATTR_ARRAY:", -1);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_PRIV_NAME_ARRAY, NDR_POINTER_UNIQUE,
-               "PRIV_NAME_ARRAY:", -1, 0);
+               "PRIV_NAME_ARRAY:", -1);
 
        offset = netlogon_dissect_QUOTA_LIMITS(tvb, offset,
                pinfo, tree, drep);
@@ -2522,16 +2561,16 @@ netlogon_dissect_DELTA_ACCOUNTS(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2608,7 +2647,7 @@ netlogon_dissect_CIPHER_VALUE(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CIPHER_VALUE_DATA, NDR_POINTER_UNIQUE,
-               name, hf_index, 0);
+               name, hf_index);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -2659,16 +2698,16 @@ netlogon_dissect_DELTA_SECRET(tvbuff_t *tvb, int offset,
        offset = lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dummy, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2783,82 +2822,82 @@ netlogon_dissect_DELTA_UNION(tvbuff_t *tvb, int offset,
        case 1:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_DOMAIN, NDR_POINTER_UNIQUE,
-                       "DELTA_DOMAIN:", -1, 0);
+                       "DELTA_DOMAIN:", -1);
                break;
        case 2:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_GROUP, NDR_POINTER_UNIQUE,
-                       "DELTA_GROUP:", -1, 0);
+                       "DELTA_GROUP:", -1);
                break;
        case 4:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_RENAME, NDR_POINTER_UNIQUE,
-                       "DELTA_RENAME_GROUP:", hf_netlogon_group_name, 0);
+                       "DELTA_RENAME_GROUP:", hf_netlogon_group_name);
                break;
        case 5:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_USER, NDR_POINTER_UNIQUE,
-                       "DELTA_USER:", -1, 0);
+                       "DELTA_USER:", -1);
                break;
        case 7:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_RENAME, NDR_POINTER_UNIQUE,
-                       "DELTA_RENAME_USER:", hf_netlogon_acct_name, 0);
+                       "DELTA_RENAME_USER:", hf_netlogon_acct_name);
                break;
        case 8:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_GROUP_MEMBER, NDR_POINTER_UNIQUE,
-                       "DELTA_GROUP_MEMBER:", -1, 0);
+                       "DELTA_GROUP_MEMBER:", -1);
                break;
        case 9:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_ALIAS, NDR_POINTER_UNIQUE,
-                       "DELTA_ALIAS:", -1, 0);
+                       "DELTA_ALIAS:", -1);
                break;
        case 11:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_RENAME, NDR_POINTER_UNIQUE,
-                       "DELTA_RENAME_ALIAS:", hf_netlogon_alias_name, 0);
+                       "DELTA_RENAME_ALIAS:", hf_netlogon_alias_name);
                break;
        case 12:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_ALIAS_MEMBER, NDR_POINTER_UNIQUE,
-                       "DELTA_ALIAS_MEMBER:", -1, 0);
+                       "DELTA_ALIAS_MEMBER:", -1);
                break;
        case 13:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_POLICY, NDR_POINTER_UNIQUE,
-                       "DELTA_POLICY:", -1, 0);
+                       "DELTA_POLICY:", -1);
                break;
        case 14:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_TRUSTED_DOMAINS, NDR_POINTER_UNIQUE,
-                       "DELTA_TRUSTED_DOMAINS:", -1, 0);
+                       "DELTA_TRUSTED_DOMAINS:", -1);
                break;
        case 16:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_ACCOUNTS, NDR_POINTER_UNIQUE,
-                       "DELTA_ACCOUNTS:", -1, 0);
+                       "DELTA_ACCOUNTS:", -1);
                break;
        case 18:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_SECRET, NDR_POINTER_UNIQUE,
-                       "DELTA_SECRET:", -1, 0);
+                       "DELTA_SECRET:", -1);
                break;
        case 20:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_DELETE_USER, NDR_POINTER_UNIQUE,
-                       "DELTA_DELETE_GROUP:", -1, 0);
+                       "DELTA_DELETE_GROUP:", -1);
                break;
        case 21:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DELTA_DELETE_USER, NDR_POINTER_UNIQUE,
-                       "DELTA_DELETE_USER:", -1, 0);
+                       "DELTA_DELETE_USER:", -1);
                break;
        case 22:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_MODIFIED_COUNT, NDR_POINTER_UNIQUE,
-                       "MODIFIED_COUNT:", -1, 0);
+                       "MODIFIED_COUNT:", -1);
                break;
        }
 
@@ -2983,14 +3022,14 @@ netlogon_dissect_DELTA_ID_UNION(tvbuff_t *tvb, int offset,
                        pinfo, tree, drep);
                break;
        case 18:
-               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-                       "unknown", hf_netlogon_unknown_string, -1);
+               offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, 
+                       tree, drep, NDR_POINTER_UNIQUE, "unknown", 
+                       hf_netlogon_unknown_string, 0);
                break;
        case 19:
-               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-                       "unknown", hf_netlogon_unknown_string, -1);
+               offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, 
+                       tree, drep, NDR_POINTER_UNIQUE, "unknown", 
+                       hf_netlogon_unknown_string, 0);
                break;
        case 20:
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -3068,7 +3107,7 @@ netlogon_dissect_DELTA_ENUM_ARRAY(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DELTA_ENUM_array, NDR_POINTER_UNIQUE,
-               "DELTA_ENUM: deltas", -1, 0);
+               "DELTA_ENUM: deltas", -1);
 
        return offset;
 }
@@ -3090,28 +3129,26 @@ static int
 netlogon_dissect_netsamdeltas_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Server Handle", hf_netlogon_logonsrv_handle, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_database_id, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_MODIFIED_COUNT, NDR_POINTER_REF,
-               "MODIFIED_COUNT: domain modified count", -1, 0);
+               "MODIFIED_COUNT: domain modified count", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_max_size, NULL);
@@ -3124,15 +3161,15 @@ netlogon_dissect_netsamdeltas_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_MODIFIED_COUNT, NDR_POINTER_REF,
-               "MODIFIED_COUNT: domain modified count", -1, 0);
+               "MODIFIED_COUNT: domain modified count", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DELTA_ENUM_ARRAY, NDR_POINTER_UNIQUE,
-               "DELTA_ENUM_ARRAY: deltas", -1, 0);
+               "DELTA_ENUM_ARRAY: deltas", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3157,21 +3194,19 @@ static int
 netlogon_dissect_netlogondatabasesync_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Server Handle", hf_netlogon_logonsrv_handle, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_database_id, NULL);
@@ -3192,14 +3227,14 @@ netlogon_dissect_netlogondatabasesync_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_sync_context, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DELTA_ENUM_ARRAY, NDR_POINTER_UNIQUE,
-               "DELTA_ENUM_ARRAY: deltas", -1, 0);
+               "DELTA_ENUM_ARRAY: deltas", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3284,21 +3319,20 @@ netlogon_dissect_netlogonaccountdeltas_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_UAS_INFO_0, NDR_POINTER_REF,
-               "UAS_INFO_0: RecordID", -1, 0);
+               "UAS_INFO_0: RecordID", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_count, NULL);
@@ -3317,11 +3351,11 @@ netlogon_dissect_netlogonaccountdeltas_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_REF,
-               "BYTE_array: Buffer", -1, 0);
+               "BYTE_array: Buffer", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_count, NULL);
@@ -3331,7 +3365,7 @@ netlogon_dissect_netlogonaccountdeltas_reply(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_UAS_INFO_0, NDR_POINTER_REF,
-               "UAS_INFO_0: RecordID", -1, 0);
+               "UAS_INFO_0: RecordID", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3363,17 +3397,16 @@ netlogon_dissect_netlogonaccountsync_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_reference, NULL);
@@ -3392,11 +3425,11 @@ netlogon_dissect_netlogonaccountsync_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_REF,
-               "BYTE_array: Buffer", -1, 0);
+               "BYTE_array: Buffer", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_count, NULL);
@@ -3409,7 +3442,7 @@ netlogon_dissect_netlogonaccountsync_reply(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_UAS_INFO_0, NDR_POINTER_REF,
-               "UAS_INFO_0: RecordID", -1, 0);
+               "UAS_INFO_0: RecordID", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3429,13 +3462,11 @@ static int
 netlogon_dissect_netlogongetdcname_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Server Handle", hf_netlogon_logonsrv_handle, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_domain_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_domain_name, 0);
 
        return offset;
 }
@@ -3443,9 +3474,8 @@ static int
 netlogon_dissect_netlogongetdcname_reply(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_dc_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_dc_name, 0);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3495,9 +3525,9 @@ netlogon_dissect_NETLOGON_INFO_2(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_pdc_connection_status, NULL);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Trusted DC Name", hf_netlogon_trusted_dc_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Trusted DC Name", 
+               hf_netlogon_trusted_dc_name, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_tc_connection_status, NULL);
@@ -3569,17 +3599,17 @@ netlogon_dissect_CONTROL_QUERY_INFORMATION(tvbuff_t *tvb, int offset,
        case 1:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_NETLOGON_INFO_1, NDR_POINTER_UNIQUE,
-                       "NETLOGON_INFO_1:", -1, 0);
+                       "NETLOGON_INFO_1:", -1);
                break;
        case 2:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_NETLOGON_INFO_2, NDR_POINTER_UNIQUE,
-                       "NETLOGON_INFO_2:", -1, 0);
+                       "NETLOGON_INFO_2:", -1);
                break;
        case 3:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_NETLOGON_INFO_3, NDR_POINTER_UNIQUE,
-                       "NETLOGON_INFO_3:", -1, 0);
+                       "NETLOGON_INFO_3:", -1);
                break;
        }
 
@@ -3616,7 +3646,7 @@ netlogon_dissect_netlogoncontrol_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_QUERY_INFORMATION, NDR_POINTER_REF,
-               "CONTROL_QUERY_INFORMATION:", -1, 0);
+               "CONTROL_QUERY_INFORMATION:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3636,13 +3666,12 @@ static int
 netlogon_dissect_netlogongetanydcname_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Server Handle", hf_netlogon_logonsrv_handle, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Server Handle", 
+               hf_netlogon_logonsrv_handle, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_domain_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_domain_name, 0);
 
        return offset;
 }
@@ -3650,9 +3679,8 @@ static int
 netlogon_dissect_netlogongetanydcname_reply(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_dc_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_dc_name, 0);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3689,23 +3717,23 @@ netlogon_dissect_CONTROL_DATA_INFORMATION(tvbuff_t *tvb, int offset,
        ALIGN_TO_4_BYTES;
        switch(level){
        case 5:
-               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-                       "unknown", hf_netlogon_unknown_string, -1);
+               offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, 
+                       tree, drep, NDR_POINTER_UNIQUE, "unknown", 
+                       hf_netlogon_unknown_string, 0);
                break;
        case 6:
-               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-                       "unknown", hf_netlogon_unknown_string, -1);
+               offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, 
+                       tree, drep, NDR_POINTER_UNIQUE, "unknown", 
+                       hf_netlogon_unknown_string, 0);
                break;
        case 0xfffe:
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                        hf_netlogon_unknown_long, NULL);
                break;
        case 8:
-               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-                       "unknown", hf_netlogon_unknown_string, -1);
+               offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, 
+                       tree, drep, NDR_POINTER_UNIQUE, "unknown", 
+                       hf_netlogon_unknown_string, 0);
                break;
        }
 
@@ -3737,7 +3765,7 @@ netlogon_dissect_netlogoncontrol2_rqst(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_DATA_INFORMATION, NDR_POINTER_REF,
-               "CONTROL_DATA_INFORMATION: ", -1, 0);
+               "CONTROL_DATA_INFORMATION: ", -1);
 
        return offset;
 }
@@ -3748,7 +3776,7 @@ netlogon_dissect_netlogoncontrol2_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_QUERY_INFORMATION, NDR_POINTER_REF,
-               "CONTROL_QUERY_INFORMATION:", -1, 0);
+               "CONTROL_QUERY_INFORMATION:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3775,20 +3803,21 @@ netlogon_dissect_netserverauthenticate2_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "User Name", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_pointer_cb(
+               tvb, offset, pinfo, tree, drep, 
+               dissect_ndr_wchar_cvstring, NDR_POINTER_REF, 
+               "User Name", hf_netlogon_acct_name, 
+               cb_wstr_postprocess, GINT_TO_POINTER(CB_STR_COL_INFO | 1));
 
        offset = netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL: client_chal", -1, 0);
+               "CREDENTIAL: client_chal", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_neg_flags, NULL);
@@ -3802,7 +3831,7 @@ netlogon_dissect_netserverauthenticate2_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL: server_chal", -1, 0);
+               "CREDENTIAL: server_chal", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_neg_flags, NULL);
@@ -3831,21 +3860,19 @@ static int
 netlogon_dissect_netdatabasesync2_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Server Handle", hf_netlogon_logonsrv_handle, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_database_id, NULL);
@@ -3868,14 +3895,14 @@ netlogon_dissect_netdatabasesync2_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_sync_context, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DELTA_ENUM_ARRAY, NDR_POINTER_UNIQUE,
-               "DELTA_ENUM_ARRAY: deltas", -1, 0);
+               "DELTA_ENUM_ARRAY: deltas", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3899,25 +3926,23 @@ static int
 netlogon_dissect_netlogondatabaseredo_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Server Handle", hf_netlogon_logonsrv_handle, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Server Handle", hf_netlogon_logonsrv_handle, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_REF,
-               "Change log entry: ", -1, 0);
+               "Change log entry: ", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_max_log_size, NULL);
@@ -3931,11 +3956,11 @@ netlogon_dissect_netlogondatabaseredo_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DELTA_ENUM_ARRAY, NDR_POINTER_UNIQUE,
-               "DELTA_ENUM_ARRAY: deltas", -1, 0);
+               "DELTA_ENUM_ARRAY: deltas", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3972,7 +3997,7 @@ netlogon_dissect_function_12_rqst(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_DATA_INFORMATION, NDR_POINTER_REF,
-               "CONTROL_DATA_INFORMATION: ", -1, 0);
+               "CONTROL_DATA_INFORMATION: ", -1);
 
        return offset;
 }
@@ -3982,7 +4007,7 @@ netlogon_dissect_function_12_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CONTROL_QUERY_INFORMATION, NDR_POINTER_REF,
-               "CONTROL_QUERY_INFORMATION:", -1, 0);
+               "CONTROL_QUERY_INFORMATION:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -3996,8 +4021,361 @@ 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" },
+       { 3,                            "MIT" },
+       { 4,                            "DCE" },
+       { 0, NULL }
+};
+
+#define DS_INET_ADDRESS                1
+#define DS_NETBIOS_ADDRESS     2
+static const value_string dc_address_types[] = {
+       { DS_INET_ADDRESS,              "IP/DNS name" },
+       { DS_NETBIOS_ADDRESS,           "NetBIOS name" },
+       { 0, NULL}
+};
+
+
+#define DS_DOMAIN_IN_FOREST            0x0001
+#define DS_DOMAIN_DIRECT_OUTBOUND      0x0002
+#define DS_DOMAIN_TREE_ROOT            0x0004
+#define DS_DOMAIN_PRIMARY              0x0008
+#define DS_DOMAIN_NATIVE_MODE          0x0010
+#define DS_DOMAIN_DIRECT_INBOUND       0x0020
+static const true_false_string trust_inbound = {
+       "There is a DIRECT INBOUND trust for the servers domain",
+       "There is NO direct inbound trust for the servers domain"
+};
+static const true_false_string trust_outbound = {
+       "There is a DIRECT OUTBOUND trust for this domain",
+       "There is NO direct outbound trust for this domain"
+};
+static const true_false_string trust_in_forest = {
+       "The domain is a member IN the same FOREST as the queried server",
+       "The domain is NOT a member of the queried servers domain"
+};
+static const true_false_string trust_native_mode = {
+       "The primary domain is a NATIVE MODE w2k domain",
+       "The primary is NOT a native mode w2k domain"
+};
+static const true_false_string trust_primary = {
+       "The domain is the PRIMARY domain of the queried server",
+       "The domain is NOT the primary domain of the queried server"
+};
+static const true_false_string trust_tree_root = {
+       "The domain is the ROOT of a domain TREE",
+       "The domain is NOT a root of a domain tree"
+};
+static int
+netlogon_dissect_DOMAIN_TRUST_FLAGS(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *parent_tree, char *drep)
+{
+       guint32 mask;
+       proto_item *item = NULL;
+       proto_tree *tree = NULL;
+       dcerpc_info *di;
+
+       di=pinfo->private_data;
+       if(di->conformant_run){
+               /*just a run to handle conformant arrays, nothing to dissect */
+               return offset;
+       }
+
+       offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep,
+                       hf_netlogon_trust_flags, &mask);
+
+       if(parent_tree){
+               item = proto_tree_add_uint(parent_tree, hf_netlogon_trust_flags,
+                       tvb, offset-4, 4, mask);
+               tree = proto_item_add_subtree(item, ett_trust_flags);
+       }
+
+       proto_tree_add_boolean(tree, hf_netlogon_trust_flags_inbound,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_trust_flags_native_mode,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_trust_flags_primary,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_trust_flags_tree_root,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_trust_flags_outbound,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_trust_flags_in_forest,
+               tvb, offset-4, 4, mask);
+
+       return offset;
+}
+
+
+#define DS_FORCE_REDISCOVERY           0x00000001
+#define DS_DIRECTORY_SERVICE_REQUIRED  0x00000010
+#define DS_DIRECTORY_SERVICE_PREFERRED 0x00000020
+#define DS_GC_SERVER_REQUIRED          0x00000040
+#define DS_PDC_REQUIRED                        0x00000080
+#define DS_BACKGROUND_ONLY             0x00000100
+#define DS_IP_REQUIRED                 0x00000200
+#define DS_KDC_REQUIRED                        0x00000400
+#define DS_TIMESERV_REQUIRED           0x00000800
+#define DS_WRITABLE_REQUIRED           0x00001000
+#define DS_GOOD_TIMESERV_PREFERRED     0x00002000
+#define DS_AVOID_SELF                  0x00004000
+#define DS_ONLY_LDAP_NEEDED            0x00008000
+#define DS_IS_FLAT_NAME                        0x00010000
+#define DS_IS_DNS_NAME                 0x00020000
+#define DS_RETURN_DNS_NAME             0x40000000
+#define DS_RETURN_FLAT_NAME            0x80000000
+static const true_false_string get_dcname_request_flags_force_rediscovery = {
+       "FORCE REDISCOVERY of any cached data",
+       "You may return cached data"
+};
+static const true_false_string get_dcname_request_flags_directory_service_required = {
+       "DIRECRTORY SERVICE is REQUIRED on the server",
+       "We do NOT require directory service servers"
+};
+static const true_false_string get_dcname_request_flags_directory_service_preferred = {
+       "DIRECTORY SERVICE servers are PREFERRED",
+       "We do NOT have a preference for directory service servers"
+};
+static const true_false_string get_dcname_request_flags_gc_server_required = {
+       "GC SERVER is REQUIRED",
+       "gc server is NOT required"
+};
+static const true_false_string get_dcname_request_flags_pdc_required = {
+       "PDC SERVER is REQUIRED",
+       "pdc server is NOT required"
+};
+static const true_false_string get_dcname_request_flags_background_only = {
+       "Only returned cahced data, even if it has expired",
+       "Return cached data unless it has expired"
+};
+static const true_false_string get_dcname_request_flags_ip_required = {
+       "IP address is REQUIRED",
+       "ip address is NOT required"
+};
+static const true_false_string get_dcname_request_flags_kdc_required = {
+       "KDC server is REQUIRED",
+       "kdc server is NOT required"
+};
+static const true_false_string get_dcname_request_flags_timeserv_required = {
+       "TIMESERV service is REQUIRED",
+       "timeserv service is NOT required"
+};
+static const true_false_string get_dcname_request_flags_writable_required = {
+       "the requrned dc MUST be WRITEABLE",
+       "a read-only dc may be returned"
+};
+static const true_false_string get_dcname_request_flags_good_timeserv_preferred = {
+       "GOOD TIMESERV servers are PREFERRED",
+       "we do NOT have a preference for good timeserv servers"
+};
+static const true_false_string get_dcname_request_flags_avoid_self = {
+       "do NOT return self as dc, return someone else",
+       "you may return yourSELF as the dc"
+};
+static const true_false_string get_dcname_request_flags_only_ldap_needed = {
+       "we ONLY NEED LDAP, you dont have to return a dc",
+       "we need a normal dc, an ldap only server will not do"
+};
+static const true_false_string get_dcname_request_flags_is_flat_name = {
+       "the name we specify is a NetBIOS name",
+       "the name we specify is NOT a NetBIOS name"
+};
+static const true_false_string get_dcname_request_flags_is_dns_name = {
+       "the name we specify is a DNS name",
+       "ther name we specify is NOT a dns name"
+};
+static const true_false_string get_dcname_request_flags_return_dns_name = {
+       "return a DNS name",
+       "you may return a NON-dns name"
+};
+static const true_false_string get_dcname_request_flags_return_flat_name = {
+       "return a NetBIOS name",
+       "you may return a NON-NetBIOS name"
+};
+static int
+netlogon_dissect_GET_DCNAME_REQUEST_FLAGS(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *parent_tree, char *drep)
+{
+       guint32 mask;
+       proto_item *item = NULL;
+       proto_tree *tree = NULL;
+       dcerpc_info *di;
+
+       di=pinfo->private_data;
+       if(di->conformant_run){
+               /*just a run to handle conformant arrays, nothing to dissect */
+               return offset;
+       }
+
+       offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep,
+                       hf_netlogon_get_dcname_request_flags, &mask);
+
+       if(parent_tree){
+               item = proto_tree_add_uint(parent_tree, hf_netlogon_get_dcname_request_flags,
+                       tvb, offset-4, 4, mask);
+               tree = proto_item_add_subtree(item, ett_get_dcname_request_flags);
+       }
+
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_return_flat_name,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_return_dns_name,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_is_flat_name,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_is_dns_name,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_only_ldap_needed,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_avoid_self,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_good_timeserv_preferred,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_writable_required,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_timeserv_required,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_kdc_required,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_ip_required,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_background_only,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_pdc_required,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_gc_server_required,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_directory_service_preferred,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_directory_service_required,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_force_rediscovery,
+               tvb, offset-4, 4, mask);
+       
+       return offset;
+}
+
+
+
+#define DS_PDC_FLAG            0x00000001
+#define DS_GC_FLAG             0x00000004
+#define DS_LDAP_FLAG           0x00000008
+#define DS_DS_FLAG             0x00000010
+#define DS_KDC_FLAG            0x00000020
+#define DS_TIMESERV_FLAG       0x00000040
+#define DS_CLOSEST_FLAG                0x00000080
+#define DS_WRITABLE_FLAG       0x00000100
+#define DS_GOOD_TIMESERV_FLAG  0x00000200
+#define DS_NDNC_FLAG           0x00000400
+#define DS_DNS_CONTROLLER_FLAG 0x20000000
+#define DS_DNS_DOMAIN_FLAG     0x40000000
+#define DS_DNS_FOREST_FLAG     0x80000000
+static const true_false_string dc_flags_pdc_flag = {
+       "this is the PDC of the domain",
+       "this is NOT the pdc of the domain"
+};
+static const true_false_string dc_flags_gc_flag = {
+       "this is the GC of the forest",
+       "this is NOT the gc of the forest"
+};
+static const true_false_string dc_flags_ldap_flag = {
+       "this is an LDAP server",
+       "this is NOT an ldap server"
+};
+static const true_false_string dc_flags_ds_flag = {
+       "this is a DS server",
+       "this is NOT a ds server"
+};
+static const true_false_string dc_flags_kdc_flag = {
+       "this is a KDC server",
+       "this is NOT a kdc server"
+};
+static const true_false_string dc_flags_timeserv_flag = {
+       "this is a TIMESERV server",
+       "this is NOT a timeserv server"
+};
+static const true_false_string dc_flags_closest_flag = {
+       "this is the CLOSEST server",
+       "this is NOT the closest server"
+};
+static const true_false_string dc_flags_writable_flag = {
+       "this server has a WRITABLE ds database",
+       "this server has a READ-ONLY ds database"
+};
+static const true_false_string dc_flags_good_timeserv_flag = {
+       "this server is a GOOD TIMESERV server",
+       "this is NOT a good timeserv server"
+};
+static const true_false_string dc_flags_ndnc_flag = {
+       "NDNC is set",
+       "ndnc is NOT set"
+};
+static const true_false_string dc_flags_dns_controller_flag = {
+       "DomainControllerName is a DNS name",
+       "DomainControllerName is NOT a dns name"
+};
+static const true_false_string dc_flags_dns_domain_flag = {
+       "DomainName is a DNS name",
+       "DomainName is NOT a dns name"
+};
+static const true_false_string dc_flags_dns_forest_flag = {
+       "DnsForestName is a DNS name",
+       "DnsForestName is NOT a dns name"
+};
+static int
+netlogon_dissect_DC_FLAGS(tvbuff_t *tvb, int offset,
+       packet_info *pinfo, proto_tree *parent_tree, char *drep)
+{
+       guint32 mask;
+       proto_item *item = NULL;
+       proto_tree *tree = NULL;
+       dcerpc_info *di;
+
+       di=pinfo->private_data;
+       if(di->conformant_run){
+               /*just a run to handle conformant arrays, nothing to dissect */
+               return offset;
+       }
+
+       offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep,
+                       hf_netlogon_dc_flags, &mask);
 
+       if(parent_tree){
+               item = proto_tree_add_uint_format(parent_tree, hf_netlogon_dc_flags,
+                               tvb, offset-4, 4, mask, "Domain Controller Flags: 0x%08x%s", mask, (mask==0x0000ffff)?"  PING (mask==0x0000ffff)":"");
+               tree = proto_item_add_subtree(item, ett_dc_flags);
+       }
+
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_dns_forest_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_dns_domain_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_dns_controller_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_ndnc_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_good_timeserv_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_writable_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_closest_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_timeserv_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_kdc_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_ds_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_ldap_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_gc_flag,
+               tvb, offset-4, 4, mask);
+       proto_tree_add_boolean(tree, hf_netlogon_dc_flags_pdc_flag,
+               tvb, offset-4, 4, mask);
 
+       return offset;
+}
 
 
 
@@ -4030,7 +4408,7 @@ netlogon_dissect_pointer_char(tvbuff_t *tvb, int 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, int levels)
+                       char *drep, int type, int hf_index, dcerpc_callback_fnct_t *callback)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -4051,9 +4429,9 @@ netlogon_dissect_UNICODE_STRING(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_nt_unicode_string);
        }
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_UNICODE_STRING_str, type,
-                       name, hf_index, levels);
+       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;
@@ -4102,7 +4480,7 @@ netlogon_dissect_UNICODE_MULTI(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_UNICODE_MULTI_array, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, 0);
+               "unknown", hf_netlogon_unknown_string);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -4133,13 +4511,11 @@ netlogon_dissect_DOMAIN_CONTROLLER_INFO(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_DOMAIN_CONTROLLER_INFO);
        }
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "DC Name", hf_netlogon_dc_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "DC Name", hf_netlogon_dc_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "DC Address", hf_netlogon_dc_address, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "DC Address", hf_netlogon_dc_address, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dc_address_type, NULL);
@@ -4147,24 +4523,20 @@ netlogon_dissect_DOMAIN_CONTROLLER_INFO(tvbuff_t *tvb, int offset,
        offset = dissect_nt_GUID(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Logon Domain", hf_netlogon_logon_dom, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Logon Domain", hf_netlogon_logon_dom, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "DNS Forest", hf_netlogon_dns_forest_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "DNS Forest", hf_netlogon_dns_forest_name, 0);
 
-       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_flags, NULL);
+       offset = netlogon_dissect_DC_FLAGS(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "DC Site", hf_netlogon_dc_site_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "DC Site", hf_netlogon_dc_site_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Client Site", hf_netlogon_client_site_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Client Site", 
+               hf_netlogon_client_site_name, 0);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -4213,29 +4585,40 @@ netlogon_dissect_BLOB(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BLOB_array, NDR_POINTER_UNIQUE,
-               "BLOB:", -1, 0);
+               "BLOB:", -1);
 
        return offset;
 }
 
 static int
 netlogon_dissect_DOMAIN_TRUST_INFO(tvbuff_t *tvb, int offset,
-                       packet_info *pinfo, proto_tree *tree,
+                       packet_info *pinfo, proto_tree *parent_tree,
                        char *drep)
 {
+       proto_item *item=NULL;
+       proto_tree *tree=NULL;
+       int old_offset=offset;
+
+       if(parent_tree){
+               item = proto_tree_add_text(parent_tree, tvb, offset, 0,
+                       "DOMAIN_TRUST_INFO:");
+               tree = proto_item_add_subtree(item, ett_DOMAIN_TRUST_INFO);
+       }
+
+
        offset = lsa_dissect_POLICY_DNS_DOMAIN_INFO(tvb, offset, pinfo, tree, drep);
 
        /* Guesses at best. */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -4250,50 +4633,17 @@ netlogon_dissect_DOMAIN_TRUST_INFO(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_long, NULL);
 
+       proto_item_set_len(item, offset-old_offset);
        return offset;
 }
 
 static int
-netlogon_dissect_DOMAIN_TRUST_INFO_ptr(tvbuff_t *tvb, int offset,
-                       packet_info *pinfo, proto_tree *tree,
-                       char *drep)
-{
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_DOMAIN_TRUST_INFO, NDR_POINTER_UNIQUE,
-               "DOMAIN_TRUST_INFO pointer:", -1, 0);
-
-       return offset;
-}
-
-static int
-netlogon_dissect_DOMAIN_TRUST_INFO_ptr_ptr(tvbuff_t *tvb, int offset,
-                       packet_info *pinfo, proto_tree *tree,
-                       char *drep)
-{
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_DOMAIN_TRUST_INFO_ptr, NDR_POINTER_UNIQUE,
-               "DOMAIN_TRUST_INFO pointer pointer:", -1, 0);
-
-       return offset;
-}
-
-/* Could this be an array? Ronnie? */
-static int
-netlogon_dissect_DOMAIN_TRUST_INFO_CTR(tvbuff_t *tvb, int offset,
+netlogon_dissect_DOMAIN_TRUST_INFO_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
-       guint32 level;
-       
-       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_level, &level);
-
-       ALIGN_TO_4_BYTES;
-       switch(level){
-       case 1:
-               offset = netlogon_dissect_DOMAIN_TRUST_INFO_ptr_ptr(tvb, offset, pinfo, tree, drep);
-               break;
-       }
+       offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_DOMAIN_TRUST_INFO);
 
        return offset;
 }
@@ -4306,40 +4656,36 @@ netlogon_dissect_DOMAIN_QUERY_1(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_BLOB(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Workstation FQDN", hf_netlogon_workstation_fqdn, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Workstation FQDN", 
+               hf_netlogon_workstation_fqdn, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Workstation Site", 
+               hf_netlogon_workstation_site_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown", hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown", hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown", hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown", hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_workstation_os, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -4358,26 +4704,36 @@ netlogon_dissect_DOMAIN_QUERY_1(tvbuff_t *tvb, int offset,
 }
 
 static int
-netlogon_dissect_DOMAIN_INFO(tvbuff_t *tvb, int offset,
+netlogon_dissect_DOMAIN_INFO_1(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
        offset = netlogon_dissect_DOMAIN_TRUST_INFO(tvb, offset, pinfo, tree, drep);
 
-       offset = netlogon_dissect_DOMAIN_TRUST_INFO_CTR(tvb, offset, pinfo, tree, drep);
-       offset = netlogon_dissect_BLOB(tvb, offset, pinfo, tree, drep);
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_num_trusts, NULL);
+
+        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_DOMAIN_TRUST_INFO_ARRAY, NDR_POINTER_UNIQUE,
+               "DOMAIN_TRUST_ARRAY: Trusts", -1);
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_num_trusts, NULL);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+               netlogon_dissect_DOMAIN_TRUST_INFO_ARRAY, NDR_POINTER_UNIQUE,
+               "DOMAIN_TRUST_ARRAY:", -1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dns_domain_name, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_string, 0);
 
        /* These four integers appear to mirror the last four in the query. */
@@ -4396,6 +4752,29 @@ netlogon_dissect_DOMAIN_INFO(tvbuff_t *tvb, int offset,
        return offset;
 }
 
+
+static int
+netlogon_dissect_DOMAIN_INFO(tvbuff_t *tvb, int offset,
+                       packet_info *pinfo, proto_tree *tree,
+                       char *drep)
+{
+       guint32 level;
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_level, &level);
+
+       ALIGN_TO_4_BYTES;
+       switch(level){
+       case 1:
+               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
+                       netlogon_dissect_DOMAIN_INFO_1, NDR_POINTER_UNIQUE,
+                       "DOMAIN_INFO_1:", -1);
+               break;
+       }
+
+       return offset;
+}
+
 static int
 netlogon_dissect_UNICODE_STRING_512(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
@@ -4466,7 +4845,7 @@ netlogon_dissect_TYPE_50(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_element_844_array, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, 0);
+               "unknown", hf_netlogon_unknown_string);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -4479,13 +4858,13 @@ netlogon_dissect_TYPE_50_ptr(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_50, NDR_POINTER_UNIQUE,
-               "TYPE_50 pointer: unknown_TYPE_50", -1, 0);
+               "TYPE_50 pointer: unknown_TYPE_50", -1);
 
        return offset;
 }
 
 static int
-netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX(tvbuff_t *tvb, int offset,
+netlogon_dissect_DS_DOMAIN_TRUSTS(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *parent_tree, char *drep)
 {
        guint32 tmp;
@@ -4495,31 +4874,30 @@ netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX(tvbuff_t *tvb, int offset,
 
        if(parent_tree){
                item = proto_tree_add_text(parent_tree, tvb, offset, 0,
-                       "DSROLE_DOMAIN_INFO_EX");
-               tree = proto_item_add_subtree(item, ett_DSROLE_DOMAIN_INFO_EX);
+                       "DS_DOMAIN_TRUSTS");
+               tree = proto_item_add_subtree(item, ett_DS_DOMAIN_TRUSTS);
        }
 
        /* name */
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "NetBIOS Name", hf_netlogon_downlevel_domain_name, 1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "NetBIOS Name", 
+               hf_netlogon_downlevel_domain_name, 0);
 
        /* domain */
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "DNS Domain Name", hf_netlogon_dns_domain_name, 1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "DNS Domain Name", 
+               hf_netlogon_dns_domain_name, 0);
 
-       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_unknown_long, &tmp);
+       offset = netlogon_dissect_DOMAIN_TRUST_FLAGS(tvb, offset, pinfo, tree, drep);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_unknown_long, &tmp);
+               hf_netlogon_trust_parent_index, &tmp);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_unknown_long, &tmp);
+               hf_netlogon_trust_type, &tmp);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_unknown_long, &tmp);
+               hf_netlogon_trust_attribs, &tmp);
 
        /* SID pointer */
        offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep);
@@ -4531,41 +4909,13 @@ netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX(tvbuff_t *tvb, int offset,
        return offset;
 }
 
-
 static int
-netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY(tvbuff_t *tvb, int offset,
+netlogon_dissect_DS_DOMAIN_TRUSTS_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        char *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX);
-
-       return offset;
-}
-
-static int
-netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO(tvbuff_t *tvb, int offset,
-                       packet_info *pinfo, proto_tree *tree,
-                       char *drep)
-{
-       guint32 level;
-
-       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_level, &level);
-
-       ALIGN_TO_4_BYTES;
-       switch(level){
-       case 1:
-               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY, NDR_POINTER_UNIQUE,
-                       "DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY:", -1, 0);
-               break;
-       case 2:
-               offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY, NDR_POINTER_UNIQUE,
-                       "DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY:", -1, 0);
-               break;
-       }
+               netlogon_dissect_DS_DOMAIN_TRUSTS);
 
        return offset;
 }
@@ -4634,11 +4984,11 @@ netlogon_dissect_TYPE_52(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_element_865_array, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, 0);
+               "unknown", hf_netlogon_unknown_string);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_element_866_array, NDR_POINTER_UNIQUE,
-               "unknown", hf_netlogon_unknown_string, 0);
+               "unknown", hf_netlogon_unknown_string);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -4651,7 +5001,7 @@ netlogon_dissect_TYPE_52_ptr(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_52, NDR_POINTER_UNIQUE,
-               "TYPE_52 pointer: unknown_TYPE_52", -1, 0);
+               "TYPE_52 pointer: unknown_TYPE_52", -1);
        return offset;
 }
 
@@ -4702,12 +5052,12 @@ netlogon_dissect_DOMAIN_QUERY(tvbuff_t *tvb, int offset,
        case 1:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DOMAIN_QUERY_1, NDR_POINTER_UNIQUE,
-                       "DOMAIN_QUERY_1:", -1, 0);
+                       "DOMAIN_QUERY_1:", -1);
                break;
        case 2:
                offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                        netlogon_dissect_DOMAIN_QUERY_1, NDR_POINTER_UNIQUE,
-                       "DOMAIN_QUERY_1:", -1, 0);
+                       "DOMAIN_QUERY_1:", -1);
                break;
        }
 
@@ -4731,7 +5081,7 @@ netlogon_dissect_nettrusteddomainlist_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_UNICODE_MULTI, NDR_POINTER_REF,
-               "UNICODE_MULTI pointer: trust_dom_name_list", -1, 0);
+               "UNICODE_MULTI pointer: trust_dom_name_list", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -4746,17 +5096,16 @@ netlogon_dissect_dsrgetdcname2_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_logon_dom, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                dissect_nt_GUID, NDR_POINTER_UNIQUE,
-               "GUID pointer: domain_guid", -1, 0);
+               "GUID pointer: domain_guid", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                dissect_nt_GUID, NDR_POINTER_UNIQUE,
-               "GUID pointer: site_guid", -1, 0);
+               "GUID pointer: site_guid", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_flags, NULL);
@@ -4771,7 +5120,7 @@ netlogon_dissect_dsrgetdcname2_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_CONTROLLER_INFO, NDR_POINTER_UNIQUE,
-               "DOMAIN_CONTROLLER_INFO:", -1, 0);
+               "DOMAIN_CONTROLLER_INFO:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -4786,17 +5135,17 @@ netlogon_dissect_function_15_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_long, NULL);
@@ -4811,11 +5160,11 @@ netlogon_dissect_function_15_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_44, NDR_POINTER_UNIQUE,
-               "TYPE_44 pointer: unknown_TYPE_44", -1, 0);
+               "TYPE_44 pointer: unknown_TYPE_44", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -4857,9 +5206,9 @@ netlogon_dissect_function_17_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        return offset;
 }
@@ -4871,7 +5220,7 @@ netlogon_dissect_function_17_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_pointer_long, NDR_POINTER_UNIQUE,
-               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long, 0);
+               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -4891,7 +5240,7 @@ netlogon_dissect_function_18_rqst(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_UNIQUE,
-               "BYTE pointer: unknown_BYTE", -1, 0);
+               "BYTE pointer: unknown_BYTE", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_long, NULL);
@@ -4919,7 +5268,7 @@ netlogon_dissect_function_18_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_16_array, NDR_POINTER_UNIQUE,
-               "BYTE pointer: unknown_BYTE", -1, 0);
+               "BYTE pointer: unknown_BYTE", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -4934,13 +5283,13 @@ netlogon_dissect_function_19_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_UNIQUE,
-               "BYTE pointer: unknown_BYTE", -1, 0);
+               "BYTE pointer: unknown_BYTE", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_long, NULL);
@@ -4955,7 +5304,7 @@ netlogon_dissect_function_19_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_16_array, NDR_POINTER_UNIQUE,
-               "BYTE pointer: unknown_BYTE", -1, 0);
+               "BYTE pointer: unknown_BYTE", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -4970,20 +5319,18 @@ netlogon_dissect_netserverauthenticate3_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Acct Name", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Acct Name", hf_netlogon_acct_name, 0);
 
        offset = netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Computer Name", hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL: authenticator", -1, 0);
+               "CREDENTIAL: authenticator", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_neg_flags, NULL);
@@ -4998,14 +5345,14 @@ netlogon_dissect_netserverauthenticate3_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_CREDENTIAL, NDR_POINTER_REF,
-               "CREDENTIAL pointer: unknown_NETLOGON_CREDENTIAL", -1, 0);
+               "CREDENTIAL pointer: unknown_NETLOGON_CREDENTIAL", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_neg_flags, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_pointer_long, NDR_POINTER_REF,
-               "ULONG: unknown_ULONG", hf_netlogon_unknown_long, 0);
+               "ULONG: unknown_ULONG", hf_netlogon_unknown_long);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5020,20 +5367,17 @@ netlogon_dissect_dsrgetdcname_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_logon_dom, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                dissect_nt_GUID, NDR_POINTER_UNIQUE,
-               "GUID pointer: domain_guid", -1, 0);
+               "GUID pointer: domain_guid", -1);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Site Name", hf_netlogon_site_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Site Name", hf_netlogon_site_name, 0);
 
-       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_flags, NULL);
+       offset = netlogon_dissect_GET_DCNAME_REQUEST_FLAGS(tvb, offset, pinfo, tree, drep);
 
        return offset;
 }
@@ -5045,7 +5389,7 @@ netlogon_dissect_dsrgetdcname_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_CONTROLLER_INFO, NDR_POINTER_UNIQUE,
-               "DOMAIN_CONTROLLER_INFO:", -1, 0);
+               "DOMAIN_CONTROLLER_INFO:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5083,25 +5427,27 @@ netlogon_dissect_netrlogongetdomaininfo_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
        /* Unlike the other NETLOGON RPCs, this is not a unique pointer. */
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
-               "Server Handle", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_REF, "Server Handle", hf_netlogon_computer_name, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Computer Name", 
+               hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
+
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_unknown_long, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_QUERY, NDR_POINTER_REF,
-               "DOMAIN_QUERY: ", -1, 0);
+               "DOMAIN_QUERY: ", -1);
 
        return offset;
 }
@@ -5112,12 +5458,12 @@ netlogon_dissect_netrlogongetdomaininfo_reply(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_DOMAIN_INFO, NDR_POINTER_UNIQUE,
-               "DOMAIN_INFO: ", -1, 0);
+               netlogon_dissect_DOMAIN_INFO, NDR_POINTER_REF,
+               "DOMAIN_INFO: ", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5132,20 +5478,20 @@ netlogon_dissect_function_1e_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_short, NULL);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = netlogon_dissect_UNICODE_STRING_512(tvb, offset,
                pinfo, tree, drep);
@@ -5160,7 +5506,7 @@ netlogon_dissect_function_1e_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5175,20 +5521,19 @@ netlogon_dissect_netserverpasswordset2_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Acct Name", hf_netlogon_acct_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Acct Name", hf_netlogon_acct_name, 0);
 
        offset = netlogon_dissect_NETLOGON_SECURE_CHANNEL_TYPE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Computer Name", hf_netlogon_computer_name, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Computer Name", 
+               hf_netlogon_computer_name, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        return offset;
 }
@@ -5200,11 +5545,11 @@ netlogon_dissect_netserverpasswordset2_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_LM_OWF_PASSWORD, NDR_POINTER_REF,
-               "LM_OWF_PASSWORD pointer: server_pwd", -1, 0);
+               "LM_OWF_PASSWORD pointer: server_pwd", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5219,17 +5564,17 @@ netlogon_dissect_function_20_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_REF,
-               "AUTHENTICATOR: credential", -1, 0);
+               "AUTHENTICATOR: credential", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_UNIQUE,
-               "BYTE pointer: unknown_BYTE", -1, 0);
+               "BYTE pointer: unknown_BYTE", -1);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_long, NULL);
@@ -5244,7 +5589,7 @@ netlogon_dissect_function_20_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_AUTHENTICATOR, NDR_POINTER_UNIQUE,
-               "AUTHENTICATOR: return_authenticator", -1, 0);
+               "AUTHENTICATOR: return_authenticator", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5264,7 +5609,7 @@ netlogon_dissect_function_21_rqst(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_UNIQUE,
-               "BYTE pointer: unknown_BYTE", -1, 0);
+               "BYTE pointer: unknown_BYTE", -1);
 
        return offset;
 }
@@ -5276,7 +5621,7 @@ netlogon_dissect_function_21_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_50_ptr, NDR_POINTER_UNIQUE,
-               "TYPE_50** pointer: unknown_TYPE_50", -1, 0);
+               "TYPE_50** pointer: unknown_TYPE_50", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5291,24 +5636,24 @@ netlogon_dissect_function_22_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_long, NULL);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                dissect_nt_GUID, NDR_POINTER_UNIQUE,
-               "GUID pointer: unknown_GUID", -1, 0);
+               "GUID pointer: unknown_GUID", -1);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_long, NULL);
@@ -5323,7 +5668,7 @@ netlogon_dissect_function_22_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_DOMAIN_CONTROLLER_INFO, NDR_POINTER_UNIQUE,
-               "DOMAIN_CONTROLLER_INFO:", -1, 0);
+               "DOMAIN_CONTROLLER_INFO:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5346,13 +5691,13 @@ static int
 netlogon_dissect_function_23_reply(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_pointer_long, NDR_POINTER_UNIQUE,
-               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long, 0);
+               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5370,15 +5715,16 @@ netlogon_dissect_function_24_rqst(tvbuff_t *tvb, int offset,
        return offset;
 }
 
-
 static int
 netlogon_dissect_function_24_reply(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       /*XXX This is a guess, it might be a different struct */
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_entries, NULL);
+
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO, NDR_POINTER_REF,
-               "DSROLE_PRIMARY_DOMAIN_INFO:", -1, 0);
+               netlogon_dissect_DS_DOMAIN_TRUSTS_ARRAY, NDR_POINTER_UNIQUE,
+               "DS_DOMAIN_TRUSTS_ARRAY:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5398,7 +5744,7 @@ netlogon_dissect_function_25_rqst(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_BYTE_array, NDR_POINTER_UNIQUE,
-               "BYTE pointer: unknown_BYTE", -1, 0);
+               "BYTE pointer: unknown_BYTE", -1);
 
        return offset;
 }
@@ -5410,7 +5756,7 @@ netlogon_dissect_function_25_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_52_ptr, NDR_POINTER_UNIQUE,
-               "TYPE_52 pointer: unknown_TYPE_52", -1, 0);
+               "TYPE_52 pointer: unknown_TYPE_52", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5423,9 +5769,9 @@ static int
 netlogon_dissect_function_26_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        return offset;
 }
@@ -5437,7 +5783,7 @@ netlogon_dissect_function_26_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_TYPE_50_ptr, NDR_POINTER_UNIQUE,
-               "TYPE_50** pointer: unknown_TYPE_50", -1, 0);
+               "TYPE_50** pointer: unknown_TYPE_50", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5449,27 +5795,27 @@ static int
 netlogon_dissect_logonsamlogonex_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "unknown string", hf_netlogon_unknown_string, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "unknown string", 
+               hf_netlogon_unknown_string, 0);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_short, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_LEVEL, NDR_POINTER_UNIQUE,
-               "LEVEL pointer: unknown_NETLOGON_LEVEL", -1, 0);
+               "LEVEL pointer: unknown_NETLOGON_LEVEL", -1);
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                hf_netlogon_unknown_short, NULL);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_pointer_long, NDR_POINTER_UNIQUE,
-               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long, 0);
+               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long);
        return offset;
 }
 
@@ -5480,15 +5826,15 @@ netlogon_dissect_logonsamlogonex_reply(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_VALIDATION, NDR_POINTER_UNIQUE,
-               "VALIDATION: unknown_NETLOGON_VALIDATION", -1, 0);
+               "VALIDATION: unknown_NETLOGON_VALIDATION", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_pointer_char, NDR_POINTER_UNIQUE,
-               "BOOLEAN pointer: unknown_BOOLEAN", hf_netlogon_unknown_char, 0);
+               "BOOLEAN pointer: unknown_BOOLEAN", hf_netlogon_unknown_char);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                netlogon_dissect_pointer_long, NDR_POINTER_UNIQUE,
-               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long, 0);
+               "ULONG pointer: unknown_ULONG", hf_netlogon_unknown_long);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5496,27 +5842,30 @@ netlogon_dissect_logonsamlogonex_reply(tvbuff_t *tvb, int offset,
        return offset;
 }
 
+
 static int
-netlogon_dissect_dsrrolegetprimarydomaininformation_rqst(tvbuff_t *tvb, int offset,
+netlogon_dissect_dsenumeratetrusteddomains_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_unknown_long, NULL);
+       offset = netlogon_dissect_DOMAIN_TRUST_FLAGS(tvb, offset, pinfo, tree, drep);
 
        return offset;
 }
 
 
 static int
-netlogon_dissect_dsrrolegetprimarydomaininformation_reply(tvbuff_t *tvb, int offset,
+netlogon_dissect_dsenumeratetrusteddomains_reply(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
+       offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_entries, NULL);
+
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO, NDR_POINTER_REF,
-               "DSROLE_PRIMARY_DOMAIN_INFO:", -1, 0);
+               netlogon_dissect_DS_DOMAIN_TRUSTS_ARRAY, NDR_POINTER_UNIQUE,
+               "DS_DOMAIN_TRUSTS_ARRAY:", -1);
 
        offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
                                  hf_netlogon_rc, NULL);
@@ -5531,21 +5880,19 @@ netlogon_dissect_dsrderegisterdnshostrecords_rqst(tvbuff_t *tvb, int offset,
        offset = netlogon_dissect_LOGONSRV_HANDLE(tvb, offset,
                pinfo, tree, drep);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "Domain", hf_netlogon_logon_dom, 0);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "Domain", hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                dissect_nt_GUID, NDR_POINTER_UNIQUE,
-               "GUID pointer: domain_guid", -1, 0);
+               "GUID pointer: domain_guid", -1);
 
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                dissect_nt_GUID, NDR_POINTER_UNIQUE,
-               "GUID pointer: dsa_guid", -1, 0);
+               "GUID pointer: dsa_guid", -1);
 
-       offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
-               "dns_host", hf_netlogon_dns_host, -1);
+       offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
+               NDR_POINTER_UNIQUE, "dns_host", hf_netlogon_dns_host, 0);
 
        return offset;
 }
@@ -5684,9 +6031,9 @@ static dcerpc_sub_dissector dcerpc_netlogon_dissectors[] = {
        { NETLOGON_LOGONSAMLOGONEX, "LogonSamLogonEx",
                netlogon_dissect_logonsamlogonex_rqst,
                netlogon_dissect_logonsamlogonex_reply },
-       { NETLOGON_DSRROLEGETPRIMARYDOMAININFORMATION, "DsrRoleGetPrimaryDomainInformation",
-               netlogon_dissect_dsrrolegetprimarydomaininformation_rqst,
-               netlogon_dissect_dsrrolegetprimarydomaininformation_reply },
+       { NETLOGON_DSENUMERATETRUSTEDDOMAINS, "DSEnumerateTrustedDomains",
+               netlogon_dissect_dsenumeratetrusteddomains_rqst,
+               netlogon_dissect_dsenumeratetrusteddomains_reply },
        { NETLOGON_DSRDEREGISTERDNSHOSTRECORDS, "DsrDeregisterDNSHostRecords",
                netlogon_dissect_dsrderegisterdnshostrecords_rqst,
                netlogon_dissect_dsrderegisterdnshostrecords_reply },
@@ -5734,11 +6081,20 @@ static const value_string netlogon_opnum_vals[] = {
        { NETLOGON_FUNCTION_25, "Function_0x25" },
        { NETLOGON_FUNCTION_26, "Function_0x26" },
        { NETLOGON_LOGONSAMLOGONEX, "LogonSamLogonEx" },
-       { NETLOGON_DSRROLEGETPRIMARYDOMAININFORMATION, "DsrRoleGetPrimaryDomainInformation" },
+       { NETLOGON_DSENUMERATETRUSTEDDOMAINS, "DSEnumerateTrustedDomains" },
        { NETLOGON_DSRDEREGISTERDNSHOSTRECORDS, "DsrDeregisterDNSHostRecords" },
        { 0, NULL }
 };
 
+/* Secure channel types */
+
+static const value_string sec_chan_type_vals[] = {
+       { SEC_CHAN_WKSTA,  "Workstation" },
+       { SEC_CHAN_DOMAIN, "Domain trust" },
+       { SEC_CHAN_BDC,    "Backup domain controller" },
+       { 0, NULL }
+};
+
 void
 proto_register_dcerpc_netlogon(void)
 {
@@ -6007,7 +6363,7 @@ static hf_register_info hf[] = {
 
        { &hf_netlogon_dc_address_type,
                { "DC Address Type", "netlogon.dc.address_type", FT_UINT32, BASE_DEC,
-               NULL, 0, "DC Address Type", HFILL }},
+               VALS(dc_address_types), 0, "DC Address Type", HFILL }},
 
        { &hf_netlogon_client_site_name,
                { "Client Site Name", "netlogon.client.site_name", FT_STRING, BASE_NONE,
@@ -6114,8 +6470,8 @@ static hf_register_info hf[] = {
                NULL, 0x0, "Length of password history", HFILL }},
 
        { &hf_netlogon_secure_channel_type,
-               { "Sec Chn Type", "netlogon.sec_chn_type", FT_UINT16, BASE_DEC,
-               NULL, 0x0, "Secure Channel Type", HFILL }},
+               { "Sec Chan Type", "netlogon.sec_chan_type", FT_UINT16, BASE_DEC,
+               VALS(sec_chan_type_vals), 0x0, "Secure Channel Type", HFILL }},
 
        { &hf_netlogon_restart_state,
                { "Restart State", "netlogon.restart_state", FT_UINT16, BASE_DEC,
@@ -6217,6 +6573,10 @@ static hf_register_info hf[] = {
                { "Num Deltas", "netlogon.num_deltas", FT_UINT32, BASE_DEC,
                NULL, 0x0, "Number of SAM Deltas in array", HFILL }},
 
+       { &hf_netlogon_num_trusts,
+               { "Num Trusts", "netlogon.num_trusts", FT_UINT32, BASE_DEC,
+               NULL, 0x0, "", HFILL }},
+
        { &hf_netlogon_logon_attempts,
                { "Logon Attempts", "netlogon.logon_attempts", FT_UINT32, BASE_DEC,
                NULL, 0x0, "Number of logon attempts", HFILL }},
@@ -6249,6 +6609,210 @@ static hf_register_info hf[] = {
                { "Neg Flags", "netlogon.neg_flags", FT_UINT32, BASE_HEX,
                NULL, 0x0, "Negotiation Flags", HFILL }},
 
+       { &hf_netlogon_dc_flags,
+               { "Flags", "netlogon.dc.flags", FT_UINT32, BASE_HEX,
+               NULL, 0x0, "Domain Controller Flags", HFILL }},
+
+       { &hf_netlogon_dc_flags_pdc_flag,
+               { "PDC", "netlogon.dc.flags.pdc",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_pdc_flag), DS_PDC_FLAG,
+                 "If this server is a PDC", HFILL }},
+
+       { &hf_netlogon_dc_flags_gc_flag,
+               { "GC", "netlogon.dc.flags.gc",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_gc_flag), DS_GC_FLAG,
+                 "If this server is a GC", HFILL }},
+
+       { &hf_netlogon_dc_flags_ldap_flag,
+               { "LDAP", "netlogon.dc.flags.ldap",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_ldap_flag), DS_LDAP_FLAG,
+                 "If this is an LDAP server", HFILL }},
+
+       { &hf_netlogon_dc_flags_ds_flag,
+               { "DS", "netlogon.dc.flags.ds",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_ds_flag), DS_DS_FLAG,
+                 "If this server is a DS", HFILL }},
+
+       { &hf_netlogon_dc_flags_kdc_flag,
+               { "KDC", "netlogon.dc.flags.kdc",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_kdc_flag), DS_KDC_FLAG,
+                 "If this is a KDC", HFILL }},
+
+       { &hf_netlogon_dc_flags_timeserv_flag,
+               { "Timeserv", "netlogon.dc.flags.timeserv",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_timeserv_flag), DS_TIMESERV_FLAG,
+                 "If this server is a TimeServer", HFILL }},
+
+       { &hf_netlogon_dc_flags_closest_flag,
+               { "Closest", "netlogon.dc.flags.closest",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_closest_flag), DS_CLOSEST_FLAG,
+                 "If this is the closest server", HFILL }},
+
+       { &hf_netlogon_dc_flags_writable_flag,
+               { "Writable", "netlogon.dc.flags.writable",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_writable_flag), DS_WRITABLE_FLAG,
+                 "If this server can do updates to the database", HFILL }},
+
+       { &hf_netlogon_dc_flags_good_timeserv_flag,
+               { "Good Timeserv", "netlogon.dc.flags.good_timeserv",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_good_timeserv_flag), DS_GOOD_TIMESERV_FLAG,
+                 "If this is a Good TimeServer", HFILL }},
+
+       { &hf_netlogon_dc_flags_ndnc_flag,
+               { "NDNC", "netlogon.dc.flags.ndnc",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_ndnc_flag), DS_NDNC_FLAG,
+                 "If this is an NDNC server", HFILL }},
+
+       { &hf_netlogon_dc_flags_dns_controller_flag,
+               { "DNS Controller", "netlogon.dc.flags.dns_controller",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_dns_controller_flag), DS_DNS_CONTROLLER_FLAG,
+                 "If this server is a DNS Controller", HFILL }},
+
+       { &hf_netlogon_dc_flags_dns_domain_flag,
+               { "DNS Domain", "netlogon.dc.flags.dns_domain",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_dns_domain_flag), DS_DNS_DOMAIN_FLAG,
+                 "", HFILL }},
+
+       { &hf_netlogon_dc_flags_dns_forest_flag,
+               { "DNS Forest", "netlogon.dc.flags.dns_forest",
+                 FT_BOOLEAN, 32, TFS(&dc_flags_dns_forest_flag), DS_DNS_FOREST_FLAG,
+                 "", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags,
+               { "Flags", "netlogon.get_dcname.request.flags", FT_UINT32, BASE_HEX,
+               NULL, 0x0, "Flags for DSGetDCName request", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_force_rediscovery,
+               { "Force Rediscovery", "netlogon.get_dcname.request.flags.force_rediscovery",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_force_rediscovery), DS_FORCE_REDISCOVERY,
+                 "Whether to allow the server to returned cached information or not", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_directory_service_required,
+               { "DS Required", "netlogon.get_dcname.request.flags.ds_required",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_directory_service_required), DS_DIRECTORY_SERVICE_REQUIRED,
+                 "Whether we require that the returned DC supports w2k or not", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_directory_service_preferred,
+               { "DS Preferred", "netlogon.get_dcname.request.flags.ds_preferred",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_directory_service_preferred), DS_DIRECTORY_SERVICE_PREFERRED,
+                 "Whether we prefer the call to return a w2k server (if available)", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_gc_server_required,
+               { "GC Required", "netlogon.get_dcname.request.flags.gc_server_required",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_gc_server_required), DS_GC_SERVER_REQUIRED,
+                 "Whether we require that the returned DC is a Global Catalog server", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_pdc_required,
+               { "PDC Required", "netlogon.get_dcname.request.flags.pdc_required",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_pdc_required), DS_PDC_REQUIRED,
+                 "Whether we require the returned DC to be the PDC", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_background_only,
+               { "Background Only", "netlogon.get_dcname.request.flags.background_only",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_background_only), DS_BACKGROUND_ONLY,
+                 "If we want cached data, even if it may have expired", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_ip_required,
+               { "IP Required", "netlogon.get_dcname.request.flags.ip_required",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_ip_required), DS_IP_REQUIRED,
+                 "If we requre the IP of the DC in the reply", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_kdc_required,
+               { "KDC Required", "netlogon.get_dcname.request.flags.kdc_required",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_kdc_required), DS_KDC_REQUIRED,
+                 "If we require that the returned server is a KDC", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_timeserv_required,
+               { "Timeserv Required", "netlogon.get_dcname.request.flags.timeserv_required",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_timeserv_required), DS_TIMESERV_REQUIRED,
+                 "If we require the retruned server to be a NTP serveruns WindowsTimeServicer", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_writable_required,
+               { "Writable Required", "netlogon.get_dcname.request.flags.writable_required",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_writable_required), DS_WRITABLE_REQUIRED,
+                 "If we require that the return server is writable", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_good_timeserv_preferred,
+               { "Timeserv Preferred", "netlogon.get_dcname.request.flags.good_timeserv_preferred",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_good_timeserv_preferred), DS_GOOD_TIMESERV_PREFERRED,
+                 "If we prefer Windows Time Servers", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_avoid_self,
+               { "Avoid Self", "netlogon.get_dcname.request.flags.avoid_self",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_avoid_self), DS_AVOID_SELF,
+                 "Return another DC than the one we ask", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_only_ldap_needed,
+               { "Only LDAP Needed", "netlogon.get_dcname.request.flags.only_ldap_needed",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_only_ldap_needed), DS_ONLY_LDAP_NEEDED,
+                 "We just want an LDAP server, it does not have to be a DC", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_is_flat_name,
+               { "Is Flat Name", "netlogon.get_dcname.request.flags.is_flat_name",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_is_flat_name), DS_IS_FLAT_NAME,
+                 "If the specified domain name is a NetBIOS name", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_is_dns_name,
+               { "Is DNS Name", "netlogon.get_dcname.request.flags.is_dns_name",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_is_dns_name), DS_IS_DNS_NAME,
+                 "If the specified domain name is a DNS name", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_return_dns_name,
+               { "Return DNS Name", "netlogon.get_dcname.request.flags.return_dns_name",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_return_dns_name), DS_RETURN_DNS_NAME,
+                 "Only return a DNS name (or an error)", HFILL }},
+
+       { &hf_netlogon_get_dcname_request_flags_return_flat_name,
+               { "Return Flat Name", "netlogon.get_dcname.request.flags.return_flat_name",
+                 FT_BOOLEAN, 32, TFS(&get_dcname_request_flags_return_flat_name), DS_RETURN_FLAT_NAME,
+                 "Only return a NetBIOS name (or an error)", HFILL }},
+
+       { &hf_netlogon_trust_attribs,
+               { "Trust Attributes", "netlogon.trust_attribs", FT_UINT32, BASE_HEX,
+               NULL, 0x0, "Trust Attributes", HFILL }},
+
+       { &hf_netlogon_trust_type,
+               { "Trust Type", "netlogon.trust_type", FT_UINT32, BASE_DEC,
+               VALS(trust_type_vals), 0x0, "Trust Type", HFILL }},
+
+       { &hf_netlogon_trust_flags,
+               { "Trust Flags", "netlogon.trust_flags", FT_UINT32, BASE_HEX,
+               NULL, 0x0, "Trust Flags", HFILL }},
+
+       { &hf_netlogon_trust_flags_inbound,
+               { "Inbound Trust", "netlogon.trust.flags.inbound",
+                 FT_BOOLEAN, 32, TFS(&trust_inbound), DS_DOMAIN_DIRECT_INBOUND,
+                 "Inbound trust. Whether the domain directly trusts the queried servers domain", HFILL }},
+
+       { &hf_netlogon_trust_flags_outbound,
+               { "Outbound Trust", "netlogon.trust.flags.outbound",
+                 FT_BOOLEAN, 32, TFS(&trust_outbound), DS_DOMAIN_DIRECT_OUTBOUND,
+                 "Outbound Trust. Whether the domain is directly trusted by the servers domain", HFILL }},
+
+       { &hf_netlogon_trust_flags_in_forest,
+               { "In Forest", "netlogon.trust.flags.in_forest",
+                 FT_BOOLEAN, 32, TFS(&trust_in_forest), DS_DOMAIN_IN_FOREST,
+                 "Whether this domain is a member of the same forest as the servers domain", HFILL }},
+
+       { &hf_netlogon_trust_flags_native_mode,
+               { "Native Mode", "netlogon.trust.flags.native_mode",
+                 FT_BOOLEAN, 32, TFS(&trust_native_mode), DS_DOMAIN_NATIVE_MODE,
+                 "Whether the domain is a w2k native mode domain or not", HFILL }},
+
+       { &hf_netlogon_trust_flags_primary,
+               { "Primary", "netlogon.trust.flags.primary",
+                 FT_BOOLEAN, 32, TFS(&trust_primary), DS_DOMAIN_PRIMARY,
+                 "Whether the domain is the primary domain for the queried server or not", HFILL }},
+
+       { &hf_netlogon_trust_flags_tree_root,
+               { "Tree Root", "netlogon.trust.flags.tree_root",
+                 FT_BOOLEAN, 32, TFS(&trust_tree_root), DS_DOMAIN_TREE_ROOT,
+                 "Whether the domain is the root of the tree for the queried server", HFILL }},
+
+       { &hf_netlogon_trust_parent_index,
+               { "Parent Index", "netlogon.parent_index", FT_UINT32, BASE_HEX,
+               NULL, 0x0, "Parent Index", HFILL }},
+
        { &hf_netlogon_logon_time,
                { "Logon Time", "netlogon.logon_time", FT_ABSOLUTE_TIME, BASE_NONE,
                NULL, 0, "Time for last time this user logged on", HFILL }},
@@ -6328,8 +6892,12 @@ static hf_register_info hf[] = {
                &ett_LM_OWF_PASSWORD,
                &ett_NT_OWF_PASSWORD,
                &ett_GROUP_MEMBERSHIP,
-               &ett_DSROLE_DOMAIN_INFO_EX,
-               &ett_BLOB
+               &ett_DS_DOMAIN_TRUSTS,
+               &ett_BLOB,
+               &ett_DOMAIN_TRUST_INFO,
+               &ett_trust_flags,
+               &ett_get_dcname_request_flags,
+               &ett_dc_flags
         };
 
         proto_dcerpc_netlogon = proto_register_protocol(