Commit Graph

96 Commits

Author SHA1 Message Date
Evan Huus e578c6caee to_str: pull scope arg up into tvb_ether_to_str
There are a bunch of near-identical macros here, but I'm gonna change
one at a time or else the builder times out at the number of files
changed in one merge.
2021-10-04 17:10:17 +00:00
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
Moshe Kaplan e16166a74c Detect and replace bad allocation patterns
Adds a pre-commit hook for detecting and replacing
occurrences of `g_malloc()` and `wmem_alloc()` with
`g_new()` and `wmem_new()`, to improve the
readability of Wireshark's code, and
occurrences of
`g_malloc(sizeof(struct myobj) * foo)`
with
`g_new(struct myobj, foo)`
to prevent integer overflows

Also fixes all existing occurrences across
the codebase.
2020-12-22 14:56:38 +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
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
Sven Eckelmann 0afeafa7c1 batadv: Add support for RTR(4|6) mcast flags
Two additional (previously reserved flags) in the mcast flags are now used
to inform other nodes that no IPv4/IPv6 multicast routers can be found in
its segment.

Change-Id: Idf066200cf6ccee581d5c3074b0500664460e806
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33768
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-30 16:41:22 +00:00
Sven Eckelmann 292193bff1 batadv: Fix info column seqno of IV_OGM v15 packets
The sequence number shown in the info field is read from the
iv_ogm_packet_v15 object before the actual member is actual read from the
packet buffer. Just split the initialization of the info column to the
actual dissection code for the packet to avoid these kind of problems.

Change-Id: I8eb637aae17680d227116156ef7828e77e36beae
Fixes: 4cc4315793 ("batadv: Add dissector support for batadv v15")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33547
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-06-11 17:44:26 +00:00
Sven Eckelmann 40ebc9be6a batadv: Add support for throughput meter icmp packet variant
The througput meter variant of the icmp packet only shared the first 17
bytes of the original packet structure. The rest of the packet is parsed
based on the message type (15). The new fields

* subtype (MSG, ACK)
* session
* seqno
* timestamp

are required to understand the data exchange between two mesh nodes.

Change-Id: Ic885097871c20d8b580a7f922ee5dac0510aa84e
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33542
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-11 14:01:37 +00:00
Pascal Quantin c51030151d BATADV: remove tree checks
Change-Id: Ie7a71f2f4cdfb2b24fc8ecb7906d5f99676df02e
Reviewed-on: https://code.wireshark.org/review/33551
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-11 00:07:44 +00:00
Sven Eckelmann f5bc4f91e2 batadv: Fix info column seqno of ICMP v15 packets
The sequence number shown in the info field is read from the
icmp_packet_v15 object before the actual member is actual read from the
packet buffer. Just split the initialization of the info column to the
actual dissection code for the packet to avoid these kind of problems.

Change-Id: I2ab316527854260bb8f85d2283964426fb7508bd
Fixes: 4cc4315793 ("batadv: Add dissector support for batadv v15")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33546
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-10 21:00:38 +00:00
Sven Eckelmann ee2da42762 batadv: Fix offset to ICMP v15 message type
To correctly show the message type of an batman-adv ICMP v15 packet, the
offset 3 inside the header has to be checked against the list of known
packet types.

Change-Id: I280aac59abd4133eac7d8381fac79f323c79b3de
Fixes: 4cc4315793 ("batadv: Add dissector support for batadv v15")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33545
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-10 21:00:27 +00:00
Sven Eckelmann 945565d62d batadv: Add support for OGM2 packets
The B.A.T.M.A.N. V protocol replaced the OGM announcement with two new
types:

* Echo Location Protocol packet
* OriGinator Message 2 packets

The first packet is used locally to identify neighbors and their base
parameters (orignator + elp interval). The second one is used to announce
each mesh node globally.

The second step to understand the B.A.T.M.A.N. V mesh globally in wireshark
is to dissect the OGM2 packets.

