Commit Graph

28 Commits

Author SHA1 Message Date
Evan Huus 8ee8808876 First pass pinfo->pool conversion, part 2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.
2021-07-21 09:54:57 -04:00
Martin Mathieson 4a4e50992a More spelling fixes, start of second pass of dissectors.
Now easier to find errors due to script improvements and more complete
dictionary file.
2020-08-30 22:34:34 +01:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Guy Harris 7eb3e47fa4 Try to squeeze some bytes out of the frame_data structure.
Make the time stamp precision a 4-bit bitfield, so, when combined with
the other bitfields, we have 32 bits.  That means we put the flags at
the same structure level as the time stamp precision, so they can be
combined; that gets rid of an extra "flags." for references to the flags.

Put the two pointers next to each other, and after a multiple of 8 bytes
worth of other fields, so that there's no padding before or between them.

It's still not down to 64 bytes, which is the next lower power of 2, so
there's more work to do.

Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe
Reviewed-on: https://code.wireshark.org/review/31213
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-27 04:34:29 +00:00
Peter Wu ccff21854d Forbid leading, duplicated and trailing dots in field names
In order to simplify the display filter scanner, try to restrict the use
of dots ('.') in field names. Forbid leading dots, does not affect
current dissectors. Fix '..' typo in fpp dissector and forbid it. Forbid
trailing dots after fixing dissectors: some of them just have an excess
dot, others are missing a name after the dot.

Change-Id: I6e58a04ef0306ee8c16fbf6a3cabb076d7fc69c9
Reviewed-on: https://code.wireshark.org/review/26967
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 15:44:08 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Stig Bjørlykke d99112d393 Use col_append_str() for fixed strings
Change from col_append_fstr() to col_append_str() when
appending strings without formatting.

Change-Id: I8975704c246f2b9a1301ed5f96273aa9d61c6f44
Reviewed-on: https://code.wireshark.org/review/20857
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-03 05:32:17 +00:00
Michael Mann 08e4d57ec4 Bluetooth: fix conflicting entries in its value_string.
Change-Id: Ie0f9bc800b5d86effa18a8ae333bbf8da18d0c3b
Reviewed-on: https://code.wireshark.org/review/20775
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
2017-03-29 10:24:37 +00:00
Michal Labedzki b616554665 Bluetooth: HCI vendor: Add support for some Intel commands/events
This change based on BlueZ code on the same license that Wireshark is.
It seems that a lot of commands/events are incomplete or unknown,
however better to have them.

Also rename variables (etc.) of the first dissector to contain
vendor name like new one, to distinguish them.

Change-Id: I2db3ed73d477699032a44bac2d3c88a9230b0095
Reviewed-on: https://code.wireshark.org/review/17657
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-09-13 06:54:48 +00:00
Balint Reczey 1e19f55f0c Constify a few value_strings which were generated at run-time
Change-Id: Idc479a89a34fd21b743faee07020be284f828e2c
Reviewed-on: https://code.wireshark.org/review/16298
Petri-Dish: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-07-21 11:30:54 +00:00
Dario Lombardo 982359c098 bthci: add missing break (CID 1362832)
Change-Id: I705cb17d7c6d615361d29f00ba840a94dc835ff0
Reviewed-on: https://code.wireshark.org/review/16090
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-06-23 09:49:56 +00:00
Stig Bjørlykke 6ccee3ecd5 bthci: Show unknown ocf as undecoded
Don't show unknown ocf values as unexpected parameters.

Change-Id: I08a6c8c20d6382a847f0a2969e4c523a2873dd6f
Reviewed-on: https://code.wireshark.org/review/16048
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-06-21 08:16:38 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
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-20 12:48:48 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
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-24 03:41:28 +00:00
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
Michal Labedzki 7a7b293d80 Bluetooth: HCI vendor: Add some Broadcom commands
Add some Broadcom commands found in BlueZ.

Change-Id: I6b5c6ca2a55142550c2e901443d548a5a686bc90
Reviewed-on: https://code.wireshark.org/review/11981
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-11-20 16:02:04 +00:00
Michal Labedzki b271537c24 Bluetooth: Fix expert info for undecoded data
Swap PI_* values avoid crashes (assert...) of expert info.

