aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtse.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-09"new" dissector API -> dissector API for ASN.1 dissectors.Michael Mann1-1/+1
Change-Id: I7b794cba2feda2cae40411e2b1cb9fb091d08220 Reviewed-on: https://code.wireshark.org/review/12480 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-1/+1
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-5/+7
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-07-04asn1: split off cleanup routinesPeter Wu1-2/+8
General approach: 1. Split allocation (e.g. g_hash_table_new) from deallocation (g_hash_table_destroy) into functions named "init" and "cleanup". 2. Remove guards that test whether the hash tables are set as init is always called before cleanup. 3. Remove setting hash tables to NULL after destruction. 4. Copy register_init_routine function call and change init to cleanup. 5. Add cleanup function that calls reassembly_table_destroy if there is a reassembly_table_init function. Some templates were modified as follows: - snmp: split renew into init+cleanup, but keep renew for the uat_new callback. - ldap,ros: Rename init to cleanup as there was no initialization. - camel: remove init function from header, make it static. Remove debug print. - tcap: remove unused ssn_range assignment. Files in epan/ were regenerated using cmake && make asn1 Change-Id: Idac16ebf0ec304e0c8becaab5d32904e56eb69b9 Reviewed-on: https://code.wireshark.org/review/9136 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-19[rtse] Convert tabs to spaces to match editor modelinesBill Meier1-52/+52
Change-Id: I03c7decacd4def0552f461c81c4e634a85380438 Reviewed-on: https://code.wireshark.org/review/8986 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-05-26Remove proto_tree_add_text from some dissectors.Michael Mann1-4/+7
Change-Id: Id7ef95a56d9d8cc01f9a1a4556ad056b8bb7f8bc Reviewed-on: https://code.wireshark.org/review/8654 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>
2015-04-10Remove depricated API tvb_length -> tvb_reported_lengthAndersBroman1-3/+3
Change-Id: I78b1d2accf4fd0b37eaa16cb8bf515422565e98a Reviewed-on: https://code.wireshark.org/review/8011 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-13Replace tabs by spaces when editor modelines has "expandtab"Bill Meier1-1/+1
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7 Also: tabs-stops should be 8 Reviewed-on: https://code.wireshark.org/review/7100 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-04Support for P3 over RTSE.gal1-171/+189
Resolve mixed space/tab issue in the RTSE and BER dissectors and included modelines in both templates. Change-Id: I4b75bad94ed111d0faee205e026b2322b7dafbd1 Reviewed-on: https://code.wireshark.org/review/6932 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-31rtse.cnf: fix Nesting level does not match indendation (CID 1159214)Alexis La Goutte1-9/+10
Change-Id: I86e6c9103990bedf93c323e1360394a7c0a39db4 Reviewed-on: https://code.wireshark.org/review/6173 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-6/+5
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387 Reviewed-on: https://code.wireshark.org/review/6008 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-13RTSE: Return dissected length from call_rtse_oid_callbackStig Bjørlykke1-12/+11
Change-Id: I6766135ddcdfe25d9bcc060bb2a47376abb36794 Reviewed-on: https://code.wireshark.org/review/4642 Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22convert to proto_tree_add_subtree[_format] for ASN.1 dissectorsMichael Mann1-9/+10
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef Reviewed-on: https://code.wireshark.org/review/2509 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-21batch of tvb-length conversionsEvan Huus1-6/+6
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498 Reviewed-on: https://code.wireshark.org/review/2507 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-9/+9
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-9/+9
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-15Remove unused const variables errors seen with recent Clang versionPascal Quantin1-26/+16
Fixes bug 9886 Change-Id: I8624ef1c5874aea5521d21c998510fc29c838936 Reviewed-on: https://code.wireshark.org/review/657 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-02-18Remove $Id$ from the ASN.1 dissectors and regenerate them.Jeff Morriss1-23/+21
Change-Id: Ie476c6f82f318188b41ed922b92c6fec119ea954 Reviewed-on: https://code.wireshark.org/review/244 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-01-27Add back the fix from revision 54693.Stig Bjørlykke1-2/+5
svn path=/trunk/; revision=54976
2014-01-13Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-4/+1
svn path=/trunk/; revision=54732
2014-01-10Return other than 0 from RTSE when handling reassembly initiated from SES.Stig Bjørlykke1-0/+3
This bug was introduced in revision 53093 when updating to new-style dissector. svn path=/trunk/; revision=54693
2013-12-09Reject the packet if data is NULL without doing anything else.Chris Maynard1-13/+7
Note: We *might* want to do _something_ but that _something_ should be well-defined and consistent across all dissectors. Previously, some dissectors called proto_tree_add_text() to add some error message text to the tree, while others called DISSECTOR_ASSERT(). svn path=/trunk/; revision=53895
2013-12-08- Forward declaration of register functions.Anders Broman1-5/+8
svn path=/trunk/; revision=53861
2013-11-05In an effort to reduce the use of pinfo->private_data (and some true global ↵Michael Mann1-47/+53
variables), I converted the ASN.1 dissectors that use pinfo->private_data to exchange a SESSION_DATA_STRUCTURE to instead only exchange it in the context of ASN.1. This meant converting dissectors to the "new" style to pass the SESSION_DATA_STRUCTURE as well as providing a pointer to it in asn1_ctx_t.private_data. Yes, it's still "private data", but it's not used by all dissectors like pinfo->private data is. svn path=/trunk/; revision=53090
2013-11-02Require dissector_try_string to pass a data parameter to its subdissectors. ↵Michael Mann1-1/+1
There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new. svn path=/trunk/; revision=53049
2013-10-30Update the ASN.1 generated dissectors that were missed as part of the ↵Michael Mann1-3/+3
patches in bug 9344 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344) svn path=/trunk/; revision=52978
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-1/+1
svn path=/trunk/; revision=51851
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-1/+1
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-06-14Remove check_col() from ASN.1 dissectorsMichael Mann1-2/+2
svn path=/trunk/; revision=49927
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-2/+1
svn path=/trunk/; revision=49921
2013-06-03Convert ASN.1 dissectors to use filterable expert info.Michael Mann1-10/+17
NOTE: Kerberos ASN.1 template was updated, but not generated to source. svn path=/trunk/; revision=49707
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-8/+8
incompatible filters in ASN.1 dissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402 svn path=/trunk/; revision=49599
2013-04-11Update the ASN.1 based dissectors following the changes done in r48812Pascal Quantin1-2/+2
svn path=/trunk/; revision=48820
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-10/+10
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-02-19How can I get a new tvbuff that starts at an offset within a givenGuy Harris1-1/+1
tvbuff and runs to the end of the tvbuff? Let me count the ways.... Replace a bunch of different ways of doing that (some incorrect, in that they're not properly handling tvbuffs where the captured and reported lengths are different) with tvb_new_subset_remaining(). svn path=/trunk/; revision=47751
2012-12-26Fix a bunch of warnings.Guy Harris1-2/+2
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-09-24Regenerate asn.1 dissectors.Jakub Zawadzki1-5/+5
svn path=/trunk/; revision=45110
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Propage changes done in generated dissectors to asn1/Jakub Zawadzki1-3/+3
svn path=/trunk/; revision=44845
2012-09-07From Robert Bullen via ↵Jeff Morriss1-14/+16
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 : The reassembled fragments tree in the Packet Details view is awesome, but it lacks one thing: a field that exposes the reassembled data. tcp.data already exists for exposing a single TCP segment's payload as a byte array. It would be handy to have something similar for a single application layer PDU when TCP segment reassembly is involved. I propose tcp.reassembled.data, named and placed after the already existing field tcp.reassembled.length. My primary use case for this feature is outputting tcp.reassembled.data with tshark for further processing with a script. The attached patch implements this very feature. Because the reassembled fragment tree code is general purpose, i.e. not specific to just TCP, any dissector that relies upon it can add a similar field very cheaply. In that vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which expose reassembled fragment data as a single byte stream for IPv4 and IPv6, respectively. All other protocols that use the reassembly code have been left alone, other than inserting NULL into their initializer lists for the newly introduced struct field reassemble.h:fragment_items.hf_reassembled_data. svn path=/trunk/; revision=44802
2012-07-17Use G_MININT32 instead of -2^31 so as to get rid of 'this decimal constant ↵Pascal Quantin1-2/+2
is unsigned only in ISO C90' warning svn path=/trunk/; revision=43764
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-01-13Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
svn path=/trunk/; revision=40468
2011-10-15Update generated ASN1 *.[hc] files after recent work done by Jeff Morriss;Bill Meier1-1/+1
The only change in each file is in a comment showing the asn2wrs cmd used to build that file. svn path=/trunk/; revision=39427
2011-09-27Get rid of check_col, while at it set ENC.Anders Broman1-4/+4
svn path=/trunk/; revision=39164
2011-07-19Use ENC_NA as encoding for FT_PROTOCOL, FT_NONE and FT_BYTES.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=38122
2011-07-19Use correct encoding for proto_tree_add_item().Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=38107
2011-04-12Regenerate more ASN.1 dissectors for Coverity.Gerald Combs1-27/+27
svn path=/trunk/; revision=36609
2011-01-30Introduce "Fragment count" filter element for all protocols doing reassembly.Stig Bjørlykke1-3/+8
svn path=/trunk/; revision=35705
2010-09-30Cleanup reassembly hf entries.Stig Bjørlykke1-11/+10
svn path=/trunk/; revision=34291