Convert to new DCERPC string handling functions. There are still some
authortpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 3 Feb 2003 02:14:01 +0000 (02:14 +0000)
committertpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 3 Feb 2003 02:14:01 +0000 (02:14 +0000)
cosmetic bugs to work out though.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7069 f5534014-38df-0310-8fa8-9805f1628bb7

packet-dcerpc-lsa.c
packet-dcerpc-mapi.c
packet-dcerpc-netlogon.c
packet-dcerpc-reg.c
packet-dcerpc-samr.c
packet-dcerpc-spoolss.c
packet-dcerpc-srvsvc.c

index 5b4b318f969dda6eb7410af3c41115fa5aa16491..33facd242d6a3dc779223765aff932f73faa2939 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002  Added LSA command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-lsa.c,v 1.64 2003/01/31 07:27:27 guy Exp $
+ * $Id: packet-dcerpc-lsa.c,v 1.65 2003/02/03 02:14:00 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -191,7 +191,7 @@ lsa_dissect_pointer_UNICODE_STRING(tvbuff_t *tvb, int offset,
                return offset;
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                        di->hf_index, 0);
        return offset;
 }
@@ -229,8 +229,8 @@ lsa_dissect_pointer_STRING(tvbuff_t *tvb, int offset,
                return offset;
        }
 
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-                       di->hf_index);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                       di->hf_index, 1);
        return offset;
 }
 
@@ -782,7 +782,7 @@ lsa_dissect_POLICY_PRIMARY_DOMAIN_INFO(tvbuff_t *tvb, int offset,
        }
 
        /* domain */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_domain, 0);
 
        /* sid */
@@ -809,7 +809,7 @@ lsa_dissect_POLICY_ACCOUNT_DOMAIN_INFO(tvbuff_t *tvb, int offset,
        }
 
        /* account */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_acct, 0);
 
        /* sid */
@@ -865,11 +865,11 @@ lsa_dissect_POLICY_REPLICA_SOURCE_INFO(tvbuff_t *tvb, int offset,
        }
 
        /* source */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_source, 0);
 
        /* account */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_acct, 0);
 
        proto_item_set_len(item, offset-old_offset);
@@ -1012,15 +1012,15 @@ lsa_dissect_POLICY_DNS_DOMAIN_INFO(tvbuff_t *tvb, int offset,
        }
 
        /* name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_name, 0);
 
        /* domain */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_domain, 0);
 
        /* forest */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_forest, 0);
 
        /* GUID */
@@ -1067,7 +1067,7 @@ lsa_dissect_POLICY_INFORMATION(tvbuff_t *tvb, int offset,
                                tvb, offset, pinfo, tree, drep);
                break;
        case 4:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, 
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo, 
                        tree, drep, hf_lsa_acct, 0);
                break;
        case 5:
@@ -1207,23 +1207,23 @@ lsa_dissect_lsachangepassword_rqst(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, char *drep)
 {
        /* server */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_server, 0);
 
        /* domain */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_domain, 0);
 
        /* account */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_acct, 0);
 
        /* old password */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_old_pwd, 0);
 
        /* new password */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_new_pwd, 0);
 
        return offset;
@@ -1270,7 +1270,7 @@ lsa_dissect_LSA_TRANSLATED_NAME(tvbuff_t *tvb, int offset,
                        hf_lsa_sid_type, NULL);
 
        /* name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_name, 0);
 
        /* index */
@@ -1358,7 +1358,7 @@ lsa_dissect_LSA_TRUST_INFORMATION(tvbuff_t *tvb, int offset,
        }
 
        /* name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_name, 0);
 
        /* sid */
@@ -1444,11 +1444,11 @@ lsa_dissect_LSA_TRUST_INFORMATION_EX(tvbuff_t *tvb, int offset,
        }
 
        /* name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_name, 0);
 
        /* flat name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_flat_name, 0);
 
        /* sid */
@@ -1886,7 +1886,7 @@ lsa_dissect_LSA_PRIVILEGE(tvbuff_t *tvb, int offset,
        }
 
        /* privilege name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                        hf_lsa_privilege_name, 0);
 
        /* LUID */
@@ -2279,7 +2279,7 @@ lsa_dissect_LSA_TRUSTED_DOMAIN(tvbuff_t *tvb, int offset,
        }
 
        /* domain */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_domain, 0);
 
        /* sid */
