aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-disp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-07-01ASN.1 dissectors - don't try to find yourself.Michael Mann1-9/+6
If an ASN.1 dissector is calling register_dissector for itself in its proto_register_xxx function and then calling find_dissector for itself in its proto_reg_handoff_xxx function then just create a static handle for that dissector and use the return value of register_dissector, so the find isn't necessary. Change-Id: I911bdadc2fb4259601c141b955e741a2369cc447 Reviewed-on: https://code.wireshark.org/review/16233 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-13Move /asn1 to /epan/dissectorsJoão Valverde1-21/+21
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9 Reviewed-on: https://code.wireshark.org/review/14388 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: João Valverde <j@v6e.pt>
2015-12-10Convert ASN.1 dissectors to remove "new" from "new-style" dissector function ↵Michael Mann1-5/+5
names that were generated from asn2wrs.py This includes: 1. new_create_dissector_handle -> create_dissector_handle 2. new_register_dissector -> register_dissector 3. new_register_ber_oid_dissector -> register_ber_oid_dissector 4. new_register_ber_syntax_dissector -> register_ber_syntax_dissector Also remove PDU_NEW, SYNTAX_NEW and REGISTER_NEW as there is no need for the distinction anymore. Change-Id: I82c7de7c8ffeeab3259d1b55bb4afc5f6a1e0329 Reviewed-on: https://code.wireshark.org/review/12491 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
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>
2014-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-7/+6
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387 Reviewed-on: https://code.wireshark.org/review/6008 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-13ASN1: Register PDU-dissectors as NEWStig Bjørlykke1-18/+24
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64 Reviewed-on: https://code.wireshark.org/review/4494 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-08-09Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.Michael Mann1-14/+31
This mostly involved adding expert info capabilities to many of the dissectors so that they could correctly flag error conditions. Only remaining proto_tree_add_text calls are in H248.cnf, which has a convoluted way of using hf_ data to make its tree. Change-Id: I6412150c2ec1977d7fa38f3f0ed416680bdfb141 Reviewed-on: https://code.wireshark.org/review/3500 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19batch of manual tvb_length conversionsEvan Huus1-2/+2
Change-Id: Ifea45514bdba8be5f62b9dc560027077297f631e Reviewed-on: https://code.wireshark.org/review/2456 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
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-2/+2
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-31/+7
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-15/+13
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>
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-6/+9
svn path=/trunk/; revision=53873
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-13/+13
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-11-05In an effort to reduce the use of pinfo->private_data (and some true global ↵Michael Mann1-10/+12
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-09-17Regenerate all files where the .cnf files had whitespace changes.Jörg Mayer1-7/+7
svn path=/trunk/; revision=52125
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-50/+50
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
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
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-6/+6
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-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-01-19Update a couple of asn1-generated dissectors.Chris Maynard1-3/+3
svn path=/trunk/; revision=40588
2012-01-13Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
svn path=/trunk/; revision=40467
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-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-05-13Regenerate ASN.1 dissectors to update the #line directive.Stig Bjørlykke1-20/+20
svn path=/trunk/; revision=37118
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-12-06Make some prefs callback functions static. (These modules don't use ↵Jeff Morriss1-7/+9
proto_reg_handoff_*() as their prefs callback.) svn path=/trunk/; revision=35138
2010-05-11Add a little more code to avoid not-very-useful blurbs:Jeff Morriss1-18/+18
- Change spaces in the name to underscores before comparing it to the blurb. - Check if the type simply as T_ prepended to the name. - Don't put in a blurb of "NULL". and regenerate the dissectors. svn path=/trunk/; revision=32748
2010-05-11Regenerate a few of the ASN.1 dissectorsJeff Morriss1-107/+107
svn path=/trunk/; revision=32742
2010-04-07#include <string.h> and/or #include <stdio.h> not needed.Bill Meier1-8/+6
svn path=/trunk/; revision=32417
2010-04-06#include <stdio.h> not needed.Bill Meier1-7/+6
svn path=/trunk/; revision=32405
2010-01-17Get rid of check_col();Anders Broman1-32/+17
svn path=/trunk/; revision=31544
2010-01-11Add missing DEFAULT for UpdateMode.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=31491
2009-10-11Make all proto_* values static.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=30516
2009-10-09Regenerate asn1 dissectors (no change, only some line offset changes)Kovarththanan Rajaratnam1-3/+3
svn path=/trunk/; revision=30454
2009-08-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29344
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-26Re-generate asn1 dissectors after hf_register_info cleanup.Stig Bjørlykke1-8/+8
svn path=/trunk/; revision=28848
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-10/+10
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-05-16Regenerate all asn2wrs generated dissectors.Stig Bjørlykke1-13/+13
svn path=/trunk/; revision=28379
2009-02-07#include <epan/conversation.h> and/or #include <epan/emem.h> not req'd ...Bill Meier1-7/+6
svn path=/trunk/; revision=27390
2008-11-11Regenerated files for asn1 templates committed in SVN #26750Bill Meier1-17/+15
svn path=/trunk/; revision=26751
2008-11-01Regenerate all asn2wrs generated dissectorsAnders Broman1-15/+15
svn path=/trunk/; revision=26670
2008-09-19Dump the unsupported opcode for invoke result and invoke error,Stig Bjørlykke1-2/+4
as is done for invoke argument. svn path=/trunk/; revision=26232
2008-04-13Remove #defined preference groupingGraeme Lunt1-7/+3
svn path=/trunk/; revision=24985
2008-01-04Get rid of dissect_ber_boolean_value() and change the signature ofAnders Broman1-2/+2
dissect_ber_boolean() to return a value and update asn2wrs to generate the new signature. Regenerate all BER dissectors. svn path=/trunk/; revision=24015