Commit Graph

308 Commits

Author SHA1 Message Date
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
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-12-09 12:38:06 +00:00
Jeff Morriss 7f591e4c07 Clean up more unnecessary use of the 'volatile' key word.
Change-Id: I3e72fddc6ed380780d7e2e1c8df87e580138188d
Reviewed-on: https://code.wireshark.org/review/11271
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-26 11:28:41 +00:00
Pascal Quantin 3bbb5804f6 MAC LTE: upgrade dissector to v12.7.0
Change-Id: I5d97bc9199349c20598d68a92065e72fcaa88795
Reviewed-on: https://code.wireshark.org/review/10663
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-28 11:30:15 +00:00
Dario Lombardo 942eb739f4 lte/ui: fix 'time' var name.
As pointed out by checkAPI.pl.

Change-Id: Ibab9b2720f3ef666b06b2b61ffc54aa23cbb01fc
Reviewed-on: https://code.wireshark.org/review/10469
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-11 06:15:59 +00:00
Pascal Quantin 38a2385222 MAC LTE: fix dissection of Long DRX Command Control Element
Change-Id: I2d122a9ad8cd768499bff8e1af8754d2eb504594
Reviewed-on: https://code.wireshark.org/review/9788
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-07-25 17:29:13 +00:00
Pascal Quantin 8c4b8313ac MAC LTE: fix dissection of CCCH SDU for Category 0 UE
Change-Id: I2d840ad2ba70cdf87b3cd12b9d4a433f05e0b1b2
Reviewed-on: https://code.wireshark.org/review/9787
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-25 17:29:05 +00:00
Pascal Quantin 23ca456035 MAC LTE: fix dump of last SDU
Change-Id: Ice39b71fab564cde0688c451bdf46c7e426475ce
Reviewed-on: https://code.wireshark.org/review/9782
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-24 22:09:57 +00:00
Pascal Quantin d24614c77a MAC LTE: fix dissection when only header is captured but full PDU length is reported
Change-Id: I66ccfc26b3a0e948fdcf8dfe4ec8e87e6ed756da
Reviewed-on: https://code.wireshark.org/review/9778
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-07-24 19:42:54 +00:00
Pascal Quantin 54812f264b MAC LTE: indicate explicitly that UL LCID 11 is used for Category 0 devices
Change-Id: Ia9a046c8aebdefad0303bed995c19f5408e4460b
Reviewed-on: https://code.wireshark.org/review/9719
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-20 18:05:28 +00:00
Michael Mann 21e5a950ad Remove all preferences related to enabling/disabling heuristic dissectors.
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector.

Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled.

Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22
Reviewed-on: https://code.wireshark.org/review/9610
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17 17:12:22 +00:00
Michael Mann be7d295fbf Add "user presentable" and "unique string ids" to heuristic table entries.
This allows better presentation of heuristic dissectors to the end user.

Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6
Reviewed-on: https://code.wireshark.org/review/9602
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12 03:14:38 +00:00
Peter Wu ba9aa3015f Split more init routines into init/cleanup functions
This patch is partially automatically generated, but are modified
manually. In particular, assignments and function calls have been
audited.

Some debugging comments and ifdef'd prints have been removed. The
lookup tables of the dcm and sip dissectors are now cleared. It is only
called on reopening files anyway.

The isakmp dissector is modified to use g_hash_table_new_full for
destruction of its keys and values.

Fix a memleak in ipsec dissector when libgcrypt is not enabled.

Generated using
https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=3c6128ee266024d164650955f93c7740484abd68
(with AUDIT = True).

Change-Id: I3fd910bdee663842ac0196334fe0189b67e251b0
Reviewed-on: https://code.wireshark.org/review/9225
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:37:40 +00:00
Michael Mann b7ef891af8 Replace tvb_get_ptr calls with a better API choice.
Just reduces the overall tvb_get_ptr usage count in the dissector directory.

Change-Id: I455dc4cc9b082ecccdd254a2e5121f3353b5a812
Reviewed-on: https://code.wireshark.org/review/7491
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-03 09:02:25 +00:00
Pascal Quantin 25f010b269 MAC LTE: upgrade dissector to v12.4.0
Change-Id: Ieb5395a6ae7a1d7625fe645d0caf14008993d3d9
Reviewed-on: https://code.wireshark.org/review/6521
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-13 20:57:01 +00:00
Martin Mathieson 7e8a4b0927 Deleting unnecessary #includes from dissectors.
Fourth batch (packet-mac-lte.c -> packet-rtp.c).

