Commit graph

60 commits

Author SHA1 Message Date
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
Guy Harris
126dedd9b2 I think David Young needs to be granted the power of life and death
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.

svn path=/trunk/; revision=22217
2007-06-27 23:53:24 +00:00
Gerald Combs
55d2b928c2 From Dustin Johnson:
- 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.

svn path=/trunk/; revision=21831
2007-05-18 21:06:20 +00:00
Guy Harris
3a0381579e Don't cast a "guint8 *" to a pointer to a structure; just use the
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).

svn path=/trunk/; revision=21619
2007-04-30 06:19:35 +00:00
Gerald Combs
c4a52b1995 According to David Young, IEEE80211_RADIOTAP_FCS was never officially
assigned.

svn path=/trunk/; revision=20817
2007-02-15 18:35:30 +00:00
Stephen Fisher
750e036e4c Add descriptions to radiotap fields. Fix some formatting. Add an extra
linebreak between hf field definitions for readability.


svn path=/trunk/; revision=20633
2007-01-30 20:57:51 +00:00
Gerald Combs
e3ce33b8e4 Back out most of r19878; it was making the 802.11 dissector overwrite the
RSSI column with the wrong value.

svn path=/trunk/; revision=19963
2006-11-23 01:49:18 +00:00
Gerald Combs
59562378e4 David Young pointed out that we weren't aligning fields according to the
radiotap specification.  Do so.  Add fields for FHSS and Transmit
attenuation (untested).

svn path=/trunk/; revision=19915
2006-11-16 22:27:47 +00:00
Gerald Combs
d20f77d3ec Add a plain "radiotap.channel" field to the radiotap dissector.
Check for an invalid channel frequency.  Pass the channel, data rate,
and quality to the 802.11 dissector, so that they show up there
as well.  Clean up whitespace.

svn path=/trunk/; revision=19878
2006-11-12 00:52:05 +00:00
Gerald Combs
b61a0b3d16 Make sure we round up to the nearest 4-byte boundary before trying to process
the FCS.

svn path=/trunk/; revision=19746
2006-10-31 01:28:29 +00:00
Gilbert Ramirez
5a13d13021 Fix bug 1085 -- handle the various ways that a radiotap frame can
have an FCS. Also, clean up the parsing and presentation of the various
flags, and show some that aren't already shown.

svn path=/trunk/; revision=19680
2006-10-25 15:16:49 +00:00
Gerald Combs
f9661850d1 Add support for AirPcap, an upcoming wireless product from CACE. Support
is disabled by default, and can be enabled by setting AIRPCAP_CONFIG
in config.nmake.  The code is currently limited to Windows, but should
be adaptable to other platforms.

The official announcement won't come until next week, so you'll have to
read the source for details.  :)

svn path=/trunk/; revision=18928
2006-08-16 18:01:25 +00:00
Ronnie Sahlberg
feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Guy Harris
d44c620df0 Don't change rflags for any properties other than
IEEE80211_RADIOTAP_FLAGS.

svn path=/trunk/; revision=18022
2006-04-28 06:29:19 +00:00
Guy Harris
4a84a894d9 This was completely broken, as the "length" variable actually reflected
the amount of data left in the radiotap header after the fields we've
processed so far, not the total length of the header, so it couldn't be
used to skip past the radiotap header and get a tvbuff of the packet
data.  Fix that.

svn path=/trunk/; revision=18020
2006-04-27 19:58:32 +00:00