Commit Graph

149 Commits

Author SHA1 Message Date
Hannes Mezger 85e7c15605 Use proto_tree_add_expert_format instead of proto_tree_add_text
Change-Id: Ia017fa9535cbc7570ce6bd442972eedd2143825a
Reviewed-on: https://code.wireshark.org/review/4729
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-18 12:29:50 +00:00
Hannes Mezger 35a9b98138 Use proto_tree_add_bitmask for ExpandedNodeId EncodingMask
Instead of adding the items using proto_tree_add_item, use proto_tree_add_bitmask in parseExpandedNodeId(). Also, the redundant 'NodeId ' text is removed from hf_opcua_nodeid_... items for better readability.

Change-Id: Ie68f1d280dd733fd2eede0b2b73ad8d7f28396b3
Reviewed-on: https://code.wireshark.org/review/4730
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-17 16:04:09 +00:00
Hannes Mezger e5bbfa0f15 Add argument 'packet_info *pinfo' to all dissecting functions
Change-Id: Ie02326e365ee3f620fcbe3f2e8e45dc5300d3418
Reviewed-on: https://code.wireshark.org/review/4728
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-17 14:51:40 +00:00
Hannes Mezger 381966b6c4 Replace proto_tree_add_text in non-generated files
As requested by Michael Mann, most of the occurences of proto_tree_add_text/proto_item_add_subtree are replaced with proto_tree_add_subtree(_format) or proto_tree_add_item/proto_item_append_text in the non-generated files.

Change-Id: I27cccde88780adef43c78efd26333f47af098ad6
Reviewed-on: https://code.wireshark.org/review/4726
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-16 16:55:47 +00:00
Hannes Mezger a34b2526c6 Replace proto_tree_add_text with proto_tree_add_subtree(_format) in generated files
As requested by Michael Mann, all occurences of proto_tree_add_text/proto_item_add_subtree are replaced with proto_tree_add_subtree(_format) in the generated files. Our generator templates have also been updated accordingly.

Change-Id: I49ddd664dffef4b3ceda77edd1b2d7e01da363f3
Reviewed-on: https://code.wireshark.org/review/4725
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-16 14:47:58 +00:00
Hannes Mezger 03bc68c301 fix forward declarations in opcua_serviceparser.h
The declarations from opcua_complextypeparser.h were used instead of the serviceparser ones, this is also fixed in our generator

Change-Id: I3d78d26a3b2b4995dfd4556720d29ecdd6960c4b
Reviewed-on: https://code.wireshark.org/review/4650
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-13 21:29:49 +00:00
Matthieu Patou 29afac24a5 Add support for NTTIME_hyper and NTTIME_1sec
It's hyper with 8 bytes alignment it can have 1/100000 sec resolution or 1sec resolution

