Commit graph

77 commits

Author SHA1 Message Date
AndersBroman
48aa669528 CAPWAP: Fix a typo.
Change-Id: I19031eac4d26a5620dc05f2632c403d82d7a4ab2
Reviewed-on: https://code.wireshark.org/review/6966
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-05 09:19:46 +00:00
Alexis La Goutte
8bad9edf06 CAPWAP : fix warning about wrong type after proto_tree_add_bitmask(_with_flags) change
Warn Dissector bug, protocol CAPWAP-CONTROL, in packet 1: proto.c:7802: field capwap.control.message_element.wtp_frame_tunnel_mode is not of an FT_{U}INTn type
Warn Dissector bug, protocol CAPWAP-CONTROL, in packet 2: proto.c:7802: field capwap.control.message_element.ac_descriptor.security is not of an FT_{U}INTn type
...

Change-Id: I03f70ca664d99771ad27457052e6df11f9d5ad9e
Reviewed-on: https://code.wireshark.org/review/6964
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-05 08:51:20 +00:00
Alexis La Goutte
8ffaec90d4 CAPWAP: Don't try to dissect fragment packet (Only display are "Data")
Issue reported by Massimo Vellucci

Bug:10918
Change-Id: I7f3b15536f66496d975696b3ff29fbc5b77ee5a8
Reviewed-on: https://code.wireshark.org/review/6963
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-05 08:49:43 +00:00
Alexis La Goutte
bee4fb0269 CAPWAP: Use proto_tree_add_bitmask(_with_flags)
Change-Id: I39ff2e15b91981111f8de091e6e5dfb7586b4599
Reviewed-on: https://code.wireshark.org/review/6937
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-04 07:01:33 +00:00
Alexis La Goutte
6824cee6c4 CAPWAP: Add support of Cisco Vendor Specific Element
Change-Id: I62886bda3220d9aa3a5b3aee8b40063a8bb7745d
Reviewed-on: https://code.wireshark.org/review/6843
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-01-30 03:09:11 +00:00
Alexis La Goutte
5e309d6efe CAPWAP: fix double space on AC Software version
Change-Id: Ibe9715a1c2bf31e31ddda5ad2ad62fc0eda8164c
Reviewed-on: https://code.wireshark.org/review/6812
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 12:44:31 +00:00
Alexis La Goutte
bab744784f CAPWAP: Add support of Fortinet Vendor Specific Element
Based from FortiAP/WiFi 5.2.x

Change-Id: Ia78d15d54db01939a3d91947db39e35b3abc2519
Reviewed-on: https://code.wireshark.org/review/5646
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: 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>
2015-01-23 12:26:12 +00:00
Alexis La Goutte
06ddb7e31d CAPWAP: Add a IEE802.11 Message Element Type (RFC5416)
* IEEE 802.11 Information Element (1029)

Add add_tagged_field to packet-ieee80211.h (will be used by other dissector)

Change-Id: Icd13be416ccc47fb2309b9962e9a47c339885d1e
Reviewed-on: https://code.wireshark.org/review/6524
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-15 08:30:54 +00:00
Alexis La Goutte
cb1f8a3d2b CAPWAP: Add some IEE802.11 Message Element Type (RFC5416)
* IEEE 802.11 OFDM Control (1033)
* IEEE 802.11 Update WLAN (1044)

Change-Id: I702de1d649b1dc2af1de83ee21152c6a18f42dfc
Reviewed-on: https://code.wireshark.org/review/6509
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-15 05:43:38 +00:00
Alexis La Goutte
f6021e8d02 CAPWAP: Add a new Message Element Type (RFC5415)
* Delete Station (18)

Change-Id: I33afa96d183b8ff22725d2e00dcfeccea3fdfa04
Reviewed-on: https://code.wireshark.org/review/6508
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-15 05:40:51 +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
64cb5104d6 Change ENC_NA to ENC_BIG_ENDIAN for all fetches of integral type fields.
Change-Id: Ia4f5735c61eedcbe8354eabd5da05d02e167f25e
Reviewed-on: https://code.wireshark.org/review/5734
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-12 15:33:36 +00:00
Alexis La Goutte
f47bc26bc1 CAPWAP: Add some IEE802.11 Message Element Type (RFC5416)
* IEEE 802.11 Antenna (1025)
* IEEE 802.11 Direct Sequence Control (1028)
* IEEE 802.11 MAC Operation (1030)
* IEEE 802.11 MIC Countermeasures (1031)
* IEEE 802.11 Multi-Domain Capability (1032)
* IEEE 802.11 Station (1036)
* IEEE 802.11 Supported Rates (1040)
* IEEE 802.11 Tx Power (1041)
* IEEE 802.11 Tx Power Level (1042)
* IEEE 802.11 WTP Radio Configuration (1046)

