Commit graph

90 commits

Author SHA1 Message Date
Guy Harris
eaf1ae2df2 wep_decrypt() isn't needed if we have AirPDCap.
Use "break" instead of "goto done" when possible, don't goto a label
that follows immediately, and get rid of labels for which there's no
goto.

svn path=/trunk/; revision=20846
2007-02-19 01:18:26 +00:00
Gerald Combs
41c66690fc From Clay Jones:
This patch adds decodes for 802.11n information elements.  Since 802.11n
isn't a formal standard yet they are not using the final packet
structures or ie type numbers.  But there are already 802.11n pre
release devices out there and these decodes do seem to correctly decode
the IEs that they use.

svn path=/trunk/; revision=20725
2007-02-06 01:59:50 +00:00
Gerald Combs
f9e2736d7c Add support for "wildcard" WPA keys in the form "wpa:passphrase" (note
the lack of SSID).  Wildcarding combines the passphrase with the last
seen SSID and attempts decryption.  The last-seen stack is only one
element tall, which means it may get clobbered on busy and diverse
networks.  We can expand it if needed.

Make internal functions static in airpdcap.c.  Rearrange the
AIRPDCAP_KEY_ITEM struct so that the passphrase and SSID don't get
clobbered when we set our PSK.

svn path=/trunk/; revision=20572
2007-01-26 21:54:59 +00:00
Gerald Combs
2664012ca6 Fix a key preference crash bug. Improve WPA passphrase and SSID length
handling.  Free a byte array.  Squelch a compiler warning.  Fix a URI
string parsing bug.

svn path=/trunk/; revision=20549
2007-01-25 01:24:14 +00:00
Gerald Combs
cd60c73163 Fix Coverity CID 230: Make sure we handle a negative tvb_length_remaining()
value correctly.  Fix up indentation.

svn path=/trunk/; revision=20546
2007-01-24 19:22:13 +00:00
Gerald Combs
983f496f69 Add uri_str_to_bytes(), byte_array_dup(), and byte_array_equal()
functions to strutil.  Use GByteArrays to store SSIDs for decryption,
and let the user specify arbitrary byte strings using percent-encoded
strings.  We should probably add percent encoding for pass phrases as
well, so you can escape the ":" character.

Move the key struct key conversion utilities to airpdcap.c, and remove
duplicate code from packet-ieee80211.c.  Fix a lot of indentation.

svn path=/trunk/; revision=20388
2007-01-11 02:42:34 +00:00
Gerald Combs
9b70567cb1 Don't lower-case our SSID and passphrase, otherwise we'll create an
incorrect PSK hash.

svn path=/trunk/; revision=20318
2007-01-04 23:21:37 +00:00
Gerald Combs
f5ff0c214a Fix a typo.
svn path=/trunk/; revision=20294
2007-01-03 18:10:13 +00:00
Stephen Fisher
9face6ceb8 Add a good/bad tree to the FCS item.
svn path=/trunk/; revision=20273
2007-01-02 19:55:55 +00:00
Gerald Combs
bd282b4114 Move the contents of airpdcap to epan/crypt. Try to fix the current
distcheck failure.  Move the nmake build targets for airpdcap from 
epan/dissectors to epan.  This will probably break the Windows build.

svn path=/trunk/; revision=20231
2006-12-28 17:22:12 +00:00
Gerald Combs
2437fd2e77 Prepare to move the airpdcap code to epan/crypt (SVN won't let me actually
move the files until these changes are checked in).  Add an AC_DEFINE
for airpdcap (which will be removed once the changes have settled).
Update the airpdcap code to compile on non-Windows systems.  Fix up
comments and whitespace to conform more closely to the rest of the
code base.  Verified to compile under Windows and OS X.

svn path=/trunk/; revision=20227
2006-12-27 23:05:55 +00:00
Gerald Combs
75ba22c7d0 Processing packet data via tvb_get_ptr() is like palpating a cow -- it's
messy and you shouldn't do it unless you REALLY have to.  Change several
routines to use standard tvb_get_* accessors instead of operating on raw
packet data.  This fixes an integer overflow in dissect_vendor_ie_rsn()
found by Neil Kettle.

