diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2007-02-06 01:33:39 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2007-02-06 01:33:39 +0000 |
commit | 0f7e40945e35559f1826ffc198b4cdfd96127ca7 (patch) | |
tree | 53f1020c1e196b21fbebfd137e5a41921d49ae8d /epan/dissectors/packet-dcom.c | |
parent | 352f0eeb68e21751c69508c878c600548bd37903 (diff) |
dissector changes:
- new: ICBALogicalDevice2::PBAddressInfo
- enhanced: GROUPERRORDEF
simplify ett registration
add a callback for SAFEARRAY data dissection
svn path=/trunk/; revision=20723
Diffstat (limited to 'epan/dissectors/packet-dcom.c')
-rw-r--r-- | epan/dissectors/packet-dcom.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index f0ae9a918d..2eb35aa779 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -1115,9 +1115,9 @@ dissect_dcom_COMVERSION(tvbuff_t *tvb, int offset, packet_info *pinfo, } -static int +int dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, int hfindex _U_) + proto_tree *tree, guint8 *drep, int hfindex _U_, sa_callback_t sacb) { guint32 u32Dims; guint16 u16Dims; @@ -1202,6 +1202,10 @@ dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo, tvb_ensure_bytes_exist(tvb, offset, u32ArraySize * u32ElementSize); u32VariableOffset = offset + u32ArraySize * u32ElementSize; + if(sacb) { + sacb(tvb, offset, pinfo, tree, drep, u32VarType, u32ArraySize); + } + u32Tmp = u32ArraySize; while(u32ArraySize--) { switch(u32VarType) { @@ -1245,12 +1249,12 @@ dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo, u32VariableOffset = dissect_dcom_tobedone_data(tvb, u32VariableOffset, pinfo, sub_tree, drep, 10000); } - } + } - /* update subtree header */ - proto_item_append_text(sub_item, ": Elements: %u/%u VarType: %s", - u32Elements, u32BoundElements, - val_to_str(u32VarType, dcom_variant_type_vals, "Unknown (0x%08x)") ); + /* update subtree header */ + proto_item_append_text(sub_item, ": Elements: %u/%u VarType: %s", + u32Elements, u32BoundElements, + val_to_str(u32VarType, dcom_variant_type_vals, "Unknown (0x%08x)") ); proto_item_set_len(sub_item, u32VariableOffset - u32SubStart); @@ -1390,7 +1394,7 @@ dissect_dcom_VARIANT(tvbuff_t *tvb, int offset, packet_info *pinfo, break; case(WIRESHARK_VT_ARRAY): offset = dissect_dcom_SAFEARRAY(tvb, offset, pinfo, sub_tree, drep, - 0); + 0, NULL); break; case(WIRESHARK_VT_ERROR): offset = dissect_dcom_HRESULT(tvb, offset, pinfo, sub_tree, drep, |