Change-Id: Idee5793dd909fd01588024b4d9b44236ea5ffb86
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33544
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-10 20:36:38 +00:00
Sven Eckelmann df40f5b279 batadv: Add support for ELP packets
The B.A.T.M.A.N. V protocol replaced the OGM announcement with two new
types:

* Echo Location Protocol packet
* OriGinator Message 2 packets

The first packet is used locally to identify neighbors and their base
parameters (orignator + elp interval). The second one is used to announce
each mesh node globally.

The first step to understand the B.A.T.M.A.N. V mesh locally in wireshark
is to dissect the ELP packets.

Change-Id: I13f5d60637a2774282ca75853884238e8e7dd33c
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33543
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-10 20:32:34 +00:00
Sven Eckelmann cbb2564d7e batadv: Parse priority field of fragmented packets
The upper 3 bits of the lower nibble in the octet for the sequence number
in fragmentation packets is used to store the priority of the original
(unfragmented) packet.

Change-Id: I1711ba078aafa06bec309c395e0ec3741b097c17
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33541
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-10 20:31:06 +00:00
Sven Eckelmann bf854b8dcc batadv: Fix filtering by mcast flags
The mcast tvlv flags field was incorrectly mapped to "batadv.iv_ogm.flags".
But this is the generic B.A.T.M.A.N IV's flags field and not the
specialized mcast TVLV's flag.

Just add a special field "batadv.tvlv.mcast.flags" to handle these flags.

Change-Id: Ia1f37f10d8d58146bd71ef607933f61d7dbc6e88
Fixes: 4cc4315793 ("batadv: Add dissector support for batadv v15")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33540
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-06-10 16:54:06 +00:00
Sven Eckelmann a2376d27d7 batadv: Check checksum for full TT responses
The full translation table responses for the v15 format of batman-adv
contain a list of vlans and then a list of entries for these VLANs. The
VLANs itself contain a checksum that is done over the entries which belong
to these VLANs.

The checkum must be correct or otherwise the receiver will not be able to
finish its synchronization of the remote translation table. Having this
information available for filtering is essential to understand such a
situation and to analyze why a node continues to send full table
requests.

Change-Id: I90f3d3d2c19ac85c1c5a6474cf1877583cfd1139
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/27442
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-05-13 16:16:52 +00:00
Sven Eckelmann 4a8957540d batadv: Accept Multicast TVLV v2
The multicast implementation in batman-adv exists in two different versions
which are incompatible. But their TVLV format for announcing the feature
itself is the same and can be supported by the current dissector.

Change-Id: I0e3012375912355e47adbb9d0e4f91fc7510156b
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/27443
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-05-13 16:16:32 +00:00
Sven Eckelmann 04fffbbe9f batadv: Fix label for batadv.unicast_tvlv.src
Change-Id: I73c06bb84efc874412b534348b9d1261b8ed5164
Fixes: v1.99.1rc0-546-g4cc4315793 ("batadv: Add dissector support for batadv v15")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/27440
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-12 21:24:19 +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
Michael Mann af54b292e6 Register reassembly tables
Register all reassembly tables with a central unit, allowing the
central unit to have the callback that initializes and destroys
the reassembly tables, rather than have dissectors do it individually.

Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4
Reviewed-on: https://code.wireshark.org/review/19834
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-29 13:29:04 +00:00
Guy Harris 8604ed2ef8 Consistently use tvb_reported_length_remaining().
That's the amount of data left in the packet; perhaps not all of it was
*captured*, and using tvb_reported_length_remaining() will throw an
exception, but that's what *should* happen ("packet cut short"
notification and all).

Use tvb_new_subset_remaining() to get a tvbuff with everything after a
certain point in the packet.

Change-Id: I2512e58e23600f7e7bbce0126732b05997692a65
Reviewed-on: https://code.wireshark.org/review/19596
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-09 23:14:10 +00:00
Michael Mann b7f4e25059 Adjust proto_tree_add_uint_format_value calls to use unit string
Several calls to proto_tree_add_uint_format_value could be better served
using BASE_UNIT_STRING with a "unit string" in hf_ field.  There also
a few cases where proto_tree_add_uint_format_value could just be
proto_tree_add_uint.

