Commit Graph

74 Commits

Author SHA1 Message Date
Guy Harris 0275247b97 Use WTAP_ENCAP_IEEE_802_11_xxx for all the "802.11 plus radio header"
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
2012-05-02 03:11:00 +00:00
Guy Harris 74f042558d There is no "dBm transmit attenuation" field in radiotap; there is,
however, a dBm transmit *power* field.

Fix up the capitalization of "dB" and "dBm", and improve the blurb for
attenuation fields, while we're at it.

Should fix bug 7000:

	https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7000

svn path=/trunk/; revision=41781
2012-03-26 22:12:03 +00:00
Guy Harris 1222542112 Mark the computed-from-the-MCS-field data rate as generated, and make it
cover the entire MCS field, in the hopes of avoiding the need to ask
questions such as

	http://ask.wireshark.org/questions/9461

svn path=/trunk/; revision=41633
2012-03-17 21:46:43 +00:00
Alexis La Goutte 668e23f9fe From Wojciech Dubowik via 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)

svn path=/trunk/; revision=40422
2012-01-10 12:08:43 +00:00
Bill Meier d9d97688a3 Manually fix a proto_tree_add_item() encoding arg.
svn path=/trunk/; revision=39474
2011-10-19 20:29:36 +00:00
Bill Meier 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(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


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +00:00
Bill Meier 67ee5049d4 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_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +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
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly 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

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Bill Meier 4c46725c2c Fix vi "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39074
2011-09-21 16:28:53 +00:00
Stig Bjørlykke 5359494b1f Second try to move crc routines to libwsutil.
This time keep the tvb routines in epan.

Now we can use common crc routines outside epan.

svn path=/trunk/; revision=38810
2011-08-31 09:00:54 +00:00
Stig Bjørlykke 71f903b956 Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
2011-08-30 14:17:40 +00:00
Stig Bjørlykke 4132d40e50 Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap.

svn path=/trunk/; revision=38800
2011-08-30 13:46:42 +00:00
Bill Meier d2269ce7d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
2011-06-19 18:47:35 +00:00
Jeff Morriss da8ec2c2d6 Use proto_tree_add_item() instead of proto_tree_add_xxx() with a pointer into
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.

svn path=/trunk/; revision=37317
2011-05-20 02:42:14 +00:00
Guy Harris 94afa45fbf Array indices are integers, not Booleans. (The code is the same, given
that TRUE is #defined as 1 and FALSE is #defined as 0, but let's not
depend on that.)

svn path=/trunk/; revision=36942
2011-04-28 19:00:28 +00:00
Anders Broman c752fb8b87 Fix warnings:
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'

svn path=/trunk/; revision=36926
2011-04-28 05:11:53 +00:00
Guy Harris d7b8350c7c Picky, picky....
While we're at it, catch invalid MCS/channel width/GI combinations.

svn path=/trunk/; revision=36919
2011-04-27 23:06:23 +00:00
Guy Harris 49b410ffbe Put the rate in for the MCS field, if all the information needed to
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.

svn path=/trunk/; revision=36916
2011-04-27 21:59:47 +00:00
Bill Meier b9784b4f21 From Solomon Peachy:Fix "Missing indication that we recognize the Radiotap 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.

svn path=/trunk/; revision=36632
2011-04-13 22:07:53 +00:00
Guy Harris ae86d3b411 Put the "MCS known information" field into the protocol tree; yes, it's
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.

svn path=/trunk/; revision=35968
2011-02-16 21:08:40 +00:00
Gerald Combs dc39cf712d Fix chekcAPIs.
svn path=/trunk/; revision=35685
2011-01-27 19:04:14 +00:00
Gerald Combs 8eec5081cd From Johannes Berg via bug 5625:
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.

svn path=/trunk/; revision=35684
2011-01-27 17:45:45 +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
Stig Bjørlykke dcbd634884 Remove blurbs equal to name.
svn path=/trunk/; revision=34551
2010-10-18 07:41:47 +00:00
Gerald Combs dc46e7db50 Tighten up our data rate check. This should fix bug 5280 (mostly).
svn path=/trunk/; revision=34516
2010-10-14 18:09:57 +00:00
Gerald Combs ea4ca0524b From Johannes Berg via bug 4421:
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.

svn path=/trunk/; revision=34515
2010-10-14 17:56:06 +00:00
Gerald Combs fc260f7967 From Johannes Berg via bug 4421:
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.

svn path=/trunk/; revision=34503
2010-10-13 21:30:27 +00:00
Jeff Morriss 381664535b As suggested by Kovarththanan Rajaratnam in 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.

svn path=/trunk/; revision=34165
2010-09-21 03:14:49 +00:00
Guy Harris d4010f2058 Clean up some calls to use the same offset as the call to put the parent
into the protocol tree.

Put the cases for various Radiotap data items into numerical order by
the bit number.

svn path=/trunk/; revision=32610
2010-04-30 08:26:12 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Anders Broman bdfb16fda0 Revert commit 31798 and 31799 as requested by Johannes Berg
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4283
Follow up in 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4421

svn path=/trunk/; revision=32328
2010-03-30 21:20:48 +00:00
Anders Broman 222b6fac82 Try to pacify the buildbot.
svn path=/trunk/; revision=31799
2010-02-05 06:46:32 +00:00
Anders Broman f93f8f0388 From Joshua Zhao:
Add vendor extension support for 802.11 radiotap header.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4283
Slightly modified.

svn path=/trunk/; revision=31798
2010-02-05 05:54:56 +00:00
Bill Meier 37547c1791 Fix a few gcc _Wshadow warnings ....
svn path=/trunk/; revision=31580
2010-01-19 23:51:27 +00:00
Stephen Fisher 5531c24c67 Update URL in comments.
svn path=/trunk/; revision=31542
2010-01-16 03:34:07 +00:00
Gerasimos Dimitriadis fe1e9d6296 Fix for Bug 3747:
use FT_FLOAT for the radiotap data rate because of .5 Mbps granularity

svn path=/trunk/; revision=31526
2010-01-14 18:21:09 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Guy Harris 7b07422574 Don't divide the data rate by 2 - that loses information (yes, I have a
trace with at least one packet transmitted at 5.5 Mb/s).