@@ -2358,7 +2358,7 @@ lsa_dissect_LSA_UNICODE_STRING_item(tvbuff_t *tvb, int offset,
                return offset;
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                        di->hf_index, 0);
 
        return offset;
@@ -2512,7 +2512,7 @@ lsa_dissect_lsacreatesecret_rqst(tvbuff_t *tvb, int offset,
                pinfo, tree, drep);
 
        /* [in, ref] LSA_UNICODE_STRING *name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_name, 0);
 
        /* [in] ACCESS_MASK access */
@@ -2606,7 +2606,7 @@ lsa_dissect_TRUSTED_DOMAIN_INFORMATION(tvbuff_t *tvb, int offset,
        ALIGN_TO_4_BYTES;  /* all union arms aligned to 4 bytes, case 7 and 9 need this  */
        switch(level){
        case 1:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                        hf_lsa_domain, 0);
                break;
        case 2:
@@ -2729,7 +2729,7 @@ lsa_dissect_lsaopensecret_rqst(tvbuff_t *tvb, int offset,
                pinfo, tree, drep);
 
        /* [in, ref] LSA_UNICODE_STRING *name */
-       offset = dissect_ndr_nt_UNICODE_STRING_cb(
+       offset = dissect_ndr_counted_string_cb(
                tvb, offset, pinfo, tree, drep, hf_lsa_name,
                cb_str_postprocess, 
                GINT_TO_POINTER(CB_STR_COL_INFO | 2));
@@ -3008,7 +3008,7 @@ lsa_dissect_lsaquerytrusteddomaininfobyname_rqst(tvbuff_t *tvb, int offset,
 
        /* [in, ref] LSA_UNICODE_STRING *name */
        /* domain */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_domain, 0);
 
        /* [in] TRUSTED_INFORMATION_CLASS level */
@@ -3045,7 +3045,7 @@ lsa_dissect_lsasettrusteddomaininfobyname_rqst(tvbuff_t *tvb, int offset,
 
        /* [in, ref] LSA_UNICODE_STRING *name */
        /* domain */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_domain, 0);
 
        /* [in] TRUSTED_INFORMATION_CLASS level */
@@ -3100,7 +3100,7 @@ lsa_dissect_lsaopentrusteddomainbyname_rqst(tvbuff_t *tvb, int offset,
 
        /* [in, ref] LSA_UNICODE_STRING *name */
        /* domain */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_domain, 0);
 
        /* [in] ACCESS_MASK access */
@@ -3397,7 +3397,7 @@ lsa_dissect_lsalookupprivilegedisplayname_rqst(tvbuff_t *tvb, int offset,
                pinfo, tree, drep);
 
        /* [in, ref] LSA_UNICODE_STRING *name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_name, 0);
 
        /* [in] USHORT unknown */
@@ -3440,7 +3440,7 @@ lsa_dissect_lsastoreprivatedata_rqst(tvbuff_t *tvb, int offset,
                pinfo, tree, drep);
 
        /* [in, ref] LSA_UNICODE_STRING *key */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_key, 0);
 
        /* [in, unique] LSA_SECRET **data */
@@ -3471,7 +3471,7 @@ lsa_dissect_lsaretrieveprivatedata_rqst(tvbuff_t *tvb, int offset,
                pinfo, tree, drep);
 
        /* [in, ref] LSA_UNICODE_STRING *key */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_key, 0);
 
        /* [in, out, ref] LSA_SECRET **data */
@@ -3547,7 +3547,7 @@ lsa_dissect_LSA_TRANSLATED_NAME_EX(tvbuff_t *tvb, int offset,
                        hf_lsa_sid_type, NULL);
 
        /* name */
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_lsa_name, 0);
 
        /* index */
index f0747da06edf7d0edc4d24085813b5b24b959c71..6369fa1dec3f6cdf97ff4ff12d52702e96224c44 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for MS Exchange MAPI
  * Copyright 2002, Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-mapi.c,v 1.16 2003/01/28 23:56:38 guy Exp $
+ * $Id: packet-dcerpc-mapi.c,v 1.17 2003/02/03 02:14:00 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -237,7 +237,7 @@ mapi_logon_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_STRING_string, NDR_POINTER_REF,
+                       dissect_ndr_wchar_array, NDR_POINTER_REF,
                        "unknown string", hf_mapi_unknown_string);
 
         DISSECT_UNKNOWN(tvb_length_remaining(tvb, offset));