Bug: 10541
Change-Id: Iecc4c6d1bd1695a4c02db72e1617134254810cd9
Reviewed-on: https://code.wireshark.org/review/4606
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-12 14:08:44 +00:00
Gerald Combs bea24cfdad CMake: Bundle our plugins.
plugins/*/CMakeLists.txt has a lot of repitition. We might want to
create a module or include file to simplify things.

Change-Id: Iadd453c286a4127beacd80edf6dc200aa9148852
Reviewed-on: https://code.wireshark.org/review/4582
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-09 23:57:43 +00:00
Bill Meier 0111e46193 plugins: Add editor modelines; Adjust whitespace as needed.
Change-Id: I36124f6021d46a228721bdc976f6b9fef1c8c088
Reviewed-on: https://code.wireshark.org/review/4488
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 01:42:32 +00:00
Hannes Mezger b2f03f1967 opcua: prefix all hf_register_info with opcua, unify naming
Change-Id: I575bd2f93202837b2ce15a39b1b0bd9b5c53f5bf
Reviewed-on: https://code.wireshark.org/review/4151
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-17 23:20:16 +00:00
Hannes Mezger 095a0e8b18 opcua: use BASE_NONE instead of 0
Change-Id: I5ca5d41edf1f56b24da6360a10f0c6e2600572d2
Reviewed-on: https://code.wireshark.org/review/4150
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-17 23:16:40 +00:00
Hannes Mezger 769a98498d opcua: format all hf_register_info tables by aligning them to longest value
Change-Id: I0b533edd7bad52922dd1e0aaa2c980e56dd88b78
Reviewed-on: https://code.wireshark.org/review/4149
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-17 23:14:34 +00:00
Hannes Mezger d8afd59b55 opcua: remove unused code
Change-Id: I78963640e32393f3ac399e59a659ddf619d15c3d
Reviewed-on: https://code.wireshark.org/review/4148
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-17 23:07:06 +00:00
Hannes Mezger 17c14d6499 opcua: add hint to OPCUA settings tooltip
It's unclear how the ports should be separated, this additional text in the tooltip clarifies it

Change-Id: I686482522d006024f920a3cc26b83cd21c19f8a5
Reviewed-on: https://code.wireshark.org/review/4147
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-17 23:05:33 +00:00
Роман Донченко 4a3e62cd54 Don't show the echo/python command lines when making plugin.c
For consistency with epan/dissectors/Makefile.am. Also, remove the
"with python" parts, since that's the only option now.

Change-Id: I761e1bf7995c1cc1ebd790013181fd6116b289a1
Reviewed-on: https://code.wireshark.org/review/3925
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-08-31 22:14:54 +00:00
Роман Донченко 549f5c401c Remove obsolete comments regarding the shell version of make-dissector-reg
Change-Id: I93470e8c6e9afd6c1ebf735eb13141586964be0e
Reviewed-on: https://code.wireshark.org/review/3818
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-24 20:45:26 +00:00
Joerg Mayer 65ac652a07 Remove make-dissector-reg and require python for autotool builds as well
Change-Id: I6239063a08ba37199a4e95302a3650a80544c750
Reviewed-on: https://code.wireshark.org/review/3562
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-08-12 21:31:34 +00:00
Роман Донченко dc748b1e7f Now that Python is mandatory on Windows, remove checks for it from nmakefiles
Change-Id: I2ca6abb372ec4bda0af1aa40089082533a61df3a
Reviewed-on: https://code.wireshark.org/review/3392
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-09 20:23:39 +00:00
AndersBroman 79c55a34cb Fix Bug #10348 Different dissection results for same file.
The fault is that reassembly_table_init() must be called when reloading
the file - move it to an init routine and register the init routine.
While there move the proto_register_opcua() routine to the end of the file
to be more consistent with other dissectors.
Change soft deprecated APIs

Change-Id: I2b93692be24dbf60f4ef09aa7283e55ebf3c1874
Reviewed-on: https://code.wireshark.org/review/3431
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 13:36:03 +00:00
Hannes Mezger 5894b555a1 fix encodingmask of DiagnosticInfo
In 2008, before the OpcUa specification was released, the EncodingMask was changed to include the Locale after the LocalizedText. This commit applies the changes necessary to display DiagnosticInfo correctly.

Change-Id: Iad35ff0557eac62a259a63505ebce3e637095136
Reviewed-on: https://code.wireshark.org/review/3259
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-30 16:32:36 +00:00
Michael Mann e6c87fe6b1 convert to proto_tree_add_subtree[_format] for plugin dissectors
Change-Id: I13924c5a2f056688a42cdee25654d82c056b5f97
Reviewed-on: https://code.wireshark.org/review/2974
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-10 01:51:21 +00:00
Роман Донченко afa8f21f56 make-dissectors-reg: optimize by factoring out the loops
Instead of calling the grep/sed pipelines for each file, build the
list of files in the beginning and call each pipeline only once,
passing the list to the first grep.

This results in a massive speedup in Cygwin; in my test, the time
it takes to run make-dissector-reg . dissectors packet-*.c in dissectors/epan
is reduced from ~116 to ~3 seconds. I also tried it on NetBSD, where
the time do to the same goes from ~6 to ~0.5 seconds.

Amend makefile comments to elide mentions of invoking multiple processes
per file.

Change-Id: Iad441e7d2b6cc3669dada57646e2f8f6b987fd34
Reviewed-on: https://code.wireshark.org/review/2826
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:08:20 +00:00
Joerg Mayer c11ae8ac82 Add .rc files to the sources to have them included in the build
Change-Id: I84dda519e617b24d92fcf374670a4a6ee6f488ee
Reviewed-on: https://code.wireshark.org/review/2506
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-20 23:58:22 +00:00
Hannes Mezger 7067e3a340 Create and register subtree identifiers for all opcua array types
Currently for all arrays, the generic ett_opcua_array is used, instead we want to be more selective for storing the expanded state of subtrees. This commit adds subtree identifiers for all array types.

Change-Id: Idcec51a200d1109cdb557d3366021d3b066b453d
Reviewed-on: https://code.wireshark.org/review/2176
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17 17:25:16 +00:00
Hannes Mezger 647255d627 Unify how opcua arrays are displayed
- Display 'Array of <fieldname>' instead of 'Array of Simple Type'
- Display array indexes for simple types
- Display data type in simple type arrays

Change-Id: Id2cc746898f97ce329c6afb9cc49f1907a9f18e4
Reviewed-on: https://code.wireshark.org/review/2161
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17 17:12:21 +00:00
Hannes Mezger 91c29ec205 Add myself as author for the opcua dissector plugin
Change-Id: If8349e778fd91426a6a4b6d6e98d3ab870d188d5
Reviewed-on: https://code.wireshark.org/review/2302
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17 17:11:24 +00:00
Hannes Mezger 2f369b216f Cleanup subtree types in opcua plugin
- make ett_opcua_transport static, is only used locally
- format code grouping extern ett variables
- add subtree variables for encodingmasks of simple types

Change-Id: Ia044ca6ca0ff19e940a03d21610db67fe3679b01
Reviewed-on: https://code.wireshark.org/review/2157
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-16 15:47:17 +00:00
Hannes Mezger 0bb0b62ec8 Display status code info bits if set
Checks if a StatusCode has any of the additional info bits set and displays them accordingly.

Change-Id: Ic584233083174d3fd30c6ec6684f308e0e5ae22e
Reviewed-on: https://code.wireshark.org/review/2127
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-16 15:47:01 +00:00
Hannes Mezger a9b18eff0f Display text representation of status codes
Adds a table containing all known StatusCodes and displays them if found.
The list of StatusCodes is in a separate file for easy generating of the list if necessary.

Change-Id: Iab74b22b7fc4fb53d8f072c4e3a4cea4ae18196c
Reviewed-on: https://code.wireshark.org/review/2126
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-16 15:44:35 +00:00
AndersBroman 803d47d49e opcua_simpletypes.c:94:12: error: static declaration of 'hf_opcua_NamespaceUri' follows non-static declaration
Change-Id: I2cae9691408c22a64144f5482cc536a5dc88ec6c
Reviewed-on: https://code.wireshark.org/review/2135
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-11 14:27:11 +00:00
Hannes Mezger 5e67c45160 Remove unused array length fields
The NoOf... fields are not used at all in the dissector.

Change-Id: I1f20a9992eab5d47c7e0ad34dabeaed07efa4a80
Reviewed-on: https://code.wireshark.org/review/2130
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-11 13:57:49 +00:00
Hannes Mezger abf1b5ead7 Regenerate all sources using latest OPC UA specification
- HistoryUpdateEventResult has been removed
- Fixes two enums
- Removes unused identifier defines

Change-Id: I39c65c1eca1701b60dfaa3541cd7a5d1b479fb9b
Reviewed-on: https://code.wireshark.org/review/2129
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-11 13:57:26 +00:00
Hannes Mezger 2ab3b2ac2b Improve display of Open/CloseSecureChannel requests and responses
- Return the ServiceId of the service calls for displaying if it's a request or response
- Add the missing parsing code for CloseSecureChannel, some fields were missing

Change-Id: Id9b1e1986e222a77ad979fb615adc6ac62a4ced8
Reviewed-on: https://code.wireshark.org/review/2125
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-11 12:59:48 +00:00
Hannes Mezger baa5888788 Move ServiceFault from ComplexType- to ServiceParser
ServiceFaults are always sent as a service response and never as value, this moves the parsing code to the correct location.

Change-Id: Ida9cb561aa40fcbfc3c0429aed732d108b295138
Reviewed-on: https://code.wireshark.org/review/2124
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-11 12:59:08 +00:00
Hannes Mezger fabee432de Unify displaying of NodeId
Adds hf_register_info for all possible NodeId identifier types for unified displaying.

Change-Id: Ic7a8077a32f435d5acfb1a956117d21a0b51b43b
Reviewed-on: https://code.wireshark.org/review/2123
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-11 12:47:18 +00:00
Hannes Mezger e2ae387d9c Fix NodeId and ExpandedNodeId encoding mask display
There are no 'URI' NodeIds, removed this option and changed GUID/Opaque to their correct values as stated in the UA specification.

Change-Id: Ibf9afdbd72f8ad336f5eb83ece5adbcce51e8365
Reviewed-on: https://code.wireshark.org/review/2122
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-11 12:15:39 +00:00
Hannes Mezger ddc275c562 Unify variable and identifier names according to the UA specification
- Rename Uri to NamespaceUri for clarity
- Correct NsId to NsIndex
- ByteString NodeIds are called 'Opaque'

Change-Id: I622d408ef9e19a2a899906b4127bae497735d402
Reviewed-on: https://code.wireshark.org/review/2121
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-11 12:14:49 +00:00
Hannes Mezger 6ddf081f64 Fix switch case on ExpandedNodeId encoding mask
Only the bits 0-3 are significant for the type of the NodeId contained in the ExpandedNodeId.
The other bits are a mask telling if a NamespaceUri and/or a ServerIndex is set.

Change-Id: I17948524f8a1bf6cb9dffc5f66ec5cddee580bcd
Reviewed-on: https://code.wireshark.org/review/2120
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-11 12:14:36 +00:00
Stig Bjørlykke bd38b3152d Support out-of-source checkapi
Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir)
from Makefile.am to allow out-of-source 'make checkapi'.

Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973
Reviewed-on: https://code.wireshark.org/review/1294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 04:23:46 +00:00
Alexis La Goutte d8001e8064 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\*\* \$Id\$/,+1 d') (2 star and space)

Change-Id: I48505ffb8bfa103cd7db0117e18cdb1925a7034d
Reviewed-on: https://code.wireshark.org/review/884
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:50:19 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Alexis La Goutte 94a791a76e Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\$Id\$/,+1 d') (No space or star before $Id$)

Change-Id: I0801bd7cf234d32487008a8b6dcee64875b07688
Reviewed-on: https://code.wireshark.org/review/876
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 16:00:04 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Pascal Quantin b1bea543d9 Introduce end-of-line normalization
Change-Id: Ie6991af2432b193fbdc23bbbd335f83c091f14e8
Reviewed-on: https://code.wireshark.org/review/114
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-02-05 22:28:01 +00:00
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