Clean up indentation.

svn path=/trunk/; revision=29178
2009-07-23 09:32:58 +00:00
Anders Broman 832087bfbf - Ambiguous value for radiotap datarate.
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.

svn path=/trunk/; revision=29177
2009-07-23 08:56:09 +00:00
Gerald Combs 2391d808af Update documentation links.
svn path=/trunk/; revision=28926
2009-07-02 20:35:46 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(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

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Martin Mathieson 09d545038d Add newline to end of file
svn path=/trunk/; revision=28387
2009-05-17 21:41:00 +00:00
Gerald Combs 7ea5c3cba7 From Johannes Berg via bug 3415:
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.

svn path=/trunk/; revision=28385
2009-05-17 19:18:18 +00:00
Stephen Fisher c36e74116e Enhancements from bug #3043 with a few whitespace cleanups.
svn path=/trunk/; revision=26861
2008-11-27 08:34:41 +00:00
Gerald Combs 20e131acf7 Add a modeline blurb for the predominant indentation style, and update some
whitespace to  match.

svn path=/trunk/; revision=26546
2008-10-24 23:35:50 +00:00
Bill Meier aa30dcd129 Minor proto_reg_handoff cleanup: use find_dissector when appropriate.
svn path=/trunk/; revision=26308
2008-09-30 14:49:44 +00:00
Bill Meier 44af6ef887 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
2008-05-14 01:47:41 +00:00
Gerald Combs e679376996 From Sam Leffler: Add support for IEEE80211_RADIOTAP_XCHANNEL.
svn path=/trunk/; revision=23625
2007-11-27 20:03:43 +00:00
Gerald Combs 72daa58e19 Instead of converting between 802.11 frequencies and channels umpteen
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.

svn path=/trunk/; revision=22538
2007-08-17 19:34:14 +00:00