Commit Graph

67276 Commits

Author SHA1 Message Date
Pau Espin ad60fe0238 gsm_osmux: Add support to follow Osmux streams and show its statistics
Change-Id: I5262b3b1ac5a6f5bc6ac932eedbb889847131d9c
2017-05-12 11:47:12 +02:00
Pau Espin 4814685f20 gsm_osmux: Support multiple OSmux frames per packet
Also split and show all AMR payloads

Change-Id: I5bde4e87dc51fd4a996a14117813ea89d7005d38
2017-05-12 11:47:07 +02:00
Pau Espin ba92095873 gsm_osmux: Add RTP Marker field
GSM Osmux recently got support to bring RTP Marker (M) bit. It should be
mostly backwards compatible as the first bit was reserved and not used
before for the FieldType.

Support was added in libosmo-netif commit e98afe5808176efb60298a2f764e8e11efaf580b
This bit is documented in the protocol documentation recently available: http://ftp.osmocom.org/docs/latest/osmux-reference.pdf

Change-Id: Ia0508971519b3df9499d963404bb8a0e3c4b9c33
2017-05-12 10:44:50 +02:00
Pau Espin f15b779d0b GTK+Qt: Show non-plugin stats_tree entries on the menu bar
Change-Id: I565b0d2d43dd98781f77a302a20bd841e3e4650e
2017-05-12 10:44:44 +02:00
Peter Wu 129bdb5a16 dns: improve loop detection in label decompression
Previously the number of allowed pointers within a message is equal to
the data in a tvb (16575 in one example). This is still expensive, so
implement an alternative detection mechanism that looks for a direct
self-loop and limits the total pointers to about 256.

Bug: 13633
Change-Id: I803873e24ab170c7ef0b881d3bdc9dfd4014de97
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1206
Reviewed-on: https://code.wireshark.org/review/21507
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-05-11 14:52:44 +00:00
Guy Harris 79eab8ca07 Force HAVE_REMOTE to be defined when including pcap.h with remote support.
WinPcap made the mistake of having stuff in its public header fines
depend on a configuration #define, HAVE_REMOTE; this means that we need
to forcibly define it when building with remote capture support.

The tip of the libpcap master branch does not have that botch; hopefully
future versions of libpcap-for-Windows will be based on that libpcap and
thus lack that botch as well.

Defining HAVE_REMOTE in config.h is not the right fix, as it makes it
look like a *Wireshark* configuration option that code in Wireshark
should test, rather than a *WinPcap* configuration option that the
pcap.h that ships with the WinPcap SDK should have been changed, as part
of the build process, to correctly define or not, so that users of
WinPcap don't have to define it themselves.

Change-Id: I62d1eca6d3c900d0dcc9fbc011db77f595a86313
Reviewed-on: https://code.wireshark.org/review/21593
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 10:57:22 +00:00
Guy Harris 871a8a2ccc Another shadowing fix for abort().
Change-Id: I991bd24ab8b64bdfeae275941d79b716da3309f9
Reviewed-on: https://code.wireshark.org/review/21592
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 10:50:45 +00:00
Guy Harris 804d0cdfa3 Squelch warning from some compilers.
Change-Id: Iacd5832e3b63fa24907423d2b7df40e81fafb0de
Reviewed-on: https://code.wireshark.org/review/21591
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 10:08:07 +00:00
Guy Harris 1ecf3b6645 Note whether we found remote pcap support in libpcap.
Change-Id: Ida20f7164d3132a72fdd6547905cd0af4e451917
Reviewed-on: https://code.wireshark.org/review/21590
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 09:49:31 +00:00
Christoph Schlosser 1be20bc4c2 EPL: Dissect read/write multiple parameter SDOs
The dissector only dissected Write Multiple Parameter by Index requests
 correctly.
 Now it is possible to dissect the response to the request and
 Read Multiple Parameter by Index request and responses.

Bug: 13677

Change-Id: I13aae241690cd3ac9dfbe8129ef56d0fc9016301
Reviewed-on: https://code.wireshark.org/review/21034
Reviewed-by: Christoph Schlosser <christoph@schlosser.xyz>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-11 04:56:36 +00:00
Pascal Quantin f751918476 GSM RLC/MAC: fix global-buffer-overflow error reported by ASAN
After a M_NEXT_EXIST(), you should always have another variable (like
M_UINT, M_TYPE, ...) and not immediately end the structure with
CSN_DESCR_END.
Note that this is a workaround as the current description does not allow
a proper parsing anyway (as the structure is reentrant). But at least it
solves the buffer overflow.

