Commit Graph

42 Commits

Author SHA1 Message Date
Michael Mann 2eb7b05b8c Convert most UDP dissectors to use "auto" preferences.
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67,
convert dissectors that use "udp.port".

More cleanup done on dissectors that use both TCP and UDP dissector
tables, so that less preference callbacks exist.

Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3
Reviewed-on: https://code.wireshark.org/review/18120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13 02:51:18 +00:00
Dario Lombardo d68f62244d aruba_erm: register dissector by name.
Change-Id: Ifad70ed2ee2a554cdc31496ad47148728071abdb
Reviewed-on: https://code.wireshark.org/review/17458
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-02 19:57:41 +00:00
Guy Harris a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +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
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
This will make it easier to determine protocol dependencies.

Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used)

Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d
Reviewed-on: https://code.wireshark.org/review/14446
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17 00:05:17 +00:00
Simon Barber ffa9e938e2 Refactor 802.11 radio flags.
The use of a flag field here is aesthetically unpleasing when the flags
are referred to frequently. Convert these into bitfield entries.

Change-Id: I6f47e31558439dfd343ec7f856d04480366a1237
Reviewed-on: https://code.wireshark.org/review/12511
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-24 07:58:51 +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 bbdd89b973 create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: Ie514f126352e7598acc4f7c38db9c61d105d5e48
Reviewed-on: https://code.wireshark.org/review/11850
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-11-16 03:50:05 +00:00
Michael Mann 74541a9596 Don't allow multiple registrations of a protocol in dissector tables.
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing.

The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not.  It's just ENFORCED for Decode As.

Bug: 3949
Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127
Reviewed-on: https://code.wireshark.org/review/11405
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04 12:39:40 +00:00
Guy Harris f1bc598d87 Clean up 802.11 radio information handling.
Have a field that holds the PHY type but nothing else.  Have
a union with structures holding PHY-type-specific information, as a
bunch of attributes are PHY-specific.

If we have a channel and band, but don't have the frequency, attempt to
calculate the frequency, and add that to the radio information if we
succeed.  If we have the frequency, but don't have the channel, attempt
to calculate the channel, and add that to the radio information if we
succeed.

Handle FHSS information, 11a "half/quarter-clocked" and turbo
information, 11g normal vs. Super G, additional 11n and 11ac
information, and the "short preamble" flag for 11b and 11g.

Add a PHY type for 11 legacy DSSS and detect it if possible.

Clean up the AVS dissector - make all fields wlancap. fields (if you
want generic fields, use the wlan_radio. fields).

Set more fields when writing out Commview Wi-Fi files.

Change-Id: I691ac59f5e9e1a23779b56a65124049914b72e69
Reviewed-on: https://code.wireshark.org/review/9146
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-25 19:15:56 +00:00
Alexis La Goutte c37b05d8ab ARUBA (ERM): Add type 5
it using PeekRemote-Ng (with Header version = 2)

Change-Id: I601cb7ecfaf01e51ec696502d10918f869486d01
Reviewed-on: https://code.wireshark.org/review/9126
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-06-25 15:13:21 +00:00
Alexis La Goutte 85d39893e0 Aruba (ERM): Add missing type 4 (PPI) to Decode AS
Change-Id: If2cb75fc9992bec2d699c5abace06dccc8bfb4ae
Reviewed-on: https://code.wireshark.org/review/9125
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-25 15:12:59 +00:00
Alexis La Goutte 27fc2b7985 ERM (Aruba): Fix Assigned value is garbage or undefined found by Clang Analyzer
Fix also trailing whitespace

Change-Id: I9e9e09f6855f41609581ea1b7cd1bd16b15f85f4
Reviewed-on: https://code.wireshark.org/review/9006
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-21 16:26:03 +00:00
Guy Harris 2895d58dc3 Call the "802.11 radio information" dissector for radio headers.
Have dissectors of various forms of radio information headers in the
packets fill in a struct ieee_802_11_phdr with radio information as
appropriate, and call the "802.11 radio information" dissector rather
than the raw 802.11 dissector.

This means that the radio information can be found in a
protocol-independent and encapsulation-independent form when you're
looking at the packet; that information can be presented in a form
somewhat easier to read than the raw metadata header format.

It also enables having a single "radio information" tap that allows
statistics to handle all different sorts of radio information
encapsulation.

In addition, it lets us clean up some of the arguments passed to the
common 802.11 dissector routine, by having it pull that information from
the struct ieee_802_11_phdr.

Ensure that the right structure gets passed to that routine, and that
all the appropriate parts of that structure are filled in.

Rename the 802.11 radio protocol to "wlan_radio", rather than just
"radio", as it's 802.11-specific.  Give all its fields "wlan_radio."
names rather than "wlan." names.

Change-Id: I78d79afece0ce0cf5fc17293c1e29596413b31c8
Reviewed-on: https://code.wireshark.org/review/8992
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-20 23:02:21 +00:00
Alexis La Goutte 5ce025c124 Aruba ERM: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: If29fce277b43d287ad9cea47477b19320831c943
Reviewed-on: https://code.wireshark.org/review/8830
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-08 07:28:54 +00:00
Alexis La Goutte ac51c091a9 Aruba ERM: Use decode AS for decode Aruba ERM Type..
Change-Id: I4c0813a273e88b16dcad7996dc1dcaaac3d01944
Reviewed-on: https://code.wireshark.org/review/8712
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-06 09:47:58 +00:00
Alexis La Goutte 7e2e8ef04c Aruba ERM: Fix FCS for Type 1 (PEEK)
Type 1 is Peek type (using Peek dissector)
Peek dissector is also update for Cisco AP, Pass info to peek dissector it is "Aruba PEEK" (with buggy FCS)

