Commit Graph

30 Commits

Author SHA1 Message Date
Evan Huus 441ebf8cc8 Use the correct define for the array length check, actually fixes the overflow I
originall tried to fix in r54441.

svn path=/trunk/; revision=54462
2013-12-26 14:01:37 +00:00
Evan Huus 36587bc7be Avoid accessing past the end of an array.
svn path=/trunk/; revision=54441
2013-12-24 14:34:06 +00:00
Jakub Zawadzki e0e86bab5a Fix const warnings.
svn path=/trunk/; revision=54092
2013-12-14 14:33:46 +00:00
Jakub Zawadzki 5ac6474c94 Rename some of pint.h macros to match common style (bits number on the end).
pntohs  -> pntoh16
   pntohl  -> pntoh32
   pletohs -> pletoh16
   pletohl -> pletoh32
   phtons  -> phton16
   phtonl  -> phton32


svn path=/trunk/; revision=53652
2013-11-29 18:59:06 +00:00
Jakub Zawadzki c9b2ee3768 include <wsutil/pint.h> only when needed.
svn path=/trunk/; revision=53196
2013-11-09 15:44:29 +00:00
Evan Huus b581aff2c3 Based on help and suggestions from Johannes Berg, fix Radiotap Header decode the
right way.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9256 without
reintroducing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9212

svn path=/trunk/; revision=52564
2013-10-12 12:53:35 +00:00
Evan Huus 3955de8abf Add some additional checks around the radiotap iterator initialization, to fix
the invalid access errors in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9212

(also add modelines)

svn path=/trunk/; revision=52311
2013-10-01 13:07:25 +00:00
Michael Mann c70b1a548b Convert proto_tree_add_int_format calls to proto_tree_add_int_format_value where appropriate.
svn path=/trunk/; revision=52301
2013-09-30 16:10:40 +00:00
Michael Mann e6f1bd9056 Convert several proto_tree_add_bytes_format calls to proto_tree_add_bytes_format_value.
svn path=/trunk/; revision=52272
2013-09-29 18:19:29 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Michael Mann 346f803d42 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string

There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.

svn path=/trunk/; revision=52098
2013-09-16 10:39:06 +00:00
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Michael Mann 5405b34469 Batch of filterable expert info.
svn path=/trunk/; revision=51688
2013-09-02 23:32:31 +00:00
Michael Mann b38ec03858 Bugfix SGI Nsym disambiguation is unconditionally displayed when dissecting VHT, bug 8989 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8989)
From Karl Beldan

BACKPORT(1.8,1.10)

svn path=/trunk/; revision=51422
2013-08-19 00:11:50 +00:00
Pascal Quantin d7856ef304 Fix bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8829 :
Prevent an out of bounds access in 802.11 Radiotap dissector

svn path=/trunk/; revision=50090
2013-06-20 22:21:24 +00:00
Evan Huus 1164990ffb Initialize a proto_tree variable which is now used for expert info but is
only being set if tree.

svn path=/trunk/; revision=49239
2013-05-11 02:02:31 +00:00
Guy Harris 7a6235666d Add expert info for radiotap header errors.
Add the "unknown fields" expert info to the bitmap, just as we do the
other expert info.

svn path=/trunk/; revision=49238
2013-05-10 23:21:42 +00:00
Anders Broman 81e80f2c0b From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48355
2013-03-17 16:48:47 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Bill Meier e5e3373e9d Fix several [-Wshadow] warnings;
Also:
 - Create/use several extended value strings;
 - Reformat hf[] array;
 - Do various whitespace and formatting changes to use a consistent style.

svn path=/trunk/; revision=46222
2012-11-27 14:34:27 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Alexis La Goutte b6e0cc28a5 From Daniel via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7716
Adding VHT Radiotap fields support

Parsing and UI representation for recently adopted VHT Radiotap fields for
802.11ac specification
http://www.radiotap.org/defined-fields/VHT 

From me :
* Make checkAPIs happy
* Fix wrong last argument for some proto_tree_add_item
* Use proto_tree_add_item when it is possible

svn path=/trunk/; revision=44985
2012-09-18 20:46:05 +00:00
Alexis La Goutte daa1818d39 Enhance radiotap dissector
* Reorder code ! Match with Wireshark "Rules" (put in top value_string and static hf_..., in bottom proto_register_radiotap...)

svn path=/trunk/; revision=44336
2012-08-08 12:56:37 +00:00
Alexis La Goutte 88c219908e Enhance radiotap dissector
* Display unused/not defined present flags
* Add expert info if unused/not defined present flags has not "zero"

svn path=/trunk/; revision=44333
2012-08-08 12:32:04 +00:00
Alexis La Goutte 0e9df60466 Add A-MPDU Status Present flag
svn path=/trunk/; revision=44330
2012-08-08 08:30:51 +00:00
Alexis La Goutte 02cd557c95 From Johannes Berg via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7583
Add radiotap A-MPDU status

The new A-MPDU status extension for radiotap was adopted.
http://www.radiotap.org/defined-fields/A-MPDU%20status 

From me 
Use proto_tree_add_item

svn path=/trunk/; revision=44329
2012-08-08 08:16:34 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Guy Harris ec69aa8d27 Rename the NetMon 802.11 radio header and radiotap 802.11 radio header
dissector source files to match the "packet-ieee80211-XXX" pattern used
for other 802.11 radio header dissectors.

svn path=/trunk/; revision=42380
2012-05-02 04:03:49 +00:00