Bug: 13692
Change-Id: I8e607aadcced2d8cc636dc10f9690c5c679ad581
Reviewed-on: https://code.wireshark.org/review/21585
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-11 04:55:21 +00:00
Guy Harris d13b8ea13c Get rid of HAVE_REMOTE.
We never test for it - we test for HAVE_PCAP_REMOTE - so there's no need
to set it in config.h.

While we're at it, note that "PCAP" in "HAVE_PCAP_REMOTE" can refer to
libpcap as well as WinPcap, given that, at least in the tip of the
master branch, you can configure remote support in libpcap, although
it's not enabled by default (it needs to be vetted for security, as it
increases the attack surface of a machine running the server *and* of an
application using libpcap with remote support).

Change-Id: I3c96cf16bbda19ec7c085f74cffc6f125198d45b
Reviewed-on: https://code.wireshark.org/review/21589
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-10 21:16:29 +00:00
Guy Harris 537eddbc40 Define YYMALLOCARGTYPE appropriately.
Define it, so the generated parser knows what argument type the function
passed to MateParserAlloc() takes.  Use it when declaring
MateParserAlloc().

Change-Id: Ice18fd6b5fdbdb31f527e5d6eb06e78594d4565b
Reviewed-on: https://code.wireshark.org/review/21588
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-10 20:47:35 +00:00
Guy Harris 559952b903 Clean up MateParser routine declarations.
Remove the declarations from mate_parser.l, and have mate_parser.h
include mate.h at the beginning of the file, instead.

Move the #if'ed version of the declaration of MateParserAlloc() to
mate.h.

Change-Id: I03ffdd5f093b179ffc0cb0e43eac093f7e4af65c
Reviewed-on: https://code.wireshark.org/review/21587
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-10 20:42:06 +00:00
Guy Harris 12057373d7 This is specified in section 8 of the DIX v2.0 Ethernet spec.
Note that, and give a URL for the spec.

Change-Id: I60953ddf2e7934ac273ba808ae4aa662f562917e
Reviewed-on: https://code.wireshark.org/review/21583
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-10 01:42:55 +00:00
Alexis La Goutte fc1f62a88c RADIUS: sync with FreeRADIUS
commit d4e9cc75313f05678d0f2ac41962f46c99751e1f
Author: Alan T. DeKok <aland@freeradius.org>
Date:   Sun May 7 12:56:57 2017 -0400

    added one more attribute

Change-Id: I5821076c2d4f02d82c393a768edd0c77da582a2d
Reviewed-on: https://code.wireshark.org/review/21576
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09 23:11:13 +00:00
Alexis La Goutte a78ff1093c nge: add modelines info
Change-Id: Ib75f637c36be575a85e75fee6282d1a16455bfd6
Reviewed-on: https://code.wireshark.org/review/21572
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Charlie Lenahan <clenahan@sonicbison.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09 23:10:04 +00:00
Alexis La Goutte 5d45e77eef nge: fix no previous prototype for ‘proto_register_nge/handoff_nge’ [-Wmissing-prototypes]
Change-Id: I2e7cecad96390f709c6a135b6059c01712971dfe
Reviewed-on: https://code.wireshark.org/review/21571
Reviewed-by: Charlie Lenahan <clenahan@sonicbison.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09 23:09:47 +00:00
Alexis La Goutte 5e944ee2a8 mate (grammar): fix no previous prototype for function 'MateParser/Alloc/Free' [-Wmissing-prototypes]
Change-Id: I87ff11b7c04cb3b6963d4c8c16df2c3d60a0aec8
Reviewed-on: https://code.wireshark.org/review/21574
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>
2017-05-09 23:09:26 +00:00
Guy Harris 8bab958e19 You can't have a field be both integer and string.
For an inter-frame gap that couldn't be determined, just add it with
proto_tree_add_uint_format_value() and "Cannot be determined" as the way
the value is displayed.

(But why add it *at all* if it couldn't be determined?)

Change-Id: I491f9a6fe430141a15568e9a7dec3253a1c78cf5
Reviewed-on: https://code.wireshark.org/review/21582
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09 22:08:02 +00:00
Guy Harris 9d6083efd1 Give fields better names than ".bitN".
".bitN" names 1) don't indicate what the bit actually *means* and 2) run
the risk of collisions if the bit in question has a different meaning in
different bitsets.

