Dont assign tlv_item unless we need to dereference it.
Also push the variable deeper into the scope where it is used isntead of function wide scope.
svn path=/trunk/; revision=36243
Remove dead code and add a g_assert_not_reached() at a spot we can definitely never reach.
change a if(x)g_free(x) to a g_free(x)
since g_free(NULL) is just a nop.
svn path=/trunk/; revision=36238
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile;
a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS;
b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake)
(This allows disabling "Warnings as Errors" by just changing config.nmake)
c. CVARSDLL definitions (not usage) have been removed from the various makefiles.
XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since:
-DWIN32 and -DNULL=0 do not appear to be needed (any more);
-D_MT and _D_DLL are not needed since /MP causes these definitions.
d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled.
E.G., 4295: array is too small to include a terminating null character
- config.nmake: reformat some long lines for readability;
- plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile);
- dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ...
svn path=/trunk/; revision=35747
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
Until now the info column only shows the OPC UA transport protocol type (Hello,
Ack, Secure Conversion message).
After connections establishment has finished this column shows only Secure
Conversion message, because every service is sent over the secure channel.
This patch adds the useful support of displaying the service type in the info
column. This makes it easier to find specific service calls in huge capture
files.
svn path=/trunk/; revision=35119
Add a configuration parameter of the NWG version for WiMAX ASN CP dissector.
The format and meaning of TLVs, as well as function types and messages changed
between the different NWG versions.
Added support for the version number of TLVs in the dictionary xml, its parser,
and of course in the packet itself.
Added support for the version number of function-types and message-types by
extending the value_string structure to contain also a "since" version number.
Successfully tested with a live capture and capture file, containing WiMAX ASN
packets (full Network entry).
Also fuzzed 500 passes successfully.
The XML doesn't contain all existing NWG versions, only selected ones. This is
a little tedious work to go over all TLVs of each version, so I'll add some
newer versions later on. can add a short how-to of adding a new version, for
others to use, if needed.
svn path=/trunk/; revision=34919
This patch adds support for displaying OPC UA ExtensionObjects.
An ExtensionObject is a mechanism to transport user defined structures as
serialized blobs. Some types of ExtensionObjects are already defined by the OPC
Foundation's OPC UA Specifications.
These types can be implemented by this dissector, because they are well-known.
Real user-defined or vendor-defined types are unlikely to be implemented by a
passive dissector, because this would require browsing of the UA server's
address space to retrieve the type information.
Currently only the following types are supported:
* DataChangeNotification
* EventNotification
Others OPC defined types will follow.
From me: fix warnings: "format not a string literal and no format arguments"
svn path=/trunk/; revision=34906
This patch fixes displaying OPCUA Strings and ByteStrings.
From me: fix warnings: "format not a string literal and no format arguments"
svn path=/trunk/; revision=34905
I attached a patch which fixes some problems in the array handling of OPC UA
data when the array length is zero or -1 which is a Null-Array.
svn path=/trunk/; revision=34880
In the profinet plugin, the decoding of the MRP LinkUp and MRP LinkDown
messages is missing the MRP_SA field which garbles the decode of the rest of
the packet.
This fix adds the decoding of the MRP_SA field to the MRP LinkUp and MRP
LinkDown dissectors.
svn path=/trunk/; revision=34524
In profinet plugin, there is a dissection based on whether the read data
returned is expected to contain a single or multiple blocks. Currently, the
I&M0FilterData case assumes only a single block is returned. Profinet specifies
two optional additional blocks.
This change moves I&M0FilterData to expect multiple blocks to correct decode
the optional information.
svn path=/trunk/; revision=34523
1) don't set thei SOVERSION - run-time-loaded modules don't have
an SOVERSION;
2) build them with link mode MODULE, not SHARED, on all
platforms.
(Fixing 1) also fixes the problem with building them as MODULE on OS X.)
svn path=/trunk/; revision=34243
I try to configure Wireshark with cmake on macosx 10.6.
It fails with : set_target_properties called with incorrect number of arguments.
Attached a patch to fix this issue.
svn path=/trunk/; revision=34201
Fails to decrement msg_len on 3 different message types which causes the
dissector to attempt to decode an addition or misplaced unistim cmd.
svn path=/trunk/; revision=33643
passing a string directly to a routine that expects a format string.
The correct way to handle that is to pass "%s" as the string.
As long as you're escaping non-printable characters, just let
tvb_format_string() handle that.
For null-terminated strings, get the length of the string with
tvb_strsize(), and then just put the string into the protocol tree as a
regular item.
svn path=/trunk/; revision=33482
New dissector (plugin) to support decode of the EPCglobal Low-Level Reader
protocol (see llrp.org for more information). This dissector has passed fuzz
testing.
svn path=/trunk/; revision=33088
"representation" - we already use "representation" to refer to the text
representation of fields.
Change some routines with an endianness argument to make it a
representation argument instead;
svn path=/trunk/; revision=32929
from which to choose; use that for protocol fields in some protocols
(modify the CORBA generator to use it, and manually update the generated
CORBA dissectors accordingly).
svn path=/trunk/; revision=32777
(Thank you, sed, for doing the 90% of the work for me.)
Note that two of these files says "do not modify" implying that they are
machine generated but AFAIK we don't have the means to rebuild them.
svn path=/trunk/; revision=32561
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3010 .
Also finish the implementation of ShowTimes for GOGs so that the variable gets
initialized (preventing another uninitialized variable warning from Valgrind).
svn path=/trunk/; revision=32465
the value that couldn't be mapped to a string - it's an integer and
needs to be printed with an integer format. Fixes bug 4644.
svn path=/trunk/; revision=32396
- Add checking for linker flags
- Install plugins with the name including the Wireshark version.
This will make it easier to find matching plugin versions if
files get just copied over.
svn path=/trunk/; revision=32231
(real and simulated) BMW cars for all kinds of gadget communication.
My plugin only dissects the high level infrastructure and not any particular
messages. It uses a heuristic dissector to detect INTERLINK packets.
svn path=/trunk/; revision=32202
col_clear.diff
Remove calls to col_clear :
- called twice.
- before functions which also clear the column
- by replacing col_clear + col_append_xxx with col_add_xxx
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394
svn path=/trunk/; revision=31517
- Separate .h file not req'd since not used elsewhere;
- Use bitmasks instead of using non-portable bitfields;
- Note possible incorrect display of crcError and alignError flags;
- Clean up spacing.
svn path=/trunk/; revision=31412
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.
svn path=/trunk/; revision=31319
- Add opcua to the list of plugins to build
- Link the gtk stuff statically into wireshark
- Beginnings of "make install"
- Change a few things about install paths
svn path=/trunk/; revision=30029
1) This indicates that the string has ephemeral lifetime
2) More consistent with its existing seasonal counterpart, se_address_to_str().
svn path=/trunk/; revision=29747
DOCSIS 3.0 includes a new Bonded Initial Ranging Request (B-INIT-RNG-REQ) MAC
Management type (34). A simple dissector is needed to decode this message.
svn path=/trunk/; revision=29487
brackets, so the API checks for non-terminated value_string arrays will
not falsely think the arrays are non-terminated.
svn path=/trunk/; revision=29299
- Move proto_register...() to the end of the file as per convention;
- Move ett[] to be local to proto_register...();
- "if (...==-1)" not req'd in proto_register...();
- #include <moduleinfo.h> not req'd;
- Remove unneeded forward declarations.
svn path=/trunk/; revision=29296
- Move proto_register to near the end of the file as per convention;
- Remove unneeded #include <epan/reassemble.h>;
- Comment out unused ett[] array and associated;
svn path=/trunk/; revision=29284
- Comment out code which creates two dissector tables and then
stores a preference value in each of them;
AFAICT the tables are not accessed elsewhere;
- Comment out the no longer required prefs callback specification
in proto_register;
- "if (... == -1)" not req'd in proto_register;
- Remove unused proto_reg_wimax function.
svn path=/trunk/; revision=29283
- Do all find_dissector() calls only once during proto_reg_handoff
(not each time a sub-dissector is called when dissecting frames).
- Move proto_register & proto_reg_handoff to the end of the file as per convention;
- Move a global variables to be local;
- Change a global variable to be static;
- Remove unneeded multiple #include <string.h>
- Remove an unneeded variable and a few unneeded lines of code.
svn path=/trunk/; revision=29282
This patch optimizes proto_tree_prime_hfid() + friends and
plugs a memleak in the process.
From me:
Removed unused hfindex in proto_tree_new_item()
Fixed ref_count entry in struct header_field_info.
svn path=/trunk/; revision=29137
Use the standard "if (!initialized)..." logic in proto_reg_handoff().
Also: use "true_false_string flags_yes_no" as in the original patch.
svn path=/trunk/; revision=28994
1. For some reason: using an using the external tfs_yes_no doesn't work in a plugin;
2. proto_reg_handoff: remove unneeded code;
3. Change the prefs callback to call a function which just enables/disables
the protocol; (using proto_reg_handoff means that the dissector
was re-registered each time the pref was changed);
4. packet-esl.h: use #if 0 instead of /* ... */ to comment out code;
svn path=/trunk/; revision=28986
- New dissector for EtherCAT Switch Link Header added to EtherCAT plugin
- Changed filtering of EtherCAT commands to the abbreviated form:
e.g. ecat.cmd = APWR
From me:
- Mark unused variables
- Fixed a string warning
- Do not initialize a static struct
- Use tfs_yes_no
- Reorder files in Makefile
svn path=/trunk/; revision=28976
Move header field info declarations into function scope.
This is the first step. Another patch will be submitted which actually scrubs
the header field info declarations (remove empty blurbs, etc.)
svn path=/trunk/; revision=28797
a protocol tree;
the column values.
This includes stats-tree listeners.
Have the routines to build the packet list, and to retap packets, honor
those requirements. This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.
This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.
While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.
Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.
Clean up some indentation and some gboolean vs. gint items.
svn path=/trunk/; revision=28645
generated from pycrc. The command line used to generate the file is in
epan/crc/Makefile.common. I used "plain" to distinguish it from CCITT,
USB, and other 16-bit CRCs. Integrate the new CRC code into our
infrastructure.
Add crc16_plain_tvb_offset() to epan/crc16.[ch] and use it in
plugins/profinet/packet-pn-rt.c. This _should_ work correctly, but
hasn't been tested.
svn path=/trunk/; revision=27790
- As suggested actually use sizeof(...) rather than a numeric constant.
- g_snprintf() and g_vsnprintf() since glib 1.3.12 do not return -1.
svn path=/trunk/; revision=27772
that would break compilation for older compilers. Create a "DLL_LDFLAGS"
variable and use it in DLLs and plugins. Use PLUGIN_LDFLAGS and
DLL_LDFLAGS where needed. Don't force i386 code in the TPG plugin.
svn path=/trunk/; revision=27582
As of version 0.99.8, there has been an annoying problem in the ASN.1 dissector:
when using a 'type table' which discribes the ASN.1 syntax of the traced packets,
wireshark would crash on the very first packet. The cause for the crash is an out-of-
boundry write, detected by g_free().
svn path=/trunk/; revision=27507
There was an ugly hack while creating the menu, that tried to detect the stat_group a stats_tree belongs to by looking at the name string. That makes it unnecessarily hard to understand how the menu is really created.
Fix: Add a new function stats_tree_register_with_group() that takes the stat_group as a parameter. Use this function where a stats_tree doesn't fit into the default "unsorted" group.
svn path=/trunk/; revision=27407
should be "%s", with the string used as an argument, just in case the
string contains a "%" character.
Clean up indentation.
svn path=/trunk/; revision=27304
Add some heuristics to the RLM LAPD-over-UDP dissector, so as not to
misdissect as many packets.
Fetch the LAPD dissector handle only once.
Change some Boolean arguments to gboolean from int.
svn path=/trunk/; revision=27217