wireshark/plugins/opcua
Michael Mann 268841f3e0 Combine Decode As and port preferences for tcp.port dissector table.
This patch introduces new APIs to allow dissectors to have a preference for
a (TCP) port, but the underlying data is actually part of Decode As functionality.
For now the APIs are intentionally separate from the regular APIs that register a
dissector within a dissector table.  It may be possible to eventually combine the
two so that all dissectors that register with a dissector table have an opportunity
to "automatically" have a preference to adjust the "table value" through the
preferences dialog.

The tcp.port dissector table was used as the guinea pig.  This will eventually be
expanded to other dissector tables as well (most notably UDP ports).  Some
dissectors that "shared" a TCP/UDP port preference were also converted. It also
removed the need for some preference callback functions (mostly when the callback
function was the proto_reg_handoff function) so there is cleanup around that.

Dissectors that has a port preference whose default was 0 were switched to using
the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference

Also added comments for TCP ports used that aren't IANA registered.

Change-Id: I99604f95d426ad345f4b494598d94178b886eb67
Reviewed-on: https://code.wireshark.org/review/17724
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08 02:44:53 +00:00
..
AUTHORS
ChangeLog
CMakeLists.txt cmake: make WERROR_COMMON_FLAGS a normal string 2016-09-30 20:08:02 +00:00
COPYING
Doxyfile
Makefile.am Remove Makefile.common files 2016-06-30 11:04:17 +00:00
moduleinfo.h
opcua.c Combine Decode As and port preferences for tcp.port dissector table. 2016-10-08 02:44:53 +00:00
opcua_application_layer.c
opcua_application_layer.h
opcua_complextypeparser.c opcua: expand ReturnDiagnostics field of RequestHeader 2015-12-08 02:18:02 +00:00
opcua_complextypeparser.h regenerate files adding new UA Specification 1.03 services and types 2015-10-14 04:25:21 +00:00
opcua_enumparser.c opcua: display string representation of AttributeId and DeadbandType 2015-10-27 17:47:26 +00:00
opcua_enumparser.h opcua: display string representation of AttributeId and DeadbandType 2015-10-27 17:47:26 +00:00
opcua_extensionobjectids.h regenerate files adding new UA Specification 1.03 services and types 2015-10-14 04:25:21 +00:00
opcua_extensionobjecttable.c regenerate files adding new UA Specification 1.03 services and types 2015-10-14 04:25:21 +00:00
opcua_hfindeces.c opcua: display string representation of AttributeId and DeadbandType 2015-10-27 17:47:26 +00:00
opcua_hfindeces.h opcua: display string representation of AttributeId and DeadbandType 2015-10-27 17:47:26 +00:00
opcua_identifiers.h
opcua_security_layer.c
opcua_security_layer.h
opcua_serviceids.h regenerate files adding new UA Specification 1.03 services and types 2015-10-14 04:25:21 +00:00
opcua_serviceparser.c regenerate files adding new UA Specification 1.03 services and types 2015-10-14 04:25:21 +00:00
opcua_serviceparser.h regenerate files adding new UA Specification 1.03 services and types 2015-10-14 04:25:21 +00:00
opcua_servicetable.c regenerate files adding new UA Specification 1.03 services and types 2015-10-14 04:25:21 +00:00
opcua_servicetable.h
opcua_simpletypes.c opcua: expand ReturnDiagnostics field of RequestHeader 2015-12-08 02:18:02 +00:00
opcua_simpletypes.h opcua: expand ReturnDiagnostics field of RequestHeader 2015-12-08 02:18:02 +00:00
opcua_statuscode.c
opcua_statuscode.h
opcua_transport_layer.c
opcua_transport_layer.h
plugin.rc.in
README

OpcUa Plugin:
=============

This plugin implements the dissection of the OpcUa Binary Protocol.
Authors: Gerhard Gappmeier & Hannes Mezger
         ascolab GmbH
         http://www.ascolab.com
	
Overview:
=========

OpcUa (OPC Unified Architecture) is a vendor and platform independent
protocol for automation technology. It is the successor of the
COM/DCOM based specifications OPC DA, OPC Alarm & Events, OPC HDA, etc.
It unifies all this technologies into a single protocol.

The specification describes abstract services that are independent
of the underlying protocol. For now there exist protocol mappings
to a Binary TCP based protocol and a SOAP based Webservice.
Also a hybrid version will be available where the Binary messages are transported
by a single webservice command called "Invoke".

More information about the technology you can find on
http://www.ascolab.com/index.php?file=ua&lang=en.

Protocol Mappings:
==================

Binary (TCP): The fastest and most flexible version (small footprint, no XML and SOAP necessary)
              can easily be tunneled (SSH, IPSEC, etc.), redirected, ...
SOAP version: Easy to implement with verious tools like .Net, JAVA, gSOAP, etc.
              Better to communicate through firewalls via HTTP.
SOAP with Binary Attchment: Combines the advantages of both.
              The messages are encoded as Binary, and transported via SOAP as binary
              attachment.

The OPC Foundation offers a free Opc Ua stack implementation in ANSI C
for all members. This stack implements the binary protocol as well
as the SOAP version. It's easily portable to different kinds of operating
systems from embedded devices to servers.
This makes it easy to implement Opc Ua applications based on this stack
and it is expected that the binary protocol will be the most used
protocol.
Nevertheless it's free to everbody to implement an own stack according
to the specification. An own implementation of the SOAP version 
should be easy with the various SOAP toolkits.

For more information see http://www.opcfoundation.org

Known limitations:
==================

* Only the security policy http://opcfoundation.org/UA/SecurityPolicy#None is
  supported, which means the encryption and signing is turned off.
  
Machine-generated dissector:
============================
Parts of the OpcUa dissector are machine generated.  Several of the files are
marked "DON'T MODIFY THIS FILE!" for this reason.

However, the code to create this dissector is not part of the Wireshark source
source code distribution.  This was discussed prior to the plugin's inclusion.
From http://www.wireshark.org/lists/wireshark-dev/200704/msg00025.html :

~~~
> a lot of the code seems to be autogenerated (as the comments suggest)
> It might make sense to include the sources and the build process instead 
> of the intermediate files (if the amount of code/tools to build the 
> files seems reasonable). The reason: When people start to hack your code 
> (e.g. to remove warnings on a compiler you don't even think about), 
> you'll might get into annoying trouble with merging code the next time 
> you've update the upcua files.
>
>   
I'm sorry, but I cannot give you the sources of the code generator,
because they are owned by the OPC Foundation.
I only extended the existing code generator to produce also wireshark code.
It's .Net based so I guess you don't want to have it anyway ;-)
~~~

So, if changes must be made to the machine-generated files, it just means the
upstream source will have to be modified before pushing any updates back to
Wireshark.

Of course it also means that care must be taken when applying patches from
upstream to ensure local changes aren't reversed.