@@ -258,13 +258,13 @@ mapi_logon_reply(tvbuff_t *tvb, int offset,
         DISSECT_UNKNOWN(20); /* this is 20 bytes, unless there are pointers */
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_STRING_string, NDR_POINTER_REF,
+                       dissect_ndr_wchar_array, NDR_POINTER_REF,
                        "unknown string", hf_mapi_unknown_string);
 
         DISSECT_UNKNOWN(6); /* possibly 1 or 2 bytes padding here */
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_STRING_string, NDR_POINTER_REF,
+                       dissect_ndr_wchar_array, NDR_POINTER_REF,
                        "unknown string", hf_mapi_unknown_string);
 
         DISSECT_UNKNOWN( tvb_length_remaining(tvb, offset)-4 );
@@ -286,7 +286,7 @@ mapi_unknown_02_request(tvbuff_t *tvb, int offset,
                /* this is a unidimensional varying and conformant array of
                   encrypted data */
                        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                               dissect_ndr_nt_STRING_string, NDR_POINTER_REF,
+                               dissect_ndr_wchar_array, NDR_POINTER_REF,
                                "unknown data", hf_mapi_unknown_data);
        } else {
                offset = mapi_decrypt_pdu(tvb, offset, pinfo, tree, drep);
@@ -312,7 +312,7 @@ mapi_unknown_02_reply(tvbuff_t *tvb, int offset,
                /* this is a unidimensional varying and conformant array of
                   encrypted data */
                        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                               dissect_ndr_nt_STRING_string, NDR_POINTER_REF,
+                               dissect_ndr_wchar_array, NDR_POINTER_REF,
                                "unknown data", hf_mapi_unknown_data);
        } else {
                offset = mapi_decrypt_pdu(tvb, offset, pinfo, tree, drep);
index e3015f0246a1bb57f15330dc88cdf7931d98c3d1..a353229a5865de2de499521f0ca7ecaf4c6d558d 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002 structure and command dissectors by Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-netlogon.c,v 1.70 2003/01/31 07:37:12 guy Exp $
+ * $Id: packet-dcerpc-netlogon.c,v 1.71 2003/02/03 02:14:00 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -489,7 +489,7 @@ 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,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -498,10 +498,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
@@ -654,11 +654,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);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_nt_chal_resp, 0);
 
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-               hf_netlogon_lm_chal_resp);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+               hf_netlogon_lm_chal_resp, 0);
 
        return offset;
 }
