diff options
author | tpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-02-03 02:00:54 +0000 |
---|---|---|
committer | tpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-02-03 02:00:54 +0000 |
commit | f3e7788102dd8d3ff7cd5bbabd95b6f2c7902e3a (patch) | |
tree | aa98d5ba6835ec09c675ee52823b26d018a2dee4 /packet-dcerpc-nt.h | |
parent | d73399d8cb6d98600bc2033025ccd1468e9083e0 (diff) |
Replace the confusing collection of Windows DCERPC string handling
functions with something a little less confusing.
We now have two sets of functions to dissect strings:
- dissect_ndr_wchar_array() which dissects NDR arrays of wide characters
(uint32, uint32, uint32, buffer)
- dissect_ndr_counted_string() which dissects a "counted string"
(uint16, uint16, pointer to array of wchar)
There are three contexts for dissecting counted strings:
1. "in-line" using dissect_ndr_counted_string()
2. as a callback to dissect_ndr_pointer()
3. as a callback to dissect_ndr_pointer_cb()
Context 2 is used when you have a pointer to a counted string.
Context 3 is when you wish to perform some special processing with the
returned string.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7068 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-dcerpc-nt.h')
-rw-r--r-- | packet-dcerpc-nt.h | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/packet-dcerpc-nt.h b/packet-dcerpc-nt.h index b3b8eb554b..e2a0650a65 100644 --- a/packet-dcerpc-nt.h +++ b/packet-dcerpc-nt.h @@ -2,7 +2,7 @@ * Routines for DCERPC over SMB packet disassembly * Copyright 2001-2003 Tim Potter <tpot@samba.org> * - * $Id: packet-dcerpc-nt.h,v 1.37 2003/01/30 08:19:38 guy Exp $ + * $Id: packet-dcerpc-nt.h,v 1.38 2003/02/03 02:00:54 tpot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -48,36 +48,21 @@ char *fake_unicode(tvbuff_t *tvb, int offset, int len); } int -dissect_ndr_nt_UNICODE_STRING_str(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - char *drep); -int -dissect_ndr_nt_UNICODE_STRING_cb(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *parent_tree, - char *drep, int hf_index, - dcerpc_callback_fnct_t *callback, - void *callback_args); +dissect_ndr_counted_string_cb(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, + char *drep, int hf_index, + dcerpc_callback_fnct_t *callback, + void *callback_args); int -dissect_ndr_nt_UNICODE_STRING(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *parent_tree, - char *drep, int hf_index, int levels); +dissect_ndr_counted_string_ptr(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *parent_tree, + char *drep); int -dissect_ndr_nt_STRING_string(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - char *drep); -int -dissect_ndr_nt_STRING_cb(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *parent_tree, - char *drep, int hf_index, - dcerpc_callback_fnct_t *callback, - void *callback_args); - -int -dissect_ndr_nt_STRING(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *parent_tree, - char *drep, int hf_index); +dissect_ndr_counted_string(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *parent_tree, + char *drep, int hf_index, int levels); int dissect_ndr_nt_acct_ctrl(tvbuff_t *tvb, int offset, packet_info *pinfo, @@ -218,4 +203,12 @@ void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_, void dcerpc_smb_init(int proto_dcerpc); +int +dissect_ndr_wchar_array(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, char *drep); + +int +dissect_ndr_char_array(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, char *drep); + #endif /* packet-dcerpc-nt.h */ |