forked from osmocom/wireshark
add PIDL friendly helper to manage unicode strings
svn path=/trunk/; revision=20941
This commit is contained in:
parent
6df7878bd5
commit
bf87640840
|
@ -1450,6 +1450,27 @@ dissect_ndr_wchar_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
FALSE, NULL);
|
||||
}
|
||||
|
||||
/* This function is aimed for PIDL useage and dissects a UNIQUE pointer to
|
||||
* unicode string.
|
||||
*/
|
||||
int
|
||||
PIDL_dissect_wchar_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 param)
|
||||
{
|
||||
header_field_info *hf_info;
|
||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||
|
||||
hf_info=proto_registrar_get_nth(hfindex);
|
||||
|
||||
offset = dissect_ndr_pointer_cb(
|
||||
tvb, offset, pinfo, tree, drep,
|
||||
dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE,
|
||||
hf_info->name, hfindex, cb_wstr_postprocess,
|
||||
GINT_TO_POINTER(param));
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
/* Dissect an NDR varying string of elements.
|
||||
The length of each element is given by the 'size_is' parameter;
|
||||
the elements are assumed to be characters or wide characters.
|
||||
|
|
|
@ -233,6 +233,8 @@ int dissect_ndr_char_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
proto_tree *tree, guint8 *drep);
|
||||
int dissect_ndr_wchar_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, guint8 *drep);
|
||||
int PIDL_dissect_wchar_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 param);
|
||||
|
||||
int dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, guint8 *drep, int size_is,
|
||||
int hfinfo, gboolean add_subtree,
|
||||
|
@ -431,7 +433,9 @@ init_ndr_pointer_list(packet_info *pinfo);
|
|||
*/
|
||||
#define PIDL_POLHND_OPEN 0x80000000
|
||||
#define PIDL_POLHND_CLOSE 0x40000000
|
||||
/* To "save" a pointer to the string in dcv->private_data */
|
||||
#define PIDL_STR_SAVE 0x00020000
|
||||
/* To make this value appear on the summary line for the packet */
|
||||
#define PIDL_SET_COL_INFO 0x20000000
|
||||
#define PIDL_SET_COL_INFO 0x00010000
|
||||
|
||||
#endif /* packet-dcerpc.h */
|
||||
|
|
Loading…
Reference in New Issue