Commit Graph

13 Commits

Author SHA1 Message Date
David Perry 34ee3cbc48 Change some `wmem_packet_scope()` to `pinfo->pool`
As requested [here][1], help with replacing calls to
`wmem_packet_scope()` with references to `pinfo->pool`.

My principles were:

* Plugins chosen semi-randomly.
* When a calling function already has a `pinfo` argument, just use that.
    * Remove `_U_` from its signature if it was there.
* Don't go more than 2 or 3 levels deep of changing signatures.
* If a function is clearly allocing memory to return, change the
  function signature to take a `wmem_allocator_t *`. Otherwise, either
  that or take a `packet_info *` as seems to make sense.
* No mention of `wmem_packet_scope()` should remain in the files I've
  touched.
    * I didn't always succeed at this, but I made a dent.

[1]: https://www.wireshark.org/lists/wireshark-dev/202107/msg00052.html
2021-07-29 01:36:01 +00:00
Constantine Gavrilov 5db4d2c0c9 Fix compilation with gcc-11.
Closes #17281
2021-04-17 10:29:15 +00:00
Alexis La Goutte ef6d3ae9a0 cemi: Fix Dead Store found by Clang Analyzer
Although the value stored to 'offset' is used in the enclosing expression, the value is never actually read from 'offset'
2021-02-07 07:32:00 +00:00
Martin Mathieson 08ab0e5d1f Fix some wrong filter names.
These were detected by running check_typed_item_calls.py
with --consecutive, which flags items that have different
labels but the same filter string.  Usually this is because
of copy/paste.

Quite a few similar bugs still exist, will address in a future commit.
2020-09-27 18:40:13 +00:00
Jaap Keuter d5fc969e57 No explicit glib.h include required
Stop including glib.h in dissectors, this will come in implicitly with
packet.h including proto.h, an essential include file for dissectors.
While at it, config.h is no longer conditional and stdio.h is usually
not needed either. Some other cleanups too.

Change-Id: I60c12f16d7ef1e6398509293031ffed7460d2c61
Reviewed-on: https://code.wireshark.org/review/36969
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-05-01 21:28:27 +00:00
Alexis La Goutte 8b6f316f30 cemi: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I4524d104b4f2c59694c59d2061ba0763659e1f0f
Reviewed-on: https://code.wireshark.org/review/35034
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-11-09 22:15:01 +00:00
Pascal Quantin 1628bff78d Get rid of proto_tree_add_debug_text() calls
This function should not be used for anything else than debug, as stated
in its name.

Bug: 15989
Change-Id: Ie2a99f3487169fcf2d00c06e7fc5d61086f32969
Reviewed-on: https://code.wireshark.org/review/34954
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-11-04 14:22:05 +00:00
Jaap Keuter 6580ca9b93 cemi: Remove superfluous checks
Remove superfluous checks on pinfo when getting cinfo.

CID 1440377

Change-Id: Id80c4344bde755ffe54b01049108d60bc9f03323
Reviewed-on: https://code.wireshark.org/review/33166
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-15 21:48:16 +00:00
Dario Lombardo 9040e7b0f5 cemi: fix dead assignment (found by clang).
Change-Id: I30739813c84ae05c9c6edf31b204dfff8496a954
Reviewed-on: https://code.wireshark.org/review/30477
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-11-02 08:33:29 +00:00
Alexis La Goutte 23a7b81e0d cemi: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I30b48c9452ac1d996de2d018c4708dd181b39556
Reviewed-on: https://code.wireshark.org/review/30357
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-24 03:38:54 +00:00
Alexis La Goutte 25137aa68a cemi: fix copyright
Ethereal -> Wireshark

Change-Id: I2a1630c79b86238a67f440c9c0997e3648291147
Reviewed-on: https://code.wireshark.org/review/30356
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-24 03:38:43 +00:00
Alexis La Goutte 8bfabf7c48 cemi: fix no previous prototype for ‘proto_register_cemi/proto_reg_handoff_cemi’ [-Wmissing-prototypes]
Change-Id: Ib1d0a97f0226d97de4d0683446c3dbba47a6b0c4
Reviewed-on: https://code.wireshark.org/review/30355
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-24 03:38:16 +00:00
Ralf Nasilowski 9769df50ef KNX-IP: new KNXnet/IP dissector
The new KNXnet/IP dissector replaces the old KNXnet/IP dissector.

The new KNXnet/IP dissector supports the new KNX features
- A_MemoryExtended services
- A_PropertyExt services
- KNX Data Security
- KNXnet/IP Core V2
- KNXnet/IP Device Management V2
- KNXnet/IP Tunneling V2
- KNXnet/IP Routing V2
- KNXnet/IP Security

Change-Id: I3d1d716ef03d16d2720e6a1fcb23c2243d1cd956
Reviewed-on: https://code.wireshark.org/review/29155
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-10-16 09:03:43 +00:00