Will look at cleaning up and committing script afterwards.

Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644
Reviewed-on: https://code.wireshark.org/review/6023
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 17:16:40 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
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-21 05:46:22 +00:00
Martin Mathieson 5d6eb80c14 Use g_direct_ functions for hash tables where possible
Change-Id: Ie364cbdcf500d7a04e64d7adcdd03bd1926dda86
Reviewed-on: https://code.wireshark.org/review/5736
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-13 00:17:23 +00:00
Pascal Quantin 74172aee0b LTE: Update MAC and RLC dissectors to Release 12
Change-Id: I036a0d1180b6481e8cc27210ed44eda4ba078a27
Reviewed-on: https://code.wireshark.org/review/5659
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-09 09:49:49 +00:00
Bill Meier f8c0bff6b8 mac-lte: Rename expert filter name to fix conflict with same name in hf[]
Change-Id: I906a195b3c6a1e68f273decc9c443a233af4f9be
Reviewed-on: https://code.wireshark.org/review/5609
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-04 03:44:22 +00:00
Guy Harris f249589938 Just have get_mac_lte_rapid_description() return the description string.
If get_mac_lte_rapid_description() returned FALSE, we always used "" as
the description string; just have it return the string, or return "" if
rapid ranges haven't been configured, and just use the string.

(If the code ever needs to determine in other places whether rapid ranges
have been configured, it can check s_rapid_ranges_configured, or
get_mac_lte_rapid_description() could return NULL in that case and the
code using the string can check for a null value.)

This should squelch some incorrect used-but-not-set warnings from at
least one compiler.

Change-Id: I3ed495a4beb4a553e453e7bca764d1d8a07c5e53
Reviewed-on: https://code.wireshark.org/review/4750
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16 23:04:26 +00:00
Bill Meier b14bf98c06 Fix spelling: cant-->can't, wont-->won't, etc
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6
Reviewed-on: https://code.wireshark.org/review/4124
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16 13:51:51 +00:00
Michael Mann d68d0e88b4 Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the neighborhood.

Change-Id: If73a029f564219782c313d4154c24c7ce7458b52
Reviewed-on: https://code.wireshark.org/review/3574
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>
2014-08-14 04:21:05 +00:00
Bill Meier 9ed99d5c4e Strip some trailing whitespace; Fix some indentation; Add editor-modelines as needed.
Change-Id: I943153e28f468070d86535abad7be032e1386118
Reviewed-on: https://code.wireshark.org/review/2994
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-11 03:20:54 +00:00
Pascal Quantin 9f3c429929 MAC LTE: interpret RAR TPC command
Change-Id: I4e44124d5634e570917730084619e138a6e534af
Reviewed-on: https://code.wireshark.org/review/2963
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-09 18:04:57 +00:00
Michael Mann c7a6e6fa13 convert to proto_tree_add_subtree[_format]
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc
Reviewed-on: https://code.wireshark.org/review/2852
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:59:14 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
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-06-07 15:41:07 +00:00
Pascal Quantin 37d40eb210 MAC LTE: fix dissection of Extended Power Headroom control element
Change-Id: Ia57b4769732f2e18dd2864b576c5c77fc68deb20
Reviewed-on: https://code.wireshark.org/review/1798
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-25 21:20:34 +00:00
Evan Huus 08ce84ebbe Grab-bag of dead initializers and two actual bugs.
All caught by cppcheck. The two (semi)-interesting bugs are:
- in asn1/atn-cpdlc/packet-atn-cpdlc-template.c where the break statement should
  have been inside the brace, causing potential control-flow weirdness with
  exceptions
- in epan/dissectors/packet-ieee80211.c where the bounds check for tag_len did
  not match the expert info given

