from Gerhard Gappmeier:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 15 May 2007 09:53:26 +0000 (09:53 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 15 May 2007 09:53:26 +0000 (09:53 +0000)
renamed prefix ua_ -> opcua_
remove unused code

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21784 f5534014-38df-0310-8fa8-9805f1628bb7

plugins/opcua/Makefile.common
plugins/opcua/opcua.c
plugins/opcua/opcua_application_layer.c [moved from plugins/opcua/ua_application_layer.c with 100% similarity]
plugins/opcua/opcua_application_layer.h [moved from plugins/opcua/ua_application_layer.h with 100% similarity]
plugins/opcua/opcua_security_layer.c [moved from plugins/opcua/ua_security_layer.c with 98% similarity]
plugins/opcua/opcua_security_layer.h [moved from plugins/opcua/ua_security_layer.h with 100% similarity]
plugins/opcua/opcua_simpletypes.c
plugins/opcua/opcua_transport_layer.c [moved from plugins/opcua/ua_transport_layer.c with 99% similarity]
plugins/opcua/opcua_transport_layer.h [moved from plugins/opcua/ua_transport_layer.h with 100% similarity]

index 9812d9ba5e6dcb4b9b928df7b40821e61669304d..689f4807a2ddcfdc886f97f24cfdff14133f7416 100644 (file)
@@ -30,9 +30,9 @@ PLUGIN_NAME = opcua
 # the dissector sources (without any helpers)
 DISSECTOR_SRC = \
        opcua.c \
-       ua_transport_layer.c \
-       ua_security_layer.c \
-       ua_application_layer.c \
+       opcua_transport_layer.c \
+       opcua_security_layer.c \
+       opcua_application_layer.c \
        opcua_serviceparser.c \
        opcua_complextypeparser.c \
        opcua_enumparser.c \
@@ -48,6 +48,6 @@ DISSECTOR_INCLUDES =  \
        opcua_identifiers.h \
        opcua_serviceparser.h \
        opcua_simpletypes.h \
-       ua_application_layer.h \
-       ua_security_layer.h \
-       ua_transport_layer.h
+       opcua_application_layer.h \
+       opcua_security_layer.h \
+       opcua_transport_layer.h
index 7b9ac17afc0c1cb8bd3365deb75077fe71645716..6f21594bd16672a73afed9638ae00d39e4bc2778 100644 (file)
@@ -30,9 +30,9 @@
 #include <epan/emem.h>
 #include <epan/dissectors/packet-tcp.h>
 #include <epan/prefs.h>
-#include "ua_transport_layer.h"
-#include "ua_security_layer.h"
-#include "ua_application_layer.h"
+#include "opcua_transport_layer.h"
+#include "opcua_security_layer.h"
+#include "opcua_application_layer.h"
 #include "opcua_complextypeparser.h"
 #include "opcua_serviceparser.h"
 #include "opcua_enumparser.h"
@@ -253,3 +253,4 @@ static void dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree
 }    
 
 
+
similarity index 98%
rename from plugins/opcua/ua_security_layer.c
rename to plugins/opcua/opcua_security_layer.c
index c139f672757aebe729a681a5a370be3ba2e16d5c..61d97e5c40e334faee1d9ab815a23b70cd910f65 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <gmodule.h>
 #include <epan/packet.h>
-#include "ua_application_layer.h"
+#include "opcua_application_layer.h"
 #include "opcua_simpletypes.h"
 
 /** NodeClass enum table */
index 32e2db9ec05f4d24629f5f9e88b29b71d8238c00..1411226cc5b8854cf7401c81fb457d2ed58f7204 100644 (file)
@@ -693,7 +693,6 @@ void parseNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldNa
     proto_tree *subtree = proto_item_add_subtree(ti, ett_opcua_nodeid);
     gint    iOffset = *pOffset;
     guint8  EncodingMask;
-    guint32 Numeric = 0, NSId = 0;
 
     EncodingMask = tvb_get_guint8(tvb, iOffset);
     proto_tree_add_item(subtree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, TRUE);
