Commit Graph

105 Commits

Author SHA1 Message Date
Guy Harris 88e3e47bfd More prototype cleanup.
svn path=/trunk/; revision=54752
2014-01-14 02:17:16 +00:00
Guy Harris 4fdbf843a6 dispatchService() is imported from other code; declare it in
opcua_transport_layer.h, not opcua_transport_layer.c.

svn path=/trunk/; revision=54730
2014-01-13 22:24:54 +00:00
Anders Broman 451c30ef81 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54528
2014-01-01 12:17:57 +00:00
Evan Huus e805778692 Avoid using ephemeral memory in register routines.
svn path=/trunk/; revision=54423
2013-12-23 21:19:34 +00:00
Anders Broman 171f91db2b Try to fix [-Wmissing-prototypes]
svn path=/trunk/; revision=53337
2013-11-15 06:32:11 +00:00
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?

Should tcp_dissect_pdus return length (bytes consumed)?  There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb).  Seems like that could all be rolled into one.

svn path=/trunk/; revision=53198
2013-11-09 17:46:28 +00:00
Bill Meier 8c220a6f7f Fix (using '#if 0') a few more [-Wunused-const-variable] warnings
svn path=/trunk/; revision=52799
2013-10-23 16:59:34 +00:00
Graham Bloice 9c4ee86784 Add CMake properties to targets so that they are logically organised when using a Visual Studio solution.
Add CMake properties to group the source files in epan into logical blocks when using a Visual Studio solution.

svn path=/trunk/; revision=52580
2013-10-13 09:21:55 +00:00
Pascal Quantin 953c6fed13 emem -> wmem
svn path=/trunk/; revision=52130
2013-09-17 21:34:05 +00:00
Alexis La Goutte 21436abf5f Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=51679
2013-09-02 23:15:17 +00:00
Jakub Zawadzki 72ea2f9c9c Remove hfinfo->bitshift member, add hfinfo_bitshift() to get it.
svn path=/trunk/; revision=51174
2013-08-06 20:10:59 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Evan Huus 53c6595bd9 Add our license header to plugin moduleinfo.h files. Cleans up a batch of
licensecheck warnings.

svn path=/trunk/; revision=50407
2013-07-06 13:31:31 +00:00
Guy Harris a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +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
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
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
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
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 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 8ed7a73e22 Fix a bunch of warnings.
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
2012-12-26 05:57:06 +00:00
Anders Broman 8f3f87a931 Bump revission.
svn path=/trunk/; revision=46447
2012-12-07 19:15:34 +00:00
Anders Broman 5505655199 From hannes:
'Fix for displaying the payload of the first chunk correctly.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8068

svn path=/trunk/; revision=46445
2012-12-07 16:57:14 +00:00
Anders Broman e7c9ade670 From hannes:
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
2012-12-07 09:33:40 +00:00
Bill Meier 7cd0417af5 Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).

svn path=/trunk/; revision=46402
2012-12-05 15:56:36 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier 3d4b3f2784 Set Makefile.common as a plugin.c dependency so plugin.c is rebuilt if Makefile.common is changed
svn path=/trunk/; revision=42972
2012-06-01 14:44:35 +00:00
Bill Meier 1caa79ad80 Windows: Set Makefile.common as a plugin.c dependency so plugin.c is rebuilt if Makefile.common is changed
ToDo: ditto for Makefile.am ?

svn path=/trunk/; revision=42971
2012-06-01 14:08:12 +00:00
Guy Harris 90f564717f Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

Clean up indentation.

svn path=/trunk/; revision=42586
2012-05-11 19:20:23 +00:00
pascal 48f4ae6e3b From Nhi Nguyen:
OPC UA bytestring node id decoding is wrong
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7226

svn path=/trunk/; revision=42437
2012-05-05 04:57:40 +00:00
Jakub Zawadzki a3aa2b7d7c Add missing consts in opcua plugin.
svn path=/trunk/; revision=42000
2012-04-09 20:06:27 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Anders Broman 8e97665863 Add *.sbr files to the clean target.
svn path=/trunk/; revision=40761
2012-01-29 20:03:39 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier cca6984ab9 Do some more conversions of proto_tree_add_item() 'encoding' arg
(previously missed).

svn path=/trunk/; revision=39450
2011-10-18 00:17:48 +00:00
Bill Meier 782cc6e3c3 Convert plugin files proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).

svn path=/trunk/; revision=39429
2011-10-15 19:58:31 +00:00
Bill Meier 9eb54292d3 Convert 'encoding' parameter of certain proto_tree_add_item() calls in plugins/*:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in an earlier SVN)

svn path=/trunk/; revision=39329
2011-10-10 00:53:55 +00:00
Bill Meier 02065b0981 Convert 'encoding' parameter of certain proto_tree_add_item() calls in plugin dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39292
2011-10-06 14:46:34 +00:00
Stig Bjørlykke cb56e84556 Removed unused parameter to parseServiceNodeId.
Coverity 596.

svn path=/trunk/; revision=36283
2011-03-23 08:03:02 +00:00
Bill Meier d3efa3ed9f A bit of Windows makefiles rework and cleanup:
- 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
2011-02-02 01:19:53 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
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
2010-12-20 05:35:29 +00:00
Stig Bjørlykke d9af8b16ba Added opcua_extensionobjecttable.c from revision 34906.
svn path=/trunk/; revision=35177
2010-12-11 21:40:01 +00:00
Jeff Morriss 64a099a652 From Gerhard Gappmeier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5429 :
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
2010-12-04 02:54:59 +00:00
Jeff Morriss 4f6ea6ef47 From Gerhard Gappmeier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5427 :
This patch adds support for dissecting all Extension Objects types defined by
the OPC Foundation.

svn path=/trunk/; revision=35118
2010-12-04 02:54:25 +00:00
Anders Broman a06eef00b8 From Gerhard Gappmeier:
Fix mapping of datatype strings in opcua plugin
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5428

svn path=/trunk/; revision=35105
2010-12-02 20:44:18 +00:00
Jeff Morriss 3c7ac06886 From Gerhard Gappmeier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5410 :
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
2010-11-16 17:00:50 +00:00
Jeff Morriss b7b98d4315 From Gerhard Gappmeier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5409 :
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
2010-11-16 16:45:22 +00:00