Add also check of signal value (when signal strength = 100%) it is a TX packet and there is no FCS

Bug:11204

Change-Id: I435e0e3275bc0a03fa534e49e86251114f568040
Reviewed-on: https://code.wireshark.org/review/8710
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-06 09:47:35 +00:00
Alexis La Goutte 8d46c411e9 Aruba ERM: Fix FCS for Type 3
Add a check of signal value (when signal strength = 100%) it is a TX packet and there is no FCS
Only work for Type3 (no signal information on Type 0)

For type 0, Always display the FCS

Bug:11204
Change-Id: I837f8c01c0d0284ecb218b6b03fa9ac025fac5f2
Reviewed-on: https://code.wireshark.org/review/8569
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-06 09:46:00 +00:00
Alexis La Goutte 390299c953 Aruba ERM: fix typo
Double space between Signal Strength and [percent]

Change-Id: Ibf645a9e44d2e642df8fd53afd0a6ccbbb2adde0
Reviewed-on: https://code.wireshark.org/review/8549
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-20 14:53:33 +00:00
Guy Harris d934d40f96 Update some comments.
There's all sorts of interesting stuff out there on the Intertubes if
you happen to be searching for the right thing.

Change-Id: Ib5e18ece5dfaa284ece8cfda23887a9408c8318e
Reviewed-on: https://code.wireshark.org/review/8503
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-17 21:50:19 +00:00
Guy Harris 36af2c61e8 Improve comments, fix capitalization of "Aruba".
Give better comments describing the 5 different formats Aruba equipment
can use.

It's "Aruba Networks", not "ARUBA" anything.

Change-Id: I300d77375e8182b60e830cb545d8802c1a49569c
Reviewed-on: https://code.wireshark.org/review/8500
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-17 19:43:19 +00:00
Guy Harris 83787bb6ee Make the human-readable names the same in the preferences and the packets.
Change-Id: Ie00c81e9893412cc322cfb08e8b5b5f4e5ce47e4
Reviewed-on: https://code.wireshark.org/review/8499
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-17 19:20: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
Guy Harris 21a1208735 Introduce 802.11 dissectors with wired-in "FCS present" indications.
For a number of protocols that encapsulate 802.11 frames inside packets,
whether the frame includes an FCS or not is specified by the protocol,
not by whether the link-layer frame carrying the packets *itself*
includes an FCS.  As we've done with Ethernet, add "_withfcs" and
"_withoutfcs" dissectors, which *don't* check the pseudo-header FCS
length indication, and call those, rather than dissectors that check the
pseudo-header length indication, from the dissectors for those protocols.

Change-Id: Ib8c8ecdd872e1782fdfc66e7573415d91911a62e
Reviewed-on: https://code.wireshark.org/review/1866
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-29 17:57:14 +00:00
Pascal Quantin e63eb0298a Fix compilation of packet-aruba-erm.c
Change-Id: I30bef3eb92e1bdf67e4a3019ef3542e14ac9505c
Reviewed-on: https://code.wireshark.org/review/669
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-15 09:01:12 +00:00
Alexis La Goutte a16b86282c Enhance dissector Aruba ERM
Support type 0 (legacy), type 1 (peek), type 3 (pcap+radio) mode
via preference

type 2 (airmagnet) is no yet supported

Change-Id: I4f0d10e5d9b87bdcf5863d84e565201acaeee45b
Reviewed-on: https://code.wireshark.org/review/647
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-15 08:21:24 +00:00
Hadriel Kaplan 08bf1a4ae1 Add support for Aruba ERM Radio-Format
This adds support for a variant of the current Aruba ERM format,
a new format that provides rdio information. This addresses
enhancment bug 9880.

Change-Id: Ia38ff09d9f814193bdc544466dbd005123771262
Reviewed-on: https://code.wireshark.org/review/629
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-13 07:38:43 +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
Alexis La Goutte 80e807fef7 Fix indent (Use 4 spaces and modelines info)
Change-Id: If816b474634dd72ad75931e8803ba1bdfb6b1143
Reviewed-on: https://code.wireshark.org/review/165
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-10 22:16:04 +00:00
Anders Broman 87d4d484c7 packet-aruba-erm.c:136: warning: 'range_add_callback' defined but not used
svn path=/trunk/; revision=51568
2013-08-28 19:25:48 +00:00
Anders Broman f6b9c18eed Use dissector_delete_uint_range/dissector_add_uint_range
svn path=/trunk/; revision=51567
2013-08-28 19:10:33 +00:00
Anders Broman 04766017df - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48282
2013-03-13 21:14:20 +00:00
Anders Broman 27fc641a79 - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48274
2013-03-12 23:09:37 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier 10ffd14b8f Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)
svn path=/trunk/; revision=32735
2010-05-10 15:54:57 +00:00
Jeff Morriss 112fd18410 Make the absolute_time_display_e enum start at 1000 to avoid overlapping with
the base_display_e enum.

Fix a couple of dissectors that were still using FT_ABSOLUTE_TIME with
BASE_NONE.  (The time format chosen is based only on an attempt to not change
the behavior.  I don't know that it's right.)  One of these is built by Pidl.
I'll send a patch upstream too.

When checking hfinfos, display the absolute_time_display_e values too.
Display "bit count: X" instead of "unknown" when the display value doesn't
match one of the enumerated values.

svn path=/trunk/; revision=32552
2010-04-24 19:07:21 +00:00
Stig Bjørlykke 702d4c367e From Alexis La Goutte via bug 4418:
Aruba Wireless Controller support a Remote Monitoring of Access Point
The code is based en HP ERM/Cisco ERSPAN dissectors

svn path=/trunk/; revision=31645
2010-01-24 20:52:50 +00:00