diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-27 09:37:48 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-27 09:37:48 +0000 |
commit | bf87640840860862a850a2717404fe2ee9b22bd1 (patch) | |
tree | 82052bd69bd923cc41eb655529170d40b3475493 /epan/dissectors/packet-dcerpc.c | |
parent | 6df7878bd5e7bc411e2e49274e44648ada3207f0 (diff) |
add PIDL friendly helper to manage unicode strings
svn path=/trunk/; revision=20941
Diffstat (limited to 'epan/dissectors/packet-dcerpc.c')
-rw-r--r-- | epan/dissectors/packet-dcerpc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 14b852147d..a847fcf802 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -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. |