Commit Graph

1750 Commits

Author SHA1 Message Date
Evan Huus 91cec2a12e From Thomas Wiens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8455
Don't add an extra 16 to offset, we've been updating it as we go. Fixes cases
where valid AMS packets were marked as malformed.

svn path=/trunk/; revision=48215
2013-03-09 13:47:08 +00:00
Pascal Quantin b7e55ff079 ENC_BIG_ENDIAN -> ENC_NA (as found by fix-encoding-args.pl)
svn path=/trunk/; revision=48040
2013-03-03 18:59:20 +00:00
Pascal Quantin 4d63de1b41 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from profinet plugin

svn path=/trunk/; revision=48039
2013-03-03 18:45:23 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Pascal Quantin 323ab76f2d From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from packet-asn1.c

svn path=/trunk/; revision=47984
2013-03-01 19:32:23 +00:00
Pascal Quantin 809c118bee From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from WiMAX plugins

svn path=/trunk/; revision=47978
2013-03-01 19:05:25 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c.  Update their callers to include
<epan/show_exception.h> to get their declaration.

Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff.  Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).

Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).

Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.

Use show_exception() to report non-fatal errors, rather than doing it
yourself.
 
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.

Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.

Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.

svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier 63f113d908 it's ==> its & its == > it's as needed.
svn path=/trunk/; revision=47893
2013-02-26 01:30:56 +00:00
Guy Harris 29715ccc8f How can I get a new tvbuff that starts at an offset within a given
tvbuff and runs to the end of the tvbuff?  Let me count the ways....

Replace a bunch of different ways of doing that (some incorrect, in that
they're not properly handling tvbuffs where the captured and reported
lengths are different) with tvb_new_subset_remaining().

svn path=/trunk/; revision=47751
2013-02-19 23:17:07 +00:00
Guy Harris 3b9b52e279 Get rid of an extra blank line.
svn path=/trunk/; revision=47677
2013-02-15 20:10:19 +00:00
Evan Huus f95978cf08 From Hannes Mezger via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8327
Updates to the OPCUA plugin so that subtrees of the dissector select the
appropriate number of bytes. Also fix dissection of the array dimensions
field for matrix values and the highlighting for empty string fields.

svn path=/trunk/; revision=47673
2013-02-15 15:24:39 +00:00
Gilbert Ramirez 486c6d5445 Fix the grammar.h/grammar.c/grammar.lemon dependency so that
grammar.h is not always out of date. Use the same pattern as in the
Makefile.nmake files

svn path=/trunk/; revision=47643
2013-02-12 17:25:28 +00:00
Bill Meier f784806968 Comment out numerous unused hf_.... instances found by checkhf.
svn path=/trunk/; revision=47617
2013-02-10 20:52:21 +00:00
Guy Harris 0a20c5dd91 Add %option noinput to some Flex files, as we aren't using the input()
routine and thus don't need to have it generated - and as it produces
warnings of a routine defined but not used, we don't want to have it
generated.

svn path=/trunk/; revision=47616
2013-02-10 20:21:05 +00:00
Bill Meier af28be3598 Fix a (benign) ERROR: NO ARRAY: opcua/opcua.c, hf_opcua_reassembled_data
svn path=/trunk/; revision=47614
2013-02-10 19:30:37 +00:00
Guy Harris ebacca89a7 Add %option noinput to a bunch of Flex files, as we aren't using the
input() routine and thus don't need to have it generated - and as it
produces warnings of a routine defined but not used, we don't want to
have it generated.

Squelch a casting-const-away warning.

svn path=/trunk/; revision=47613
2013-02-10 19:13:07 +00:00
Bill Meier c2b97dd845 Comment out various unused hf_... instances found by checkhf.
svn path=/trunk/; revision=47607
2013-02-10 16:31:52 +00:00
Bill Meier 9276c4340b Fix ERROR: NO ARRAY: packet-tlv.c, hf_docsis_rcv_mod_enc_ctr_freq_asgn
##Backport 1.6, 1.8