Combine the "receive case" and "transmit case" bitsets in some cases
where the only difference between the two sets is that some bits are
present only in one set, but if a bit is present in both sets, it has
the same meaning.

Change-Id: Ie1cb9d076e431b30b64ef05acab39efe38193d33
Reviewed-on: https://code.wireshark.org/review/21581
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09 21:47:30 +00:00
Guy Harris 3d9cadd392 De-capitalize "error" - it's not capitalized in other field names.
Change-Id: I6f5aaaba47ab8d36124aa10c63ceec7cf1f70867
Reviewed-on: https://code.wireshark.org/review/21580
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09 21:40:23 +00:00
Guy Harris b8040a44ce Fix various field names and types.
Make some names used for multiple fields more stylistically consistent.

If a bitfield has more than one bit, it's not Boolean - the extra bits
mean it has more values than "true" or "false".

If a bitfield has only one bit, and indicates that something is
true/false, or enabled/disabled, or present/absent, or on/off, or
something else obviously Boolean, it's Boolean.

Change-Id: I89d5e214eb5c4e7f72eb59a78757f0f49fec3dbf
Reviewed-on: https://code.wireshark.org/review/21579
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09 21:29:29 +00:00
Björn Ruytenberg c25b4f2f3f debian-setup: Always install Libgcrypt
Libgcrypt is mandatory to build. Do not mark as optional.

Change-Id: Iafbe1cd93f4185e2a9492bb0a21c30a26d8883ce
Reviewed-on: https://code.wireshark.org/review/21575
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-05-09 18:22:21 +00:00
Guy Harris 09209056ce Set nss and rate_mcs_index in more arms of the Series II PLCP switch.
For HT mixed, set it the same way it's set for HT greenfield.

For pre-HT, set it to 0.

Also, for the "unknown" case, set rate_mcs_index to 0.
This should obviate the need to initialize either of those variables,
don't initialize them, so that failing to set them in an arm of the
switch statement shows up as an error if the compiler's dataflow
analysis actually bothers to check this.

Change-Id: I92703770dd5000a579b53609fb93a2085fd9fca3
Reviewed-on: https://code.wireshark.org/review/21573
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09 17:51:59 +00:00
Alexis La Goutte 2d44f7f303 ua3g: fix conflicting entry in its value_string
Field 'Audio Env.' (ua3g.ip.set_param_req.parameter.audio_env) has a conflicting entry in its value_string: 2 is at indices 2 (Open Space) and 3 (Meeting Room))

Field 'Audio Env.' (ua3g.ip.set_param_req.parameter.audio_env) has a conflicting entry in its value_string: 2 is at indices 2 (Open Space) and 4 (Noisy))

Field 'Audio Env.' (ua3g.ip.set_param_req.parameter.audio_env) has a conflicting entry in its value_string: 2 is at indices 3 (Meeting Room) and 4 (Noisy))

Change-Id: I495f183dd52e59ec64e6eea0df15a5b243d8b87c
Reviewed-on: https://code.wireshark.org/review/21568
Reviewed-by: Nicolas BERTIN <nicolas.bertin@al-enterprise.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.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>
2017-05-09 16:37:00 +00:00
Adrian Simionov 0972db2f9d docsis: DCC-REQ TLV 2.7 support
Change-Id: I40724306d5facd0f4a5a9ca2354330577857d27f
Reviewed-on: https://code.wireshark.org/review/21563
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-05-09 16:36:21 +00:00
Michael Mann 5cd7ea6af2 Don't have epan_dissect_init() return anything.
It manipulates the epan_dissect_t structure passed into it and then
returns that.
Callers can (and have been) just using the passed in epan_dissect_t
structure anyway.

Change-Id: Ia19d360a7347ff473654eeb553756f59a38f95bd
Reviewed-on: https://code.wireshark.org/review/21570
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09 16:36:06 +00:00
Graham Bloice 8c576051fd More fields, more pre-allocated memory for fields.
Change-Id: I36469fad59d28a1fbf15d3fd99544a3a6b0ef015
Reviewed-on: https://code.wireshark.org/review/21569
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-05-09 14:55:27 +00:00
Alexis La Goutte 33f3866fb4 tshark: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I4425be3bbee0e781dff59a07d7de65f5eba81bdd
Reviewed-on: https://code.wireshark.org/review/21564
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09 13:42:24 +00:00
Alexis La Goutte ea3b356eb2 nm: Uninitialized argument value Warning found by Clang Analyzer
false positive