Change-Id: I5f5188c9358a4ac93565fc079a3a0e8ea4b7f965
Reviewed-on: https://code.wireshark.org/review/11019
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-10-17 10:21:45 +00:00
Michal Labedzki 3faec795e9 Qt/Bluetooth: Add HCI Summary dialogue
HCI Summary dialogue collect HCI Opcodes, HCI Events, Hardware Errors,
Statuses and Reasons. Also show occurrence of them. The top level item
is group of items (by OGF or types), the second level item is in real
command, event, hardware error, status or reason. The third level items
are direct link to packet that contains second level item type.

Change-Id: I6b6bd02533c4605a2dd2c1f5dfee46f72a0f3fdc
Reviewed-on: https://code.wireshark.org/review/9676
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-17 13:54:43 +00:00
Michal Labedzki 7ec7e43f3b Bluetooth: Coverity fixes
Try to fix Coverity issues in Bluetooth HCI and androiddump.

Change-Id: Id2ed35130eb4dbb0698b7a54afccdba56af62bfd
Reviewed-on: https://code.wireshark.org/review/8983
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-19 13:20:57 +00:00
Pascal Quantin 8cbd144453 Bluetooth: ensure to give bluetooth_data structure to dissect_eir_ad_data()
Bug: 11285
Change-Id: I1d3a4900fe3daec6f8d7596a9925322063f2c4eb
Reviewed-on: https://code.wireshark.org/review/8976
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-18 14:39:55 +00:00
Michal Labedzki 7102a06811 Qt/Bluetooth: Add Devices dialogue
Please found it under Bluetooth menu. It shows all devices found
in logs, not only connected, all that its address can be found in
logs. Show if device is local (in most cases: capturing on it side)
and manufacturer and LMP version what should answer the question what
version of Bluetooth is used by Bluetooth device chip.
Also firmware version.

Change-Id: I32e3b7100cdebcaa850b6541de0ab89dff41c0e1
Reviewed-on: https://code.wireshark.org/review/8901
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-15 05:40:25 +00:00
Michal Labedzki f837dab1b2 Bluetooth: HCI: Add command-event tracking
HCI Commands in most cases generate response in Event queue, so try
to map event to command and give user response time information.

Change-Id: Ib4956829b7d0064ab528aa3202f8f959d8d371b7
Reviewed-on: https://code.wireshark.org/review/8514
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-18 07:10:37 +00:00
Michal Labedzki 6521771124 Bluetooth: Simplify to "UnknownDirection" in Info column when direction is unknown
Change-Id: Ibad679c0b6c95d65389ce087f65b8f31cf3acd68
Reviewed-on: https://code.wireshark.org/review/6903
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-02 10:48:56 +00:00
Michal Labedzki c4f08ec0f9 Bluetooth: HCI Vendor: Fix for "Enable WBS" command
Codec value for mSBC is 0x02 (not 0x01), also "Codec" field
does not appear when Codec state in Disable.

Change-Id: I4f0b27d0dc8659fdc054eaf18b54a42aad60275b
Reviewed-on: https://code.wireshark.org/review/6899
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-02 10:47:50 +00:00
Michal Labedzki f343710ee2 Bluetooth: HCI: Detect Vendor by "Read Local Version Information"
There is information about manufacturer of Bluetooth chip.
Also try to detect if that "permament" info is not changed,
if so informs user about this rare event (probably there is an issue)

Change-Id: I1fa748a67ad7943e61d4445d240f0578b94560fc
Reviewed-on: https://code.wireshark.org/review/6408
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10 15:36:22 +00:00
Michal Labedzki 55df238efd Bluetooth: SMP: Add missing opcode for "Identity Address Information"
Also fix tvb_length, tvb_length_remaining warnings.

Bug: 10299

Change-Id: Ib8b55ea9f2220394a5896d13e5cc4e2cefff1e13
Reviewed-on: https://code.wireshark.org/review/6407
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10 15:36:02 +00:00
Michal Labedzki d6e0409892 Bluetooth: Add HCI Vendor Broadcom dissector
Since those command/events are vendor specific and proprietary
not all commands/events are implemented. All implemented commands can be
found in Open Source implementations for Broadcom chip. If you found more,
please let me know.

Change-Id: Ie68d3737c88a8cef39260a9d93192cfc81871d6c
Reviewed-on: https://code.wireshark.org/review/6406
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10 15:35:39 +00:00