svn path=/trunk/; revision=47605
2013-02-10 16:18:18 +00:00
Guy Harris eca5bd1c65 We *did* fix the APIs used.
svn path=/trunk/; revision=47597
2013-02-09 20:21:37 +00:00
Guy Harris 4824a391e8 Pull the definition of NODIST_HEADER_FILES up into
plugins/Makefile.common.inc.

svn path=/trunk/; revision=47596
2013-02-09 20:15:18 +00:00
Guy Harris 19aa5dbe46 "make maintainer-clean" should nuke all generated files.
svn path=/trunk/; revision=47594
2013-02-09 19:32:31 +00:00
Guy Harris c8af93ea2d Get rid of trailing tabs, make comments more similar.
svn path=/trunk/; revision=47593
2013-02-09 19:30:18 +00:00
Guy Harris ccadade242 Define GENERATED_HEADER_FILES in plugins/Makefile.common.inc.
svn path=/trunk/; revision=47592
2013-02-09 19:20:13 +00:00
Guy Harris 9c4e108387 plugins/Makefile.common.inc defines NODIST_SRC_FILES, and
plugins/mate/Makefile.common includes it, so there's no need to define
it in plugins/mate/Makefile.common.

svn path=/trunk/; revision=47591
2013-02-09 19:15:24 +00:00
Guy Harris df33477429 Define FLEX_GENERATED_SRC_FILES and LEMON_GENERATED_SRC_FILES in
plugins/Makefile.common.inc, and use it in plugins/mate/Makefile.nmake.

svn path=/trunk/; revision=47590
2013-02-09 19:11:14 +00:00
Guy Harris fa596409e0 plugins/Makefile.common.inc should already be defining
GENERATED_SRC_FILES, and plugins/mate/Makefile.common includes it, so it
shouldn't need to define GENERATED_SRC_FILES itself.

svn path=/trunk/; revision=47589
2013-02-09 18:54:27 +00:00
Guy Harris 518e27bc00 The type of the second argument to g_snprintf() is gulong. (It *should*
have been size_t, just as with Boring Old Snprintf; what were they
thinking?)

svn path=/trunk/; revision=47588
2013-02-09 18:41:06 +00:00
Anders Broman 4e4cf2b9a5 Add casts to make it build on win64.
svn path=/trunk/; revision=47587
2013-02-09 17:08:41 +00:00
Anders Broman 3f00e454a5 Try to fix the makefiles to be able to build mate after distclean.
svn path=/trunk/; revision=47586
2013-02-09 16:34:51 +00:00
Evan Huus f07a2b1080 Get rid of a '- i' that appears to have been accidentally inserted in r47581.
i is definitely not initialized at that point (GCC was complaining), and there
seems to be no need to subtract anything from the value in question in the
first place.

svn path=/trunk/; revision=47582
2013-02-09 14:15:11 +00:00
Guy Harris 89d226b733 Get rid of g_sprintf() and strncpy() usage - this is somewhat of a hack,
but this should really be completely rewritten to use the packet-ber.c
routines and to handle strings better (code that handles strings should
not be written in a language that doesn't have a string datatype; that
eliminates C as a possibility, and that's not a bug, that's a
feature...).

svn path=/trunk/; revision=47581
2013-02-09 09:57:05 +00:00
Guy Harris 10e2296c79 The stats_tree plugin doesn't, at present, have anything that looks for
register routines, so there's no plugin.c and hence no plugin.obj.

svn path=/trunk/; revision=47580
2013-02-09 06:09:16 +00:00
Guy Harris e30d2b5001 Make the other plugin makefiles use the new style introduced in the MATE
makefiles.

svn path=/trunk/; revision=47579
2013-02-09 05:31:15 +00:00
Guy Harris a52fedeece Stick NONGENERATED_ in the front of the macros listing non-generated
files.  Define C_FILES and CPP_FILES in Makefile.common.inc to include
*all* C and C++ files, respectively, including generated files.

svn path=/trunk/; revision=47557
2013-02-08 05:31:13 +00:00
Guy Harris ddd4e48890 We don't care what source files are "dissector" source files, we only
need to care whether source files should be scanned for registration
functions.