@@ -910,22 +910,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,
@@ -953,10 +953,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,
@@ -1027,22 +1027,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,
@@ -1070,10 +1070,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,
@@ -1175,13 +1175,13 @@ netlogon_dissect_VALIDATION_PAC_INFO(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
                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,
@@ -1198,16 +1198,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;
@@ -1398,7 +1398,7 @@ netlogon_dissect_netserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer_cb(
                tvb, offset, pinfo, tree, drep, 
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF, 
+               dissect_ndr_wchar_array, NDR_POINTER_REF, 
                "Computer Name", hf_netlogon_computer_name, 
                cb_str_postprocess, 
                GINT_TO_POINTER(CB_STR_COL_INFO | 1));
@@ -1582,16 +1582,16 @@ netlogon_dissect_DELTA_DELETE_USER(tvbuff_t *tvb, int offset,
        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,
@@ -1704,10 +1704,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,
@@ -1716,19 +1716,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,
@@ -1768,10 +1768,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,
@@ -1789,16 +1789,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,
@@ -1845,10 +1845,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,
@@ -1878,16 +1878,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,
@@ -1928,13 +1928,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,
+       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,
@@ -1943,16 +1943,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,
@@ -1994,22 +1994,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,
+       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,
                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,
@@ -2136,7 +2136,7 @@ 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,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_alias_name, 0);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2148,16 +2148,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,
@@ -2324,7 +2324,7 @@ netlogon_dissect_DELTA_POLICY(tvbuff_t *tvb, int offset,
                netlogon_dissect_EVENT_AUDIT_OPTIONS_ARRAY, NDR_POINTER_UNIQUE,
                "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,
@@ -2345,16 +2345,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,
@@ -2378,7 +2378,7 @@ 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,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                hf_netlogon_dc_name, 0);
 
        return offset;
@@ -2418,7 +2418,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,
@@ -2434,16 +2434,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,
@@ -2489,7 +2489,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;
@@ -2558,16 +2558,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,
@@ -2695,16 +2695,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,
@@ -4424,7 +4424,7 @@ netlogon_dissect_UNICODE_STRING(tvbuff_t *tvb, int offset,
        }
 
        offset = dissect_ndr_pointer_cb(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_UNICODE_STRING_str, type,
+                       dissect_ndr_wchar_array, type,
                        name, hf_index, callback, NULL);
 
        proto_item_set_len(item, offset-old_offset);
@@ -4603,16 +4603,16 @@ netlogon_dissect_DOMAIN_TRUST_INFO(tvbuff_t *tvb, int offset,
        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,
@@ -4670,16 +4670,16 @@ netlogon_dissect_DOMAIN_QUERY_1(tvbuff_t *tvb, int offset,
        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,
@@ -4718,16 +4718,16 @@ netlogon_dissect_DOMAIN_INFO_1(tvbuff_t *tvb, int offset,
                netlogon_dissect_DOMAIN_TRUST_INFO_ARRAY, NDR_POINTER_UNIQUE,
                "DOMAIN_TRUST_ARRAY:", -1);
  
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       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. */
index 2a3af7dcfd023f0d7fba22ef6806d5615a7df4e6..3e535731144e5589e803ec55a9341e01cf33a9d3 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \PIPE\winreg packet disassembly
  * Copyright 2001-2003 Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-reg.c,v 1.14 2003/01/30 08:19:38 guy Exp $
+ * $Id: packet-dcerpc-reg.c,v 1.15 2003/02/03 02:14:00 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -324,7 +324,7 @@ RegQueryKey_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
                tvb, offset, pinfo, tree, drep,
                hf_hnd, NULL, FALSE, FALSE);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(
+       offset = dissect_ndr_counted_string(
                tvb, offset, pinfo, tree, drep, hf_querykey_class, 0);
 
        dcerpc_smb_check_long_frame(tvb, offset, pinfo, tree);
@@ -345,7 +345,7 @@ RegQueryKey_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        /* Parse packet */
 
-       offset = dissect_ndr_nt_UNICODE_STRING(
+       offset = dissect_ndr_counted_string(
                tvb, offset, pinfo, tree, drep, hf_querykey_class, 0);
 
        offset = dissect_ndr_uint32(
@@ -408,7 +408,7 @@ RegOpenEntry_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
                tvb, offset, pinfo, tree, drep,
                hf_hnd, NULL, FALSE, FALSE);
 
-       offset = dissect_ndr_nt_UNICODE_STRING(
+       offset = dissect_ndr_counted_string(
                tvb, offset, pinfo, tree, drep, hf_querykey_class, 0);
 
        offset = dissect_ndr_uint32(
index e6a8304ef25033229381f45545ec4d8d3a3d3843..6061d6ac4b5088d731718d3faf8ca7eac51639ee 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *   2002 Added all command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-samr.c,v 1.71 2003/02/02 22:47:46 guy Exp $
+ * $Id: packet-dcerpc-samr.c,v 1.72 2003/02/03 02:14:00 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -128,12 +128,6 @@ static int hf_samr_unknown_char = -1;
 static int hf_samr_unknown_string = -1;
 static int hf_samr_unknown_time = -1;
 
-/* these are used by functions in packet-dcerpc-nt.c */
-int hf_nt_str_len = -1;
-int hf_nt_str_off = -1;
-int hf_nt_str_max_len = -1;
-int hf_nt_string_length = -1;
-int hf_nt_string_size = -1;
 static int hf_nt_acct_ctrl = -1;
 static int hf_nt_acb_disabled = -1;
 static int hf_nt_acb_homedirreq = -1;
@@ -458,6 +452,7 @@ dissect_ndr_nt_SID(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        /* the SID contains a conformant array, first we must eat
           the 4-byte max_count before we can hand it off */
+
        offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                        hf_samr_count, NULL);
 
@@ -653,32 +648,7 @@ samr_dissect_pointer_STRING(tvbuff_t *tvb, int offset,
                return offset;
        }
 
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-                       di->hf_index);
-       return offset;
-}
-
-static int
-samr_dissect_pointer_UNICODE_STRING(tvbuff_t *tvb, int offset,
-                             packet_info *pinfo, proto_tree *tree,
-                             char *drep)
-{
-       dcerpc_info *di;
-
-       /*
-        * XXX - why does this exist?  Why not just call
-        * "dissect_ndr_nt_UNICODE_STRING()"?
-        *
-        * Is it to arrange that offset not be aligned on a 4-byte
-        * boundary if "di->conformant_run" is true?
-        */
-       di=pinfo->private_data;
-       if(di->conformant_run){
-               /*just a run to handle conformant arrays, nothing to dissect */
-               return offset;
-       }
-
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                        di->hf_index, 1);
        return offset;
 }
@@ -745,11 +715,11 @@ samr_dissect_USER_DISPINFO_1(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                                hf_samr_rid, NULL);
        offset = dissect_ndr_nt_acct_ctrl(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_samr_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_samr_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_samr_acct_desc, 0);
 
        proto_item_set_len(item, offset-old_offset);
@@ -816,9 +786,9 @@ samr_dissect_USER_DISPINFO_2(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                        hf_samr_rid, NULL);
        offset = dissect_ndr_nt_acct_ctrl(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_samr_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_samr_acct_desc, 0);
 
        proto_item_set_len(item, offset-old_offset);
@@ -863,10 +833,6 @@ samr_dissect_USER_DISPINFO_2_ARRAY (tvbuff_t *tvb, int offset,
        return offset;
 }
 
-
-
-
-
 static int
 samr_dissect_GROUP_DISPINFO(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
@@ -888,9 +854,9 @@ samr_dissect_GROUP_DISPINFO(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                        hf_samr_rid, NULL);
        offset = dissect_ndr_nt_acct_ctrl(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_samr_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_samr_acct_desc, 0);
 
        proto_item_set_len(item, offset-old_offset);
@@ -957,10 +923,10 @@ samr_dissect_ASCII_DISPINFO(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                        hf_samr_rid, NULL);
        offset = dissect_ndr_nt_acct_ctrl(tvb, offset, pinfo, tree, drep);
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-                       hf_samr_acct_name);
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-                       hf_samr_acct_desc);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                       hf_samr_acct_name, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                       hf_samr_acct_desc, 1);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -1086,8 +1052,8 @@ samr_dissect_get_display_enumeration_index_rqst(tvbuff_t *tvb, int offset,
        if (check_col(pinfo->cinfo, COL_INFO))
                col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
 
-       offset = dissect_ndr_nt_STRING(tvb, offset, pinfo, tree, drep,
-                       hf_samr_acct_name);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                       hf_samr_acct_name, 1);
 
        return offset;
 }