Change-Id: Ie173fb8d917aabb9b4571435d671d6f16e1c7569
Reviewed-on: https://code.wireshark.org/review/1793
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-25 18:12:00 +00:00
Pascal Quantin a8456cc104 MAC LTE: add a comment explaining why g_hash_table_lookup_extended is used
Change-Id: I9d7310359d5972c603396a802abc2a82b46fe57e
Reviewed-on: https://code.wireshark.org/review/1563
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-08 15:42:53 +00:00
Pascal Quantin a7ac73916f MAC LTE: fix copy/paste error
Change-Id: I59fd7745d454357d3eeaf48ed8700581a8aa0018
Reviewed-on: https://code.wireshark.org/review/1556
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-08 13:04:07 +00:00
Pascal Quantin 4eaf1c82c5 MAC LTE: get extended BSR sizes configuration from RRC
Change-Id: I09afa7c17be5e0ed902a2c2f5ea9989df3380615
Reviewed-on: https://code.wireshark.org/review/1550
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-08 06:29:21 +00:00
Pascal Quantin 542b4e6742 MAC/RLC/PDCP LTE: replace obsolete APIs
Change-Id: I5368cc7b1986c6a87cb70a3fd3cb5e589d73f870
Reviewed-on: https://code.wireshark.org/review/1520
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-05-05 21:26:46 +00:00
Pascal Quantin 6c7ab457ea MAC LTE: fix compilation error
error: assignment discards 'const' qualifier from pointer target type [-Werror]

also add the missing definition of hf_mac_lte_bsr_size_median

Change-Id: I31e172a16b4afd59ba8cf5a9b281bbeaf15b6c56
Reviewed-on: https://code.wireshark.org/review/1492
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-04 21:08:31 +00:00
Martin Mathieson 1ddce8bb4c Have RRC tell MAC about RAPID ranges so it can show for RAPIDs seen
Change-Id: Ie9adbe3015c63e53997068053b6f8ec224a5bf82
Reviewed-on: https://code.wireshark.org/review/1474
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-05-03 21:39:20 +00:00
Martin Mathieson 0708e0923e Update SR and DRX tracking when see UL CRC error'd frame, and add an
option to add generated items corresponding to the middle of
BSR ranges (suitable for plotting/stats).

Change-Id: I73b4e82ea5fb869d93d9666b9f8c9a10562db365
Reviewed-on: https://code.wireshark.org/review/1419
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-04-28 21:15:19 +00:00
Martin Mathieson 70ff7be1e6 MAC LTE: fix a typo in Buffer Size value_string
Change-Id: Ie38726fb51a74bbcdc630550e61fa0e934ffdd1e
Reviewed-on: https://code.wireshark.org/review/618
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-12 17:02:07 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Bill Meier 93fe4d53e2 Remove trailing whitespace.
Change-Id: Ia03a1cd4590aceda30ead4aa93ad413d90c6aea6
Reviewed-on: https://code.wireshark.org/review/372
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 16:36:38 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Bill Meier 9d0207ed90 Comment out unused hf[] entries and related found by checkhf.
svn path=/trunk/; revision=54989
2014-01-28 03:06:03 +00:00
Pascal Quantin 9de6aa8619 From Fabrice Bellard:
Add Carrier Id and detailed PHY info to MAC LTE UDP framing dissector

svn path=/trunk/; revision=54370
2013-12-22 21:16:31 +00:00
Pascal Quantin 6af6cd7089 Add out-of-band send_preamble event to UDP framing protocol
svn path=/trunk/; revision=54277
2013-12-19 22:40:49 +00:00
Pascal Quantin d66bffb66e Add System Frame Number to UDP framing protocol and display it in info column
svn path=/trunk/; revision=54272
2013-12-19 21:40:38 +00:00
Jakub Zawadzki e0e86bab5a Fix const warnings.
svn path=/trunk/; revision=54092
2013-12-14 14:33:46 +00:00
Jakub Zawadzki 1053e722ed Fix warnings
svn path=/trunk/; revision=54089
2013-12-14 12:45:57 +00:00
Chris Maynard c96d5a97ad Trivial: Tab -> spaces.
svn path=/trunk/; revision=53967
2013-12-12 19:20:30 +00:00
Martin Mathieson aad04d5963 Remove some TODOs that have now been addressed
svn path=/trunk/; revision=53961
2013-12-12 13:25:12 +00:00
Martin Mathieson c25611b9e7 Remove an unused variable
svn path=/trunk/; revision=53933
2013-12-11 11:15:35 +00:00
Martin Mathieson c72fa5eb95 Convert to new-style dissector, change crcStatusValid to a gboolean, and rework DRX timers (again)
svn path=/trunk/; revision=53932
2013-12-11 11:03:29 +00:00
Michael Mann 9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00