Reduce the number of macros we define in Makefile.common.inc, getting
rid of some only used internally.

svn path=/trunk/; revision=47556
2013-02-08 04:20:32 +00:00
Guy Harris ec02b35a9c -Werror needs to be applied only to clean files, not to, for example,
Flex-generated files.  Comment it out for now.

svn path=/trunk/; revision=47516
2013-02-06 10:24:50 +00:00
Guy Harris de2db00f04 Add -Werror if enabled.
Sort EXTRA_DIST.

svn path=/trunk/; revision=47515
2013-02-06 09:52:09 +00:00
Guy Harris c0afc1df76 Only remove Flex-generated files with "nmake distclean", not all
generated files.

Remove all generated files with "nmake maintainer-clean".

svn path=/trunk/; revision=47514
2013-02-06 09:51:33 +00:00
Guy Harris a7ae83ff95 Don't bother setting XXX_FILES to empty strings.
svn path=/trunk/; revision=47513
2013-02-06 09:50:38 +00:00
Guy Harris 4c99756f6e strtod() is locale-dependent; use g_ascii_strtod() instead.
If the intent is that floating-point representations be
locale-dependent, change this and somehow arrange that this not fail the
API test.  However, I doubt anybody's actually done anything that uses
this code path, given that...

...it was comparing a value against itself.  Fix it to use op->v.

svn path=/trunk/; revision=47512
2013-02-06 04:37:27 +00:00
Guy Harris 379a400c8f Don't run Lemon-generated header files through checkAPI, either (they
don't have an RCS ID, and they just define a pile of tokens).

svn path=/trunk/; revision=47511
2013-02-06 03:33:45 +00:00
Guy Harris 02433fe7d4 Get rid of extra blank line at the end.
svn path=/trunk/; revision=47510
2013-02-06 03:33:37 +00:00
Guy Harris 91f023174a Lemon-generated files get API warnings as well.
Do, however, run the support files through checkAPI.

svn path=/trunk/; revision=47509
2013-02-06 03:30:02 +00:00
Guy Harris af22672ed7 Do a bit more splitting and combining of file names, so that we can
avoid running the checkAPI stuff on Flex-generated files.

svn path=/trunk/; revision=47506
2013-02-06 02:30:08 +00:00
Guy Harris 39dd49ee2a mate_parser.obj depends on mate_grammar.h, as it's built from
mate_parser.c and mate_parser.c includes mate_grammar.h, so we need to
make sure mate_grammar.h is built before we try to compile
mate_parser.c.  However, mate_parser.obj isn't built by trying to
compile mate_grammar.h, so don't use $? in the $(CC) line, as that will
cause it to try to compile *all* the dependencies.

Add a comment to explain why mate_parser_lex.h depends on mate_parser.c.

svn path=/trunk/; revision=47504
2013-02-05 21:49:43 +00:00
Guy Harris c521263a6b Put NODIST_ at the beginning of macros containing NODIST, paralleling
the nodist_ convention for Automake variables.

Regularize the lists of source files, dividing them according to several
attributes.  Build composite lists in a plugins/Makefile.common.inc
file, to be included by plugin Makefile.common files, and use the
composite lists as appropriate in Makefile.am and Makefile.nmake.

svn path=/trunk/; revision=47502
2013-02-05 21:10:56 +00:00
Guy Harris 618e732f98 Don't forget the .c files that we *don't* distribute.
svn path=/trunk/; revision=47491
2013-02-05 09:11:37 +00:00
Guy Harris 68b610c304 mate_parser.c includes mate_grammar.h, so make mate_parser.obj depend on
mate_grammar.h.

svn path=/trunk/; revision=47490
2013-02-05 09:09:12 +00:00
Guy Harris 9eba2ea90a Don't distribute the results of running Lemon, as we distribute Lemon
ourselves.

Clean up various bits of "distribute" vs. "don't distribute" stuff in
the process - use similar names, and make the "distribute vs. don't
distribute" distinction the same as the "don't clean with "make
distclean" vs. clean with "make distclean"" distinction.

svn path=/trunk/; revision=47485
2013-02-05 06:09:17 +00:00