diff options
author | Michael Mann <mmann78@netscape.net> | 2013-11-06 12:36:09 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-11-06 12:36:09 +0000 |
commit | 79cd3563fc10e0fd4a6c1ec7fa9f15a05fdc4315 (patch) | |
tree | 45fd3deaa992596f91e93af90461a454ca7c630a /epan/dissectors/pidl | |
parent | 5d50358868f2f9178f8d5b5eb2e431b6eefe2d26 (diff) |
Remove pinfo->private_data from DCERPC dissectors. Bug 9387 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9387)
This is the PIDL input file changes necessary to support removing pinfo->private_data from the DCERPC dissectors in favor of passing it through function parameters. I didn't regenerate the dissector source, so this is just a "good faith" effort to mimic the manual changes.
svn path=/trunk/; revision=53098
Diffstat (limited to 'epan/dissectors/pidl')
-rw-r--r-- | epan/dissectors/pidl/dnsserver.cnf | 20 | ||||
-rw-r--r-- | epan/dissectors/pidl/efs.cnf | 4 | ||||
-rw-r--r-- | epan/dissectors/pidl/eventlog.cnf | 31 | ||||
-rw-r--r-- | epan/dissectors/pidl/frsrpc.cnf | 21 | ||||
-rw-r--r-- | epan/dissectors/pidl/frstrans.cnf | 6 | ||||
-rw-r--r-- | epan/dissectors/pidl/initshutdown.cnf | 2 | ||||
-rw-r--r-- | epan/dissectors/pidl/lsa.cnf | 88 | ||||
-rw-r--r-- | epan/dissectors/pidl/mapi/mapi.cnf | 6 | ||||
-rw-r--r-- | epan/dissectors/pidl/mapi/request.cnf.c | 28 | ||||
-rw-r--r-- | epan/dissectors/pidl/mapi/response.cnf.c | 20 | ||||
-rw-r--r-- | epan/dissectors/pidl/misc.cnf | 6 | ||||
-rw-r--r-- | epan/dissectors/pidl/samr.cnf | 68 | ||||
-rw-r--r-- | epan/dissectors/pidl/srvsvc.cnf | 52 | ||||
-rw-r--r-- | epan/dissectors/pidl/winreg.cnf | 30 | ||||
-rw-r--r-- | epan/dissectors/pidl/wkssvc.cnf | 20 |
15 files changed, 180 insertions, 222 deletions
diff --git a/epan/dissectors/pidl/dnsserver.cnf b/epan/dissectors/pidl/dnsserver.cnf index 21bbda84e8..8797217003 100644 --- a/epan/dissectors/pidl/dnsserver.cnf +++ b/epan/dissectors/pidl/dnsserver.cnf @@ -16,18 +16,16 @@ CODE START #include "packet-smb-common.h" int -dnsserver_dissect_struct_DNS_RPC_NAME(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +dnsserver_dissect_struct_DNS_RPC_NAME(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) { proto_item *item = NULL; proto_tree *tree = NULL; int old_offset; - dcerpc_info *di = NULL; guint8 len; const char *dn; int dn_len = 0; guint16 bc; - di=(dcerpc_info *)pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; @@ -42,7 +40,7 @@ dnsserver_dissect_struct_DNS_RPC_NAME(tvbuff_t *tvb _U_, int offset _U_, packet_ tree = proto_item_add_subtree(item, ett_dnsserver_DNS_RPC_NAME); } - offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep, hf_dnsserver_DNS_RPC_NAME_NameLength, &len); + offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, di, drep, hf_dnsserver_DNS_RPC_NAME_NameLength, &len); bc = tvb_length_remaining(tvb, offset); dn = get_unicode_or_ascii_string(tvb, &offset, TRUE, &dn_len, TRUE, TRUE, &bc); @@ -61,34 +59,28 @@ dnsserver_dissect_struct_DNS_RPC_NAME(tvbuff_t *tvb _U_, int offset _U_, packet_ static guint16 node_record_count; static int -dnsserver_dissect_element_DNS_RPC_NODE_RecordCount(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +dnsserver_dissect_element_DNS_RPC_NODE_RecordCount(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - dcerpc_info *di = NULL; - - di=(dcerpc_info *)pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep, hf_dnsserver_DNS_RPC_NODE_RecordCount, &node_record_count); + offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, di, drep, hf_dnsserver_DNS_RPC_NODE_RecordCount, &node_record_count); return offset; } static int -dnsserver_dissect_element_DNS_RPC_NODE_records(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +dnsserver_dissect_element_DNS_RPC_NODE_records(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - dcerpc_info *di = NULL; - - di=(dcerpc_info *)pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } while(node_record_count--){ - offset = dnsserver_dissect_element_DNS_RPC_NODE_records_(tvb, offset, pinfo, tree, drep); + offset = dnsserver_dissect_element_DNS_RPC_NODE_records_(tvb, offset, pinfo, tree, di, drep); } return offset; diff --git a/epan/dissectors/pidl/efs.cnf b/epan/dissectors/pidl/efs.cnf index bc72a8b217..f3dc4a4d44 100644 --- a/epan/dissectors/pidl/efs.cnf +++ b/epan/dissectors/pidl/efs.cnf @@ -13,10 +13,8 @@ PARAM_VALUE efs_dissect_element_EfsRpcCloseRaw_pvContext_ PIDL_POLHND_CLOSE CODE START static int -efs_dissect_struct_dom_sid(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +efs_dissect_struct_dom_sid(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) { - dcerpc_info *di = (dcerpc_info *)pinfo->private_data; - if(di->conformant_run){ /* just a run to handle conformant arrays, no scalars to dissect */ return offset; diff --git a/epan/dissectors/pidl/eventlog.cnf b/epan/dissectors/pidl/eventlog.cnf index f60d4ed678..8385363078 100644 --- a/epan/dissectors/pidl/eventlog.cnf +++ b/epan/dissectors/pidl/eventlog.cnf @@ -34,36 +34,31 @@ PARAM_VALUE eventlog_dissect_element_CloseEventLog_handle_ PIDL_POLHND_CLO CODE START /* Add this one manually until we can compile LSA */ static int -eventlog_dissect_struct_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index,int notused _U_) +eventlog_dissect_struct_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index,int notused _U_) { - dcerpc_info *di; - - di=pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_counted_string(tvb, offset, pinfo, tree, di, drep, hf_index, 0); return offset; } static int -eventlog_dissect_element_ReadEventLogW_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +eventlog_dissect_element_ReadEventLogW_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint32 len; - dcerpc_info *di; tvbuff_t *record_tvb; - di=pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_eventlog_Record_length, &len); /* Create a new tvb so that we know that offset==0 is the beginning @@ -72,7 +67,7 @@ eventlog_dissect_element_ReadEventLogW_data_(tvbuff_t *tvb, int offset, packet_i * encoded therein. */ record_tvb=tvb_new_subset(tvb, offset, MIN((gint)len, tvb_length_remaining(tvb, offset)), len); - eventlog_dissect_struct_Record(record_tvb, 0, pinfo, tree, drep, hf_eventlog_Record, 0); + eventlog_dissect_struct_Record(record_tvb, 0, pinfo, tree, di, drep, hf_eventlog_Record, 0); offset+=len; return offset; @@ -83,18 +78,18 @@ eventlog_dissect_element_ReadEventLogW_data_(tvbuff_t *tvb, int offset, packet_i and we want to dissect the sid from the data blob */ static guint32 sid_length; static int -eventlog_dissect_element_Record_sid_length(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +eventlog_dissect_element_Record_sid_length(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { sid_length=0; - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_eventlog_eventlog_Record_sid_length,&sid_length); + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_sid_length,&sid_length); return offset; } static int -eventlog_dissect_element_Record_sid_offset(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +eventlog_dissect_element_Record_sid_offset(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint32 sid_offset=0; - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_eventlog_eventlog_Record_sid_offset,&sid_offset); + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_sid_offset,&sid_offset); if(sid_offset && sid_length){ tvbuff_t *sid_tvb; @@ -158,10 +153,10 @@ eventlog_dissect_element_Record_computer_name(tvbuff_t *tvb, int offset, packet_ static guint16 num_of_strings; static int -eventlog_dissect_element_Record_num_of_strings(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +eventlog_dissect_element_Record_num_of_strings(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { num_of_strings=0; - offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep, hf_eventlog_eventlog_Record_num_of_strings,&num_of_strings); + offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_num_of_strings,&num_of_strings); return offset; } @@ -169,10 +164,10 @@ eventlog_dissect_element_Record_num_of_strings(tvbuff_t *tvb, int offset, packet static guint32 string_offset; static int -eventlog_dissect_element_Record_stringoffset(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +eventlog_dissect_element_Record_stringoffset(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { string_offset=0; - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_eventlog_eventlog_Record_stringoffset,&string_offset); + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_stringoffset,&string_offset); return offset; } diff --git a/epan/dissectors/pidl/frsrpc.cnf b/epan/dissectors/pidl/frsrpc.cnf index 72d2754e46..fc45c63032 100644 --- a/epan/dissectors/pidl/frsrpc.cnf +++ b/epan/dissectors/pidl/frsrpc.cnf @@ -12,13 +12,12 @@ MANUAL frsrpc_dissect_struct_CommPktChunk CODE START static int -frsrpc_dissect_element_CommPktChangeOrderCommand_file_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +frsrpc_dissect_element_CommPktChangeOrderCommand_file_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - dcerpc_info *di = (dcerpc_info *)pinfo->private_data; int conformant = di->conformant_run; if (!conformant) { - guint32 soffset = dissect_null_term_wstring(tvb, offset, pinfo, tree, drep, hf_frsrpc_CommPktChangeOrderCommand_file_name, 0); + guint32 soffset = dissect_null_term_wstring(tvb, offset, pinfo, tree, di, drep, hf_frsrpc_CommPktChangeOrderCommand_file_name, 0); /* The difference has to be 4 due to the uint16 of the length + null terminator utf16*/ DISSECTOR_ASSERT(soffset - offset < 261); offset += 261; @@ -28,14 +27,13 @@ frsrpc_dissect_element_CommPktChangeOrderCommand_file_name(tvbuff_t *tvb _U_, in } int -frsrpc_dissect_struct_CommPktChunk(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +frsrpc_dissect_struct_CommPktChunk(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) { guint1632 type = 0; int i = 0; const char *s = NULL; proto_item *item = NULL; proto_tree *tree = NULL; - dcerpc_info *di = (dcerpc_info *)pinfo->private_data; int old_offset; @@ -46,9 +44,9 @@ frsrpc_dissect_struct_CommPktChunk(tvbuff_t *tvb _U_, int offset _U_, packet_inf tree = proto_item_add_subtree(item, ett_frsrpc_frsrpc_CommPktChunk); } - offset = frsrpc_dissect_element_CommPktChunk_type(tvb, offset, pinfo, tree, drep, &type); + offset = frsrpc_dissect_element_CommPktChunk_type(tvb, offset, pinfo, tree, di, drep, &type); - offset = frsrpc_dissect_element_CommPktChunk_data(tvb, offset, pinfo, tree, drep, &type); + offset = frsrpc_dissect_element_CommPktChunk_data(tvb, offset, pinfo, tree, di, drep, &type); for (i=0; frsrpc_frsrpc_CommPktChunkType_vals[i].strptr; i++) { if (frsrpc_frsrpc_CommPktChunkType_vals[i].value == type) { @@ -69,7 +67,7 @@ frsrpc_dissect_struct_CommPktChunk(tvbuff_t *tvb _U_, int offset _U_, packet_inf } int -frsrpc_dissect_enum_CommPktCommand(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_) +frsrpc_dissect_enum_CommPktCommand(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_) { guint32 parameter=0; int i = 0; @@ -77,7 +75,7 @@ frsrpc_dissect_enum_CommPktCommand(tvbuff_t *tvb _U_, int offset _U_, packet_inf if(param){ parameter=(guint32)*param; } - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, ¶meter); + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, ¶meter); for (i=0; frsrpc_frsrpc_CommPktCommand_vals[i].strptr != NULL; i++) { if (frsrpc_frsrpc_CommPktCommand_vals[i].value == parameter) { @@ -96,11 +94,10 @@ frsrpc_dissect_enum_CommPktCommand(tvbuff_t *tvb _U_, int offset _U_, packet_inf static int -frsrpc_dissect_struct_frsrpc_CommPktChunkCtr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep _U_, int hf_index, guint32 param _U_) +frsrpc_dissect_struct_frsrpc_CommPktChunkCtr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep _U_, int hf_index, guint32 param _U_) { guint32 nb_chunk = 0; guint32 remaining = tvb_length_remaining(tvb, offset); - dcerpc_info *di = (dcerpc_info *)pinfo->private_data; int align_status = di->no_align; if (remaining > 0) { @@ -108,7 +105,7 @@ frsrpc_dissect_struct_frsrpc_CommPktChunkCtr(tvbuff_t *tvb, int offset, packet_i proto_tree *subtree = proto_item_add_subtree(item, ett_ChunkCtr); di->no_align = 1; for(nb_chunk = 0; remaining > 0; nb_chunk++) { - offset = frsrpc_dissect_struct_CommPktChunk(tvb, offset, pinfo, subtree, drep, hf_CommPktChunk, param); + offset = frsrpc_dissect_struct_CommPktChunk(tvb, offset, pinfo, subtree, di, drep, hf_CommPktChunk, param); remaining = tvb_length_remaining(tvb, offset); } di->no_align = align_status; diff --git a/epan/dissectors/pidl/frstrans.cnf b/epan/dissectors/pidl/frstrans.cnf index aae0a738fb..a161377623 100644 --- a/epan/dissectors/pidl/frstrans.cnf +++ b/epan/dissectors/pidl/frstrans.cnf @@ -1,13 +1,13 @@ # Conformance file for DFS-R / FRSTRANS -TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 +TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 CODE START static int -cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 param _U_, int hfindex) +cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, guint32 param _U_, int hfindex) { - offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, drep, hfindex, NULL); + offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, hfindex, NULL); return offset; } diff --git a/epan/dissectors/pidl/initshutdown.cnf b/epan/dissectors/pidl/initshutdown.cnf index 82949185a3..07266f0c3f 100644 --- a/epan/dissectors/pidl/initshutdown.cnf +++ b/epan/dissectors/pidl/initshutdown.cnf @@ -1 +1 @@ -TYPE lsa_StringLarge "offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL
+TYPE lsa_StringLarge "offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, di, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL
diff --git a/epan/dissectors/pidl/lsa.cnf b/epan/dissectors/pidl/lsa.cnf index 9637035ce7..2f19a89203 100644 --- a/epan/dissectors/pidl/lsa.cnf +++ b/epan/dissectors/pidl/lsa.cnf @@ -21,9 +21,9 @@ PARAM_VALUE lsarpc_dissect_element_lsa_CloseTrustedDomainEx_handle_ PIDL_POLHND_ -TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 +TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 -TYPE sec_desc_buf "offset=cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep);" FT_NONE BASE_NONE 0 NULL 4 +TYPE sec_desc_buf "offset=cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep);" FT_NONE BASE_NONE 0 NULL 4 HF_FIELD hf_lsarpc_sec_desc_buf_len "Sec Desc Buf Len" "lsarpc.sec_desc_buf_len" FT_UINT32 BASE_DEC NULL 0 "" "" "" @@ -133,43 +133,43 @@ struct access_mask_info lsarpc_domain_access_mask_info = { }; int -lsarpc_dissect_bitmap_lsa_PolicyAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +lsarpc_dissect_bitmap_lsa_PolicyAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_lsarpc_policy_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_lsarpc_policy_access_mask, &lsarpc_policy_access_mask_info, NULL); return offset; } int -lsarpc_dissect_bitmap_lsa_AccountAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +lsarpc_dissect_bitmap_lsa_AccountAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_lsarpc_account_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_lsarpc_account_access_mask, &lsarpc_account_access_mask_info, NULL); return offset; } int -lsarpc_dissect_bitmap_lsa_SecretAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +lsarpc_dissect_bitmap_lsa_SecretAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_lsarpc_secret_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_lsarpc_secret_access_mask, &lsarpc_secret_access_mask_info, NULL); return offset; } int -lsarpc_dissect_bitmap_lsa_DomainAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +lsarpc_dissect_bitmap_lsa_DomainAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_lsarpc_domain_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_lsarpc_domain_access_mask, &lsarpc_domain_access_mask_info, NULL); return offset; } static int -cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint32 len; dcerpc_info *di = NULL; @@ -178,13 +178,12 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t guint32 type=0; struct access_mask_info *ami=NULL; - di=(dcerpc_info*)pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_lsarpc_sec_desc_buf_len, &len); dcv = (dcerpc_call_value *)di->call_data; @@ -218,21 +217,19 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t } static int -cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint32 len; - dcerpc_info *di; - di=(dcerpc_info*)pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_lsarpc_sec_desc_buf_len, &len); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE, "LSA SECURITY DESCRIPTOR data:", -1); @@ -241,27 +238,27 @@ cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr int -lsarpc_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep){ - return cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep); +lsarpc_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep){ + return cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep); } int -lsarpc_dissect_struct_security_descriptor(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int unused1 _U_, int unused2 _U_){ - return cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep); +lsarpc_dissect_struct_security_descriptor(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_, int unused1 _U_, int unused2 _U_){ + return cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep); } int -lsarpc_dissect_struct_dom_sid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int unused1 _U_, int unused2 _U_) { +lsarpc_dissect_struct_dom_sid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_, int unused1 _U_, int unused2 _U_) { /* sid */ - return dissect_ndr_nt_SID(tvb, offset, pinfo, tree, drep); + return dissect_ndr_nt_SID(tvb, offset, pinfo, tree, di, drep); } static int -cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 param _U_, int hfindex) +cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, guint32 param _U_, int hfindex) { - offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, drep, hfindex, NULL); + offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, hfindex, NULL); return offset; } @@ -269,11 +266,10 @@ cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre # PIDL cant handle top level arrays so we must explicitely go through a # ref pointer here static int -lsarpc_dissect_element_lsa_LookupNames3_names_X(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_LookupNames3_names_X(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di, guint8 *drep _U_) { proto_item *item = NULL; proto_tree *tree = NULL; - dcerpc_info *di = NULL; int old_offset = offset; if (parent_tree) { @@ -281,39 +277,37 @@ lsarpc_dissect_element_lsa_LookupNames3_names_X(tvbuff_t *tvb _U_, int offset _U tree = proto_item_add_subtree(item, ett_lsarpc_names); } - di=(dcerpc_info*)pinfo->private_data; - - offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, lsarpc_dissect_element_lsa_LookupNames3_names_); + offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, di, drep, lsarpc_dissect_element_lsa_LookupNames3_names_); proto_item_set_len(item, offset-old_offset); return offset; } static int -lsarpc_dissect_element_lsa_LookupNames_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_LookupNames_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); + offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); return offset; } static int -lsarpc_dissect_element_lsa_LookupNames2_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_LookupNames2_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); + offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); return offset; } static int -lsarpc_dissect_element_lsa_LookupNames3_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_LookupNames3_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); + offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); return offset; } static int -lsarpc_dissect_element_lsa_LookupNames4_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_LookupNames4_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); + offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, lsarpc_dissect_element_lsa_LookupNames3_names_X, NDR_POINTER_REF, "Pointer to Names", hf_lsarpc_names); return offset; } @@ -326,11 +320,11 @@ lsarpc_dissect_element_lsa_String_string__(tvbuff_t *tvb _U_, int offset _U_, pa } static int -lsarpc_dissect_element_lsa_String_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_String_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { char *data; - offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_lsarpc_String_name, FALSE, &data); + offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_lsarpc_String_name, FALSE, &data); proto_item_append_text(tree, ": %s", data); return offset; @@ -343,11 +337,11 @@ lsarpc_dissect_element_lsa_StringLarge_string__(tvbuff_t *tvb _U_, int offset _U } static int -lsarpc_dissect_element_lsa_StringLarge_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_StringLarge_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { char *data; - offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_lsarpc_String_name, FALSE, &data); + offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_lsarpc_String_name, FALSE, &data); proto_item_append_text(tree, ": %s", data); return offset; @@ -356,23 +350,19 @@ lsarpc_dissect_element_lsa_StringLarge_string_(tvbuff_t *tvb _U_, int offset _U_ static int -lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) { - dcerpc_info *di = NULL; tvbuff_t *next_tvb; gint len, reported_len; dissector_handle_t efsblob_handle; - di=(dcerpc_info*)pinfo->private_data; - - if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_lsarpc_efs_blob_len, &reported_len); len = reported_len; diff --git a/epan/dissectors/pidl/mapi/mapi.cnf b/epan/dissectors/pidl/mapi/mapi.cnf index ed1a8c66a0..7a4bf3dbed 100644 --- a/epan/dissectors/pidl/mapi/mapi.cnf +++ b/epan/dissectors/pidl/mapi/mapi.cnf @@ -71,9 +71,9 @@ TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, drep, @PARAM@, @H CODE START static int -cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 param _U_, int hfindex) +cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, guint32 param _U_, int hfindex) { - offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, drep, hfindex, NULL); + offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, hfindex, NULL); return offset; } @@ -82,7 +82,7 @@ cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre /** * Analyze mapi_request MAPI Handles */ -static int mapi_dissect_element_request_handles(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +static int mapi_dissect_element_request_handles(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) { gint reported_len; gint i; diff --git a/epan/dissectors/pidl/mapi/request.cnf.c b/epan/dissectors/pidl/mapi/request.cnf.c index b92e258848..f3dca6e983 100644 --- a/epan/dissectors/pidl/mapi/request.cnf.c +++ b/epan/dissectors/pidl/mapi/request.cnf.c @@ -36,7 +36,7 @@ MANUAL mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenMsgStore CODE START int -mapi_dissect_struct_EcDoRpc_MAPI_REQ(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +mapi_dissect_struct_EcDoRpc_MAPI_REQ(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) { proto_item *item = NULL; proto_tree *tree = NULL; @@ -72,16 +72,16 @@ mapi_dissect_struct_EcDoRpc_MAPI_REQ(tvbuff_t *tvb _U_, int offset _U_, packet_i switch(opnum) { case op_MAPI_Release: - offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_Release(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_Release(tvb, offset, pinfo, tree, di, drep); break; case op_MAPI_OpenFolder: - offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenFolder(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenFolder(tvb, offset, pinfo, tree, di, drep); break; case op_MAPI_GetProps: - offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_GetProps(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_GetProps(tvb, offset, pinfo, tree, di, drep); break; case op_MAPI_OpenMsgStore: - offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenMsgStore(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenMsgStore(tvb, offset, pinfo, tree, di, drep); break; default: offset += param - 3; @@ -93,16 +93,16 @@ mapi_dissect_struct_EcDoRpc_MAPI_REQ(tvbuff_t *tvb _U_, int offset _U_, packet_i } static int -mapi_dissect_element_EcDoRpc_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +mapi_dissect_element_EcDoRpc_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) { - offset = mapi_dissect_element_EcDoRpc_request_(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_request_(tvb, offset, pinfo, tree, di, drep); return offset; } static int -mapi_dissect_element_EcDoRpc_request_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +mapi_dissect_element_EcDoRpc_request_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) { guint32 size; int start_offset = offset; @@ -115,7 +115,7 @@ mapi_dissect_element_EcDoRpc_request_(tvbuff_t *tvb _U_, int offset _U_, packet_ proto_item *it = NULL; proto_tree *tr = NULL; - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_mapi_EcDoRpc_mapi_request, &size); + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_mapi_EcDoRpc_mapi_request, &size); proto_tree_add_text(tree, tvb, start_offset, offset - start_offset + size, "Subcontext size: 0x%x", size); reported_len = tvb_reported_length_remaining(tvb, offset); @@ -147,10 +147,10 @@ mapi_dissect_element_EcDoRpc_request_(tvbuff_t *tvb _U_, int offset _U_, packet_ proto_tree_add_item(tr, hf_mapi_decrypted_data, decrypted_tvb, 2, pdu_len - 2, FALSE); /* analyze contents */ - offset = mapi_dissect_element_EcDoRpc_request__(decrypted_tvb, 0, pinfo, tr, drep); + offset = mapi_dissect_element_EcDoRpc_request__(decrypted_tvb, 0, pinfo, tr, di, drep); /* analyze mapi handles */ - offset = mapi_dissect_element_request_handles(decrypted_tvb, offset, pinfo, tr, drep); + offset = mapi_dissect_element_request_handles(decrypted_tvb, offset, pinfo, tr, di, drep); /* append ptr size (4) */ return start_offset + offset + 4; @@ -160,7 +160,7 @@ mapi_dissect_element_EcDoRpc_request_(tvbuff_t *tvb _U_, int offset _U_, packet_ /* * Analyze mapi_request real contents */ -static int mapi_dissect_element_EcDoRpc_request__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +static int mapi_dissect_element_EcDoRpc_request__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) { guint16 length; @@ -176,7 +176,7 @@ static int mapi_dissect_element_EcDoRpc_request__(tvbuff_t *tvb _U_, int offset int -mapi_dissect_struct_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +mapi_dissect_struct_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) { proto_item *item = NULL; proto_tree *tree = NULL; @@ -186,7 +186,7 @@ mapi_dissect_struct_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinf tree = proto_item_add_subtree(item, ett_mapi_mapi_request); } - offset = mapi_dissect_struct_EcDoRpc_MAPI_REQ(tvb, offset, pinfo, tree, drep, hf_mapi_mapi_request_mapi_req, 0); + offset = mapi_dissect_struct_EcDoRpc_MAPI_REQ(tvb, offset, pinfo, tree, di, drep, hf_mapi_mapi_request_mapi_req, 0); return offset; } diff --git a/epan/dissectors/pidl/mapi/response.cnf.c b/epan/dissectors/pidl/mapi/response.cnf.c index 14bb799682..a525557364 100644 --- a/epan/dissectors/pidl/mapi/response.cnf.c +++ b/epan/dissectors/pidl/mapi/response.cnf.c @@ -38,7 +38,7 @@ MANUAL mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_GetProps CODE START static int -mapi_dissect_struct_EcDoRpc_MAPI_REPL(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +mapi_dissect_struct_EcDoRpc_MAPI_REPL(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) { proto_item *item = NULL; proto_tree *tree = NULL; @@ -76,16 +76,16 @@ mapi_dissect_struct_EcDoRpc_MAPI_REPL(tvbuff_t *tvb _U_, int offset _U_, packet_ if (retval == MAPI_E_SUCCESS) { switch(opnum) { case op_MAPI_Release: - offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_Release(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_Release(tvb, offset, pinfo, tree, di, drep); break; case op_MAPI_OpenFolder: - offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_OpenFolder(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_OpenFolder(tvb, offset, pinfo, tree, di, drep); break; case op_MAPI_GetProps: - offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_GetProps(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_GetProps(tvb, offset, pinfo, tree, di, drep); break; /* case op_MAPI_OpenMsgStore: */ -/* offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_OpenMsgStore(tvb, offset, pinfo, tree, drep); */ +/* offset = mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_OpenMsgStore(tvb, offset, pinfo, tree, di, drep); */ /* break; */ default: offset += param - 6; @@ -102,16 +102,16 @@ mapi_dissect_struct_EcDoRpc_MAPI_REPL(tvbuff_t *tvb _U_, int offset _U_, packet_ } static int -mapi_dissect_element_EcDoRpc_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +mapi_dissect_element_EcDoRpc_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) { - offset = mapi_dissect_element_EcDoRpc_response_(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_EcDoRpc_response_(tvb, offset, pinfo, tree, di, drep); return offset; } static int -mapi_dissect_element_EcDoRpc_response_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +mapi_dissect_element_EcDoRpc_response_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) { guint32 size; int start_offset = offset; @@ -165,7 +165,7 @@ mapi_dissect_element_EcDoRpc_response_(tvbuff_t *tvb _U_, int offset _U_, packet static int -mapi_dissect_element_EcDoRpc_response__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +mapi_dissect_element_EcDoRpc_response__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) { guint16 length; tvbuff_t *subtvb; @@ -263,7 +263,7 @@ mapi_dissect_element_EcDoRpc_MAPI_REPL_UNION_OpenMsgStore(tvbuff_t *tvb _U_, int tree = proto_item_add_subtree(item, ett_mapi_OpenMsgStore_repl); } - offset = mapi_dissect_element_OpenMsgStore_repl_PR_OBJECT_TYPE(tvb, offset, pinfo, tree, drep); + offset = mapi_dissect_element_OpenMsgStore_repl_PR_OBJECT_TYPE(tvb, offset, pinfo, tree, di, drep); proto_item_set_len(item, offset - origin_offset); diff --git a/epan/dissectors/pidl/misc.cnf b/epan/dissectors/pidl/misc.cnf index 572bacfde4..8edd310351 100644 --- a/epan/dissectors/pidl/misc.cnf +++ b/epan/dissectors/pidl/misc.cnf @@ -4,7 +4,7 @@ MANUAL misc_dissect_element_winreg_Data_string CODE START
static int
-misc_dissect_element_winreg_Data_string(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
+misc_dissect_element_winreg_Data_string(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
offset = dissect_null_term_wstring(tvb, offset, pinfo, tree, drep, hf_misc_winreg_Data_string , 0);
@@ -12,9 +12,9 @@ misc_dissect_element_winreg_Data_string(tvbuff_t *tvb _U_, int offset _U_, packe }
static int
-misc_dissect_element_winreg_Data_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
+misc_dissect_element_winreg_Data_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_)
{
- offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_misc_winreg_Data_value, 0);
+ offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_misc_winreg_Data_value, 0);
return offset;
}
diff --git a/epan/dissectors/pidl/samr.cnf b/epan/dissectors/pidl/samr.cnf index 5e865fd70a..7ac2fafbe2 100644 --- a/epan/dissectors/pidl/samr.cnf +++ b/epan/dissectors/pidl/samr.cnf @@ -150,21 +150,21 @@ PARAM_VALUE samr_dissect_element_GetDomPwInfo_domain_name_ 3|PIDL_SET_COL_INFO PARAM_VALUE samr_dissect_element_CreateUser_account_name_ 3|PIDL_SET_COL_INFO|PIDL_STR_SAVE PARAM_VALUE samr_dissect_element_CreateUser2_account_name_ 3|PIDL_SET_COL_INFO|PIDL_STR_SAVE -TYPE lsa_String "offset=dissect_ndr_lsa_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 -TYPE lsa_AsciiString "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 -TYPE lsa_StringLarge "offset=dissect_ndr_lsa_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 -TYPE lsa_AsciiStringLarge "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 -TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 +TYPE lsa_String "offset=dissect_ndr_lsa_String(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 +TYPE lsa_AsciiString "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 +TYPE lsa_StringLarge "offset=dissect_ndr_lsa_String(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 +TYPE lsa_AsciiStringLarge "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 +TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 -TYPE sec_desc_buf "offset=cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep);" FT_NONE BASE_NONE 0 NULL 4 +TYPE sec_desc_buf "offset=cnf_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep);" FT_NONE BASE_NONE 0 NULL 4 HF_FIELD hf_samr_sec_desc_buf_len "Sec Desc Buf Len" "samr.sec_desc_buf_len" FT_UINT32 BASE_DEC NULL 0 "" "" "" -TYPE dom_sid2 "offset=cnf_dissect_dom_sid2(tvb, offset, pinfo, tree, drep);" FT_NONE BASE_NONE 0 NULL 4 +TYPE dom_sid2 "offset=cnf_dissect_dom_sid2(tvb, offset, pinfo, tree, di, drep);" FT_NONE BASE_NONE 0 NULL 4 -TYPE lsa_SidArray "offset=cnf_dissect_lsa_SidArray(tvb, offset, pinfo, tree, drep);" FT_NONE BASE_NONE 0 NULL 4 +TYPE lsa_SidArray "offset=cnf_dissect_lsa_SidArray(tvb, offset, pinfo, tree, di, drep);" FT_NONE BASE_NONE 0 NULL 4 -TYPE security_secinfo "offset=cnf_dissect_samr_security_secinfo(tvb, offset, pinfo, tree, drep);" FT_NONE BASE_NONE 0 NULL 4 +TYPE security_secinfo "offset=cnf_dissect_samr_security_secinfo(tvb, offset, pinfo, tree, di, drep);" FT_NONE BASE_NONE 0 NULL 4 # # ConnectX access masks @@ -227,10 +227,10 @@ struct access_mask_info samr_connect_access_mask_info = { }; int -samr_dissect_bitmap_ConnectAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +samr_dissect_bitmap_ConnectAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_samr_connect_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_samr_connect_access_mask, &samr_connect_access_mask_info, NULL); return offset; } @@ -254,10 +254,10 @@ struct access_mask_info samr_alias_access_mask_info = { }; int -samr_dissect_bitmap_AliasAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +samr_dissect_bitmap_AliasAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_samr_alias_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_samr_alias_access_mask, &samr_alias_access_mask_info, NULL); return offset; } @@ -281,10 +281,10 @@ struct access_mask_info samr_group_access_mask_info = { }; int -samr_dissect_bitmap_GroupAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +samr_dissect_bitmap_GroupAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_samr_group_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_samr_group_access_mask, &samr_group_access_mask_info, NULL); return offset; } @@ -314,10 +314,10 @@ struct access_mask_info samr_domain_access_mask_info = { }; int -samr_dissect_bitmap_DomainAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +samr_dissect_bitmap_DomainAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_samr_domain_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_samr_domain_access_mask, &samr_domain_access_mask_info, NULL); return offset; } @@ -347,28 +347,28 @@ struct access_mask_info samr_user_access_mask_info = { }; int -samr_dissect_bitmap_UserAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +samr_dissect_bitmap_UserAccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_samr_user_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_samr_user_access_mask, &samr_user_access_mask_info, NULL); return offset; } static int -cnf_dissect_lsa_AsciiString(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 param _U_, int hfindex) +cnf_dissect_lsa_AsciiString(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, guint32 param _U_, int hfindex) { - offset = dissect_ndr_counted_ascii_string(tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_counted_ascii_string(tvb, offset, pinfo, tree, di, drep, hfindex, 0); return offset; } static int -cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 param _U_, int hfindex) +cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, guint32 param _U_, int hfindex) { - offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, drep, hfindex, NULL); + offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, hfindex, NULL); return offset; } @@ -377,7 +377,7 @@ cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre static int -cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint64 len; dcerpc_info *di = NULL; @@ -386,14 +386,12 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t guint32 type=0; struct access_mask_info *ami=NULL; - di=(dcerpc_info*)pinfo->private_data; - if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, di, drep, hf_samr_sec_desc_buf_len, &len); dcv = (dcerpc_call_value *)di->call_data; @@ -430,21 +428,19 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t } static int -cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint64 len; - dcerpc_info *di; - di=(dcerpc_info*)pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, di, drep, hf_samr_sec_desc_buf_len, &len); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE, "SAM SECURITY DESCRIPTOR data:", -1); @@ -454,17 +450,17 @@ cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr static int -cnf_dissect_dom_sid2(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +cnf_dissect_dom_sid2(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - offset = dissect_ndr_nt_SID(tvb, offset, pinfo, tree, drep); + offset = dissect_ndr_nt_SID(tvb, offset, pinfo, tree, di, drep); return offset; } static int -cnf_dissect_lsa_SidArray(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +cnf_dissect_lsa_SidArray(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - offset = dissect_ndr_nt_PSID_ARRAY(tvb, offset, pinfo, tree, drep); + offset = dissect_ndr_nt_PSID_ARRAY(tvb, offset, pinfo, tree, di, drep); return offset; } diff --git a/epan/dissectors/pidl/srvsvc.cnf b/epan/dissectors/pidl/srvsvc.cnf index 55378a6e8e..2985e5ba7e 100644 --- a/epan/dissectors/pidl/srvsvc.cnf +++ b/epan/dissectors/pidl/srvsvc.cnf @@ -41,18 +41,16 @@ CODE START #include "packet-smb-browse.h" static int -srvsvc_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint32 len; - dcerpc_info *di; - di=pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_srvsvc_sec_desc_buf_len, &len); dissect_nt_sec_desc(tvb, offset, pinfo, tree, drep, TRUE, len, @@ -63,39 +61,36 @@ srvsvc_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto return offset; } static int -srvsvc_dissect_element_NetShareInfo_info1501_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetShareInfo_info1501_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_element_NetGetFileSecurity_sd_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetGetFileSecurity_sd_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_element_NetSetFileSecurity_sd_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetSetFileSecurity_sd_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_element_NetShareCtr1501_array__(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetShareCtr1501_array__(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_element_NetShareInfo502_sd_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetShareInfo502_sd_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_sec_desc_buf(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_ServerType(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_ServerType(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - dcerpc_info *di; - - di=pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; @@ -107,23 +102,20 @@ srvsvc_dissect_ServerType(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t return offset; } static int -srvsvc_dissect_element_NetSrvInfo101_server_type(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetSrvInfo101_server_type(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_ServerType(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_ServerType(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_element_NetSrvInfo102_server_type(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetSrvInfo102_server_type(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_ServerType(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_ServerType(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_secinfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep _U_) +srvsvc_dissect_secinfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep _U_) { - dcerpc_info *di; - - di=pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; @@ -134,14 +126,14 @@ srvsvc_dissect_secinfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree return offset; } static int -srvsvc_dissect_element_NetGetFileSecurity_securityinformation(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetGetFileSecurity_securityinformation(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_secinfo(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_secinfo(tvb, offset, pinfo, tree, di, drep); } static int -srvsvc_dissect_element_NetSetFileSecurity_securityinformation(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +srvsvc_dissect_element_NetSetFileSecurity_securityinformation(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { - return srvsvc_dissect_secinfo(tvb, offset, pinfo, tree, drep); + return srvsvc_dissect_secinfo(tvb, offset, pinfo, tree, di, drep); } CODE END diff --git a/epan/dissectors/pidl/winreg.cnf b/epan/dissectors/pidl/winreg.cnf index 9ffefcaf65..622597e0ab 100644 --- a/epan/dissectors/pidl/winreg.cnf +++ b/epan/dissectors/pidl/winreg.cnf @@ -1,6 +1,6 @@ -TYPE lsa_StringLarge "offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL -TYPE winreg_Type "offset=misc_dissect_enum_winreg_Type(tvb, offset, pinfo, tree, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL -IMPORT security_secinfo offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL); +TYPE lsa_StringLarge "offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, di, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL +TYPE winreg_Type "offset=misc_dissect_enum_winreg_Type(tvb, offset, pinfo, tree, di, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL +IMPORT security_secinfo offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL); # @@ -101,7 +101,7 @@ PARAM_VALUE winreg_dissect_element_CloseKey_handle_ PIDL_POLHND_CLOSE # # Create a new type to handle winreg_String so that we can get nice and # pretty dissection of the strings contained within winreg -TYPE winreg_String "offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 +TYPE winreg_String "offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 # # # @@ -157,23 +157,21 @@ struct access_mask_info winreg_access_mask_info = { }; static int -winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep) { guint32 len; - dcerpc_info *di; - di=(dcerpc_info*)pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } /* this is a varying and conformant array */ - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_winreg_sd_max_size, NULL); - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_winreg_sd_offset, NULL); - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_winreg_sd_actual_size, &len); dissect_nt_sec_desc(tvb, offset, pinfo, tree, drep, TRUE, len, @@ -185,10 +183,10 @@ winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb, int offset, packet_i } int -winreg_dissect_bitmap_AccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +winreg_dissect_bitmap_AccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { offset = dissect_nt_access_mask( - tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, + tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, &winreg_access_mask_info, NULL); return offset; } @@ -201,7 +199,7 @@ winreg_dissect_bitmap_AccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, * } winreg_String; */ static int -cnf_dissect_winreg_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, guint32 param, int hfindex) +cnf_dissect_winreg_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info* di, guint8 *drep, guint32 param, int hfindex) { proto_item *item = NULL; proto_tree *tree = NULL; @@ -218,12 +216,12 @@ cnf_dissect_winreg_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t tree = proto_item_add_subtree(item, ett_winreg_winreg_String); } - offset = winreg_dissect_element_String_name_len(tvb, offset, pinfo, tree, drep); + offset = winreg_dissect_element_String_name_len(tvb, offset, pinfo, tree, di, drep); - offset = winreg_dissect_element_String_name_size(tvb, offset, pinfo, tree, drep); + offset = winreg_dissect_element_String_name_size(tvb, offset, pinfo, tree, di, drep); offset = dissect_ndr_pointer_cb( - tvb, offset, pinfo, tree, drep, + tvb, offset, pinfo, tree, di, drep, dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE, hf_info->name, hfindex, cb_wstr_postprocess, GINT_TO_POINTER(param)); diff --git a/epan/dissectors/pidl/wkssvc.cnf b/epan/dissectors/pidl/wkssvc.cnf index 3b94423f67..556230871b 100644 --- a/epan/dissectors/pidl/wkssvc.cnf +++ b/epan/dissectors/pidl/wkssvc.cnf @@ -32,21 +32,21 @@ PARAM_VALUE wkssvc_dissect_element_NetWkstaInfo102_domain_name_ 5 PARAM_VALUE wkssvc_dissect_element_NetWkstaTransportEnum_server_name_ 1|PIDL_SET_COL_INFO -TYPE lsa_String "offset=cnf_dissect_lsa_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 -TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 +TYPE lsa_String "offset=cnf_dissect_lsa_String(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 +TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, di, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 CODE START /* Bug in pidl. Can not handle these dependencies properly yet */ static int -wkssvc_dissect_struct_srvsvc_PlatformId(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_) +wkssvc_dissect_struct_srvsvc_PlatformId(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_) { - offset = srvsvc_dissect_enum_PlatformId(tvb,offset,pinfo,tree,drep,hf_wkssvc_platform_id,0); + offset = srvsvc_dissect_enum_PlatformId(tvb,offset,pinfo,tree,di,drep,hf_wkssvc_platform_id,0); return offset; } static int -cnf_dissect_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, guint32 param, int hfindex) +cnf_dissect_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info* di, guint8 *drep, guint32 param, int hfindex) { proto_item *item = NULL; proto_tree *tree = NULL; @@ -63,11 +63,11 @@ cnf_dissect_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree tree = proto_item_add_subtree(item, ett_wkssvc_lsa_String); } - offset = wkssvc_dissect_element_lsa_String_name_len(tvb, offset, pinfo, tree, drep); - offset = wkssvc_dissect_element_lsa_String_name_size(tvb, offset, pinfo, tree, drep); + offset = wkssvc_dissect_element_lsa_String_name_len(tvb, offset, pinfo, tree, di, drep); + offset = wkssvc_dissect_element_lsa_String_name_size(tvb, offset, pinfo, tree, di, drep); offset = dissect_ndr_pointer_cb( - tvb, offset, pinfo, tree, drep, + tvb, offset, pinfo, tree, di, drep, dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE, hf_info->name, hfindex, cb_wstr_postprocess, GINT_TO_POINTER(param)); @@ -78,9 +78,9 @@ cnf_dissect_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree } static int -cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 param _U_, int hfindex) +cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, guint32 param _U_, int hfindex) { - offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, drep, hfindex, NULL); + offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, hfindex, NULL); return offset; } |