diff options
author | Hannes Mezger <hannes.mezger@ascolab.com> | 2014-06-10 11:47:07 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-06-11 12:47:18 +0000 |
commit | fabee432def958af4a102eca6bfe935ec80836f6 (patch) | |
tree | f6d69abd242b2535a529ffafb392cf459fa087e7 | |
parent | af687c581f71d3d0d779ee0fea0dd62a9192d79d (diff) | |
download | wireshark-fabee432def958af4a102eca6bfe935ec80836f6.tar.gz wireshark-fabee432def958af4a102eca6bfe935ec80836f6.tar.bz2 wireshark-fabee432def958af4a102eca6bfe935ec80836f6.zip |
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>
-rw-r--r-- | plugins/opcua/opcua_simpletypes.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/plugins/opcua/opcua_simpletypes.c b/plugins/opcua/opcua_simpletypes.c index 9620a343a9..81815bb9ec 100644 --- a/plugins/opcua/opcua_simpletypes.c +++ b/plugins/opcua/opcua_simpletypes.c @@ -72,6 +72,9 @@ static int hf_opcua_expandednodeid_mask_serverindex = -1; static int hf_opcua_variant_encodingmask = -1; static int hf_opcua_nodeid_nsindex = -1; static int hf_opcua_nodeid_numeric = -1; +static int hf_opcua_nodeid_string = -1; +static int hf_opcua_nodeid_guid = -1; +static int hf_opcua_nodeid_bytestring = -1; static int hf_opcua_localizedtext_locale = -1; static int hf_opcua_localizedtext_text = -1; static int hf_opcua_qualifiedname_id = -1; @@ -279,9 +282,10 @@ void registerSimpleTypes(int proto) { &hf_opcua_nodeid_nsindex, { "NodeId Namespace Index", "application.nodeid.nsindex", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_opcua_nodeid_numeric, - { "NodeId Identifier Numeric", "application.nodeid.numeric", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } - }, + { &hf_opcua_nodeid_numeric, { "NodeId Identifier Numeric", "application.nodeid.numeric", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_opcua_nodeid_string, { "NodeId Identifier String", "application.nodeid.string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_opcua_nodeid_guid, { "NodeId Identifier Guid", "application.nodeid.guid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_opcua_nodeid_bytestring, { "NodeId Identifier ByteString", "application.nodeid.bytestring", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_opcua_expandednodeid_mask_namespaceuri, { "has namespace uri", "opcua.has_namespace_uri", FT_BOOLEAN, 8, NULL, NODEID_NAMESPACEURIFLAG, NULL, HFILL } }, { &hf_opcua_expandednodeid_mask_serverindex, { "has server index", "opcua.has_server_index", FT_BOOLEAN, 8, NULL, NODEID_SERVERINDEXFLAG, NULL, HFILL } }, { &hf_opcua_localizedtext_locale, { "Locale", "opcua.Locale", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, @@ -848,17 +852,17 @@ void parseNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szF case 0x03: /* string */ proto_tree_add_item(subtree, hf_opcua_nodeid_nsindex, tvb, iOffset, 2, ENC_LITTLE_ENDIAN); iOffset+=2; - parseString(subtree, tvb, &iOffset, hf_opcua_String); + parseString(subtree, tvb, &iOffset, hf_opcua_nodeid_string); break; case 0x04: /* guid */ proto_tree_add_item(subtree, hf_opcua_nodeid_nsindex, tvb, iOffset, 2, ENC_LITTLE_ENDIAN); iOffset+=2; - parseGuid(subtree, tvb, &iOffset, hf_opcua_Guid); + parseGuid(subtree, tvb, &iOffset, hf_opcua_nodeid_guid); break; case 0x05: /* byte string */ proto_tree_add_item(subtree, hf_opcua_nodeid_nsindex, tvb, iOffset, 2, ENC_LITTLE_ENDIAN); iOffset+=2; - parseByteString(subtree, tvb, &iOffset, hf_opcua_ByteString); + parseByteString(subtree, tvb, &iOffset, hf_opcua_nodeid_bytestring); break; }; @@ -935,17 +939,17 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const c case 0x03: /* string */ proto_tree_add_item(subtree, hf_opcua_nodeid_nsindex, tvb, iOffset, 2, ENC_LITTLE_ENDIAN); iOffset+=2; - parseString(subtree, tvb, &iOffset, hf_opcua_String); + parseString(subtree, tvb, &iOffset, hf_opcua_nodeid_string); break; case 0x04: /* guid */ proto_tree_add_item(subtree, hf_opcua_nodeid_nsindex, tvb, iOffset, 2, ENC_LITTLE_ENDIAN); iOffset+=2; - parseGuid(subtree, tvb, &iOffset, hf_opcua_Guid); + parseGuid(subtree, tvb, &iOffset, hf_opcua_nodeid_guid); break; case 0x05: /* byte string */ proto_tree_add_item(subtree, hf_opcua_nodeid_nsindex, tvb, iOffset, 2, ENC_LITTLE_ENDIAN); iOffset+=2; - parseByteString(subtree, tvb, &iOffset, hf_opcua_ByteString); + parseByteString(subtree, tvb, &iOffset, hf_opcua_nodeid_bytestring); break; }; |