diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-03-15 08:26:21 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-03-15 08:26:21 +0000 |
commit | 5dd314e53a7a852866bb01de5e876573fc283c8c (patch) | |
tree | af45d3af5f3bc42321e205ff75c0cea96d7b1573 /epan | |
parent | beeb757f613aa8543c0589c2fa7c5a1c41cf1e57 (diff) |
lookupnames2 takes a different sid structure compared to lookupnames
update it to dissect it as such and create new helpers for the new structure that takes one extra guint32 at the end of the previous structure.
svn path=/trunk/; revision=17632
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-dcerpc-lsa.c | 63 |
1 files changed, 61 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dcerpc-lsa.c b/epan/dissectors/packet-dcerpc-lsa.c index a933db15ca..16021a8b0e 100644 --- a/epan/dissectors/packet-dcerpc-lsa.c +++ b/epan/dissectors/packet-dcerpc-lsa.c @@ -2475,6 +2475,65 @@ lsa_dissect_LSA_TRANSLATED_SIDS(tvbuff_t *tvb, int offset, } static int +lsa_dissect_LSA_TRANSLATED_SID2(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + /* sid type */ + offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, + hf_lsa_sid_type, NULL); + + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + hf_lsa_rid, NULL); + + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + hf_lsa_index, NULL); + + /* unknown */ + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + hf_lsa_unknown_long, NULL); + + return offset; +} + +static int +lsa_dissect_LSA_TRANSLATED_SIDS2_array(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, + lsa_dissect_LSA_TRANSLATED_SID2); + + return offset; +} + +static int +lsa_dissect_LSA_TRANSLATED_SIDS2(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *parent_tree, guint8 *drep) +{ + proto_item *item=NULL; + proto_tree *tree=NULL; + int old_offset=offset; + + if(parent_tree){ + item = proto_tree_add_text(parent_tree, tvb, offset, -1, + "LSA_TRANSLATED_SIDS:"); + tree = proto_item_add_subtree(item, ett_LSA_TRANSLATED_SIDS); + } + + /* count */ + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + hf_lsa_count, NULL); + + /* settings */ + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + lsa_dissect_LSA_TRANSLATED_SIDS2_array, NDR_POINTER_UNIQUE, + "Translated SIDS", -1); + + proto_item_set_len(item, offset-old_offset); + return offset; +} + + +static int lsa_dissect_lsarlookupnames_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -2493,7 +2552,7 @@ lsa_dissect_lsarlookupnames_rqst(tvbuff_t *tvb, int offset, /* [in, out, ref] LSA_TRANSLATED_SIDS *rids */ offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - lsa_dissect_LSA_TRANSLATED_SIDS, NDR_POINTER_REF, + lsa_dissect_LSA_TRANSLATED_SIDS2, NDR_POINTER_REF, "LSA_TRANSLATED_SIDS pointer: rids", -1); /* [in] USHORT level */ @@ -2519,7 +2578,7 @@ lsa_dissect_lsarlookupnames_reply(tvbuff_t *tvb, int offset, /* [in, out, ref] LSA_TRANSLATED_SIDS *rids */ offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - lsa_dissect_LSA_TRANSLATED_SIDS, NDR_POINTER_REF, + lsa_dissect_LSA_TRANSLATED_SIDS2, NDR_POINTER_REF, "LSA_TRANSLATED_SIDS pointer: rids", -1); /* [in, out, ref] ULONG *num_mapped */ |