@@ -1169,7 +1135,7 @@ samr_dissect_connect2_rqst(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer_cb(
                tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
+               dissect_ndr_wchar_array, NDR_POINTER_UNIQUE,
                "Server", hf_samr_server, cb_str_postprocess,
                GINT_TO_POINTER(CB_STR_COL_INFO | CB_STR_SAVE | 1));
 
@@ -1187,7 +1153,7 @@ samr_dissect_connect4_rqst(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer_cb(
                tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
+               dissect_ndr_wchar_array, NDR_POINTER_UNIQUE,
                "Server", hf_samr_server, cb_str_postprocess,
                GINT_TO_POINTER(CB_STR_COL_INFO | 1));
 
@@ -1500,7 +1466,7 @@ samr_dissect_create_alias_in_domain_rqst(tvbuff_t *tvb, int offset,
                                       hf_samr_hnd, NULL, FALSE, FALSE);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_REF,
                        "Account Name", hf_samr_acct_name);
 
        offset = dissect_nt_access_mask(
@@ -1555,11 +1521,11 @@ samr_dissect_ALIAS_INFO_1 (tvbuff_t *tvb, int offset,
                              packet_info *pinfo, proto_tree *tree,
                              char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                tree, drep, hf_samr_acct_name, 0);
         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                                      hf_samr_rid, NULL);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                tree, drep, hf_samr_acct_desc, 0);
        return offset;
 }
@@ -1588,11 +1554,11 @@ samr_dissect_ALIAS_INFO(tvbuff_t *tvb, int offset,
                                tvb, offset, pinfo, tree, drep);
                break;
        case 2:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, hf_samr_acct_name, 0);
                break;
        case 3:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, hf_samr_acct_desc, 0);
                break;
        }
@@ -1969,7 +1935,7 @@ samr_dissect_unicode_change_password_user2_rqst(tvbuff_t *tvb, int offset,
                        NDR_POINTER_UNIQUE, "Server", hf_samr_server, 0);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_REF,
                        "Account Name:", hf_samr_acct_name);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
