Commit Graph

396 Commits

Author SHA1 Message Date
Guy Harris 4c3fd1012a Fix non-proto_tree_add_item() calls passing an ENC_ value as the last
argument.

svn path=/trunk/; revision=43808
2012-07-18 23:34:59 +00:00
Guy Harris b40db9cf4c Add to the 802.11 pseudo-header a "this is already decrypted" flag, set
it as appropriate in the code to read Network Instruments Observer
captures (rather than tweaking the "protected" flag in the packet data),
and use that flag in the 802.11 dissector.

Fix indentation while we're at it (tabs are not *ipso facto* 4 spaces).

svn path=/trunk/; revision=43795
2012-07-18 22:10:34 +00:00
Guy Harris 9d470cceb9 Clean up indentation.
svn path=/trunk/; revision=43780
2012-07-18 04:45:41 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Alexis La Goutte a16c3e2692 From report of Dennis Mendoza via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7429
Wireshark > 1.4 does not correctly read Association ID for PS Poll packets

Wireless Frame with subtype 0x1a don't interpret the Association ID (always 0).

Fix : 
proto_tree_add_uint() wasn't changed to proto_tree_add_item()

#BACKPORT

svn path=/trunk/; revision=43556
2012-07-03 12:28:06 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Chris Maynard d9d97cb7ce Fix typos.
svn path=/trunk/; revision=43320
2012-06-17 20:07:32 +00:00
Chris Maynard 365139b5cf Do not use BASE_NONE for FT_UINT8 types.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7333 (I think).

svn path=/trunk/; revision=43176
2012-06-09 17:08:46 +00:00
Alexis La Goutte 6c8174a1a8 Make checkhf tools Happy, Remove hf_ieee80211_chan*
svn path=/trunk/; revision=43032
2012-06-03 16:49:01 +00:00
Alexis La Goutte 44d7c7fb73 Add 802.11 AP Channel Report IE (51)
svn path=/trunk/; revision=43031
2012-06-03 16:47:15 +00:00
Alexis La Goutte 588fd3e761 Enhance 802.11 Secondary Channel Offset (62)
svn path=/trunk/; revision=43030
2012-06-03 16:45:30 +00:00
Alexis La Goutte 9a7409589a Enhance 802.11 HT Info 1.1 (60)
svn path=/trunk/; revision=43029
2012-06-03 16:43:19 +00:00
Alexis La Goutte 7852f04531 Cleanup Header (Remove e-mail of original author to report bugs...)
svn path=/trunk/; revision=43028
2012-06-03 16:41:11 +00:00
Alexis La Goutte 8f94d6a813 Enhance 802.11 (Vendor Specific) HT Capability (45)
And fix last Dead Store warning found by Clang


svn path=/trunk/; revision=43027
2012-06-03 16:39:55 +00:00
Alexis La Goutte 3899295893 Enhance 802.11 (vendor specifiq) HT Info 1.0 (Draft)
svn path=/trunk/; revision=43025
2012-06-03 16:37:56 +00:00
Bill Meier d53320919a Remove unneeded #includes (stdlib, stdio, ctypes, time);
In a few cases: do some whitespace, indentation cleanup & reformatting.

svn path=/trunk/; revision=42632
2012-05-15 19:23:35 +00:00
Gerald Combs 3e4b3756fd From Evan Huus via bug 6805:
Look before we loop

Check the value of various key count parameters against the size of their
parent tag *before* we start looping on them.

Stick an expert error on the field and bound the loop at a sane point if the
count is bogus.

svn path=/trunk/; revision=42631
2012-05-15 19:13:10 +00:00
Alexis La Goutte 466988126d From Jim Young via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7252
Add wlan.ra field value to wlan.addr

The (hidden) field wlan.addr==xx:xx:xx:xx:xx:xx currently matches wlan.da,
wlan.bssid, wlan.sa and wlan.da fields but not wlan.ra field.

svn path=/trunk/; revision=42597
2012-05-12 13:12:01 +00:00
Alexis La Goutte 193386b281 From me via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7115
802.11s Decoding Bug (Mesh Control Field)

Wrong offset use to dissector Mesh Extended Address(bug from the revision 39314)

