Commit Graph

1020 Commits

Author SHA1 Message Date
Evan Huus 706211b642 Make the wmem scopes friendly to the valgrind script like emem is.
svn path=/trunk/; revision=46171
2012-11-24 19:02:05 +00:00
Jeff Morriss 2e487add27 If tshark doesn't fail when building the tree, try again without -V.
svn path=/trunk/; revision=46080
2012-11-19 00:04:08 +00:00
Michael Mann 7d39afa6f8 Use proto_tree_add_<signed integer> functions for signed giop datatypes
svn path=/trunk/; revision=46021
2012-11-13 13:20:39 +00:00
Evan Huus ca21cf8083 Add -n option to valgrind script that runs with -v instead of a pcap file.
Useful for find issues and leaks in non-dissection related code when you
don't have a capture file handy.

svn path=/trunk/; revision=45979
2012-11-09 02:10:48 +00:00
Michael Mann 9f84a8d340 Add a few more expert_add_info_format calls to giop dissector which requires packet_info* structure and proto_item* to be filtered down through the generated functions.
Also removed some excessive whitespace.

svn path=/trunk/; revision=45911
2012-11-05 03:36:07 +00:00
Gerald Combs 6c92b6d86a Add an option (-P) for a minimum plugin count.
svn path=/trunk/; revision=45800
2012-10-26 16:30:48 +00:00
Evan Huus bfe304a9a4 Make the fuzz-test plugin error into a warning, since lacking plugins
doesn't seem (to me) to warrant preventing someone from fuzz-testing.

Anyone know why this was put in in the first place?

svn path=/trunk/; revision=45733
2012-10-22 23:33:48 +00:00
Evan Huus 90584f4655 Add verbose option to the cppcheck script.
svn path=/trunk/; revision=45542
2012-10-14 19:30:33 +00:00
Evan Huus 4930f6d820 Enhancements to the CppCheck script:
- make html output a flag (-h), instead of what happens when you
  specify no files
- add flag (-j) for job count, like make et al.
- add flag (-a) to ignore the suppressions file and report all issues
- require /bin/bash instead of just /bin/sh in order to get arithmetic $(())
- add mode-lines

svn path=/trunk/; revision=45520
2012-10-13 02:03:18 +00:00
Michael Mann a5d56d30b4 Make idl2wrs dissectors filterable - Part 1
Updated wireshark_gen.py to generate hf_ variables for all of the IDL "types".  The "simple" types use proto_tree_add_* (not text), while the "complex" types use the GIOP dissector API.  checkhf.pl generates some warnings because (some of) the hf_ variables are being generated for the "complex" types, but are not being used.  That will be done in Part 2.

expert_add_info_format now linked to a real item instead of being attached to a duplicative proto_tree_add_text().  This cleaned up literally thousands of unnecessary proto_tree_add_text()s

svn path=/trunk/; revision=45472
2012-10-11 14:42:33 +00:00
Gerald Combs ff32bd8000 If our error output is huge (> 5 MB) trim out the middle of the file.
The recent loop bugs have generated output that's too large to attach to
Bugzilla.

svn path=/trunk/; revision=45437
2012-10-09 20:47:22 +00:00
Gerald Combs 5cb8f53f5c Make "tools", which includes lrelease. Update the version to 4.8.3.
svn path=/trunk/; revision=45362
2012-10-07 03:19:53 +00:00
Gerald Combs 52972458e8 Add the command and arguments to the error file.
svn path=/trunk/; revision=45294
2012-10-03 18:03:12 +00:00
Gerald Combs a5b9de38b4 Fix return code checking (hopefully).
svn path=/trunk/; revision=45289
2012-10-03 16:39:35 +00:00
Gerald Combs 498db62022 Test with the presence (-nVxr) and absence (-nr) of the tree. We now
use an array of arguments so additional combinations can be added.

svn path=/trunk/; revision=45258
2012-10-02 17:58:00 +00:00
Guy Harris fbe74322b1 From Bill Parker:
Add some additional memory-allocation failure checks in Lemon.

	Use NULL rather than 0 as the null-pointer constant in those
	checks.

From me:

	Catch one more of the NULL-vs-0 cases.

	Fix some failure messages to use fprintf(stderr, ...) -
	ErrorMsg() requires a file name and line number, and is
	generally used if you're going to continue rather than just give
	up.

