aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/opcua/opcua_simpletypes.c
AgeCommit message (Collapse)AuthorFilesLines
2015-02-10Remove unneeded includes from plugins folderMartin Mathieson1-1/+0
Change-Id: Ifdad0fb786a97a6f84a64d442fcca0c20116552f Reviewed-on: https://code.wireshark.org/review/7059 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-22plugins: Cleanup #includesBill Meier1-2/+0
Change-Id: Ic839f2995532d68308f8b5908c185acc7acaaa9c Mostly: remove '#include <glib/glib.h>' and certain other #includes already included in packet.h Reviewed-on: https://code.wireshark.org/review/5971 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-18Use proto_tree_add_expert_format instead of proto_tree_add_textHannes Mezger1-12/+16
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-17Use proto_tree_add_bitmask for ExpandedNodeId EncodingMaskHannes Mezger1-9/+16
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-17Add argument 'packet_info *pinfo' to all dissecting functionsHannes Mezger1-110/+110
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-16Replace proto_tree_add_text in non-generated filesHannes Mezger1-33/+37
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-12Add support for NTTIME_hyper and NTTIME_1secMatthieu Patou1-1/+1
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-06plugins: Add editor modelines; Adjust whitespace as needed.Bill Meier1-50/+63
Change-Id: I36124f6021d46a228721bdc976f6b9fef1c8c088 Reviewed-on: https://code.wireshark.org/review/4488 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-17opcua: prefix all hf_register_info with opcua, unify namingHannes Mezger1-42/+42
Change-Id: I575bd2f93202837b2ce15a39b1b0bd9b5c53f5bf Reviewed-on: https://code.wireshark.org/review/4151 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-17opcua: format all hf_register_info tables by aligning them to longest valueHannes Mezger1-74/+52
Change-Id: I0b533edd7bad52922dd1e0aaa2c980e56dd88b78 Reviewed-on: https://code.wireshark.org/review/4149 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-30fix encodingmask of DiagnosticInfoHannes Mezger1-4/+16
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-10convert to proto_tree_add_subtree[_format] for plugin dissectorsMichael Mann1-24/+26
Change-Id: I13924c5a2f056688a42cdee25654d82c056b5f97 Reviewed-on: https://code.wireshark.org/review/2974 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-17Create and register subtree identifiers for all opcua array typesHannes Mezger1-34/+82
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-17Unify how opcua arrays are displayedHannes Mezger1-76/+107
- 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-16Cleanup subtree types in opcua pluginHannes Mezger1-10/+18
- 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-16Display status code info bits if setHannes Mezger1-2/+92
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-16Display text representation of status codesHannes Mezger1-1/+11
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-11opcua_simpletypes.c:94:12: error: static declaration of ↵AndersBroman1-2/+0
'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-11Unify displaying of NodeIdHannes Mezger1-9/+13
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-11Fix NodeId and ExpandedNodeId encoding mask displayHannes Mezger1-8/+12
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-11Unify variable and identifier names according to the UA specificationHannes Mezger1-19/+19
- 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-11Fix switch case on ExpandedNodeId encoding maskHannes Mezger1-2/+2
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-03-31Continue to remove $Id$ from top of fileAlexis La Goutte1-2/+0
(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-01-01Fix [-Wmissing-prototypes]Anders Broman1-2/+0
svn path=/trunk/; revision=54528
2013-09-17emem -> wmemPascal Quantin1-3/+3
svn path=/trunk/; revision=52130
2013-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=51679
2013-08-06Remove hfinfo->bitshift member, add hfinfo_bitshift() to get it.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=51174
2013-02-15From Hannes Mezger via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8327Evan Huus1-46/+96
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
2012-12-26Fix a bunch of warnings.Guy Harris1-4/+4
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-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45015
2012-05-11Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-21/+21
proto_tree_add_item() calls. Clean up indentation. svn path=/trunk/; revision=42586
2012-05-05From Nhi Nguyen:pascal1-2/+2
OPC UA bytestring node id decoding is wrong https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7226 svn path=/trunk/; revision=42437
2012-04-09Add missing consts in opcua plugin.Jakub Zawadzki1-11/+11
svn path=/trunk/; revision=42000
2011-10-10Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-16/+16
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-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-22/+22
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
2010-12-02From Gerhard Gappmeier:Anders Broman1-12/+12
Fix mapping of datatype strings in opcua plugin https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5428 svn path=/trunk/; revision=35105
2010-11-16From Gerhard Gappmeier via ↵Jeff Morriss1-1/+40
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-16From Gerhard Gappmeier via ↵Jeff Morriss1-8/+29
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-15From Gerhard Gappmeier via ↵Jeff Morriss1-33/+25
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5406 : 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
2010-04-26Make the OpcUa plugin's fields filterable (by giving them abbreviations).Jeff Morriss1-33/+33
(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
2010-04-07Remove some uneeded #includesBill Meier1-1/+0
svn path=/trunk/; revision=32419
2010-01-28Fix some gcc -Wshadow warnings.Bill Meier1-3/+3
svn path=/trunk/; revision=31722
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofGuy Harris1-2/+2
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
2009-10-20Don't call PROTO_ITEM_SET_GENERATED(proto_tree_add[...]): that will end up ↵Jeff Morriss1-9/+17
adding the item to the tree multiple times. svn path=/trunk/; revision=30635
2009-09-09Check our array lengths and refuse to process them if they're too large.Gerald Combs1-30/+49
Fixes bug 3986. Use tvb_memeql and proto_tree_add_item instead of digging around in tvb->real_data. svn path=/trunk/; revision=29813
2009-06-22From Kovarththanan Rajaratnam:Stig Bjørlykke1-36/+36
More header field info cleanup in plugins/* and epan/dissectors/* svn path=/trunk/; revision=28811
2009-06-22From Kovarththanan Rajaratnam:Stig Bjørlykke1-64/+63
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
2009-04-06From Gerhard Gappmeier:Jaap Keuter1-40/+88
This patch updates the plugin to fit the released OPCUA protocol version. svn path=/trunk/; revision=27974
2008-12-22Fix some typos and spelling (mostly in text strings)Bill Meier1-1/+1
svn path=/trunk/; revision=27085
2008-10-31Fix some "format not a string literal and no format arguments" warnings.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=26652