svn path=/trunk/; revision=42105
2012-04-17 07:40:11 +00:00
Anders Broman fc41d4ad51 From Evan Huus:
Duplicate and misplaced 'break' statements.

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

svn path=/trunk/; revision=42091
2012-04-16 08:39:34 +00:00
Martin Mathieson 82a2fc4934 Set the extent of the tagged parameters.
svn path=/trunk/; revision=42078
2012-04-15 03:41:15 +00:00
Guy Harris 2d2d5f47f4 Patch from Alex Lindberg to update the LLDP dissector to display
registered OUIs from manuf and allow custom dissectors for
Organizationally Specific TLVs.  Fixes bug 7080.

Use uint_get_manuf_name() and uint_get_manuf_name_if_known(), rather
than tvb_get_manuf_name() and tvb_get_manuf_name_if_known(), in cases
where we've fetched the OUI.

Have the ECP/VDP dissector also display registered OUIs from manuf.

Get rid of the OUI_CISCO_2 OUI from tlv_oui_subtype_vals, as that can
come from the manuf file.  Leave in comments explaining why, for now, we
aren't using the manuf file for *all* the OUIs.

svn path=/trunk/; revision=42055
2012-04-13 22:26:35 +00:00
Jakub Zawadzki 23494db817 Add missing const attribute to some char *
Fix some "assignment discards qualifiers from pointer target type", etc

svn path=/trunk/; revision=41996
2012-04-09 18:44:10 +00:00
Bill Meier 2df5dc3d53 From Reinhard Speyerer: Fix several misspellings/typos in Wireshark
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967

svn path=/trunk/; revision=41645
2012-03-18 22:24:24 +00:00
Bill Meier 198c9ba55f FT_BOOLEAN hf[] entries with a 0 'bitmask' should have 'display' = BASE_NONE;
In some cases:
 Use val_to_str_const() instead of val_to_str();
 Reformat long lines;
 Do some general whitespace changes.


svn path=/trunk/; revision=41587
2012-03-16 02:00:29 +00:00
Bill Meier 86f7bff724 Fix incorrect packet-details display of certain 1 bit FT_BOOLEAN fields.
(Use a valid 'parent field width' in the hf[] 'display' field.

svn path=/trunk/; revision=41396
2012-03-07 15:39:39 +00:00
Jeff Morriss 406861ebf4 Don't use FT_*INT with true_false strings: the code to generate
representations of former is expecting value_strings--which are quite
different than the latter.

svn path=/trunk/; revision=41362
2012-03-06 02:04:10 +00:00
Jörg Mayer 1169f15d6e Let part of the patch speak for itself:
{ &hf_ieee80211_addr,
-      {"Source or Destination address", "wlan.addr", FT_ETHER, BASE_NONE, NULL, 0,
-       "Source or Destination Hardware Address", HFILL }},
+      {"Hardware address", "wlan.addr", FT_ETHER, BASE_NONE, NULL, 0,
+       "SA, DA, BSSID, RA or TA Hardware Address", HFILL }},
 

svn path=/trunk/; revision=41038
2012-02-16 08:31:19 +00:00
Jörg Mayer 49854a07a3 - dissect_vendor_ie_atheros:
Remove tag_len parameter - it was redundant.
  The length passed no longer contains the vendor id.
- add_tagged_field / TAG_VENDOR_SPECIFIC_IE:
  Reorder so that the ieee "standard" vendor ids come fist,
  after that the really vendor specific stuff.

svn path=/trunk/; revision=41027
2012-02-14 18:34:59 +00:00
Guy Harris 8a4786bd90 In a loop of the form
for (i = 1; i <= N; i++)
		...

