aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-radiotap.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-10From Wojciech Dubowik via ↵alagoutte1-0/+18
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6720 Add STBC flag to MCS field in radiotap packet dissector. From me: Replace VALS by TFS (and use boolean hf) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40422 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-19Manually fix a proto_tree_add_item() encoding arg.wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39474 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.wmeier1-21/+21
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39442 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵wmeier1-8/+8
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_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39328 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵wmeier1-8/+8
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39288 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵wmeier1-2/+2
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39260 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-21Fix vi "modeline" so it works;wmeier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39074 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-31Second try to move crc routines to libwsutil.stig1-1/+1
This time keep the tvb routines in epan. Now we can use common crc routines outside epan. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38810 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-30Revert r38800, as the crc routines contains some tvb functions.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38803 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-30Move all crc routines to libwsutil.stig1-1/+1
This way we can use the crc routines in wiretap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38800 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-19Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.wmeier1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37716 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-20Use proto_tree_add_item() instead of proto_tree_add_xxx() with a pointer intomorriss1-8/+5
the TVB. Introduce and start using tvb_get_manuf_name() and tvb_get_manuf_name_if_known() which do the same as the non-tvb versions but take a tvb and an offset instead of (commonly) a pointer into a TVB. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37317 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-28Array indices are integers, not Booleans. (The code is the same, givenguy1-11/+12
that TRUE is #defined as 1 and FALSE is #defined as 0, but let's not depend on that.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36942 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-28Fix warnings:etxrab1-5/+5
packet-radiotap.c(240) : error C2220: warning treated as error - no 'object' file generated packet-radiotap.c(240) : warning C4305: 'initializing' : truncation from 'double' to 'const float' packet-radiotap.c(310) : warning C4305: 'initializing' : truncation from 'double' to 'const float' packet-radiotap.c(315) : warning C4305: 'initializing' : truncation from 'double' to 'const float' packet-radiotap.c(370) : warning C4305: 'initializing' : truncation from 'double' to 'const float' packet-radiotap.c(380) : warning C4305: 'initializing' : truncation from 'double' to 'const float' git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36926 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-27Picky, picky....guy1-156/+160
While we're at it, catch invalid MCS/channel width/GI combinations. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36919 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-27Put the rate in for the MCS field, if all the information needed toguy1-66/+527
calculate the rate is present. Don't put the rate in for MCS indices in the Rate field - we need not only the MCS index but the bandwidth (20 MHz vs. 40 MHz) and the length of the guard interval. Note in a comment that those other items *might* be available from some other radiotap fields. Expand a comment on the hack to try to figure out whether a Rate field with the 0x80 bit set is a FreeBSD MCS index or a high data rate. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36916 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-13From Solomon Peachy:Fix "Missing indication that we recognize the Radiotap ↵wmeier1-0/+3
MCS header field." https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5827 The radiotap header has a pile of optional fields, and uses a bitmask field to indicate which fields are present. Wireshark marks the fields it decodes, and then decodes the payload. The recently-added MCS field is decoded now, but the bit is not displayed as recognized. This was presumably an oversight, as this bit is recognized and the field decoded properly. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36632 f5534014-38df-0310-8fa8-9805f1628bb7
2011-02-16Put the "MCS known information" field into the protocol tree; yes, it'sguy1-4/+49
somewhat redundant, as items aren't displayed if they're not known, but it can make it a little clearer to people who aren't familiar with the gory details of radiotap (which people just looking at network traffic might not be). Clean up some capitalization of field names. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35968 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-27Fix chekcAPIs.gerald1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35685 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-27From Johannes Berg via bug 5625:gerald1-0/+96
The radiotap standard just adopted the new MCS field to display MCS information. The attached patch allows wireshark to parse that field. From me: Terminate value_strings. Move the IEEE80211_RADIOTAP_XCHANNEL definition to packet-radiotap-defs.h. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35684 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-1/+1
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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-18Remove blurbs equal to name.stig1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34551 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-14Tighten up our data rate check. This should fix bug 5280 (mostly).gerald1-1/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34516 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-14From Johannes Berg via bug 4421:gerald1-335/+300
radiotap: new parser The current parser has a number of bugs, most importantly not being able to parse radiotap files with multiple presence bitmaps. It is also rather hard extend. Use a generic library for parsing radiotap that can be extended very easily. From me: Dumb down some initializers and add some casts to make Visual C++ happy. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34515 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-13From Johannes Berg via bug 4421:gerald1-1060/+1214
radiotap: re-indent The current file has very strange mix of various indentation sometimes using spaces and sometimes using tabs which is rather hard to keep intact, so reindent it completely. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34503 f5534014-38df-0310-8fa8-9805f1628bb7
2010-09-21As suggested by Kovarththanan Rajaratnam in ↵morriss1-4/+4
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548 : Clean up hf fields some more: mostly removing leading and trailing spaces from names and blurbs. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34165 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-30Clean up some calls to use the same offset as the call to put the parentguy1-175/+192
into the protocol tree. Put the cases for various Radiotap data items into numerical order by the bit number. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32610 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-06#include <string.h> not needed.wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32410 f5534014-38df-0310-8fa8-9805f1628bb7
2010-03-30Revert commit 31798 and 31799 as requested by Johannes Berg etxrab1-86/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4283 Follow up in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4421 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32328 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-05Try to pacify the buildbot.etxrab1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31799 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-05From Joshua Zhao:etxrab1-1/+85
Add vendor extension support for 802.11 radiotap header. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4283 Slightly modified. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31798 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-19Fix a few gcc _Wshadow warnings ....wmeier1-6/+12
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31580 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-16Update URL in comments.sfisher1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31542 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-14Fix for Bug 3747:dimeg1-5/+5
use FT_FLOAT for the radiotap data rate because of .5 Mbps granularity git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31526 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()krj1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29446 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-23Don't divide the data rate by 2 - that loses information (yes, I have aguy1-64/+64
trace with at least one packet transmitted at 5.5 Mb/s). Clean up indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29178 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-23- Ambiguous value for radiotap datarate.etxrab1-71/+60
The value given to proto_tree_add_uint_format() was not divided by 2. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3747 - remove check_col() - Indentation changes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29177 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-02Update documentation links.gerald1-1/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28926 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-18From Kovarththanan Rajaratnam via bug 3548:stig1-7/+7
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28770 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-17Add newline to end of filemartinm1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28387 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-17From Johannes Berg via bug 3415:gerald1-47/+91
The attached patch updates wireshark to the radiotap RX flags leaving the non-standard option to dissect bit 14 as "FCS in header". Merge the patch by hand in a couple of places to avoid conflicts with r26861. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28385 f5534014-38df-0310-8fa8-9805f1628bb7
2008-11-27Enhancements from bug #3043 with a few whitespace cleanups.sfisher1-1/+20
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26861 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-24Add a modeline blurb for the predominant indentation style, and update somegerald1-42/+56
whitespace to match. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26546 f5534014-38df-0310-8fa8-9805f1628bb7
2008-09-30Minor proto_reg_handoff cleanup: use find_dissector when appropriate.wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26308 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-14Fix some of the Errors/warnings detected by checkapi.wmeier1-2/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25290 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-27From Sam Leffler: Add support for IEEE80211_RADIOTAP_XCHANNEL.gerald1-16/+246
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23625 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-17Instead of converting between 802.11 frequencies and channels umpteengerald1-50/+11
different ways, add a set of common conversion routines. Add a "Frequency/Channel" column and fill it in where we can. Fix RSSI column printing in PPI. Fix up whitespace along the way. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22538 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-27I think David Young needs to be granted the power of life and deathguy1-0/+20
over anybody who edits the sys/net80211/ieee80211_radiotap.h header on any operating system. I also think he needs to be willing to use that power when necessary. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22217 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-18From Dustin Johnson:gerald1-4/+60
- Update the wireless/AirPcap GUI code to support 802.11n as well as some related upcoming code changes. - Remove airpcap.h from the repository, since it exists in the AirPcap devpack (and will be superseded Real Soon Now). - Show the individual channel flag bits in radiotap. Fix the 802.11n MCS set display. This is a partial checkin, so hopefully nothing is broken. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21831 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-30Don't cast a "guint8 *" to a pointer to a structure; just use theguy1-11/+14
pointer to the guint8, plus explicitly defined structure offsets (the structure had better be the same on all platforms, forever, otherwise binary compatibility breaks, which would be an error, given that the structure appears in capture files). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21619 f5534014-38df-0310-8fa8-9805f1628bb7