Commit Graph

55 Commits

Author SHA1 Message Date
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
Stig Bjørlykke 63a2017571 Add a cast to avoid a warning.
svn path=/trunk/; revision=26315
2008-09-30 22:01:04 +00:00
Bill Meier aa30dcd129 Minor proto_reg_handoff cleanup: use find_dissector when appropriate.
svn path=/trunk/; revision=26308
2008-09-30 14:49:44 +00:00
Anders Broman 637761d295 From Francesco Fusco:
Endace ERFII (extension header) support.

svn path=/trunk/; revision=26287
2008-09-29 16:20:24 +00:00
Guy Harris 2e18ba7873 Just have a scalar handle_t for the Infiniband handle, for now. (The
old code had the type value past the end of the array.)

Rename the handle variables.

svn path=/trunk/; revision=25739
2008-07-14 20:26:58 +00:00
Guy Harris e95265b926 Rename the ERF "erfhdlc" preference to "hdlc_type" ("erf" is redundant,
and "hdlc" doesn't indicate that it's a protocol type), and, instead of
a "raw" option, have a "try to guess the traffic type" option - for now,
if the first byte is 0x0f or 0x8f, treat it as Cisco HDLC, otherwise
treat it as PPP.

svn path=/trunk/; revision=25737
2008-07-14 19:28:19 +00:00
Guy Harris 1349de5532 Replace the old "erfatm" preference for the ERF dissector with an
"aal5_type" dissector, which offers only "guess the traffic type" and
"LLC multiplexed" as options, defaulting to "guess the type".

Add a separate preference to control whether to treat single ATM cells
as raw data or as the first cell of an AAL5 PDU (and dissecting them as
short AAL5 PDUs).

Don't reach inside the tvbuff to get the data and the length; use
tvb_length() and tvb_get_ptr().

Pass the data *after* the AAL5 header to the "guess the traffic type"
routine.

svn path=/trunk/; revision=25736
2008-07-14 18:56:25 +00:00
Guy Harris f805676e19 Make erf.ethfcs a Boolean, with "FCS present" and "FCS not present" the
only options, and default to "FCS present".

svn path=/trunk/; revision=25724
2008-07-12 18:26:47 +00:00
Guy Harris a092f9857d Rename the preference values to something that leaves out the "eth" (as
it's redundant).

svn path=/trunk/; revision=25720
2008-07-12 02:42:33 +00:00
Guy Harris 6d0ad7e140 ERF Ethernet records always contain Ethernet packets, as the name
indicates; replace the "erf.eth" preference with an "erf.ethfcs"
preference, specifying whether the FCS is present in Ethernet frames,
and offer the options "present", "not present", and "maybe present" -
for "maybe present", call the regular Ethernet dissector, which tries to
figure out whether there's an FCS at the end of the packet or not.

svn path=/trunk/; revision=25719
2008-07-12 02:36:32 +00:00
Guy Harris 18bc1a2fef Make the default for HDLC traffic "Raw data", just as it is for other
record types, so that people know they have to set the preference.

svn path=/trunk/; revision=25609
2008-06-26 01:47:59 +00:00
Guy Harris 1f08653d0e Make the preference settings for the dissector to use for various ERF
link-layer types static.

If the preference is set to "raw data" for any of those types, display
the raw data with an indication that the preference in question has been
set to "raw data", so people don't just wonder why ERF files aren't
working right any more.  (See bug 2641; I had the same surprise when I
tried it on some ERF captures I have.)

Pull the dissect_erf_header() code into dissect_erf() - it's dissecting
the *payload*, not the *header*.

Fill in the Info column with the record type.

When using tvb_new_subset() to chop a header off of a tvbuff, just
specify lengths of -1, so we go all the way to the end.

Clean up the Infiniband dissector call.

svn path=/trunk/; revision=25608
2008-06-26 01:38:38 +00:00
Bill Meier 392d7f7376 Convert C++ style comments ...
svn path=/trunk/; revision=25273
2008-05-11 17:18:59 +00:00