aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211-prism.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-3/+3
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-01-20Call the dissectors for types in TZSP packets individually.Guy Harris1-3/+4
That way, we know we're passing them the dissector data they expect. Change-Id: I43aa1b751705eae77e082c537e8ffd6a4edc1a5f Reviewed-on: https://code.wireshark.org/review/13430 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-24Refactor 802.11 radio flags.Simon Barber1-3/+3
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-17Create capture dissector "info" structure (capture_packet_info_t)Michael Mann1-3/+3
While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added. Change-Id: I003552c58043c7c2d67aec458187b12b233057e2 Reviewed-on: https://code.wireshark.org/review/12690 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-12-14Create capture dissector tables.Michael Mann1-14/+10
They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility. They are intended to be much simpler/faster than full dissection. The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API. Others may be added in the future. The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet. The current application of this is capture functions returning TRUE if they affected a "type" of packet count. Returning FALSE ends up considering the packet an "other" type. Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd Reviewed-on: https://code.wireshark.org/review/12607 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-12-13Create a way to register "capture" dissectors.Michael Mann1-4/+7
Capture dissectors could be architected like dissection dissectors, with tables and subtables and possibly using tvbs to pass there data instead of raw byte arrays. This is a first step towards that by refactoring capture_info_packet() to work off of a "capture dissector table" Registering the capture dissection functions instead of calling them directly also clears up a bunch of dissector header files who sole purpose was providing the capture dissection function definition. Change-Id: I10e9b79e061f32d2572f009823601d4f048d37aa Reviewed-on: https://code.wireshark.org/review/12581 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-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
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-11-26Replace tvb_get_enctohl and tvb_get_enctohs with the functions already ↵Michael Mann1-35/+15
created in tvbuff.h Change-Id: Id44d4b11e0ba140f6ec4a8e87eaaa8eacbc2d8b6 Reviewed-on: https://code.wireshark.org/review/12151 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: Anders Broman <a.broman58@gmail.com>
2015-11-16create_dissector_handle -> new_create_dissector_handleMichael Mann1-28/+15
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I96aa9cf53533cbb07105aa400d42922baf3016b3 Reviewed-on: https://code.wireshark.org/review/11860 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-06-25Clean up 802.11 radio information handling.Guy Harris1-0/+1
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-24Fill in the 802.11 pseudo-header and call the "802.11+radio" dissector.Guy Harris1-6/+24
Do with the Prism and AVS headers what we do with the radiotap, PPI, etc. headers. Change-Id: I4b2522a2b294f53f22c363cd43604c4af0304fc2 Reviewed-on: https://code.wireshark.org/review/9082 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-17Update a URL.Guy Harris1-1/+1
Change-Id: I51e884815a83bd44b528d5dd86f98d0ea51719f9 Reviewed-on: https://code.wireshark.org/review/8498 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-10Change a lot of http:// URLs to https://.Gerald Combs1-1/+1
Most of our sites are now HTTPS-only. Update URLs accordingly. Update other URLs while we're at it. Remove or comment out dead links. Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33 Reviewed-on: https://code.wireshark.org/review/7621 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18Add a CF_FUNC macro for casting BASE_CUSTOM functions.Gerald Combs1-1/+1
Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid the following warning: warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic] We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be more consistent with the other macros in proto.h. Update each instance of BASE_CUSTOM to use CF_FUNC. Adjust a dummy variable name generated by asn2wrs.py that was triggering an invalid error in checkhf.pl. Fix an encoding arguement in packet-elasticsearch.c found by fix-encoding-args.pl. Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22 Reviewed-on: https://code.wireshark.org/review/7150 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
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-11-27Fix a number of dup hf[] filter-names probably mostly resulting from ↵Bill Meier1-1/+1
cut/paste errs Change-Id: Id658b9e1803b2f5b92e711a3ce981ff602333d98 Reviewed-on: https://code.wireshark.org/review/5513 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-1/+1
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-21Handle big-endian Prism headers.Guy Harris1-39/+63
Apparently, some systems write out big-endian Prism headers (probably big-endian-MIPS-based Wi-Fi APs running $LINUX_DISTRIBUTION and the like), so check for both big-endian and little-endian message codes, and, for the fields in the header, use the byte order that matched. Change-Id: Ia13df606676bb7dbc5d12fe4e297681bebb6f478 Reviewed-on: https://code.wireshark.org/review/759 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-11-29Avoid including <wiretap/wtap.h> in dissectors.Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=53655
2013-11-29Rename some of pint.h macros to match common style (bits number on the end).Jakub Zawadzki1-1/+1
pntohs -> pntoh16 pntohl -> pntoh32 pletohs -> pletoh16 pletohl -> pletoh32 phtons -> phton16 phtonl -> phton32 svn path=/trunk/; revision=53652
2013-11-09include <wsutil/pint.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53196
2013-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-13Dario Lombardo <lomato@gmail.com> viaJörg Mayer1-2/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9147 Migration from emem to wmem for trivial cases (ep_alloc only). svn path=/trunk/; revision=52002
2013-03-17From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48355
2012-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-3/+3
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
2012-10-17The first 4 bytes of the Prism header are, apparently, a "message code",Guy Harris1-66/+89
and it apparently either has the value 0x00000044 or 0x00000041. If those bytes aren't the magic number for an AVS header and aren't one of those "message code" values, assume there's no Prism header, just an 802.11 frame - that fixes at least one capture where some packets have AVS radio headers and other packets have no radio header. Note that this might also let us handle big-endian Prism headers (see which byte order the message code is in, and assume everything else is in the same byte order). Display the message code in hex, not decimal. svn path=/trunk/; revision=45609
2012-10-14According toGuy Harris1-103/+174
http://home.martin.cc/linux/prism there's a set of DID type values different from the ones we were using, and there are captures out there that use values from both sets. Support both sets. That page also says that a "status" value of 0 means "supplied"; treat zero as meaning "supplied", and, if it's not zero for a field, don't include it. The "Mac Time" is, according to that page, the lower 32 bits of the MAC timestamp; report it as such. Fix some field names that were copied-and-pasted but not changed. The RSSI and signal quality values are numbers, so show them in decimal. The "signal" and "noise" values appear to be signed numbers, so make them signed rather than unsigned and show them in decimal. Show the data rate in the same style as it's shown in the radiotap dissector. Show the frame length in decimal; we probably have relatively few users with 16 fingers. svn path=/trunk/; revision=45545
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-05-02Use WTAP_ENCAP_IEEE_802_11_xxx for all the "802.11 plus radio header"Guy Harris1-1/+1
encapsulations. For pre-V9 AiroPeek captures, leave the radio information in the packet data, just as we do with the Prism, AVS, radiotap, and NetMon headers. Add a dissector for it. svn path=/trunk/; revision=42379
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-1/+1
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-12From Jouni Malinen: Anders Broman1-0/+479
Move sniffer meta data parsing to separate files packet-ieee80211.c includes dissectors for three different styles of IEEE 802.11 sniffer meta data (like signal strength). Move these to separate files in the same style as a fourth format (radiotap) was already handled, so that packet-ieee80211.c focuses on the actual IEEE 802.11 frame dissecting. This reverts http://anonsvn.wireshark.org/viewvc?revision=23911&view=revision Objections? https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39379