Change-Id: I8aa2537328a04a64b06142a04ee76705d0df5443
Reviewed-on: https://code.wireshark.org/review/21566
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09 13:38:01 +00:00
Alexis La Goutte 666366e069 vwr (wiretap): fix Assigned value is garbage or undefined Warning found by Clang Analyzer
Change-Id: I45766c7e89a009176ae56fe9e9f5a8dd63b2995b
Reviewed-on: https://code.wireshark.org/review/21567
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-09 11:36:11 +00:00
Alexis La Goutte a7b0674076 nm: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I7592737477e105870ef43118f40c0ab552c81626
Reviewed-on: https://code.wireshark.org/review/21565
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-09 11:34:33 +00:00
AndersBroman fb44c8ced5 [GSM RLCMAC] Add comments.
Change-Id: I2d98d8f318fdbe160974a69f50c456683669e57e
Reviewed-on: https://code.wireshark.org/review/21562
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-09 08:48:05 +00:00
Michael Mann fa5f913256 Bring DOCSIS Mac Management "dissectors" into modernity.
1. Use proto_tree_add_item_ret_uint to remove separate "gets"
2. Remove if (tree)s that prevented expert_info
3. Apply consistent whitespace
4. Apply consistent TLV behavior, making T and L always filterable
5. Remove T name (of TLV) from field name itself (where applicable)
6. Use BASE_UNIT_STRING and BASE_NO_DISPLAY_VALUE

Tested with capture generated from https://github.com/AdrianSimionov/docsis-generator

Change-Id: I9987397ccb3248b2a26d850af468740f94b28a63
Reviewed-on: https://code.wireshark.org/review/21561
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>
2017-05-09 04:52:00 +00:00
Alexis La Goutte 954548fdb9 qsig: fix conflicting entry in its value_string
Field 'Error' (qsig.error) has a conflicting entry in its value_string: 43 is at indices 12 (proceduralError) and 42 (notActivated))

Change-Id: I17fcebc677495033dedad57dd0c3d87631152290
Reviewed-on: https://code.wireshark.org/review/21456
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-08 17:44:04 +00:00
Alexis La Goutte c88e60f9fb ceph: fix conflicting entry in its value_string
Field 'Type' (ceph.type) has a conflicting entry in its value_string: 64 is at indices 39 (C_CEPH_MSG_PRIO_LOW) and 40 (C_MSG_MON_SCRUB))

Change-Id: I69e6bd56d928c20b6262999e057c92f0d325e96d
Reviewed-on: https://code.wireshark.org/review/21509
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>
2017-05-08 17:43:19 +00:00
AndersBroman 07fc801684 [GSM RLCMAC] Update : PACKET RESOURCE REQUEST to Release 14.0.0
Change-Id: I41e6ebf862f0bd9523778053d40f18ae7385a5bd
Reviewed-on: https://code.wireshark.org/review/21560
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-08 17:40:14 +00:00
Peter Wu ab504191fc Qt: try harder to find a working monospace font
QFont::toString returned the default font (which might be unavailable),
leading to use of non-monospace fonts in the bytes view. Detect the
effective font instead and apply it to avoid this issue.

Add additional logic to invoke font detection when the configured font
is bad (for example, because of the bug or because a font has been
removed in meantime).

Bug: 13638
Change-Id: I8a625cf365c90119caebe8c4deada0df7426e53a
Reviewed-on: https://code.wireshark.org/review/21551
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Ahmad Fatoum <ahmad@a3f.at>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-08 03:07:43 +00:00
Guy Harris ee37135c67 Note that the HT MCS index macros can't return all possible MCS values.
I don't know whether this is a bug in the software or a lack of support
in the hardware.

This at least notes the issue in CID 1405905.

Change-Id: I481454bc38842a0f877cb8b52b73e1156fd362b5
Reviewed-on: https://code.wireshark.org/review/21558
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-08 02:39:51 +00:00
Guy Harris 548e9762fb Fix handling of 20 MHz VHT with MCS = 9.
That's valid only for 3 or 6 spatial streams; return 0 as the bitrate
for all other values.  Also, handle the 6 spatial streams case.