the type of "i" must have, as its maximum value, a value >= the maximum
value of N; otherwise, if N is equal to the maximum value that fits in
"i", the loop willnever terminate.  (If that requires "i" to be larger
than you'd like, do the loop as

	for (i = 0; i < N; i++)
		...

which doesn't have that problem.)

Clean up the "i = 1" clause's white space in those for loops.

svn path=/trunk/; revision=41010
2012-02-13 05:35:20 +00:00
Guy Harris 0e2773b633 Don't use 16-bit integers as counters. The code won't be any faster on
anything that can run Wireshark (it might be slower), and if the maximum
count value is 16-bit, you can loop forever if the maximum count value
happens to be 65535.

(Yes, this means that

	guint i, j;

		...

	for (i = 0; i < j; i++)
		...

risks looping forever if j is 2^32-1, and the same applies to 64-bit
counters.  There are probably fewer protocols with 32-bit counts, and
probably even fewer with 64-bit counts, but the way it should be done in
those cases, for safety, is

	i = 0;
	for (;;) {
		if (i >= j)
			break;

		...

		if (i == j - 1)
			break;
	}

or something such as that.)

Fixes bug 6809.

#BACKPORT
Will schedule for 1.6.x.

svn path=/trunk/; revision=40967
2012-02-11 07:12:34 +00:00
Jeff Morriss 89a7d29852 Eliminate a C++/C99-style comment.
svn path=/trunk/; revision=40942
2012-02-09 18:59:16 +00:00
Alexis La Goutte 90b1095f3e Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40940
2012-02-09 17:35:05 +00:00
Alexis La Goutte 9936838ce3 From beelzebutt via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6597
Mesh Peering Management reason code field interpreted as status code

The Mesh Peering Management tag displays a status code instead of a reason code

svn path=/trunk/; revision=40132
2011-12-09 16:49:06 +00:00
Jaap Keuter 597058297e From Johannes Berg
It's tedious to parse the blockack bitmap by hand, showing it in wireshark
directly is much nicer. Attached patch does so, only for compressed BA for now.

From me: made it filterable.

svn path=/trunk/; revision=40126
2011-12-09 08:41:38 +00:00
Bill Meier 5d798a2aa8 Don't specify an hf[] item as using a range_string when it's really using a value_string.
Fixes Bug #6618

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

svn path=/trunk/; revision=40020
2011-11-27 21:14:59 +00:00
Gerald Combs f019a92c28 Remove a duplicate "TID" found by checkAPIs.pl.
svn path=/trunk/; revision=39755
2011-11-08 16:49:49 +00:00
Alexis La Goutte 40d6131f1b From Pontus Fuchs via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6548
80211 QoS Control: Add Raw TID

svn path=/trunk/; revision=39754
2011-11-08 14:45:35 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier d65261d344 Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
(Some minor whitespace cleanup).

svn path=/trunk/; revision=39488
2011-10-20 14:07:54 +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
Anders Broman 6231e52968 From Jouni Malinen:
Reassemble GAS Query Response if needed.

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

svn path=/trunk/; revision=39440
2011-10-16 17:29:12 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Anders Broman 3e9d852a1b From Jouni Malinen:
Move sniffer meta data parsing to separate files

packet-ieee80211.c includes dissectors for three different styles
of IEEE 802.11 sniffer meta data (like signal strength). Move these
to separate files in the same style as a fourth format (radiotap)
was already handled, so that packet-ieee80211.c focuses on the
actual IEEE 802.11 frame dissecting.

This reverts
http://anonsvn.wireshark.org/viewvc?revision=23911&view=revision
Objections?
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443

svn path=/trunk/; revision=39379
2011-10-12 05:08:51 +00:00
Bill Meier 9ef1758adf Fix a case wherein proto_tree_add_boolean() was intended instead of proto_tree_add_item().
Also: Use proto_tree_add_boolean() instead of proto_tree_add_item() for code consistency in 2 other cases.


svn path=/trunk/; revision=39378
2011-10-12 03:28:07 +00:00
Anders Broman 5abc230af9 From Jouni Malinen:
Dissect Time Advertisement and Time Zone elements.

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

svn path=/trunk/; revision=39371
2011-10-11 18:46:27 +00:00
Anders Broman d12747796c From Jouni Malinen:
ieee80211: Start splitting add_tagged_field into helper functions.

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

svn path=/trunk/; revision=39370
2011-10-11 18:43:13 +00:00
Anders Broman e98c120858 From Jouni Malinen:
Simplify tag_num_vals.

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

svn path=/trunk/; revision=39369
2011-10-11 18:40:02 +00:00
Anders Broman 5874619e61 From Jouni Malinen:
Dissect WNM (IEEE 802.11v) information.

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

svn path=/trunk/; revision=39368
2011-10-11 18:29:29 +00:00