Use value_strings instead of duplicating their functionality with our
own routines.  Print the WME surplus bandwidth allowance factor.  Fix
some compiler warnings.

Update the release notes.

Some of the changes are untested due to a lack of capture data.

svn path=/trunk/; revision=20126
2006-12-12 22:24:18 +00:00
Gerald Combs
8e397a2617 Don't define HAVE_AIRPDCAP if HAVE_AIRPCAP isn't defined. Fix a compiler
warning in the 802.11 dissector.

svn path=/trunk/; revision=20053
2006-12-06 20:29:54 +00:00
Gerald Combs
b751cf6797 Fix preference registration.
svn path=/trunk/; revision=20051
2006-12-05 20:57:22 +00:00
Gerald Combs
e99902c38a Fix a compilation error, and squelch a couple of other errors.
svn path=/trunk/; revision=20050
2006-12-05 19:39:54 +00:00
Gerald Combs
a980d04783 From Davide Schiera and Giorgio Tino: Add initial WPA/WPA2 decryption
support.

WEP key preferences have been overloaded to allow WPA keys.  The
decryption code currently uses Windows-specific data types, but can be
converted to use glib equivalents.

Add a few text and whitespace fixups.

svn path=/trunk/; revision=20049
2006-12-05 19:24:25 +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
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
Jörg Mayer
556bea1722 Zhu Yi:
ieee80211e dissect patch
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1191

Me:
Fix signedness warnings regarding ssid and ccode.
(in the old code, not in the 11e code)

svn path=/trunk/; revision=19774
2006-11-02 09:26:38 +00:00
Guy Harris
cc52fa035d Get rid of a duplicate call.
svn path=/trunk/; revision=19636
2006-10-20 18:49:02 +00:00
Gerald Combs
fc62f98e74 In the 802.11 dissector, mark the "wep_keys" preference as obsolete,
and replace it with an "enable_decryption" preference.

Instead of forcing the user to specify how many WEP keys we have,
figure it out for ourselves by parsing the key list.  When decrypting,
don't worry about the key index specified in the header (which resulted
in trying to decrypt using the same key twice); simply try each key in
order (which we were doing anyway).

In hex_str_to_bytes(), handle a null hex string.

Update the release notes.

svn path=/trunk/; revision=19592
2006-10-18 17:55:29 +00:00
Gerald Combs
e000e1c8ec Make the "WEP key count" option match the number of WEP key slots. Add
a note about improving the WEP key interface.

svn path=/trunk/; revision=19514
2006-10-13 15:53:20 +00:00
Gerald Combs
4e1d2cd8a9 Remove a leftover printf.
svn path=/trunk/; revision=19468
2006-10-10 00:30:49 +00:00
Gerald Combs
993305a75f First step in integrating the AirPcap WEP preferences with those
from the 802.11 dissector.  Use a #define for the maximum number of
WEP keys.  Use AirPcap's if we have it (64).  Rename find_module()
prefs_find_module() and make it public.

svn path=/trunk/; revision=19467
2006-10-10 00:28:53 +00:00
Guy Harris
86c158a4db Don't define the Aironet/Cisco Wireless OUI ourselves; get it from
<epan/oui.h>.

Fix indentation.

svn path=/trunk/; revision=19038
2006-08-26 00:06:40 +00:00
Jörg Mayer
1c888f57c9 Daniel Drake <dsd@gentoo.org>:
The barker preamble bit is set when a station associates
	which does not support short preambles. When it is 0, short
	preambles are allowed.

Me: Add a reference to the spec stating the above.


