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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
- Don't call expert...() under 'if (tree)';
- Make some functions static;
- Localize some variables; remove some uneeded initializers;
- Reformat some hf[] entries;
- Do whitespace fixes (including "4 space tabs").
svn path=/trunk/; revision=46523
(with a few minor fixes by me).
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8002
major change:
reassembling of PNIO fragments (only works if OpenSafty dissector is disabled)
minor changes:
improved handling of DFP Frames
added / updated
MRP Block decoding
ARServerBlock
ARVendorBlock
PDInterfaceDataReal
PDInterfaceAdjust
PDPortStatistic
SubdirFrameData corrected display and subblocks added
PDIRGlobalData complete dissection
decoding of FrameDataProperties and ARTypes updated to conform the STD
removed now usuported RTC2 ranges
svn path=/trunk/; revision=46522
- Use/create extended value strings as appropriate;
- Reformat hf[] entries;
- Do whitespace, & etc changes to use a consistent formatting style;
- Reformat some long lines;
- Localize some variables; remove some unneeded initializers;
- expert...() shouldnt be called under 'if (tree)' (packet-wimaxasncp);
- Move proto_register...() & etc to the end of the file (packet-ieee80211);
- Misc.
svn path=/trunk/; revision=46489
Enable the plugin to detect and reassemble chunked UA messages for displaying them correctly.
From me:
- Partly applied by hand.
- move hf and ett asignments inseide the register routine as per convention.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8068
svn path=/trunk/; revision=46436
Also:
- remove some uneeded variable initializers;
- reformat some long lines;
- do some whitespace and formatting changes to use a consistent style.
svn path=/trunk/; revision=46272
CMake Warning (dev) at CMakeLists.txt:476 (add_subdirectory):
The source directory
/home/wireshark/plugins/wimaxmacphy
does not contain a CMakeLists.txt file.
CMake does not support this case but it used to work accidentally and is
being allowed for compatibility.
Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run
"cmake --help-policy CMP0014" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
svn path=/trunk/; revision=46267
looks like the worong variables may be used in the for loops.
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataAdjust_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4420:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataReal_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4542:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
../../../plugins/profinet/packet-dcerpc-pn-io.c:4491:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataCheck_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4570:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_MrpInstanceDataCheck_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:5426:160: error: unused parameter 'u16BodyLength' [-Werror=unused-parameter]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_ARBlockReq_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:6873:9: error: format '%x' expects a matching 'unsigned int' argument [-Werror=format]
../../../plugins/profinet/packet-dcerpc-pn-io.c:6811:13: warning: variable 'u16ARDevAccess' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: At top level:
../../../plugins/profinet/packet-dcerpc-pn-io.c:7628:1: error: 'dissect_IRTFrameBlock_block' defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors
svn path=/trunk/; revision=46142
Updates to conform IEC 61158.
major change:
reassembling of PNIO fragments (only works if OpenSafty dissector is disabled)
see Bug 7997
minor changes:
improved handling of DFP Frames
added / updated
MRP Block decoding
ARServerBlock
ARVendorBlock
PDInterfaceDataReal
PDInterfaceAdjust
PDPortStatistic
SubdirFrameData corrected display and subblocks added
PDIRGlobalData complete dissection
decoding of FrameDataProperties and ARTypes updated to conform the STD
removed now usuported RTC2 ranges
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8002
svn path=/trunk/; revision=46140
The rest of the code already checks for namelist being null, so it's OK
to call build_tree_view() - and it may be necessary to do so, as the
code below might assume that's worked.
However, we should not call fclose() on namelist if it's null; the C89
standard, at least, does *not* assert that fclose(NULL) is a no-op.
Clean up indentation a little bit.
Last part of fix for bug 7824.
svn path=/trunk/; revision=45455
Add Dissector for SuboptionDeviceInstance under DevicePropertiesOption in PROFINET DCP
In PROFINET DCP dissector, current build didn't have SuboptionDeviceInstance
(0x07) under DevicePropertiesOption (0x02). This patch add the support of
SuboptionDeviceInstance
svn path=/trunk/; revision=45218
This commit reduces size (from 144B to 128B on AMD64) of frame_data structure.
Part of bug 5821: Reduce per-packet memory requirements.
svn path=/trunk/; revision=45071
- Comment out hdrbits, it's retrieved but not used (slightly different
approach to overwritten patch)
- Change two instances of pt to tree as this *may* have been
the intention
svn path=/trunk/; revision=44061
times in one C statement: the order of references and modifications is
undefined. Anyway I don't think the modification is intentional: just divide
instead of divide-and-assign.
Also remove what looks to be some test code (only executed for frame number
11).
svn path=/trunk/; revision=44056
available under UDP 'decode as';
- Back out use of extended value strings (added in SVN #43942);
'tshark -G values' on Windows gives a warning as
to 'Invalid value_string_ext ptr'.
Issue: On Windows, value_string_ext validation code always
fails for extended value strings in plugins.
(Something todo with the linkage mechanism).
svn path=/trunk/; revision=44011
- don't call col_...() and expert...() fcns under 'if (tree)';
- create/use extended value strings in a few cases;
- use val_to_str_ext_const();
- Don't increment offset if not used afterwards [set but unused];
- do whitespace cleanup (indentation, trailing, ...).
svn path=/trunk/; revision=43942