@@ -2011,10 +1977,10 @@ samr_dissect_unknown_3b_rqst(tvbuff_t *tvb, int offset,
         offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
                                      hf_samr_unknown_short, NULL);
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_UNIQUE,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_UNIQUE,
                        "Unknown", hf_samr_unknown_string);
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_UNIQUE,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_UNIQUE,
                        "Unknown", hf_samr_unknown_string);
        return offset;
 }
@@ -2039,7 +2005,7 @@ samr_dissect_create_user2_in_domain_rqst(tvbuff_t *tvb, int offset,
                                       hf_samr_hnd, NULL, FALSE, FALSE);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_REF,
                        "Account Name", hf_samr_acct_name);
 
        offset = dissect_ndr_nt_acct_ctrl(tvb, offset, pinfo, tree, drep);
@@ -2086,7 +2052,7 @@ samr_dissect_get_display_enumeration_index2_rqst(tvbuff_t *tvb, int offset,
         offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
                                      hf_samr_level, NULL);
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_REF,
                        "Account Name", hf_samr_acct_name);
        return offset;
 }
@@ -2182,13 +2148,13 @@ samr_dissect_GROUP_INFO_1 (tvbuff_t *tvb, int offset,
                              packet_info *pinfo, proto_tree *tree,
                              char *drep)
 {
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                tree, drep, hf_samr_acct_name, 0);
         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                                      hf_samr_rid, NULL);
         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                                        hf_samr_attrib, NULL);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                tree, drep, hf_samr_acct_desc, 0);
        return offset;
 }
@@ -2217,7 +2183,7 @@ samr_dissect_GROUP_INFO(tvbuff_t *tvb, int offset,
                                tvb, offset, pinfo, tree, drep);
                break;
        case 2:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, hf_samr_acct_name, 0);
                break;
        case 3:
@@ -2225,7 +2191,7 @@ samr_dissect_GROUP_INFO(tvbuff_t *tvb, int offset,
                         hf_samr_attrib, NULL);
                break;
        case 4:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, hf_samr_acct_desc, 0);
                break;
        }
@@ -2386,11 +2352,11 @@ samr_dissect_DOMAIN_INFO_2(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
                        hf_samr_unknown_time);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                        hf_samr_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_samr_domain, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                        hf_samr_controller, 0);
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
                        hf_samr_unknown_time);
@@ -2547,17 +2513,17 @@ samr_dissect_DOMAIN_INFO(tvbuff_t *tvb, int offset,
                                hf_samr_unknown_time);
                break;
        case 4:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, hf_samr_unknown_string, 0);
                break;
 
        case 5:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, hf_samr_domain, 0);
                break;
 
        case 6:
-               offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+               offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, hf_samr_controller, 0);
                break;
 
@@ -2632,7 +2598,7 @@ samr_dissect_lookup_domain_rqst(tvbuff_t *tvb, int offset,
                                       hf_samr_hnd, NULL, FALSE, FALSE);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_REF,
                        "Domain:", hf_samr_domain);
 
        return offset;
@@ -2891,7 +2857,7 @@ samr_dissect_IDX_AND_NAME(tvbuff_t *tvb, int offset,
 
         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                        hf_samr_index, NULL);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo,
                        tree, drep, di->hf_index, 4);
 
        proto_item_set_len(item, offset-old_offset);
@@ -3202,14 +3168,14 @@ samr_dissect_USER_INFO_1(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_samr_user_info_1);
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_acct_name, 1);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_full_name, 0);
        offset = dissect_ndr_nt_acct_ctrl(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_samr_home, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_script, 0);
 
        proto_item_set_len(item, offset-old_offset);
@@ -3231,9 +3197,9 @@ samr_dissect_USER_INFO_2(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_samr_user_info_2);
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_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_samr_full_name, 0);
        offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
                                hf_samr_bad_pwd_count, NULL);
@@ -3259,23 +3225,23 @@ samr_dissect_USER_INFO_3(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_samr_user_info_3);
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_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_samr_full_name, 0);
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                                hf_samr_rid, NULL);
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                                hf_samr_group, NULL);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_home, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_home_drive, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_script, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_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_samr_workstations, 0);
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
                                hf_samr_logon_time);
@@ -3313,9 +3279,9 @@ samr_dissect_USER_INFO_5(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_samr_user_info_5);
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_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_samr_full_name, 0);
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                                hf_samr_rid, NULL);
@@ -3325,15 +3291,15 @@ samr_dissect_USER_INFO_5(tvbuff_t *tvb, int offset,
                                hf_samr_country, NULL);
        offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
                                hf_samr_codepage, NULL);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_home, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_home_drive, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_script, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_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_samr_workstations, 0);
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
                                hf_samr_logon_time);