svn path=/trunk/; revision=45214
2012-09-29 19:40:27 +00:00
Greg Morris 247040590d Added additional server information in NCP 23/17 reply structure for OES Linux.
Fixed GTKHash table being overwritten when number of NCP packets exceeds 255. Sequence numbers wrap so this was causing the request value table to be overwritten and subsequent malformed NCP packets.

Fixed buid_expert_data for file open reporting to correctly convert to Hex value so proper lookup in val table will succeed.

Added additional OES Linux values to build_expert_data for server entries.

svn path=/trunk/; revision=45177
2012-09-27 17:47:10 +00:00
Evan Huus b409efefce Touch the file in make-dissector-reg.py if it hasn't changed, so that
we don't try and regenerate it every single subsequent build.

Also, add modelines.

svn path=/trunk/; revision=45117
2012-09-25 01:06:13 +00:00
Gerald Combs c3f2dbdb8d Update make-dissector-reg.py to match r45083. Instead of writing the new
plugin.c or register.c content to a temporary file build a giant string
in memory and only write it if the current and new hashes differ.

This requires hashlib which was added in Python 2.5; hopefully that's
not a problem.

svn path=/trunk/; revision=45104
2012-09-24 16:21:56 +00:00
Jörg Mayer a9ddd42c28 make-dissector-reg
Only update outfile if it differs from newly created outfile
make-dissector-reg.py
	Add a comment that we should do the same here (probably a small
	task for python knowledeable people).

svn path=/trunk/; revision=45083
2012-09-24 05:59:56 +00:00
Jeff Morriss 1a97b58332 Followup to r45034: Don't define _U_ on the compile line, pull it in from
config.h (like we do in cmake).  We always HAVE_CONFIG_H so don't check for it.

svn path=/trunk/; revision=45050
2012-09-21 21:29:18 +00:00
Jeff Morriss abc482e578 Revert r45018 and r45019: put config.h back in lemon.c and take _U_ back off
the compile line when building with cmake.

Put _U_'s definition in config.h when building with autofoo and on Windows.

svn path=/trunk/; revision=45034
2012-09-21 01:42:03 +00:00
Evan Huus 5983528b69 Fix lemon build with cmake by defining _U_. I feel like there's a better
way than all the horrid escaping I had to do, but I don't know what it is.

svn path=/trunk/; revision=45019
2012-09-20 02:55:22 +00:00
Jeff Morriss 4501a9bc84 lemon is not compiled with HAVE_CONFIG_h so don't test for it nor try to include it.
svn path=/trunk/; revision=45018
2012-09-20 02:18:24 +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
Jörg Mayer 30b7b74dde Remove #defines that provided backward source compatibility
for deprecated dissector add/remmove/... functions.

svn path=/trunk/; revision=45000
2012-09-19 07:20:49 +00:00
Jeff Morriss 22b7086fb9 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=44997
2012-09-19 01:37:13 +00:00
Jeff Morriss c7fa2f0b6f If we have PYTHON use make-tap-reg.py (in both autofoo and Windows): it's
slightly faster than the old shell-script version on *NIX and it seems
significantly faster on Windows.

svn path=/trunk/; revision=44972
2012-09-18 15:15:39 +00:00
Jeff Morriss 06499e6dd0 Put back the part of the regexp's that avoids finding function prototypes.
svn path=/trunk/; revision=44955
2012-09-17 21:56:52 +00:00
Jeff Morriss 211f791c6c Rather than reading the dissectors line by line and searching for the
registration and handoff routines in each line, read the whole file into
memory and then do one findall() search. Store the matches in sets to avoid
duplication.

