just define WS_DLL_PUBLIC_NOEXTERN inside the ifdefs, and define
WS_DLL_PUBLIC as WS_DLL_PUBLIC_NOEXTERN followed by "extern".
Then rename WS_DLL_PUBLIC_NOEXTERN to WS_DLL_PUBLIC_DEF, to clarify that
it's what should be used for definitions; at least on Windows, you
*have* to use it when declaring arrays without a size, and, whilst you
might be able to use WS_DLL_PUBLIC for definitions of functions and
perhaps data definitions other than no-size arrays, it might be clearer
to rename WS_DLL_PUBLIC to WS_DLL_PUBLIC_DECL and use it only for
declarations.
svn path=/trunk/; revision=50334
work, because it can't be used with definitions, we'll probably have to
have separate macros for declarations and definitions, as I don't think
MSVC likes
int foo[];
in a header file but should be fine with
extern int foo[];
Add some more comments while we're at it; you are in a twisty little
maze of #ifdefs, all different.
svn path=/trunk/; revision=50332
confusing expr if the LHS is an empty string, the RHS needs it as well.
Also, fix some typoes ("$X" rather than "X$"), and use lower-case "x",
as that's what's used elsewhere when doing that sort of thing.
svn path=/trunk/; revision=50331
"X$GCC_OPTION" so expr doesn't get confused by the GCC_OPTION that
starts with a hyphen and spit out messages like this (on FreeBSD):
checking whether we can add -fexcess-precision=fast to CXXFLAGS... expr:
illegal option -- f
expr: usage: expr [-e] expression
expr: illegal option -- f
expr: usage: expr [-e] expression
no
svn path=/trunk/; revision=50330
WS_DLL_LOCAL were reversed; that might be what's causing a build error
with ui/qt/main_status_bar.cpp.
Add some comments for #else's while we're at it, so it's easier to
figure out when particular sets of #defines are used.
svn path=/trunk/; revision=50329
Also added an enumeration for checksum validation status, as verifying checksums is considered "expert" functionality.
svn path=/trunk/; revision=50322
Now proto_data_add_maybe_interesting_field:
- it actually add field_info to interesting hash_tree
- accept only required parameters
- is called only by proto_tree_add_node
svn path=/trunk/; revision=50321
Right now for proto_tree_add format & _format_value TRY_TO_FAKE_THIS_ITEM() is called twice
one from 'format' function, second time from 'no format' function.
This reduces size of .text by 10K:
text data bss dec hex filename
76012 112 56 76180 12994 proto-after.o
86324 112 56 86492 151dc proto-before.o
svn path=/trunk/; revision=50318
The final maintenance patch, after excessive testing of the dissection engine.
The last two bugs were:
- FindSafetyFrame did not recognize the correct CRC, which in itself did not
lead to wrongly detected packages, but was inconsistent with the rest.
- CRC == 0 - because 0 is a valid result for the CRC value.
svn path=/trunk/; revision=50312
Remove NULL tree check at start of dissection to ensure expert info is populated.
Overall I think the logic could be a little cleaner (length checking and its tie to expert info seems excessive), but I'm not familiar enough to be comfortable making the changes.
This dissector appears to be vulnerable to DOS attacks through its unsigned 16-bit length fields (just from static inspection). Having the length be a signed 32-bit value even if the length in the protocol field is an unsigned 16-bit value could simplify some of the logic.
svn path=/trunk/; revision=50310
"tcp.analysis.duplicate_ack" has both an hf_ and ei_ "item" so that the duplicate ack # and frame # can be assembled properly in the tree. Since hf_tcp_analysis_duplicate_ack is of type FT_NONE, the duplicative display filter name is okay.
svn path=/trunk/; revision=50302
(That is: Don't create the array on the stack each time
the function is called).
Reduces code memory usage and execution time.
(See SVN #50271)
svn path=/trunk/; revision=50300