Commit graph

67 commits

Author SHA1 Message Date
Michael Mann
14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo
246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Alexis La Goutte
296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki
c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Jakub Zawadzki
ea73d4a55c Avoid calling find_dissector(), cache result of [new_]register_dissector()
svn path=/trunk/; revision=53353
2013-11-16 01:10:05 +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
Pascal Quantin
07c29e74e9 Convert a few more dissectors to wmem API
svn path=/trunk/; revision=52052
2013-09-15 09:12:01 +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
e597acdc48 Batch of filterable expert info.
svn path=/trunk/; revision=51625
2013-09-01 13:05:27 +00:00
Michael Mann
0f0c111119 Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49920
2013-06-14 01:02:11 +00:00
Anders Broman
94ff9552c2 From Anthony Coddington:
SDH dissector calculation fixes.

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

svn path=/trunk/; revision=49750
2013-06-04 04:19:52 +00:00
Anders Broman
6bde918078 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48426
2013-03-19 20:00:52 +00:00
Bill Meier
1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +00:00
Pascal Quantin
e7d64a962f From Stephen Donnelly via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8215 :
Several ERF types are incorrectly calling downstream dissectors under the erf_tree instead of under the top level tree

svn path=/trunk/; revision=47122
2013-01-16 21:47:28 +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
Jeff Morriss
0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Guy Harris
4fdfccd56d Don't add FT_UINTn values with proto_tree_add_int(). (The fields in
question are 4-byte header fields containing bitfields, so "unsigned" is
appropriate here.)

svn path=/trunk/; revision=45521
2012-10-13 17:57:13 +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
Jeff Morriss
9802b80159 From Stephen Donnelly via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7563 :
Remove another invalid array write.

svn path=/trunk/; revision=44419
2012-08-10 13:00:20 +00:00
Jeff Morriss
ed497d453f From Stephen Donnelly: a better fix for the fuzz failure reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7563 :

Previous patch solved the reported problem. This patch should cover input
validation for the VC Id and Link Rate fields properly.

Note link_rate==0 (unknown) is supported, as some hardware/firmware may not set
this field, but vc_size==0 is defined invalid.


From me: also initialize m_sdh_line_rate when the input is garbage.

svn path=/trunk/; revision=44377
2012-08-09 13:20:39 +00:00
Jeff Morriss
846b557614 Fix fuzz failure reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7563 :
Don't overflow in_fmt->m_vc_index_array: verify that speed is less than or
equal to DECHAN_MAX_AUG_INDEX before using it.

Also add a comment: there are comments here that indicate that this array
should have 5 entries but there are only 4.

svn path=/trunk/; revision=44306
2012-08-07 18:17:29 +00:00
Anders Broman
fc5a63c97f From Stephen Donnelly:
ERF dissector cleanup

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

svn path=/trunk/; revision=44152
2012-07-31 07:03:25 +00:00
Jakub Zawadzki
b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Anders Broman
5bd0c263f2 From Andrew Kampjes:
SDH support for wireshark.

- Added GPL license.
- Removed not needed includes.
- Skipped th .h file as it wasn't used.

svn path=/trunk/; revision=43106
2012-06-05 10:42:38 +00:00
Gerald Combs
5690373d48 g_snprintf → ep_strbuf. I can't find an ERF file with a virtual
container but the conversion seemed be straightforward enough.

svn path=/trunk/; revision=42951
2012-05-31 21:30:40 +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
Jeff Morriss
9a376de135 From Stephen Donnelly via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6943 :
The ERF extension header 'New BFS' is poorly named, it is not descriptive.

Rename the ERF 'New BFS' extension header to 'Signature' which is more
descriptive, more easily distinguished, and consistent with the internal
naming.

svn path=/trunk/; revision=41515
2012-03-13 01:22:36 +00:00
Alexis La Goutte
85ae30c42b Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41354
2012-03-05 09:50:42 +00:00
Bill Meier
1155e25c89 Cleanup:
- packet-erf.h not used elsewhere; move to packet-erf.c;
- reformat long lines;
- minor code re-arrangement;
- whitespace cleanup.

svn path=/trunk/; revision=41345
2012-03-05 00:01:28 +00:00
Bill Meier
bba57bcfae Fix bugs in buffer overflow checking used with calls to g_snprintf();
svn path=/trunk/; revision=41344
2012-03-04 23:34:58 +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
Chris Maynard
1f3f39c242 Add a few more raw link types to be up to date with the current ERF format spec. Patch provided by Andrew Kampjes via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6410.
svn path=/trunk/; revision=39203
2011-09-30 20:51:10 +00:00
Guy Harris
a6fcf8cd45 Endace ERF channelisation and "New BFS" extension header support, from
Andrew Kampjes.

svn path=/trunk/; revision=38788
2011-08-30 03:58:12 +00:00
Chris Maynard
0db9556757 Delete unused header fields found by running tools/checkhf.pl.
svn path=/trunk/; revision=36418
2011-03-31 14:35:40 +00:00
Chris Maynard
f88037ac41 From Yair via bug 5779: Add option to leave AAL5 in unspecified format.
(... with whitepsace changes by me.)

svn path=/trunk/; revision=36416
2011-03-31 14:23:07 +00:00
Bill Meier
21d34d05b9 Don't assign to a proto_item* if the value won't be used: Coverity 895-897
Also: Fix some indentation & whitespace.

svn path=/trunk/; revision=36355
2011-03-26 16:39:30 +00:00
Jeff Morriss
2f82a2ee2c From Stephen Donnelly via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5708 :
The ERF record format defines several error flags.

This patch exposes ERF error flags using 'Expert Infos' for highlighting and
counting.

svn path=/trunk/; revision=36035
2011-02-23 17:54:00 +00:00
Bill Meier
121c65c613 Remove unneeded #includes (stdio.h,stdlib.h);
Whitespace cleanup: trailing, indentation, "4-space tabs"

svn path=/trunk/; revision=35850
2011-02-07 18:49:29 +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
Anders Broman
4d450d131e From Stephen Donnelly:
Add BFS extension header decoding to ERF dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5113

svn path=/trunk/; revision=33806
2010-08-16 05:34:12 +00:00
Anders Broman
441c3f63b2 From Stephen Donnelly:
InfiniBand Link Packet (flow control) dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4656

svn path=/trunk/; revision=32425
2010-04-08 08:41:56 +00:00
Bill Meier
09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Anders Broman
6dfde68911 From Stephen Donnelly:
Endace ATM and AAL2 enhancements.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4447

svn path=/trunk/; revision=31766
2010-02-02 04:56:39 +00:00
Kovarththanan Rajaratnam
17c9803cac Sanitize epan includes
svn path=/trunk/; revision=29499
2009-08-21 20:25:24 +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
Kovarththanan Rajaratnam
e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26: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
Bill Meier
c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +00:00
Jörg Mayer
4149a23cc5 Trivial warning fixes
svn path=/trunk/; revision=26899
2008-12-02 08:11:23 +00:00