Added a few more "common" unit string values to unit_strings.[ch]

Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d
Reviewed-on: https://code.wireshark.org/review/19242
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-13 22:56:50 +00:00
Joerg Mayer 0c471e782f Fix more -Wused-but-marked-unused warnings/errors.
Change-Id: Ieb3e70a23c1a55b7ba60b1b32f159341adfe65b7
Reviewed-on: https://code.wireshark.org/review/14682
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-28 19:06:13 +00:00
Michael Mann 1e60d63c8c Create call_data_dissector() to call data dissector.
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-20 17:38:03 +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 5fe11fb759 Call the "without FCS" version of the Ethernet dissector.
At least in the sample captures attached to bug 2631, the encapsulated
Ethernet frames don't include the FCS.

Bug: 9933

Change-Id: Ie14b87020c44d739173e5da9fc58a91924f38dfe
Reviewed-on: https://code.wireshark.org/review/13377
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-18 01:17:25 +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
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now.

Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f
Reviewed-on: https://code.wireshark.org/review/12484
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:37:36 +00:00
Michael Mann 8f52962833 Convert some "ethertype" subdissectors to "new" style.
Change-Id: I93c001e78f9365300d393bac6714535f454c6515
Reviewed-on: https://code.wireshark.org/review/11647
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-09 15:59:28 +00:00
João Valverde 3df2333155 Remaining ADDRESS macro to address function conversions
Change-Id: I8bc9af431e70243b05f4f0ce8c2b8ee451383788
Reviewed-on: https://code.wireshark.org/review/11463
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03 12:20:34 +00:00
Gerald Combs 86fe2be4dc Use address functions instead of ADDRESS macros in asn1 and epan
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the asn1 and epan directories.

Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4
Reviewed-on: https://code.wireshark.org/review/11200
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22 11:45:56 +00:00
Peter Wu 80f7ee063d Call reassembly_table_destroy for some dissectors
This patch adds reassembly_table_destroy calls as cleanup function for
dissectors which have a simple init routine that just calls
reassembly_table_init (comments are ignored).

The changes were automatically generated using
https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4cc0aec05dc67a51926a045e1955b7a956757b5e
(with the if and assignment parsers disabled).

The only difference from the autogenerated output is that the XXX
comments from the init routines in smb-pipe and tds dissectors are kept.

Change-Id: I64aedf7189877247282b30b0e0f83757be6199e7
Reviewed-on: https://code.wireshark.org/review/9222
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:34:28 +00:00
jorge power ad3685690a add register_dissector call for name batadv
Change-Id: Idf92449e510a347ad44225f79e36a274123cd0da
Reviewed-on: https://code.wireshark.org/review/8186
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-24 20:17:45 +00:00
AndersBroman 05c0152370 Replcae deprecated API tvb_length with tvb_reported_length or tvb_captured
length.

Change-Id: Id42f3409a32e202528d350f7afde7376e411fc51
Reviewed-on: https://code.wireshark.org/review/8076
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-15 15:22:42 +00:00
Michael Mann 9c55903029 Use COPY_ADDRESS_SHALLOW instead of duplicating TVB_SET_ADDRESS and SET_ADDRESS calls for the same address.
Change-Id: I0c9cc5d574fdd73ecf1f8b32dbbf0ddb2b885116
Reviewed-on: https://code.wireshark.org/review/7437
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-03-01 12:54:33 +00:00
Michael Mann 0002424f97 Remove most of the tvb_get_ptr calls in the packet-batadv.c dissector.
These calls were all getting ether addresses which can be gotten by other means.

Change-Id: I9a3d564483c9ee9b8e5183bb9086da8a315c41fc
Reviewed-on: https://code.wireshark.org/review/7421
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-27 07:42:40 +00:00
Michael Mann 8d5da72ff9 Add tvb_address_with_resolution_to_str.
Convert dissectors to using the API where appropriate.