svn path=/trunk/; revision=18777
2006-07-20 22:25:04 +00:00
Jörg Mayer
4070ac6967 Decode another byte in Cisco's IE 133 (number of associated clients)
svn path=/trunk/; revision=18726
2006-07-13 05:40:48 +00:00
Jörg Mayer
16f0ca977a Add a comment about a Cisco proprietary tag.
svn path=/trunk/; revision=18663
2006-07-05 14:57:25 +00:00
Ronnie Sahlberg
e3bdf2986f From Christoph Werle
fix for ieee802.11 aid


svn path=/trunk/; revision=18411
2006-06-09 22:06:21 +00:00
Anders Broman
996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +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
41c941b49c Call capture_radiotap() when capturing on a device supplying Radiotap
headers.

Fix capture_radiotap() to check for padding between the 802.11 header
and the 802.11 payload and to call different capture routines depending
on whether it's present or not, and create capture_ieee80211_datapad()
to handle the case where it's present.

Fix capture_radiotap() to convert the Radiotap header length from
little-endian, and to do some sanity checking of that length.

Fix capture_ieee80211_common() to use the offset supplied to it to fetch
the frame control field, as that offset isn't necessarily 0.

svn path=/trunk/; revision=17083
2006-01-23 16:56:34 +00:00
Guy Harris
2ab3f01671 Rename all the COOK_ macros to indicate the field from which they're
extracting data (except for the association ID field, where adding
ASSOC_ID would be redundant).

svn path=/trunk/; revision=17081
2006-01-23 10:17:07 +00:00
Guy Harris
d269468356 From Sam Leffler:
1. Fix a bug in caclulating the 802.11 header length for QoS
	   data frames (way bad regression from previous code). 

	2. Add support for packets w/ data padding between the 802.11
	   header and the payload (as indicated in the radiotap flags).

	3. Add support for handling FCS indication in the radiotap
	   flags. 

	4. Fix display of TSF (previous code was not byte swapping).

	5. Update ieee80211_mhz2ieee in radiotap.c to handle more
	   channels. 

	6. Nuke some #if 0 code I left in radiotap.c a while back.

Also, clean up the various macros that extract stuff from 802.11 header
fields or define bitfields within those header fields:

	group them by the fields from which they extract and the values
	they extract, or the header fields to which they belong;

	get rid of some of the COOK_ in the names - COOK_ really doesn't
	indicate anything useful, such as the field from which they're
	extracting (we should get rid of the rest);

	put in some more comments explaining what they do;

	get rid of some unused macros;

	get rid of some values that aren't flag values - they're values
	to test whether something's a data frame with a particular byte
	set in the subtype field, but they're only used on data frames,
	so we only need to test the bit in question, so we define macros
	to test the bit and name them to indicate that they're for use
	on data frames.

Consistently use "CF-Ack" and "CF-Poll" in the strings for various data
frame type/subtype values, and get rid of "802.11" (it should be obvious
to one and all that this is 802.11...).

Comment out some variables used only in commented-out code.

Get rid of some unused variables.

Fix up one "proto_tree_add_text()" call where the format string didn't
match the arguments.

svn path=/trunk/; revision=17080
2006-01-23 09:20:06 +00:00
Jörg Mayer
467de087cc According to 802.11e D11, 7.3.2.13, station count is a 16 bit value.
Accoding to 802.11, 7.1.1, numbers are little endian.

svn path=/trunk/; revision=17047
2006-01-17 13:13:29 +00:00
Jörg Mayer
be27196e0a - Replace snprintf by g_snprintf
- Beginning of incorrect g_snprintf retval ussage fixes
- Make qbss station count a byte again until we know
  whether the count is a 2 byte le value instead

svn path=/trunk/; revision=17045
2006-01-17 10:54:23 +00:00
Jörg Mayer
59bccbee5e - Change Cisco QBSS V2 to be part of the Aironet IE dissection.
- Change proto_tree_add_uint ( ...., tvb_get_guint8(...)) to
  proto_tree_add_item ( ....) for all qbss dissection code
- Change all qbss occurrences scount to be 16 bits (I may have
  gotten endianess wrong! Testers / sample captures needed)
- Change wlan_mgt.tag.aironet... filter to wlan_mgt.aironet...

