aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gprs-llc.c
AgeCommit message (Collapse)AuthorFilesLines
2017-07-31gprs-llc: Don't attempt to decode Dummy UI CommandHarald Welte1-0/+13
As explained by 3GPP TS 44.064 Section 6.4.2.2 there are Dummy UI Commands which are never generated by a LLC entity, but nevertheless received by a LLC entity. They are generated by the underlying network-side RLC/MAC entity a as a means to artificially delay the release of a downlink TBF. We introduce a new "llcgprs.dummy_ui" boolean field on which the user can match to filter our such messages, if needed. Change-Id: Ie8fcb42cbd66a7e5b77849f0bc5a3630d0d54a9c Reviewed-on: https://code.wireshark.org/review/22862 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-12-31Dissectors don't need a journey of self discovery.Michael Mann1-4/+2
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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-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-03-20Create call_data_dissector() to call data dissector.Michael Mann1-6/+4
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
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-03-02Widen length and offset variables.Guy Harris1-9/+10
Get rid of unnecessary assignment while we're at it. Change-Id: I46dd0b3d64d7e38553ea243b79f71a58cda68653 Reviewed-on: https://code.wireshark.org/review/14299 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-02Handle the A bit in I frames the same way we handle it in S frames.Guy Harris1-142/+142
While we're at it, do more formatting consistency cleanups, and show the I format bit in hex as we do with the format bits in other formats. Change-Id: I53842e948311aa0b332a60a413904901428b13f1 Reviewed-on: https://code.wireshark.org/review/14298 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-02Assorted cleanups.Guy Harris1-17/+15
Give all ett_ variables ett_llcgprs_ names. Make function formatting a bit more consistent. Show the format bits in hex for all formats. Change-Id: I7e7127a22384688b973a683c93eff442a88fb3b5 Reviewed-on: https://code.wireshark.org/review/14295 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-02Dissect the FCS after dissecting the header.Guy Harris1-226/+220
First dissect the address field, then dissect the control field, then dissect the FCS if present, then dissect the info field. That makes the dissection more like the dissection of other protocols with an FCS at the end, and means that we don't throw an exception too early. Remove the "MLT CHANGES" comments - if somebody cares who did what, they can browse the commit history; it's not as if the version prior to those changes was somehow the "pure" version and that we need to keep the changes carefully demarcated. Get rid of no-longer-necessary variable. Change-Id: I249440971e64ecbb0959ebbea1b2897a2e12375a Reviewed-on: https://code.wireshark.org/review/14293 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-02Add missing break.Guy Harris1-0/+1
Don't fall through and re-dissect the control byte of an S frame as if it were a UI frame. Change-Id: I17cf12f920bf066f87f70be5efe78dc531beb3f9 Reviewed-on: https://code.wireshark.org/review/14284 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-02Universally use tvb_new_subset_length() rather than tvb_new_subset().Guy Harris1-3/+3
Leave the job of computing the captured length up to the tvbuff code. Change-Id: If88e813ba7dee3516baf958b9fead26374d915ad Reviewed-on: https://code.wireshark.org/review/14276 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-02Rename some variables to make the relationship between lengths clearer.Guy Harris1-28/+28
"llc_data_length" is what's left of "length" after the CRC is removed; 'llc_data_captured_length" is what's left of "captured_length" after the CRC is removed. Change-Id: I9371a5d3004632d684093b2650fa0bf8fc1f9bde Reviewed-on: https://code.wireshark.org/review/14275 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-23register_dissector -> new_register_dissectorMichael Mann1-4/+5
Change-Id: Ic368dd8e83cf39e0c934da0ae2744778e2d54ce6 Reviewed-on: https://code.wireshark.org/review/12050 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 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>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-30/+23
Part 2 of many Change-Id: I50815e7738b011382392f3078a7107d3d9eec4ec Reviewed-on: https://code.wireshark.org/review/5542 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-03tvb_length -> tvb_reported_lengthAndersBroman1-3/+3
Change-Id: I48b618008c8c8accd6f161bdc42e02906a4765b7 Reviewed-on: https://code.wireshark.org/review/5085 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-30Add editor modelines; Adjust whitespace; Remove boilerplate commentsBill Meier1-10/+17
Change-Id: I1f5f83ed441f6009125cf2cbe5023af04986898a Reviewed-on: https://code.wireshark.org/review/4392 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-08Get rid of no-longer-used variable.Guy Harris1-1/+0
Change-Id: I63bde706a6561c834aab9b10975dbb242c65d998 Reviewed-on: https://code.wireshark.org/review/3495 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08Eliminate proto_tree_add_text from some dissectors.Michael Mann1-29/+33
Change-Id: I6f1710a093fc548c718defa9b40ab68877ede977 Reviewed-on: https://code.wireshark.org/review/3470 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-29convert to proto_tree_add_subtree[_format]Michael Mann1-46/+31
Change-Id: If110de1e0555637264f86f1508858d569871a9c7 Reviewed-on: https://code.wireshark.org/review/2675 Reviewed-by: Michael Mann <mmann78@netscape.net>
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-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-3/+3
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
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 FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-04-30Fix a few clang warningspascal1-1/+0
svn path=/trunk/; revision=42343
2011-05-18#include <stdlib.h> not req'd;Bill Meier1-527/+601
Reformat hf[] definition; Misc whitespace cleanup; svn path=/trunk/; revision=37266
2011-05-18Add a missing creation of a subtree: Fixes Coverity 907 [UNUSED];Bill Meier1-2/+2
Don't create an unused subtree: Fixes Coverity 908 [UNUSED]; svn path=/trunk/; revision=37265
2011-01-13Use value_string_ext.Anders Broman1-7/+11
svn path=/trunk/; revision=35517
2011-01-13Remove an unused variable.Anders Broman1-1/+0
svn path=/trunk/; revision=35516
2011-01-13Make it possible to dissect the part pressent in short frames.Anders Broman1-89/+82
svn path=/trunk/; revision=35515
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-4/+4
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-08-02Fix cases where the type of a for loop variable is smaller than the type of ↵Bill Meier1-2/+2
the "end" variable. In some cases the usage may have been benign since it can be seen by code inspection that the maximum value of the end variable can't exceed the maximum value of the loop variable. However, on general principles, all the usages have been fixed. svn path=/trunk/; revision=33692
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-01-25From Mike Morrin:Anders Broman1-1/+1
Empty GPRS LLC S frames cause truncated data exception. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4417 svn path=/trunk/; revision=31667
2009-09-24Don't guard col_append_str with check_colKovarththanan Rajaratnam1-4/+1
svn path=/trunk/; revision=30125
2009-08-21Sanitize epan includesKovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=29499
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-8/+2
svn path=/trunk/; revision=29345
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-7/+7
(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
2008-12-18Fix various typos and spelling errors (mostly in text strings)Bill Meier1-1/+1
svn path=/trunk/; revision=27050
2008-12-13From Vincent Helfre:Anders Broman1-2/+12
Fix sndcp_xid_offset. svn path=/trunk/; revision=26990
2008-10-07Fix for bug 2944:Jaap Keuter1-6/+6
Textual correction: Unnumbered Information format-> Unconfirmed Information format, among others. svn path=/trunk/; revision=26369
2008-09-30Minor proto_reg_handoff cleanup: use find_dissector when appropriate.Bill Meier1-1/+1
svn path=/trunk/; revision=26308