@@ -3369,9 +3335,9 @@ samr_dissect_USER_INFO_6(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_samr_user_info_6);
        }
 
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_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_samr_full_name, 0);
 
        proto_item_set_len(item, offset-old_offset);
@@ -3521,31 +3487,31 @@ samr_dissect_USER_INFO_21(tvbuff_t *tvb, int offset,
                                hf_samr_pwd_can_change_time);
        offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep,
                                hf_samr_pwd_must_change_time);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_acct_name, 2);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_full_name, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_home, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_home_drive, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_script, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_profile, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_acct_desc, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_workstations, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_comment, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
-                               hf_samr_parameters, 0);
-       offset = dissect_ndr_nt_UNICODE_STRING(tvb, offset, pinfo, tree, drep,
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_acct_name, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_full_name, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_home, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_home_drive, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_script, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_profile, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_acct_desc, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_workstations, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_comment, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
+                               hf_samr_parameters, 1);
+       offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep,
                                hf_samr_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_samr_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_samr_unknown_string, 0);
        offset = samr_dissect_BUFFER(tvb, offset, pinfo, tree, drep);
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -3689,11 +3655,11 @@ samr_dissect_USER_INFO (tvbuff_t *tvb, int offset,
                                tvb, offset, pinfo, tree, drep);
                break;
        case 7:
-               offset = dissect_ndr_nt_UNICODE_STRING(
+               offset = dissect_ndr_counted_string(
                        tvb, offset, pinfo, tree, drep, hf_samr_full_name, 0);
                break;
        case 8:
-               offset = dissect_ndr_nt_UNICODE_STRING(
+               offset = dissect_ndr_counted_string(
                        tvb, offset, pinfo, tree, drep, hf_samr_acct_desc, 0);
                break;
        case 9:
@@ -3705,19 +3671,19 @@ samr_dissect_USER_INFO (tvbuff_t *tvb, int offset,
                                tvb, offset, pinfo, tree, drep);
                break;
        case 11:
-               offset = dissect_ndr_nt_UNICODE_STRING(
+               offset = dissect_ndr_counted_string(
                        tvb, offset, pinfo, tree, drep, hf_samr_home, 0);
                break;
        case 12:
-               offset = dissect_ndr_nt_UNICODE_STRING(
+               offset = dissect_ndr_counted_string(
                        tvb, offset, pinfo, tree, drep, hf_samr_home_drive, 0);
                break;
        case 13:
-               offset = dissect_ndr_nt_UNICODE_STRING(
+               offset = dissect_ndr_counted_string(
                        tvb, offset, pinfo, tree, drep, hf_samr_script, 0);
                break;
        case 14:
-               offset = dissect_ndr_nt_UNICODE_STRING(
+               offset = dissect_ndr_counted_string(
                        tvb, offset, pinfo, tree, drep, hf_samr_workstations, 0);
                break;
        case 16:
@@ -3737,7 +3703,7 @@ samr_dissect_USER_INFO (tvbuff_t *tvb, int offset,
                                tvb, offset, pinfo, tree, drep);
                break;
        case 20:
-               offset = dissect_ndr_nt_UNICODE_STRING(
+               offset = dissect_ndr_counted_string(
                        tvb, offset, pinfo, tree, drep, hf_samr_profile, 0);
                break;
        case 21:
@@ -4054,7 +4020,7 @@ samr_dissect_LOOKUP_NAMES_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_samr_acct_name, 1);
        return offset;
 }
@@ -4176,7 +4142,7 @@ samr_dissect_UNICODE_STRING_ARRAY_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_samr_acct_name, 0);
        return offset;
 }
@@ -4677,7 +4643,7 @@ samr_dissect_create_group_in_domain_rqst(tvbuff_t *tvb, int offset,
                                       hf_samr_hnd, NULL, FALSE, FALSE);
 
         offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
-                       samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
+                       dissect_ndr_counted_string_ptr, NDR_POINTER_REF,
                        "Account Name", hf_samr_acct_name);
 
        offset = dissect_nt_access_mask(
@@ -5328,27 +5294,6 @@ proto_register_dcerpc_samr(void)
                "Divisions", "samr.divisions", FT_UINT16, BASE_DEC,
                NULL, 0, "Number of divisions for LOGON_HOURS", HFILL }},
 
-       /* these are used by packet-dcerpc-nt.c */
-       { &hf_nt_string_length,
-               { "Length", "nt.string.length", FT_UINT16, BASE_DEC,
-               NULL, 0x0, "Length of string in bytes", HFILL }},
-
-       { &hf_nt_string_size,
-               { "Size", "nt.string.size", FT_UINT16, BASE_DEC,
-               NULL, 0x0, "Size of string in bytes", HFILL }},
-
-       { &hf_nt_str_len,
-               { "Length", "nt.str.len", FT_UINT32, BASE_DEC,
-               NULL, 0x0, "Length of string in short integers", HFILL }},
-
-       { &hf_nt_str_off,
-               { "Offset", "nt.str.offset", FT_UINT32, BASE_DEC,
-               NULL, 0x0, "Offset into string in short integers", HFILL }},
-
-       { &hf_nt_str_max_len,
-               { "Max Length", "nt.str.max_len", FT_UINT32, BASE_DEC,
-               NULL, 0x0, "Max Length of string in short integers", HFILL }},
-
        { &hf_nt_acct_ctrl,
                { "Acct Ctrl", "nt.acct_ctrl", FT_UINT32, BASE_HEX,
                NULL, 0x0, "Acct CTRL", HFILL }},
index d935066264b569bb660f2473ff7bca3a4390c06b..098a2e50732312dbd466bd81f442c44dd0ec77f2 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \PIPE\spoolss packet disassembly
  * Copyright 2001-2003, Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-spoolss.c,v 1.77 2003/01/30 23:41:28 tpot Exp $
+ * $Id: packet-dcerpc-spoolss.c,v 1.78 2003/02/03 02:14:01 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -2749,7 +2749,7 @@ static int SpoolssOpenPrinterEx_q(tvbuff_t *tvb, int offset,
 
        offset = dissect_ndr_pointer_cb(
                tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
+               dissect_ndr_wchar_array, NDR_POINTER_UNIQUE,
                "Printer name", hf_spoolss_printername, cb_str_postprocess,
                GINT_TO_POINTER(CB_STR_COL_INFO | CB_STR_SAVE | 1));
 
index 67a1cecf2b50fbfbb0e4c0cc45bf5a9ef39f4734..84954cbc0f9b8d78f7e77c3169ddb9f73b1451ac 100644 (file)
@@ -9,7 +9,7 @@
  * 2002, some share information levels implemented based on samba
  * sources.
  *
- * $Id: packet-dcerpc-srvsvc.c,v 1.49 2003/01/31 06:24:50 guy Exp $
+ * $Id: packet-dcerpc-srvsvc.c,v 1.50 2003/02/03 02:14:01 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -2945,11 +2945,17 @@ srvsvc_dissect_netrsharegetinfo_rqst(tvbuff_t *tvb, int offset,
                                     packet_info *pinfo, proto_tree *tree,
                                     char *drep)
 {
-        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
-                       NDR_POINTER_UNIQUE, "Server", hf_srvsvc_server, 0);
+       offset = dissect_ndr_pointer_cb(
+               tvb, offset, pinfo, tree, drep,
+               dissect_ndr_wchar_array, NDR_POINTER_UNIQUE,
+               "Server", hf_srvsvc_server, cb_str_postprocess,
+               GINT_TO_POINTER(CB_STR_COL_INFO | 1));
 
-        offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep,
-                       NDR_POINTER_REF, "Share", hf_srvsvc_share, 0);
+       offset = dissect_ndr_pointer_cb(
+               tvb, offset, pinfo, tree, drep,
+               dissect_ndr_wchar_array, NDR_POINTER_REF,
+               "Share", hf_srvsvc_share, cb_str_postprocess,
+               GINT_TO_POINTER(CB_STR_COL_INFO | 1));
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                        hf_srvsvc_info_level, 0);
@@ -5288,7 +5294,7 @@ srvsvc_dissect_netrservergetinfo_rqst(tvbuff_t *tvb, int offset,
 {
        offset = dissect_ndr_pointer_cb(
                tvb, offset, pinfo, tree, drep,
-               dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_UNIQUE,
+               dissect_ndr_wchar_array, NDR_POINTER_UNIQUE,
                "Server", hf_srvsvc_server, cb_str_postprocess,
                GINT_TO_POINTER(CB_STR_COL_INFO | 1));