Enhance 802.11 Rate Set (1034)

Change-Id: Ib37bc4081e75af051d80d023ddba689ecd9bf9ff
Reviewed-on: https://code.wireshark.org/review/5481
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-08 00:54:44 +00:00
Alexis La Goutte
97b073810b CAPWAP: Add some new Message Element Type (RFC5415)
* AC Timestamp (6)
* Add Station (6)
* CAPWAP Local IPv4 Address (30)
* CAPWAP Local IPv6 Address (50)
* CAPWAP Transport Protocol (51)
* MTU Discovery Padding (52)
* ECN Support (53)

Change-Id: Ib8b2768d5df4b0e1b5b8b5bd28ae66e825020205
Reviewed-on: https://code.wireshark.org/review/3986
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>
2014-09-05 03:36:05 +00:00
Alexis La Goutte
8ffd2f3d0a CAPWAP: fix some message type with wrong length (don't use optlen for "fixed type length")
Change-Id: Id666086abdd55e38bcb470f8015363585d40728f
Reviewed-on: https://code.wireshark.org/review/3957
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-03 10:22:43 +00:00
Alexis La Goutte
4f4c6ed3e9 CAPWAP: Add some news expert info
When it is the mininum wrong length for Message Element Type or
when the Message Element Type is not yet decoded by Wireshark

Change-Id: I49aca0df5ba5ec70d8fb764fef39c17c46ee22a0
Reviewed-on: https://code.wireshark.org/review/3956
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-03 08:05:35 +00:00
Alexis La Goutte
ee92864b02 CAPWAP: Add new ett variable
Avoid to have all subtree has expended

Only 2 ett actually and there is > 20 subtree...

Change-Id: Ia4af85345a6f1963d24d1fd589ff8ee09a8ef412
Reviewed-on: https://code.wireshark.org/review/3955
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-03 08:02:57 +00:00
Alexis La Goutte
7a87447148 CAPWAP: Split CAPWAP Control and Data in 2 different protocol
Avoid to have 2 CAPWAP in Decode as (and more easy to use too...)

Change-Id: I3a332e9b4b069b9215c38b5c08872bd07ac4c2c3
Reviewed-on: https://code.wireshark.org/review/3954
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-03 08:02:13 +00:00
Alexis La Goutte
653dc8bf17 CAPWAP: Use standard boilerplate (see doc/packet-PROTOABBREV.c)
For hf field, reindent code
Use 0x0 by default for bitmask
Remove also some "boilerplate" comment..

Change-Id: I552ccca2e444f3686ee9ecdad456f2ecfbaa5cba
Reviewed-on: https://code.wireshark.org/review/3953
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-03 07:59:40 +00:00
Alexis La Goutte
ec2fe0faaa CAPWAP: Wrong usage of FT_BOOLEAN for Reserved field...
Change-Id: Ie1c472f4db105a1a8db9dba265039282872dffb2
Reviewed-on: https://code.wireshark.org/review/3952
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-03 07:39:33 +00:00
Alexis La Goutte
2263b73ae5 CAPWAP : Fix wrong offset for AC Name with Priority
Thanks to Massimo Velluci for sample

Change-Id: Ibab2658c2c11c9940d3fdebb0bdc42752d57e1ae
Reviewed-on: https://code.wireshark.org/review/3871
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-26 19:40:08 +00:00
Jakub Zawadzki
923cf412f1 Fix copy/paste errors in value_string.
Also make repetition_coding_indications[] standard terminated.

Change-Id: Ice20e1f27f5ab4d111f893608a230b83899efc9f
Reviewed-on: https://code.wireshark.org/review/2288
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-17 00:08:49 +00:00
Alexis La Goutte
5cff2b6d03 CAPWAP: Fix soft-deprecated APIs warning
tvb_length_remaining => tvb_reported_length_remaining

Change-Id: Ie1fa09e00e098c41df2e87771300e3842659dad6
Reviewed-on: https://code.wireshark.org/review/2095
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-10 08:20:25 +00:00
Alexis La Goutte
2f13ccc64c CAPWAP: Display incorrect value for Wireless IEEE802.11 RSSI and Data Rate
* Wireless data ieee80211 RSSI (dBm) is a signed integer. In the wireless radio the dBm value is negative.
* Wireless data ieee80211 Data Rate (Mbps) is a 100Kbps. You need divide this value by 10.

Issue found by Massimo Vellucci (SmartCAPWAP)

Change-Id: I04dd8a9e38a5f60ee5bf64cd304db1b11413c809
Reviewed-on: https://code.wireshark.org/review/2094
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-10 08:18:54 +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
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
8a1cead947 Fix typo in name of Radio Type 802.11b (in IEEE802.11 WTP Radio Information)
Found by Massimo Vellucci

Change-Id: Ibbe2d0a4d1e421e647028262baf0398d05905c8d
Reviewed-on: https://code.wireshark.org/review/246
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-18 13:31:20 +00:00
Alexis La Goutte
353163cf97 Add new IEEE802.11 CAPWAP message type from RFC5416
* Add WLAN
* Assigned WTP BSSID
* Delete Wlan

From SmartCAPWAP Bug #9752

Change-Id: I22fe8366e824a3ec3d3cd09887f0328141c30a69
Reviewed-on: https://code.wireshark.org/review/214
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-14 13:59:10 +00:00
Alexis La Goutte
a9dc8016e9 Add message type from RFC5416 : Section 3 : IEEE 802.11 Specific CAPWAP Control Messages
Issue found by Massimo Vellucci (SmartCAPWAP)

Partial-Bug: 9752

Change-Id: I6f61a3c8706572e9ea7935e8f00818e6aa9fef7a
Reviewed-on: https://code.wireshark.org/review/193
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-12 21:24:43 +00:00
Jakub Zawadzki
c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Alexis La Goutte
6895d1f63d Remove unused variable
svn path=/trunk/; revision=52872
2013-10-26 17:17:38 +00:00
Bill Meier
9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Michael Mann
747f1409a1 Properly decode CAPWAP Data Keep-Alive's. Bug 9165 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9165)
From Andreas Schultz

From me: Use expert API instead of throwing exception for a bad length.

svn path=/trunk/; revision=52657
2013-10-17 02:13:23 +00:00
Michael Mann
9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Jakub Zawadzki
a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Michael Mann
2d37ec3cb0 Batch of filterable expert infos.
svn path=/trunk/; revision=49853
2013-06-09 03:28:05 +00:00
Guy Harris
a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Alexis La Goutte
84e31e29b7 Replace proto_tree_add_text/uint/boolean by proto_tree_add_item Use bitmask (remove tvb_get_bits(..))
svn path=/trunk/; revision=47798
2013-02-21 15:32:07 +00:00
Alexis La Goutte
964d9adf42 Fix indent (Tab => 4 Spaces) and Add Modelines
svn path=/trunk/; revision=47797
2013-02-21 15:31:58 +00:00
Alexis La Goutte
fbbe22d170 Fix CheckAPI about trailing space
svn path=/trunk/; revision=47794
2013-02-21 12:31:16 +00:00
Alexis La Goutte
d2b0c28f71 From Paul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8319 CAPWAP Header dissector returns invalid length
The problem is when Wireshark dissect CAPWAP packets from Cisco without preference "Cisco Wireless Controller Support"

In this case the whole packet decoded wrong, not only Wireless Specific Information field in CAPWAP header

I suggest following patch to dissect_capwap_header function to always return correct length of CAPWAP header based on HLEN header field

From me:
Add expert info to display a warning about Calculate length and Header length are different (and suggest to activate Cisco Wireless Controller Support Preference)

svn path=/trunk/; revision=47793
2013-02-21 10:50:28 +00:00
Anders Broman
57d3c5e260 Higlight the Header bytes.
svn path=/trunk/; revision=46037
2012-11-16 09:42:18 +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
Jakub Zawadzki
5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jeff Morriss
aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Guy Harris
682d1f34b6 Fix non-proto_tree_add_item() calls passing an ENC_ value as the last
argument.

svn path=/trunk/; revision=43802
2012-07-18 23:18:01 +00:00
Chris Maynard
1ff8c1fcba Don't pass the return value of tvb_length_remaining() to fragment_add_check(), as it might have been -1.
Fixes Coverity CID 280510: Improper use of negative value.

svn path=/trunk/; revision=43716
2012-07-14 19:52:18 +00:00
Bill Meier
d53320919a Remove unneeded #includes (stdlib, stdio, ctypes, time);
In a few cases: do some whitespace, indentation cleanup & reformatting.

svn path=/trunk/; revision=42632
2012-05-15 19:23:35 +00:00
Anders Broman
4c379bc979 From Dirk:
CAPWAP dissector tries to allocate -1 bytes of memory during reassembly.
- changed to return offset.

svn path=/trunk/; revision=39779
2011-11-10 06:07:16 +00:00
Alexis La Goutte
654f213aae Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39654
2011-10-28 17:39:31 +00:00