forked from osmocom/wireshark
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>
This commit is contained in:
parent
fabee432de
commit
baa5888788
|
@ -314,14 +314,6 @@ void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const c
|
||||||
parseExtensionObject(subtree, tvb, pOffset, "AdditionalHeader");
|
parseExtensionObject(subtree, tvb, pOffset, "AdditionalHeader");
|
||||||
proto_item_set_end(ti, tvb, *pOffset);
|
proto_item_set_end(ti, tvb, *pOffset);
|
||||||
}
|
}
|
||||||
gint ett_opcua_ServiceFault = -1;
|
|
||||||
void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName)
|
|
||||||
{
|
|
||||||
proto_item *ti = proto_tree_add_text(tree, tvb, *pOffset, -1, "%s : ServiceFault", szFieldName);
|
|
||||||
proto_tree *subtree = proto_item_add_subtree(ti, ett_opcua_ServiceFault);
|
|
||||||
parseResponseHeader(subtree, tvb, pOffset, "ResponseHeader");
|
|
||||||
proto_item_set_end(ti, tvb, *pOffset);
|
|
||||||
}
|
|
||||||
gint ett_opcua_UserTokenPolicy = -1;
|
gint ett_opcua_UserTokenPolicy = -1;
|
||||||
void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName)
|
void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName)
|
||||||
{
|
{
|
||||||
|
@ -1803,7 +1795,6 @@ static gint *ett[] =
|
||||||
&ett_opcua_ApplicationDescription,
|
&ett_opcua_ApplicationDescription,
|
||||||
&ett_opcua_RequestHeader,
|
&ett_opcua_RequestHeader,
|
||||||
&ett_opcua_ResponseHeader,
|
&ett_opcua_ResponseHeader,
|
||||||
&ett_opcua_ServiceFault,
|
|
||||||
&ett_opcua_UserTokenPolicy,
|
&ett_opcua_UserTokenPolicy,
|
||||||
&ett_opcua_EndpointDescription,
|
&ett_opcua_EndpointDescription,
|
||||||
&ett_opcua_RegisteredServer,
|
&ett_opcua_RegisteredServer,
|
||||||
|
|
|
@ -42,7 +42,6 @@ void parseTimeZoneDataType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const
|
||||||
void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
||||||
void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
||||||
void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
||||||
void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
|
||||||
void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
||||||
void parseEndpointDescription(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
void parseEndpointDescription(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
||||||
void parseRegisteredServer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
void parseRegisteredServer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const char *szFieldName);
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#define OpcUaId_ApplicationDescription_Encoding_DefaultBinary 310
|
#define OpcUaId_ApplicationDescription_Encoding_DefaultBinary 310
|
||||||
#define OpcUaId_RequestHeader_Encoding_DefaultBinary 391
|
#define OpcUaId_RequestHeader_Encoding_DefaultBinary 391
|
||||||
#define OpcUaId_ResponseHeader_Encoding_DefaultBinary 394
|
#define OpcUaId_ResponseHeader_Encoding_DefaultBinary 394
|
||||||
#define OpcUaId_ServiceFault_Encoding_DefaultBinary 397
|
|
||||||
#define OpcUaId_FindServersRequest_Encoding_DefaultBinary 422
|
#define OpcUaId_FindServersRequest_Encoding_DefaultBinary 422
|
||||||
#define OpcUaId_FindServersResponse_Encoding_DefaultBinary 425
|
#define OpcUaId_FindServersResponse_Encoding_DefaultBinary 425
|
||||||
#define OpcUaId_UserTokenPolicy_Encoding_DefaultBinary 306
|
#define OpcUaId_UserTokenPolicy_Encoding_DefaultBinary 306
|
||||||
|
|
|
@ -49,7 +49,6 @@ ExtensionObjectParserEntry g_arExtensionObjectParserTable[] = {
|
||||||
{ OpcUaId_ApplicationDescription_Encoding_DefaultBinary, parseApplicationDescription, "ApplicationDescription" },
|
{ OpcUaId_ApplicationDescription_Encoding_DefaultBinary, parseApplicationDescription, "ApplicationDescription" },
|
||||||
{ OpcUaId_RequestHeader_Encoding_DefaultBinary, parseRequestHeader, "RequestHeader" },
|
{ OpcUaId_RequestHeader_Encoding_DefaultBinary, parseRequestHeader, "RequestHeader" },
|
||||||
{ OpcUaId_ResponseHeader_Encoding_DefaultBinary, parseResponseHeader, "ResponseHeader" },
|
{ OpcUaId_ResponseHeader_Encoding_DefaultBinary, parseResponseHeader, "ResponseHeader" },
|
||||||
{ OpcUaId_ServiceFault_Encoding_DefaultBinary, parseServiceFault, "ServiceFault" },
|
|
||||||
{ OpcUaId_UserTokenPolicy_Encoding_DefaultBinary, parseUserTokenPolicy, "UserTokenPolicy" },
|
{ OpcUaId_UserTokenPolicy_Encoding_DefaultBinary, parseUserTokenPolicy, "UserTokenPolicy" },
|
||||||
{ OpcUaId_EndpointDescription_Encoding_DefaultBinary, parseEndpointDescription, "EndpointDescription" },
|
{ OpcUaId_EndpointDescription_Encoding_DefaultBinary, parseEndpointDescription, "EndpointDescription" },
|
||||||
{ OpcUaId_RegisteredServer_Encoding_DefaultBinary, parseRegisteredServer, "RegisteredServer" },
|
{ OpcUaId_RegisteredServer_Encoding_DefaultBinary, parseRegisteredServer, "RegisteredServer" },
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
**
|
**
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
#define OpcUaId_ServiceFault_Encoding_DefaultBinary 397
|
||||||
#define OpcUaId_TestStackRequest_Encoding_DefaultBinary 410
|
#define OpcUaId_TestStackRequest_Encoding_DefaultBinary 410
|
||||||
#define OpcUaId_TestStackResponse_Encoding_DefaultBinary 413
|
#define OpcUaId_TestStackResponse_Encoding_DefaultBinary 413
|
||||||
#define OpcUaId_TestStackExRequest_Encoding_DefaultBinary 416
|
#define OpcUaId_TestStackExRequest_Encoding_DefaultBinary 416
|
||||||
|
|
|
@ -29,6 +29,15 @@
|
||||||
#include "opcua_hfindeces.h"
|
#include "opcua_hfindeces.h"
|
||||||
#include "opcua_serviceparser.h"
|
#include "opcua_serviceparser.h"
|
||||||
|
|
||||||
|
gint ett_opcua_ServiceFault = -1;
|
||||||
|
void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
|
||||||
|
{
|
||||||
|
proto_item *ti = proto_tree_add_text(tree, tvb, *pOffset, -1, "ServiceFault");
|
||||||
|
proto_tree *subtree = proto_item_add_subtree(ti, ett_opcua_ServiceFault);
|
||||||
|
|
||||||
|
parseResponseHeader(subtree, tvb, pOffset, "ResponseHeader");
|
||||||
|
proto_item_set_end(ti, tvb, *pOffset);
|
||||||
|
}
|
||||||
gint ett_opcua_FindServersRequest = -1;
|
gint ett_opcua_FindServersRequest = -1;
|
||||||
void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
|
void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
|
||||||
{
|
{
|
||||||
|
@ -1003,6 +1012,7 @@ void parseTestStackExResponse(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
|
||||||
/** Setup protocol subtree array */
|
/** Setup protocol subtree array */
|
||||||
static gint *ett[] =
|
static gint *ett[] =
|
||||||
{
|
{
|
||||||
|
&ett_opcua_ServiceFault,
|
||||||
&ett_opcua_FindServersRequest,
|
&ett_opcua_FindServersRequest,
|
||||||
&ett_opcua_FindServersResponse,
|
&ett_opcua_FindServersResponse,
|
||||||
&ett_opcua_GetEndpointsRequest,
|
&ett_opcua_GetEndpointsRequest,
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
|
|
||||||
|
void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
|
||||||
void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
|
void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
|
||||||
void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
|
void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
|
||||||
void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
|
void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "opcua_servicetable.h"
|
#include "opcua_servicetable.h"
|
||||||
|
|
||||||
ParserEntry g_arParserTable[] = {
|
ParserEntry g_arParserTable[] = {
|
||||||
|
{ OpcUaId_ServiceFault_Encoding_DefaultBinary, parseServiceFault },
|
||||||
{ OpcUaId_FindServersRequest_Encoding_DefaultBinary, parseFindServersRequest },
|
{ OpcUaId_FindServersRequest_Encoding_DefaultBinary, parseFindServersRequest },
|
||||||
{ OpcUaId_FindServersResponse_Encoding_DefaultBinary, parseFindServersResponse },
|
{ OpcUaId_FindServersResponse_Encoding_DefaultBinary, parseFindServersResponse },
|
||||||
{ OpcUaId_GetEndpointsRequest_Encoding_DefaultBinary, parseGetEndpointsRequest },
|
{ OpcUaId_GetEndpointsRequest_Encoding_DefaultBinary, parseGetEndpointsRequest },
|
||||||
|
@ -112,6 +113,7 @@ const int g_NumServices = sizeof(g_arParserTable) / sizeof(ParserEntry);
|
||||||
|
|
||||||
/** Service type table */
|
/** Service type table */
|
||||||
const value_string g_requesttypes[] = {
|
const value_string g_requesttypes[] = {
|
||||||
|
{ OpcUaId_ServiceFault_Encoding_DefaultBinary, "ServiceFault" },
|
||||||
{ OpcUaId_FindServersRequest_Encoding_DefaultBinary, "FindServersRequest" },
|
{ OpcUaId_FindServersRequest_Encoding_DefaultBinary, "FindServersRequest" },
|
||||||
{ OpcUaId_FindServersResponse_Encoding_DefaultBinary, "FindServersResponse" },
|
{ OpcUaId_FindServersResponse_Encoding_DefaultBinary, "FindServersResponse" },
|
||||||
{ OpcUaId_GetEndpointsRequest_Encoding_DefaultBinary, "GetEndpointsRequest" },
|
{ OpcUaId_GetEndpointsRequest_Encoding_DefaultBinary, "GetEndpointsRequest" },
|
||||||
|
|
Loading…
Reference in New Issue