Give the conversion tables explicit sizes, to make it clear what
subscripts are valid.

Return 0 for an MCS > 9, for consistency with the other error return,
and to mark it as clearly wrong.

Fixes CID 1405908.

Change-Id: Icbf655c63c0e88fd6cec7c66bae85fd887a3bd9c
Reviewed-on: https://code.wireshark.org/review/21557
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-07 21:19:15 +00:00
Guy Harris f4585f957d Regenerate header.
Change-Id: Ie77c182b0ee61f84f505b0f40a171d5afef59811
Reviewed-on: https://code.wireshark.org/review/21556
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-07 21:14:20 +00:00
Martin Kaiser 2229665d48 gif: fix the version detection
tvb_strneql() returns 0 if the two strings are equal.
Thanks to Ahmad Fatoum for reporting this bug.

Change-Id: Id6cde56623e18fe0a28f37b108dc1848cc58e1c3
Reviewed-on: https://code.wireshark.org/review/21554
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-05-07 21:02:57 +00:00
S. Shapira 163d66099d UMTS Iub: Refactored U-RNTI resolving logic for dedicated channels
Instead of mapping Scrambling codes to U-RNTIs, now mapping CRNC communication context IDs to U-RNTIs.

Change-Id: Id81b7764d2941b742f21094dac391f8658061a80
Reviewed-on: https://code.wireshark.org/review/21495
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-07 21:01:05 +00:00
Uli Heilmeier 0419add8a1 ixveriwave: Fix maybe-uninitialized warning
Fix maybe-uninitialized warning:
packet-ixveriwave.c:2508:16: error: 'rate_mcs_index' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (rate_mcs_index < 4)

Change-Id: I878f8d68104cf4f01990eebea85cfbb2a170a5bd
Reviewed-on: https://code.wireshark.org/review/21553
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-05-07 20:53:38 +00:00
Martin Kaiser 6a040b525c gif: start cleaning up the dissection code
Remove the global if(tree). We should not throw exceptions under if
(tree). Buf we may get exceptions while parsing the gif file.

Process the version string once as we go through the file. (Ok, we
already had to look at it to figure out that we have a gif file.)

Use tvb_reported_length_remaining() in the main loop.

Change-Id: Ie00594eebffc715676ffd5df8cbf7d43034aa68d
Reviewed-on: https://code.wireshark.org/review/21545
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-05-07 20:34:51 +00:00
Guy Harris c1b7aa4d95 Clean up various things.
Sort the hf_ definitions, and the entries for them, as much as possible
by the order in which they're put into the protocol tree.

Indicate which if statement branches are for pre-OCTO hardware and which
are for OCTO hardware.

Pre-HT PHYs don't have an MCS index; the "MCS index" is, rather, an
index into a table of bit rates, so call it a "rate index".

Fill in some more 802.11 radio pseudoheader fields.

Use proto_item_append_text to indicate the direction in the entry for
the L1 information.

Don't show irrelevant fields, such as the preamble length for HT and
VHT.

Change-Id: Ibd2baff09fd4ec6e4a84dc0ae2e4615631a2d15e
Reviewed-on: https://code.wireshark.org/review/21550
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-07 19:53:17 +00:00
Martin Kaiser d0e317d69e gif: refactor the detection of a gif file
Generally, we should not throw an exception before we know that this is
our file/packet. Use tvb_strneql() to get the version string. This
function does not throw an exception if there are fewer bytes left than
we requested.

(I know that we check for reported len < 20. However, for captured
length > 6 and reported length < 20, the current code does not work.)

Change-Id: I5214c5c9dc9da616a94ae96269ec1c9e6f412e8e
Reviewed-on: https://code.wireshark.org/review/21544
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-05-07 18:18:26 +00:00
Martin Kaiser 8657646e0b gif: remove pointless coments, unused debug macro
Change-Id: Id4ac23a7e5164e40ddc0ee22ddb62f7121b74ad9
Reviewed-on: https://code.wireshark.org/review/21543
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-05-07 15:34:23 +00:00
Martin Kaiser 47b1a98f09 gif: (trivial) fix a typo
The trailer byte is 0x3b, not 0xb3.

Change-Id: I9b2d21f369957fc0c4eb5ff376c4aa7fbdc28c9e
Reviewed-on: https://code.wireshark.org/review/21542
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-05-07 15:34:06 +00:00