aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorHannes Mezger <hannes.mezger@ascolab.com>2014-06-10 11:46:05 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-06-11 12:15:39 +0000
commite2ae387d9c9d2d38d1da788f39b8e65a22fff8dd (patch)
tree7a1bb31c8ea5c4757afdf8d3a68f8d0ac9418b8e /plugins
parentddc275c562805757d5d971ccc31ef47dbc6df4bc (diff)
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>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/opcua/opcua_application_layer.c19
-rw-r--r--plugins/opcua/opcua_simpletypes.c20
2 files changed, 20 insertions, 19 deletions
diff --git a/plugins/opcua/opcua_application_layer.c b/plugins/opcua/opcua_application_layer.c
index 28920ae5a1..1c29778942 100644
--- a/plugins/opcua/opcua_application_layer.c
+++ b/plugins/opcua/opcua_application_layer.c
@@ -28,14 +28,12 @@
/** NodeId encoding mask table */
static const value_string g_nodeidmasks[] = {
- { 0, "Two byte encoded Numeric" },
- { 1, "Four byte encoded Numeric" },
- { 2, "Numeric of arbitrary length" },
- { 3, "String" },
- { 4, "URI" },
- { 5, "GUID" },
- { 6, "Opaque" },
- { 0x80, "UriMask" },
+ { 0x00, "Two byte encoded Numeric" },
+ { 0x01, "Four byte encoded Numeric" },
+ { 0x02, "Numeric of arbitrary length" },
+ { 0x03, "String" },
+ { 0x04, "GUID" },
+ { 0x05, "Opaque" },
{ 0, NULL }
};
@@ -101,9 +99,8 @@ int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
iOffset+=4;
break;
case 0x03: /* string */
- case 0x04: /* uri */
- case 0x05: /* guid */
- case 0x06: /* byte string */
+ case 0x04: /* guid */
+ case 0x05: /* opaque*/
/* NOT USED */
break;
};
diff --git a/plugins/opcua/opcua_simpletypes.c b/plugins/opcua/opcua_simpletypes.c
index f02cf50b4f..9620a343a9 100644
--- a/plugins/opcua/opcua_simpletypes.c
+++ b/plugins/opcua/opcua_simpletypes.c
@@ -67,6 +67,8 @@ static int hf_opcua_datavalue_mask_servertimestampflag = -1;
static int hf_opcua_datavalue_mask_sourcepicoseconds = -1;
static int hf_opcua_datavalue_mask_serverpicoseconds = -1;
static int hf_opcua_nodeid_encodingmask = -1;
+static int hf_opcua_expandednodeid_mask_namespaceuri = -1;
+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;
@@ -91,14 +93,12 @@ static int hf_opcua_ServerIndex = -1;
/** NodeId encoding mask table */
static const value_string g_nodeidmasks[] = {
- { 0, "Two byte encoded Numeric" },
- { 1, "Four byte encoded Numeric" },
- { 2, "Numeric of arbitrary length" },
- { 3, "String" },
- { 4, "URI" },
- { 5, "GUID" },
- { 6, "Opaque" },
- { 0x80, "UriMask" },
+ { 0x00, "Two byte encoded Numeric" },
+ { 0x01, "Four byte encoded Numeric" },
+ { 0x02, "Numeric of arbitrary length" },
+ { 0x03, "String" },
+ { 0x04, "GUID" },
+ { 0x05, "Opaque" },
{ 0, NULL }
};
@@ -282,6 +282,8 @@ void registerSimpleTypes(int proto)
{ &hf_opcua_nodeid_numeric,
{ "NodeId Identifier Numeric", "application.nodeid.numeric", FT_UINT32, BASE_DEC, 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 } },
{ &hf_opcua_localizedtext_text, { "Text", "opcua.Text", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_opcua_qualifiedname_id, { "Id", "opcua.Id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
@@ -908,6 +910,8 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const c
EncodingMask = tvb_get_guint8(tvb, iOffset);
proto_tree_add_item(subtree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(subtree, hf_opcua_expandednodeid_mask_namespaceuri, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(subtree, hf_opcua_expandednodeid_mask_serverindex, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
iOffset++;
switch(EncodingMask & 0x0F)