(This also simplifies the number of regexps we're looking for.)

This speeds up the generation of register.c (when there is no cache)
significantly (on my system the time taken drops from ~32 seconds to ~5
seconds).

svn path=/trunk/; revision=44954
2012-09-17 21:30:24 +00:00
Jeff Morriss 73c0fa86f9 Unique-ify the list of dissector registration and handoff functions while we
sort them.  Avoids the double registration problem discussed on -dev today.

Note: the sorted() call requires Python 2.4+ but I think that's OK now.

svn path=/trunk/; revision=44952
2012-09-17 20:37:39 +00:00
Gerald Combs 1b1a1e6a3e Remove our local copy of WinPcap and download it from
wireshark-win{32,64}-libs instead. In win-setup.sh only try to unzip
files ending in .zip. PortableApps and U3 packaging changes are untested.

svn path=/trunk/; revision=44888
2012-09-13 21:28:28 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Bill Meier 5e4bff84d3 Use non-capturing grouping when grouping just for alternatives;
Also: improve error message slightly in the case of a missing NULL termination.

svn path=/trunk/; revision=44826
2012-09-10 01:53:23 +00:00
Jeff Morriss b1a5af9eed string_strings and range_strings must also be {0, NULL} terminated.
Also, remove some tabs.

svn path=/trunk/; revision=44824
2012-09-10 00:48:50 +00:00
Gerald Combs 345529250f Run 'git log' if we have a .git directory. Fixes a copy+paste error.
svn path=/trunk/; revision=44784
2012-09-05 20:58:15 +00:00
Pascal Quantin e6538311a6 Replace process_RequestOperation macro by a real function to speedup compilation time
svn path=/trunk/; revision=44779
2012-09-05 12:45:54 +00:00
Michael Mann 64d81e7477 Check for PFNAME #define as it is a common substitute for a literal string for the proto filter name and consider it the proto filter name.
Ignore "duplicates" that are generated because a display filter is prefixed by a #define (which checkfiltername.pl is not smart enough to handle), causing an empty string

svn path=/trunk/; revision=44654
2012-08-24 03:05:05 +00:00
Michael Mann 8242949ebc Allow proto filter names to have a period in them and allow display filter names to use any period separated value as a prefix. For example "gmr1.foo.bar" would allow "gmr1", "gmr1.foo" and "gmr1.foo.bar" as valid prefixes. Otherwise it will be flagged as a possible error.
Also added a "FILE TYPE" for proto filter names with a period so that they can be verified.  Presumably only "large", possibly "meta" protocols (probably spanning multiple dissector files) will be allowed to use a period in the proto filter name.

svn path=/trunk/; revision=44648
2012-08-23 21:31:20 +00:00
Evan Huus 450d24d835 Don't go into a tight loop when there's no specific number of passes.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7651

Also, use consistent indentation.

svn path=/trunk/; revision=44581
2012-08-19 13:50:22 +00:00
Evan Huus f385acc461 From Toralf Förster via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7652
Use a fast bash built-in rather than a slow call out to `expr` to increment
the loop count.

svn path=/trunk/; revision=44580
2012-08-19 13:38:53 +00:00
Gerald Combs faf3cdf75d Move error reporting to a common function. Lot information about the
most recent revision / commit.

svn path=/trunk/; revision=44552
2012-08-17 16:28:28 +00:00
Michael Mann c3f223d356 Bug 3725 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3725)
Have giop dissector use more ephemeral memory.
Update idl2wrs dissector generator accordingly.

svn path=/trunk/; revision=44498
2012-08-14 18:33:58 +00:00
Evan Huus 69cd284787 Catch more types of valgrind errors in the fuzz-tester.
These happen when, eg, a program runs out of memory under valgrind
or other more fatal errors (that may sometimes be valgrind bugs instead).

svn path=/trunk/; revision=44451
2012-08-12 14:14:08 +00:00
Jeff Morriss ff748a68c3 From Michael Mann on -dev:
The idl2wrs generated dissectors don't follow the convention of using the
filter name registered with the protocol as the start of any display filter
name.  This patch fixes that.

svn path=/trunk/; revision=44325
2012-08-08 03:37:05 +00:00
Jeff Morriss 98a893986d Use expert infos instead of g_warning when something unexpected is found.
svn path=/trunk/; revision=44324
2012-08-08 03:29:51 +00:00
Michael Mann 65379209d6 Add support for (ignoring) idl2wrs generated dissectors.
Add commandline options to show file line numbers of dissectors.  The default is to have no line numbers shown as its easier to compare results without a minor file change causing the line number of the filter to change resulting in an unnecessary difference.
Add commandline option to check filter names of automated files (default disabled).
Check for underscores prefacing or following a period in filter names as this is probably a typo.
Cleaned up output when checking a single file.

svn path=/trunk/; revision=44182
2012-08-01 03:10:34 +00:00
Jeff Morriss b667cc5a99 Add comments to point out that these 2 scripts do the same thing.
svn path=/trunk/; revision=44175
2012-07-31 23:16:26 +00:00
Evan Huus 2d1575a2d1 Update the usage stanza for fuzz-test to reflect the changes in r44024.
svn path=/trunk/; revision=44083
2012-07-27 22:31:08 +00:00
Jakub Zawadzki d1a7b804d3 Use HEAD for git-compare-abis.sh
svn path=/trunk/; revision=44072
2012-07-27 14:57:30 +00:00