svn path=/trunk/; revision=17028
2006-01-13 18:30:12 +00:00
Jaap Keuter
356cbd3a5a From Thomas Sillaber
here is the Patch for:
    - AVA (Alcatel Automatic VLAN Assignment)
    - QBSS ( QOS Basic Service Set)

svn path=/trunk/; revision=17008
2006-01-11 22:05:43 +00:00
Jörg Mayer
5fb7e183fd First attempt to decode CCX type 4 IEs (QoS?)
svn path=/trunk/; revision=16978
2006-01-09 07:41:26 +00:00
Jörg Mayer
5fb7840b04 - Undo the COL_PROTOCOL misuse introduced with rev 15115.
- Start dissection of Aironet vendor specific stuff.

svn path=/trunk/; revision=16952
2006-01-05 11:28:40 +00:00
Jörg Mayer
9d62ccefea Jaap Keuter:
>From the Debian bug database this bug:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=342588

  The rates information element with zero tag length leads to uninitialised
  memory access, presenting bogus data for the element. The attached patch
  takes care of that.

Me:
  One space in the map listing is enough.

svn path=/trunk/; revision=16947
2006-01-05 08:23:17 +00:00
Anders Broman
6f23144e46 From Jaap Keuter:
- Editcap 
Mikko Tiihonen filed bug 379 including a patch for editcap. This wasn't picked up so far. I've ported the patch to svn 16820 and included a documentation patch.

-packet-ieee80211.c
Radek Vokal of RedHat filed a bug found by Vladimir Kondratiev of Intel in the 802.11 dissector. Radek provided a sample capture and Vladimir a oneliner patch. I've ported the patch to svn 16820 and tested it against the provided capture. Works well.


-From Kan Sasaki
A patch for packet-ospf.c is attached:
 - Fix the handling of the DN-bit of options field.
 - Add a new function dissect_ospf_bitfield() to dissect a bitfield
   such as options, flags. The following functions are merged by
   using this function.
     - dissect_ospf_lls_extended_options()
     - dissect_ospf_dbd()


     - dissect_ospf_options()
     - dissect_ospf_v3_prefix_options()
 - dissect the flags and prefix-options bitfield.

- lldp Bugfix Bug 596  LLDP TIA Network Policy Decode is not correct 

- Camel make it possible to dissect based on OID.

svn path=/trunk/; revision=16822
2005-12-16 16:37:03 +00:00
Guy Harris
552ee02a93 Get rid of an unused variable, and declare a variable that points into a
tvbuff's data const.

svn path=/trunk/; revision=16368
2005-10-31 02:21:02 +00:00
Jörg Mayer
942f7fce66 - Split dissect_wendor_specific_ie into
dissect_vendor_ie_wpawme and dissect_vendor_ie_rsn
- Display the vendor code on the top level of vendor specific IEs
- Make the vendor code of vendor specific IEs filterable
  (wlan_mgt.tag.oui)


svn path=/trunk/; revision=16363
2005-10-30 09:14:38 +00:00
Jörg Mayer
c9300eeb05 - Remove trailing whitespace
- IS_WEP is now (11i) called IS_PROTECTED
- Remove duplicate (and commented out) code
- Add reson code 0x24 to reason_codes


svn path=/trunk/; revision=16362
2005-10-30 09:13:27 +00:00
Guy Harris
b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Anders Broman
b1d165da12 From Ankur Aggarwal:
First phase of testing revealed the following errors

svn path=/trunk/; revision=15780
2005-09-13 05:05:19 +00:00
Ronnie Sahlberg
30263a1d0b sprintf big fix
svn path=/trunk/; revision=15549
2005-08-27 00:10:02 +00:00
Ronnie Sahlberg
e6dd3c8b22 more sprintf updates
svn path=/trunk/; revision=15469
2005-08-20 13:02:08 +00:00
Ulf Lamping
495eb1b788 snprintf -> g_snprintf
svn path=/trunk/; revision=15398
2005-08-17 23:10:28 +00:00