@@ -702,28 +701,22 @@ void parseNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldNa
     switch(EncodingMask)
     {
     case 0x00: /* two byte node id */
-        Numeric = tvb_get_guint8(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_numeric, tvb, iOffset, 1, TRUE);
         iOffset+=1;
         break;
     case 0x01: /* four byte node id */
-        NSId = tvb_get_guint8(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 1, TRUE);
         iOffset+=1;
-        Numeric = tvb_get_letohs(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_numeric, tvb, iOffset, 2, TRUE);
         iOffset+=2;
         break;
     case 0x02: /* numeric, that does not fit into four bytes */
-        NSId = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 4, TRUE);
         iOffset+=4;
-        Numeric = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_numeric, tvb, iOffset, 4, TRUE);
         iOffset+=4;
         break;
     case 0x03: /* string */
-        NSId = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 4, TRUE);
         iOffset+=4;
         parseString(subtree, tvb, &iOffset, hf_opcua_String);
@@ -735,7 +728,6 @@ void parseNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldNa
         parseGuid(subtree, tvb, &iOffset, hf_opcua_Guid);
         break;
     case 0x06: /* byte string */
-        NSId = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 4, TRUE);
         iOffset+=4;
         parseByteString(subtree, tvb, &iOffset, hf_opcua_ByteString);
@@ -781,8 +773,7 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *s
     proto_item *ti = proto_tree_add_text(tree, tvb, 0, -1, "%s: ExpandedNodeId", szFieldName);
     proto_tree *subtree = proto_item_add_subtree(ti, ett_opcua_nodeid);
     gint    iOffset = *pOffset;
-    guint8  EncodingMask, NSId = 0;
-    guint32 Numeric = 0;
+    guint8  EncodingMask;
 
     EncodingMask = tvb_get_guint8(tvb, iOffset);
     proto_tree_add_item(subtree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, TRUE);
@@ -791,28 +782,22 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *s
     switch(EncodingMask)
     {
     case 0x00: /* two byte node id */
-        Numeric = tvb_get_guint8(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_numeric, tvb, iOffset, 1, TRUE);
         iOffset+=1;
         break;
     case 0x01: /* four byte node id */
-        NSId = tvb_get_guint8(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 1, TRUE);
         iOffset+=1;
-        Numeric = tvb_get_letohs(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_numeric, tvb, iOffset, 2, TRUE);
         iOffset+=2;
         break;
     case 0x02: /* numeric, that does not fit into four bytes */
-        NSId = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 4, TRUE);
         iOffset+=4;
-        Numeric = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_numeric, tvb, iOffset, 4, TRUE);
         iOffset+=4;
         break;
     case 0x03: /* string */
-        NSId = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 4, TRUE);
         iOffset+=4;
         parseString(subtree, tvb, &iOffset, hf_opcua_String);
@@ -824,7 +809,6 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *s
         parseGuid(subtree, tvb, &iOffset, hf_opcua_Guid);
         break;
     case 0x06: /* byte string */
-        NSId = tvb_get_letohl(tvb, iOffset);
         proto_tree_add_item(subtree, hf_opcua_nodeid_nsid, tvb, iOffset, 4, TRUE);
         iOffset+=4;
         parseByteString(subtree, tvb, &iOffset, hf_opcua_ByteString);
similarity index 99%
rename from plugins/opcua/ua_transport_layer.c
rename to plugins/opcua/opcua_transport_layer.c
index 27045d1f368901a5d6a2382216ac86a96e91ac01..b96e92adff9b76e6e31ab3b2b3f28a042aefd44d 100644 (file)
@@ -27,8 +27,8 @@
 
 #include <gmodule.h>
 #include <epan/packet.h>
-#include "ua_security_layer.h"
-#include "ua_application_layer.h"
+#include "opcua_security_layer.h"
+#include "opcua_application_layer.h"
 #include "opcua_simpletypes.h"
 #include <string.h>
 #include <epan/emem.h>