Change-Id: I059582f73a75635d4a0338d02d4c4b212162480b
Reviewed-on: https://code.wireshark.org/review/7296
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-22 02:53:48 +00:00
Michael Mann 13531d36fb Convert dissectors to use address_with_resolution_to_str instead of two separate calls for address string and name resolution.
Change-Id: I7c8cfbcf201b3b73afe731302572646ce7833d64
Reviewed-on: https://code.wireshark.org/review/7284
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-02-21 15:33:56 +00:00
Alexis La Goutte a3e934fa2a BATADV: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I3c33511389aa2f4b3eed73f1c712561b20e18bf7
Reviewed-on: https://code.wireshark.org/review/6395
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-08 13:00:23 +00:00
Michael Mann 4088a8286d SET_ADDRESS -> TVB_SET_ADDRESS to "hide" some of the tvb_get_ptr use.
Not all changes were able to remove their corresponding tvb_get_ptr, because there are other API dependent on the (tvb_get)pointer, but future iterations optimizing those other APIs will then be able to remove it.

Change-Id: Id7cefd440b81834de1d1aace7cd0789b1c871a22
Reviewed-on: https://code.wireshark.org/review/6358
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-01-07 12:37:52 +00:00
Michael Mann f002332d88 Replace ether_to_str with either address_to_str or tvb_ether_to_str.
Change-Id: I8cce9fddbfe950e27e96ea8a5a6d2e0921ff4260
Reviewed-on: https://code.wireshark.org/review/5933
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21 15:13:30 +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
Bill Meier f412c9a01a Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...
(for some dissectors which fetch all other integral fields using
   ENC_BIG_ENDIAN).

Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56
Reviewed-on: https://code.wireshark.org/review/5748
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13 18:45:56 +00:00
Michael Mann 05516b0c92 Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.
Part 1 of many

Change-Id: I77a5789ac23388e6a5f8098dc398592f39638124
Reviewed-on: https://code.wireshark.org/review/5532
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-29 22:42:56 +00:00
Alexis La Goutte e26e1dc543 BATMAN: fix indent and encoding args
use tabs for indent and use fix-encoding-args tools

Change-Id: I5e066c6cbc429021cf21a55d5ffd5b60718ad5f8
Reviewed-on: https://code.wireshark.org/review/5340
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-11-17 00:55:42 +00:00
Alexis La Goutte b867baf800 BATMAN: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I6cfabc18921397002a2303f3511fa51bf5b41956
Reviewed-on: https://code.wireshark.org/review/5341
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-16 17:18:35 +00:00
Sven Eckelmann 4cc4315793 batadv: Add dissector support for batadv v15
The packet format for batman-adv v15 supports:

 * Complete reordered packet type ids
 * reordered flags
 * type-version-length-value data containers
 * new types for coding packets and unicast transfer of TVLVs
 * dropped packet types for vis, translation table query and roaming
 * reordered packet formats
 * transparent fragmentation of batadv packets

Change-Id: I9e6733f9dd6b54eeecda19cf570599161d28b46e
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
Reviewed-on: https://code.wireshark.org/review/5175
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-14 01:40:29 +00:00
Sven Eckelmann 48885cc1bc batadv: Add missing padding to batadv_unicast_4addr_v14
The already frozen packet format of batman-adv for Linux 3.5 was rejected by
David S. Miller. The 4addr format v14 was therefore changed after the freeze
and published in his final form in Linux 3.8.

Change-Id: I519476c4c6d62b403e197fae6a853d9bbe61f9bc
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
Reviewed-on: https://code.wireshark.org/review/5174
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-08 00:20:07 +00:00
Bill Meier cd7a11c0d1 Add editor modelines; Adjust indentation as needed.
Change-Id: Ie8d4056ab706bbc85c8247682b1a64ea98bc89f2
Reviewed-on: https://code.wireshark.org/review/4185
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 02:01:58 +00:00