Commit Graph

59 Commits

Author SHA1 Message Date
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
Guy Harris bc35e184c7 Change to match more closely the way I read 802.11h, at least; I'm just
guessing about the "17" indicator for "management notification" frames -
I'm not sure whether, after paying USD 60 to get the current 802.11e
draft, Preview on my Mac could even decrypt it.

802.11h seems to say in 7.2.3.12 and 7.3.1.11 that the body of an Action
frame has a 1-byte Category field, with a value of 0 meaning "Spectrum
management", followed by, for Spectrum management, a 1-byte Action
field, with 0=Measurement Request, 1=Measurement Report, 2=TPC Request,
3=TPC Report, and 4=Channel Switch Announcement, followed by:

	for all but Channel Switch Announcement, a 1-byte Dialog Token
	followed by some tagged parameters;

	for the Channel Switch announcement, some tagged parameters.

Show some fields given in decimal in various 802.11 specs in decimal,
not hex.

svn path=/trunk/; revision=15370
2005-08-16 06:09:39 +00:00
Guy Harris 21ab160bcd Note where a table comes from, and that we don't use it.
svn path=/trunk/; revision=15366
2005-08-16 01:24:19 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Guy Harris 8a78d60fd1 Get rid of another unused variable.
svn path=/trunk/; revision=15150
2005-07-30 02:20:59 +00:00
Guy Harris e87d4d257b Get rid of some unused variables.
svn path=/trunk/; revision=15148
2005-07-30 02:07:36 +00:00
Ronnie Sahlberg df2d1d3f22 ememify some more calls to tvb_get_string()
this fixes an obvious memleak in ms-mms


svn path=/trunk/; revision=15132
2005-07-28 09:56:19 +00:00
Jörg Mayer e46478848e The latest patch used the fields
hf_qos_buf_ac, hf_qos_buf_load and hf_qos_buf_state
but failed to add them to the hf_ array. Commented out their
use for now.

svn path=/trunk/; revision=15116
2005-07-27 13:10:57 +00:00
Jörg Mayer f841f266ec Ankur Aggarwal:
IEEE 802.11 QoS decoding


svn path=/trunk/; revision=15115
2005-07-27 08:28:27 +00:00
Jörg Mayer 7949c7f31c char -> const char warning fixes
svn path=/trunk/; revision=15079
2005-07-26 08:01:16 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Jörg Mayer cb2d67351c Lars Ruoff:
Use correct offsets to decode bssid in all cases:
        Depending on the packet type the header contains
        up to 4 addresses but may contain less. The position/
        definition of the bssid changes as a result of this.

svn path=/trunk/; revision=15038
2005-07-24 11:35:41 +00:00
Guy Harris 9cb86fda9c Squelch various signed vs. unsigned warnings by:
making pointers to byte data be "guint8 *" rather than "char *",
	and making buffers holding byte data arrays of "guint8" rather
	than arrays of "char";

	making pointers to text strings "char *" rather than "guchar *";

	appropriately casting pointers (cast to "guint8 *" when passing
	to routines expecting "guint8 *" or when assigning to "guint8
	*");

	making port-number preferences "guint";

	making enum preferences "gint";

	making hf_ variables "int".

Clean up white space.

svn path=/trunk/; revision=14884
2005-07-09 00:53:17 +00:00
Ulf Lamping 2c30357c48 checksum messages: use "[correct]" instead of "(correct)" and other "alike" messages
svn path=/trunk/; revision=14880
2005-07-08 22:11:13 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Jörg Mayer 0fc3001d6a Add minimal 802.11j decoding. There's not fun in doing more unless
someone provides a capture file.


svn path=/trunk/; revision=14474
2005-05-29 08:19:11 +00:00
Gerald Combs 3ed50e1ae7 Don't pass a null format string to val_to_str().
svn path=/trunk/; revision=14167
2005-04-22 15:18:56 +00:00
Guy Harris 5f1b64cf8c Don't cruft up the display of the bitmap with "Tag interpretation".
(Perhaps we should just get rid of the "tag interpretation" field and,
instead, have explicit hf_ values for each of the fields and subfields.)

svn path=/trunk/; revision=13747
2005-03-14 03:08:38 +00:00
Guy Harris 99d60f21aa Don't attempt to get a pointer to the entire tagged field when
dissecting it; instead, fetch items from the tagged field as we go. 
Also, check the length of the tagged field against a minimum length, if
there is one.

When adding the SSID, just fetch it directly as a string, and leave it
up to the string display code to deal with non-printable characters.

When dissecting a tagged field, don't zero out the "out_buff" buffer
beforehand, just stick in the terminating '\0' afterwards.

svn path=/trunk/; revision=13743
2005-03-13 13:28:06 +00:00
Guy Harris 092815f97d From Vladimir Kondratiev:
- Give each IE its own subtree, with a summary at the root, and
	  details within the tree.  It allows a condensed view when IE
	  trees are closed.

	- Display country info in multiple protocol tree items, with
	  each (start channel, channels, power) triplet in a separate
	  item.

	- Put a separate item into the protocol tree for each CFP
	  parameter.

svn path=/trunk/; revision=13713
2005-03-11 12:07:30 +00:00
Guy Harris 87c16299db From Vladimir Kondratiev:
- better parsing for TIM info element: it parses 'bitmap control' byte
and provides list of AID for stations having power saving traffic.
- separate names for TIM elements. It helps to higlight beacons with
some properties, for example DTIM ones (dtim_count==0).

svn path=/trunk/; revision=13678
2005-03-09 10:43:34 +00:00
Jörg Mayer 761804b15e Add some minor Cisco proprietary stuff (hostname, network-eap)
svn path=/trunk/; revision=13495
2005-02-24 07:19:42 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00
Jörg Mayer 243a2b832e In case we have an unknown vendor tag, just decode the vendor from
manuf.

svn path=/trunk/; revision=13339
2005-02-07 15:55:13 +00:00
Guy Harris e7fd062619 Pass 0, not FALSE, as the FCS length argument (FALSE is defined as 0,
but the field is integral, not Boolean, so it's clearer if it's passed
as 0).

svn path=/trunk/; revision=13039
2005-01-14 18:05:08 +00:00
Jörg Mayer 9522cf61c0 Make sure print_buff is \0-terminated
svn path=/trunk/; revision=12886
2004-12-31 01:56:22 +00:00
Jörg Mayer 22dad47c9a As pointed out by Guy: We should be able to filter on the original SSID,
so use a copy of the existing one for printing.

svn path=/trunk/; revision=12885
2004-12-31 01:37:54 +00:00
Ulf Lamping b026aa4bc2 Again, another warning (hopefully) removed.
svn path=/trunk/; revision=12841
2004-12-27 10:11:28 +00:00
Guy Harris af7dca469a Add only one protocol tree item for the "weak IV" flag - add it as a
non-hidden Boolean, and use "proto_tree_add_boolean_format()" to add it
to include the key byte.

svn path=/trunk/; revision=12815
2004-12-22 09:58:28 +00:00
Guy Harris ce604f09d8 Properly declare a variable as volatile, as the longjmp done by the
exception mechanism might clobber it otherwise.

svn path=/trunk/; revision=12809
2004-12-22 00:30:39 +00:00
Jörg Mayer 773681fca3 Giles Scott: Add Wlan tap
svn path=/trunk/; revision=12799
2004-12-21 12:30:24 +00:00