aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-24Replace DISSECTOR_ASSERT(hfinfo->type == FT_STRING) with ↵Guy Harris1-2/+2
DISSECTOR_ASSERT_FIELD_TYPE. That produces better error messages, giving the name of the offending field. Change-Id: I155ac29c68ecd7811cc9752980db9cdc37fea72e Reviewed-on: https://code.wireshark.org/review/23685 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-09packet-dcerpc: move auth information into a subtreeStefan Metzmacher1-0/+31
Change-Id: I0e5d3967a26b79c899b0d219317e2963969cba6b Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/17809 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-09packet-dcerpc: improve the dissection of DCERPC Fault pdusStefan Metzmacher1-16/+56
Change-Id: I70786cc561d248529167445e12190159d818ebcb Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/17811 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-07-06Ensure expert info fields have a summary.D. Ulis1-10/+10
It's not a requirement, but some dissectors didn't provide a static summary because expert "format" was used. While at it, fix a misleading expert info description, rename expert info variables to ei_... and remove an unused hf entry. Change-Id: Ib81a0d0a3950b3c90954d0053b8dae49dbb0cd51 Reviewed-on: https://code.wireshark.org/review/20567 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-27dcerpc: improve greatly the speed of processing of DCERPC packetsMatthieu Patou1-42/+140
Instead of using one big linked list, we use a stack of list once all the pointers of one level have been handled the list is removed from the stack and we go to the level before. Because of this the lists are much smaller and far less CPU is spent iterating on the objects or inserting objects in the list Bug: 10544 Change-Id: I432aaf5b4b781411c92da92abe9c5503034b65dc Reviewed-on: https://code.wireshark.org/review/4598 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-05Add DCE/RPC over TCP dissector to "force" DCE/RPC when heuristics failMichael Mann1-2/+19
Add a simple dissection function for DCE/RPC that just calls tcp_dissect_pdus and doesn't do any heuristics checks. This can be used to handle cases where TCP PDU is too small for DCE/RPC heuristics checks and user knows the data is DCE/RPC and can set it through Decode As. Bug: 6392 Change-Id: I9e4960282ea64d20499f7d5a330f48f30a092b30 Reviewed-on: https://code.wireshark.org/review/21951 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-02GHashtable -> wmem_map conversionsMichael Mann1-53/+39
Many of the register_init_routine/register_cleanup_routine functions are for initializing and cleaning up a GHashtable. wmem_map_new_autoreset can do that automatically, so convert many of the simple cases. Change-Id: I93e1f435845fd5a5e5286487e9f0092fae052f3e Reviewed-on: https://code.wireshark.org/review/19912 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-29Register reassembly tablesMichael Mann1-15/+11
Register all reassembly tables with a central unit, allowing the central unit to have the callback that initializes and destroys the reassembly tables, rather than have dissectors do it individually. Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4 Reviewed-on: https://code.wireshark.org/review/19834 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-21dcerpc: add shutdown routine.Dario Lombardo1-1/+18
Also use g_hash_table_new_full to ease the free procedure. Change-Id: I0a411cccbd651cca18e94a048722bf5520903deb Reviewed-on: https://code.wireshark.org/review/19691 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-6/+6
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-11-03RTS_FLAG_NONE is a flags field value, but it's not a flag bit.Guy Harris1-5/+7
It's the *absence* of flag bits, so you can't test whether it's set; don't have a field for it. This gets rid of a dissector assertion. Add some more URLs for information about DCE RPC and MS-RPC. Change-Id: I53e8f11692c66e16ae2ec7fd4ba8eb90b0673da4 Reviewed-on: https://code.wireshark.org/review/18648 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-23packet-dcerpc: let dissect_dcerpc_cn_auth() always dissect the whole auth_infoStefan Metzmacher1-138/+101
As all this information belongs together I'm moving it into a subtree. Change-Id: I839a5a6294360976a78b4b43f219e30381b4f516 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/17878 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-20packet-dcerpc: dissect the auth verifier of PDU_CO_CANCEL, PDU_ORPHANED and ↵Stefan Metzmacher1-0/+3
PDU_FAULT Change-Id: I28325d655ccd5d363aac89e49e5333b3d75f68a2 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/17810 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-20packet-dcerpc: The opnum field is generated for PDU_RESP and PDU_FAULTStefan Metzmacher1-2/+4
Change-Id: Ieeb9de0f54a22afc3adcd52d8af2c45e8b82b0ab Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/17808 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-20packet-dcerpc: nca_s_fault_sec_pkg_errorStefan Metzmacher1-0/+1
Change-Id: I951a317da795c94ac6518be73cb2c836e7afb836 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/17807 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-19Improve support for single-character fields and filter expressions.Guy Harris1-0/+20
Add an FT_CHAR type, which is like FT_UINT8 except that the value is displayed as a C-style character constant. Allow use of C-style character constants in filter expressions; they can be used in comparisons with all integral types, and in "contains" operators. Use that type for some fields that appear (based on the way they're displayed, or on the use of C-style character constants in their value_string tables) to be 1-byte characters rather than 8-bit numbers. Change-Id: I39a9f0dda0bd7f4fa02a9ca8373216206f4d7135 Reviewed-on: https://code.wireshark.org/review/17787 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-1/+1
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-14dcerpc: Check dissect_ndr_ucvarray_core when looping over elements that ↵Michael Mann1-0/+4
we're incrementing offset. Bug: 12720 Change-Id: Ib9c9eb2e60c35b23b4c6b4898b036bcdc442fc84 Reviewed-on: https://code.wireshark.org/review/17041 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-13dcerpc: don't THROW() an exception from a dissectorMartin Kaiser1-17/+12
remove the checks in dissect_ndr_ucarray_core() where a block or bytes dissection function is called and an exception is thrown if the offset wraps around, i.e. the final offset is lower than the initial one the block functions eventually call proto_tree_add_item(), which throws an exception if necessary the bytes functions end up calling functions to dissect basic types. insert calls to tvb_ensure_bytes_exist() if those functions increase our offset without reading data. thus, an exception is thrown if there's an overflow. remove some unnecessary if (tree) checks while at it Change-Id: I8006399ae20934daeec231246debe247f8dedbf0 Reviewed-on: https://code.wireshark.org/review/15832 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-22Do not mix wmem and glib allocatorsPascal Quantin1-2/+2
Change-Id: I0e845668a1b9dbec93ea920a8585ecfe60f001d1 Reviewed-on: https://code.wireshark.org/review/15044 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+1
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde1-8/+8
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-22Separate hf_ fields that share filter names with FT_UINT32 and FT_UINT64 ↵Michael Mann1-2/+2
datatypes. 'bitcoin.addr.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.inv.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.getdata.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.notfound.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.getblocks.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.getheaders.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.tx.input_count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.tx.in.script_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.tx.output_count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.tx.out.script_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.block.num_transactions' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.headers.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.merkleblock.flags.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.merkleblock.hashes.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.string.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'bitcoin.data.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'dcerpc.referent_id' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'dmp.body.id' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'edonkey.start_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'edonkey.end_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.entry' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.phoff' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.shoff' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.p_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.p_vaddr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.p_paddr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.p_filesz' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.p_memsz' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.p_align' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.sh_addr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.sh_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.sh_size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.sh_addralign' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.sh_entsize' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.symbol_table.value' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.symbol_table.size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.dynamic.tag' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.dynamic.value' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.dynamic.pointer' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.dynamic.ignored' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'elf.dynamic.unspecified' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'h248.contextId' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'hcrt.data32' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'wlan_mgt.fixed.psmp.stainfo.reserved' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'isakmp.tf.attr.life_duration' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'isakmp.ike.attr.life_duration' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'jxta.message.element.content.length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'rmt-lct.tsi' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'rmt-lct.toi' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'smb.alloc_size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 'trmac.response_code' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32 Change-Id: I903933e6448bac3d3374eef1a6a0bc4771c1a9f4 Reviewed-on: https://code.wireshark.org/review/14060 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-19dcerpc: fix Called function pointer is null (null dereference) found by ↵Alexis La Goutte1-1/+1
Clang Analyzer Change-Id: Idf98bcf617d4d6343aa233e42898cf5f26b08e33 Reviewed-on: https://code.wireshark.org/review/13974 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-16const gpointer -> gconstpointerJoão Valverde1-3/+3
'const gpointer' is the same as 'void *const'. Replace with gconstpointer where straightforward (assuming that was the intent) and use gpointer everywhere else for clarity (that does not change *API* constness contract; it just means a variable is not declared immutable inside the called funtion). Change-Id: Iad2ef13205bfb4ff0056b2bce056353b58942267 Reviewed-on: https://code.wireshark.org/review/13945 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-14Fix format string warnings [-Wformat=]João Valverde1-1/+1
Change-Id: I266c7d422f6ade965b42a4e2e8dc01966f8eb5f8 Reviewed-on: https://code.wireshark.org/review/13932 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-08Revert "Add free_address_wmem() and other extensions to address API"João Valverde1-8/+8
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07Add free_address_wmem() and other extensions to address APIJoão Valverde1-8/+8
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+2
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-21/+21
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23Add more fields to packet_info structure and use them.Guy Harris1-6/+6
Add fields for the absolute time stamp (and another field for a presence flag for the absolute time stamp) and the packet encapsulation for the packet. This lets us remove the field for the packet encapsulation in the frame_data structure; do so. Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39 Reviewed-on: https://code.wireshark.org/review/13499 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-28Eliminate more unnecessary casting away of constness.Guy Harris1-3/+3
Change-Id: I3d2d83d60f798703ea3fa16ba2d6e95a00f88469 Reviewed-on: https://code.wireshark.org/review/12885 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-10packet-smb2: provide reassembling support for Named Pipe subdissectors (e.g. ↵Stefan Metzmacher1-1/+1
DCERPC) Change-Id: Ie6f28fd749219ddadc53820f94866e91cca297cb Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11596 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-06Fix 32-bit OS X buildbot.Guy Harris1-1/+2
I guess it's not at risk of being clobbered by a longjmp() in a way that affects the behavior of the code, but the older GCC on that buildbot doesn't do the dataflow analysis to figure it out. Change-Id: I770380e2a22d00aeccf5937203bc70968712d37f Reviewed-on: https://code.wireshark.org/review/11611 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-06DCERPC: fix compilation with OSX buildbots and Ubuntu 15.10Pascal Quantin1-3/+3
Change-Id: I032874d0f023d99478be03c192cb529055a6c53e Reviewed-on: https://code.wireshark.org/review/11601 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-06packet-dcerpc: implement dissecting of rpc_sec_verification_trailerGregor Beck1-12/+396
See [MS-RPCE], https://msdn.microsoft.com/en-us/library/cc243559.aspx and frame 34 in https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=dcerpc-winreg-with-rpc-sec-verification-trailer.pcap Change-Id: Ia96c1b220da5d22f2fbf216b9e6fa70b5e068deb Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11362 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-05dcerpc: add check for mutually exclusive function pointersDario Lombardo1-0/+3
Found by clang analyzer. Change-Id: Idb2e80edbb5b264fd257a7b4208ff75bd543df88 Reviewed-on: https://code.wireshark.org/review/10970 Reviewed-by: Stefan Metzmacher <metze@samba.org> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-05packet-dcerpc: let dcerpc_get_proto_name() handle unknown uuidsStefan Metzmacher1-1/+7
This fixes a regression in commit e0e574d16748313dd8903f886d1af9eb0821fee7. Change-Id: I447001a84e17a76ec77c48f736bbfcd8cc6324a1 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11574 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-05packet-dcerpc: fix dissecting of decrypted payloadStefan Metzmacher1-5/+7
This fixes a regression in commit e0e574d16748313dd8903f886d1af9eb0821fee7. Change-Id: Iccdeeb488ec70727fc637ca548637e5a5e54ef1c Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11573 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Declaring volatile pointers to functions is hard, let's go shopping!Guy Harris1-1/+1
Change-Id: I9686f0c2be43df7a00a00ad2f6aadf6db464d809 Reviewed-on: https://code.wireshark.org/review/11570 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Squelch a "setjmp/longjump may clobber" warning.Guy Harris1-37/+37
Clean up indentation while we're at it. Change-Id: If2068fe17664d78c8fc9747b0ee63bac0213d174 Reviewed-on: https://code.wireshark.org/review/11567 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't allow DCE/RPC dissector table to have duplicatesMichael Mann1-1/+1
Add "placeholders" in Profinet dissector to make that possible. Change-Id: I000069ec72b5810c5675a30df1c121aa179000b3 Reviewed-on: https://code.wireshark.org/review/11557 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04(Temporarily) Allow DCE/RPC dissector table to have duplicates.Michael Mann1-1/+1
Change-Id: I0df81ce03b567e75566fc0969f49d54488604c16 Reviewed-on: https://code.wireshark.org/review/11555 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Refactor DCE/RPC dissection to include a real dissector table.Michael Mann1-290/+303
This is hopefully just the first step in getting DCE/RPC dissection to use "standard" APIs instead of homegrown ones. For starters, it allows Decode As functionality to be less hacky (although incomplete in Qt) Change-Id: Ia0923a3d8d514ab7acce32e26ee7e08f6e24feca Reviewed-on: https://code.wireshark.org/review/11468 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+1
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-02packet-dcerpc: add proto_tree_add_dcerpc_drep()Gregor Beck1-21/+22
Change-Id: I1d3515371f50454acbcbdde75f2f1a3e614a5512 Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11495 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-01packet-dcerpc: improve dissection of bind time feature negotiationStefan Metzmacher1-30/+40
Change-Id: I6bcc5538149e36eed31933897a95fa7592baa84a Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11363 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-31packet-dcerpc: add dissect_ndr_ucarray_block()Stefan Metzmacher1-5/+36
Change-Id: Ibfb49738ea35d1d02220d69187a6083d5ebbae25 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11365 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-30packet-dcerpc: pass dcerpc_info to dcerpc_dissect_fnct_blk_tStefan Metzmacher1-1/+2
Change-Id: I92711ee39850f6710eaebf5c678496e7cd9b5f59 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/11364 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>