diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-03-09 03:17:51 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-03-13 21:30:24 +0000 |
commit | 54a520d4a1151c68d0b4e5f09a8d82466fa499f3 (patch) | |
tree | 7aacae160382098ce651ac862a5dfd5de4beff94 /epan/dissectors/asn1/ros | |
parent | c1f3c935bdd33090c87f0d2f84842ce9729b747a (diff) |
Move /asn1 to /epan/dissectors
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9
Reviewed-on: https://code.wireshark.org/review/14388
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/dissectors/asn1/ros')
-rw-r--r-- | epan/dissectors/asn1/ros/CMakeLists.txt | 60 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/Makefile.am | 23 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/Makefile.common | 56 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/Makefile.nmake | 26 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/Remote-Operations-Generic-ROS-PDUs.asn | 163 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/Remote-Operations-Information-Objects.asn | 125 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/Remote-Operations-Useful-Definitions.asn | 95 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/packet-ros-template.c | 530 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/packet-ros-template.h | 78 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/ros-err.cnf | 46 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/ros-inv.cnf | 46 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/ros-rej.cnf | 18 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/ros-res.cnf | 49 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/ros.asn | 190 | ||||
-rw-r--r-- | epan/dissectors/asn1/ros/ros.cnf | 207 |
15 files changed, 1712 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/ros/CMakeLists.txt b/epan/dissectors/asn1/ros/CMakeLists.txt new file mode 100644 index 0000000000..991645c150 --- /dev/null +++ b/epan/dissectors/asn1/ros/CMakeLists.txt @@ -0,0 +1,60 @@ +# CMakeLists.txt +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +set( PROTOCOL_NAME ros ) + +set( PROTO_OPT ) + +set( EXPORT_FILES + ${PROTOCOL_NAME}-exp.cnf +) + +set( EXT_ASN_FILE_LIST +) + +set( ASN_FILE_LIST + ${PROTOCOL_NAME}.asn + Remote-Operations-Information-Objects.asn +) + +set( EXTRA_DIST + ${ASN_FILE_LIST} + packet-${PROTOCOL_NAME}-template.c + packet-${PROTOCOL_NAME}-template.h + ${PROTOCOL_NAME}.cnf + Remote-Operations-Generic-ROS-PDUs.asn + Remote-Operations-Information-Objects.asn + Remote-Operations-Useful-Definitions.asn + ros-err.cnf + ros-inv.cnf + ros-rej.cnf + ros-res.cnf +) + +set( SRC_FILES + ${EXTRA_DIST} + ${EXT_ASN_FILE_LIST} +) + +set( A2W_FLAGS -b ) + +ASN2WRS() + diff --git a/epan/dissectors/asn1/ros/Makefile.am b/epan/dissectors/asn1/ros/Makefile.am new file mode 100644 index 0000000000..72d28e600b --- /dev/null +++ b/epan/dissectors/asn1/ros/Makefile.am @@ -0,0 +1,23 @@ +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +include ../Makefile.preinc +include Makefile.common +include ../Makefile.inc + diff --git a/epan/dissectors/asn1/ros/Makefile.common b/epan/dissectors/asn1/ros/Makefile.common new file mode 100644 index 0000000000..8e1d5bfa5c --- /dev/null +++ b/epan/dissectors/asn1/ros/Makefile.common @@ -0,0 +1,56 @@ +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +PROTOCOL_NAME=ros + +EXPORT_FILES = $(PROTOCOL_NAME)-exp.cnf + +EXT_ASN_FILE_LIST = + +ASN_FILE_LIST = \ + $(PROTOCOL_NAME).asn \ + Remote-Operations-Information-Objects.asn + +INCLUDED_ASN_FILE_LIST = \ + Remote-Operations-Generic-ROS-PDUs.asn \ + Remote-Operations-Information-Objects.asn \ + Remote-Operations-Useful-Definitions.asn \ + ros-err.cnf \ + ros-inv.cnf \ + ros-rej.cnf \ + ros-res.cnf + +# The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn +# files do not exist # for all protocols: Please add/remove as required. +EXTRA_DIST = \ + $(EXTRA_DIST_COMMON) \ + $(ASN_FILE_LIST) \ + $(INCLUDED_ASN_FILE_LIST) \ + packet-$(PROTOCOL_NAME)-template.c \ + packet-$(PROTOCOL_NAME)-template.h \ + $(PROTOCOL_NAME).cnf + +SRC_FILES = \ + $(EXTRA_DIST) \ + $(EXT_ASN_FILE_LIST) + +A2W_FLAGS= -b + +EXTRA_CNF= + diff --git a/epan/dissectors/asn1/ros/Makefile.nmake b/epan/dissectors/asn1/ros/Makefile.nmake new file mode 100644 index 0000000000..d296638ddd --- /dev/null +++ b/epan/dissectors/asn1/ros/Makefile.nmake @@ -0,0 +1,26 @@ +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +include ../../../../config.nmake +include ../Makefile.preinc.nmake +include Makefile.common +include ../Makefile.inc.nmake + diff --git a/epan/dissectors/asn1/ros/Remote-Operations-Generic-ROS-PDUs.asn b/epan/dissectors/asn1/ros/Remote-Operations-Generic-ROS-PDUs.asn new file mode 100644 index 0000000000..e55ea3c05e --- /dev/null +++ b/epan/dissectors/asn1/ros/Remote-Operations-Generic-ROS-PDUs.asn @@ -0,0 +1,163 @@ +-- Module Remote-Operations-Generic-ROS-PDUs (X.880:07/1994) + +Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t remote-operations(4) + generic-ROS-PDUs(6) version1(0)} DEFINITIONS IMPLICIT TAGS ::= +BEGIN + +-- exports everything +IMPORTS + OPERATION, ERROR + FROM Remote-Operations-Information-Objects {joint-iso-itu-t + remote-operations(4) informationObjects(5) version1(0)}; + +ROS{InvokeId:InvokeIdSet, OPERATION:Invokable, OPERATION:Returnable} ::= + CHOICE { + invoke [1] Invoke{{InvokeIdSet}, {Invokable}}, + returnResult [2] ReturnResult{{Returnable}}, + returnError [3] ReturnError{{Errors {{Returnable}}}}, + reject [4] Reject +} +(CONSTRAINED BY { -- must conform to the above definition --} ! + RejectProblem:general-unrecognizedPDU) + +Invoke{InvokeId:InvokeIdSet, OPERATION:Operations} ::= SEQUENCE { + invokeId + InvokeId(InvokeIdSet) + (CONSTRAINED BY { -- must be unambiguous --} ! + RejectProblem:invoke-duplicateInvocation), + linkedId + CHOICE {present [0] IMPLICIT present < InvokeId, + absent [1] IMPLICIT NULL + } + (CONSTRAINED BY { -- must identify an outstanding operation --} ! + RejectProblem:invoke-unrecognizedLinkedId) + (CONSTRAINED BY { -- which has one or more linked operations--} ! + RejectProblem:invoke-linkedResponseUnexpected) OPTIONAL, + opcode + OPERATION.&operationCode + ({Operations} !RejectProblem:invoke-unrecognizedOperation), + argument + OPERATION.&ArgumentType + ({Operations}{@opcode} !RejectProblem:invoke-mistypedArgument) OPTIONAL +} +(CONSTRAINED BY { -- must conform to the above definition --} ! + RejectProblem:general-mistypedPDU) +(WITH COMPONENTS { + ..., + linkedId ABSENT + } | + WITH COMPONENTS { + ..., + linkedId PRESENT, + opcode (CONSTRAINED BY { -- must be in the &Linked field of the associated operation -- + } !RejectProblem:invoke-unexpectedLinkedOperation) + }) + +-- continued on the next page +ReturnResult{OPERATION:Operations} ::= SEQUENCE { + invokeId + InvokeId + (CONSTRAINED BY { -- must be that for an outstanding operation --} ! + RejectProblem:returnResult-unrecognizedInvocation) + (CONSTRAINED BY { -- which returns a result --} ! + RejectProblem:returnResult-resultResponseUnexpected), + result + SEQUENCE {opcode + OPERATION.&operationCode({Operations}) + (CONSTRAINED BY { -- identified by invokeId --} ! + RejectProblem:returnResult-unrecognizedInvocation), + result + OPERATION.&ResultType + ({Operations}{@.opcode} ! + RejectProblem:returnResult-mistypedResult)} OPTIONAL +} +(CONSTRAINED BY { -- must conform to the above definition --} ! + RejectProblem:general-mistypedPDU) + +ReturnError{ERROR:Errors} ::= SEQUENCE { + invokeId + InvokeId + (CONSTRAINED BY { -- must be that for an outstanding operation --} ! + RejectProblem:returnError-unrecognizedInvocation) + (CONSTRAINED BY { -- which returns an error --} ! + RejectProblem:returnError-errorResponseUnexpected), + errcode + ERROR.&errorCode({Errors} !RejectProblem:returnError-unrecognizedError) + (CONSTRAINED BY { -- must be in the &Errors field of the associated operation -- + } !RejectProblem:returnError-unexpectedError), + parameter + ERROR.&ParameterType + ({Errors}{@errcode} !RejectProblem:returnError-mistypedParameter) + OPTIONAL +} +(CONSTRAINED BY { -- must conform to the above definition --} ! + RejectProblem:general-mistypedPDU) + +Reject ::= SEQUENCE { + invokeId InvokeId, + problem + CHOICE {general [0] GeneralProblem, + invoke [1] InvokeProblem, + returnResult [2] ReturnResultProblem, + returnError [3] ReturnErrorProblem} +} +(CONSTRAINED BY { -- must conform to the above definition --} ! + RejectProblem:general-mistypedPDU) + +GeneralProblem ::= INTEGER { + unrecognizedPDU(0), mistypedPDU(1), badlyStructuredPDU(2)} + +-- continued on the next page +InvokeProblem ::= INTEGER { + duplicateInvocation(0), unrecognizedOperation(1), mistypedArgument(2), + resourceLimitation(3), releaseInProgress(4), unrecognizedLinkedId(5), + linkedResponseUnexpected(6), unexpectedLinkedOperation(7)} + +ReturnResultProblem ::= INTEGER { + unrecognizedInvocation(0), resultResponseUnexpected(1), mistypedResult(2) +} + +ReturnErrorProblem ::= INTEGER { + unrecognizedInvocation(0), errorResponseUnexpected(1), unrecognizedError(2), + unexpectedError(3), mistypedParameter(4)} + +RejectProblem ::= INTEGER { + general-unrecognizedPDU(0), general-mistypedPDU(1), + general-badlyStructuredPDU(2), invoke-duplicateInvocation(10), + invoke-unrecognizedOperation(11), invoke-mistypedArgument(12), + invoke-resourceLimitation(13), invoke-releaseInProgress(14), + invoke-unrecognizedLinkedId(15), invoke-linkedResponseUnexpected(16), + invoke-unexpectedLinkedOperation(17), + returnResult-unrecognizedInvocation(20), + returnResult-resultResponseUnexpected(21), returnResult-mistypedResult(22), + returnError-unrecognizedInvocation(30), + returnError-errorResponseUnexpected(31), returnError-unrecognizedError(32), + returnError-unexpectedError(33), returnError-mistypedParameter(34)} + +InvokeId ::= CHOICE {present INTEGER, + absent NULL +} + +noInvokeId InvokeId ::= absent:NULL + +NoInvokeId InvokeId ::= {noInvokeId} + +Errors{OPERATION:Operations} ERROR ::= {Operations.&Errors} + +-- continued on the next page +Bind{OPERATION:operation} ::= CHOICE { + bind-invoke [16] OPERATION.&ArgumentType({operation}), + bind-result [17] OPERATION.&ResultType({operation}), + bind-error [18] OPERATION.&Errors.&ParameterType({operation}) +} + +Unbind{OPERATION:operation} ::= CHOICE { + unbind-invoke [19] OPERATION.&ArgumentType({operation}), + unbind-result [20] OPERATION.&ResultType({operation}), + unbind-error [21] OPERATION.&Errors.&ParameterType({operation}) +} + +END -- end of generic ROS PDU definitions + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/epan/dissectors/asn1/ros/Remote-Operations-Information-Objects.asn b/epan/dissectors/asn1/ros/Remote-Operations-Information-Objects.asn new file mode 100644 index 0000000000..40ae404177 --- /dev/null +++ b/epan/dissectors/asn1/ros/Remote-Operations-Information-Objects.asn @@ -0,0 +1,125 @@ +-- Generated by Asnp, the pretty-printer of France Telecom R&D (http://asn1.elibel.tm.fr/asnp/) +-- Module Remote-Operations-Information-Objects (Rec. X.880:07/1994) +Remote-Operations-Information-Objects {joint-iso-itu-t remote-operations(4) + informationObjects(5) version1(0)} DEFINITIONS +IMPLICIT TAGS -- WS: Don't know why I need to add this - but if it isn't, the ROS operationCode is not successfully decoded - even though it doesn't have any tags! An asn2wrs issue? +::= +BEGIN + +-- exports everything +IMPORTS + emptyBind, emptyUnbind + FROM Remote-Operations-Useful-Definitions {joint-iso-itu-t + remote-operations(4) useful-definitions(7) version1(0)}; + +OPERATION ::= CLASS { + &ArgumentType OPTIONAL, + &argumentTypeOptional BOOLEAN OPTIONAL, + &returnResult BOOLEAN DEFAULT TRUE, + &ResultType OPTIONAL, + &resultTypeOptional BOOLEAN OPTIONAL, + &Errors ERROR OPTIONAL, + &Linked OPERATION OPTIONAL, + &synchronous BOOLEAN DEFAULT FALSE, + &alwaysReturns BOOLEAN DEFAULT TRUE, + &InvokePriority Priority OPTIONAL, + &ResultPriority Priority OPTIONAL, + &operationCode Code UNIQUE OPTIONAL +} +WITH SYNTAX { + [ARGUMENT &ArgumentType + [OPTIONAL &argumentTypeOptional]] + [RESULT &ResultType + [OPTIONAL &resultTypeOptional]] + [RETURN RESULT &returnResult] + [ERRORS &Errors] + [LINKED &Linked] + [SYNCHRONOUS &synchronous] + [ALWAYS RESPONDS &alwaysReturns] + [INVOKE PRIORITY &InvokePriority] + [RESULT-PRIORITY &ResultPriority] + [CODE &operationCode] +} + +ERROR ::= CLASS { + &ParameterType OPTIONAL, + ¶meterTypeOptional BOOLEAN OPTIONAL, + &ErrorPriority Priority OPTIONAL, + &errorCode Code UNIQUE OPTIONAL +} +WITH SYNTAX { + [PARAMETER &ParameterType + [OPTIONAL ¶meterTypeOptional]] + [PRIORITY &ErrorPriority] + [CODE &errorCode] +} + +OPERATION-PACKAGE ::= CLASS { + &Both OPERATION OPTIONAL, + &Consumer OPERATION OPTIONAL, + &Supplier OPERATION OPTIONAL, + &id OBJECT IDENTIFIER UNIQUE OPTIONAL +} +-- continued on the next page +WITH SYNTAX { + [OPERATIONS &Both] + [CONSUMER INVOKES &Supplier] + [SUPPLIER INVOKES &Consumer] + [ID &id] +} + +CONNECTION-PACKAGE ::= CLASS { + &bind OPERATION DEFAULT emptyBind, + &unbind OPERATION DEFAULT emptyUnbind, + &responderCanUnbind BOOLEAN DEFAULT FALSE, + &unbindCanFail BOOLEAN DEFAULT FALSE, + &id OBJECT IDENTIFIER UNIQUE OPTIONAL +} +WITH SYNTAX { + [BIND &bind] + [UNBIND &unbind] + [RESPONDER UNBIND &responderCanUnbind] + [FAILURE TO UNBIND &unbindCanFail] + [ID &id] +} + +CONTRACT ::= CLASS { + &connection CONNECTION-PACKAGE OPTIONAL, + &OperationsOf OPERATION-PACKAGE OPTIONAL, + &InitiatorConsumerOf OPERATION-PACKAGE OPTIONAL, + &InitiatorSupplierOf OPERATION-PACKAGE OPTIONAL, + &id OBJECT IDENTIFIER UNIQUE OPTIONAL +} +WITH SYNTAX { + [CONNECTION &connection] + [OPERATIONS OF &OperationsOf] + [INITIATOR CONSUMER OF &InitiatorConsumerOf] + [RESPONDER CONSUMER OF &InitiatorSupplierOf] + [ID &id] +} + +ROS-OBJECT-CLASS ::= CLASS { + &Is ROS-OBJECT-CLASS OPTIONAL, + &Initiates CONTRACT OPTIONAL, + &Responds CONTRACT OPTIONAL, + &InitiatesAndResponds CONTRACT OPTIONAL, + &id OBJECT IDENTIFIER UNIQUE +} +WITH SYNTAX { + [IS &Is] + [BOTH &InitiatesAndResponds] + [INITIATES &Initiates] + [RESPONDS &Responds] + ID &id +} + +Code ::= CHOICE {local INTEGER, + global OBJECT IDENTIFIER +} + +Priority ::= INTEGER(0..MAX) + +END -- end of Information Object specifications + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/epan/dissectors/asn1/ros/Remote-Operations-Useful-Definitions.asn b/epan/dissectors/asn1/ros/Remote-Operations-Useful-Definitions.asn new file mode 100644 index 0000000000..e526ff4600 --- /dev/null +++ b/epan/dissectors/asn1/ros/Remote-Operations-Useful-Definitions.asn @@ -0,0 +1,95 @@ +-- Module Remote-Operations-Useful-Definitions (X.880:07/1994) + +Remote-Operations-Useful-Definitions {joint-iso-itu-t remote-operations(4) + useful-definitions(7) version1(0)} DEFINITIONS IMPLICIT TAGS ::= +BEGIN + +-- exports everything +IMPORTS + OPERATION, ERROR, OPERATION-PACKAGE, Code + FROM Remote-Operations-Information-Objects {joint-iso-itu-t + remote-operations(4) informationObjects(5) version1(0)} + InvokeId, ROS{} + FROM Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t + remote-operations(4) generic-ROS-PDUs(6) version1(0)}; + +emptyBind OPERATION ::= {ERRORS {refuse} + SYNCHRONOUS TRUE +} + +emptyUnbind OPERATION ::= {SYNCHRONOUS TRUE +} + +refuse ERROR ::= {CODE local:-1 +} + +no-op OPERATION ::= {ALWAYS RESPONDS FALSE + CODE local:-1 +} + +Forward{OPERATION:OperationSet} OPERATION ::= + {OperationSet | OperationSet.&Linked.&Linked | + OperationSet.&Linked.&Linked.&Linked.&Linked} + +Reverse{OPERATION:OperationSet} OPERATION ::= {Forward{{OperationSet.&Linked}}} + +ConsumerPerforms{OPERATION-PACKAGE:package} OPERATION ::= + {Forward{{package.&Consumer}} | Forward{{package.&Both}} | + Reverse{{package.&Supplier}} | Reverse{{package.&Both}}} + +SupplierPerforms{OPERATION-PACKAGE:package} OPERATION ::= + {Forward{{package.&Supplier}} | Forward{{package.&Both}} | + Reverse{{package.&Consumer}} | Reverse{{package.&Both}}} + +AllOperations{OPERATION-PACKAGE:package} OPERATION ::= + {ConsumerPerforms{package} | SupplierPerforms{package}} + +-- continued on the next page +recode{OPERATION:operation, Code:code} OPERATION ::= { + ARGUMENT operation.&ArgumentType + OPTIONAL operation.&argumentTypeOptional + RESULT operation.&ResultType + OPTIONAL operation.&resultTypeOptional + RETURN RESULT operation.&returnResult + ERRORS {operation.&Errors} + LINKED {operation.&Linked} + SYNCHRONOUS operation.&synchronous + ALWAYS RESPONDS operation.&alwaysReturns + INVOKE PRIORITY {operation.&InvokePriority} + RESULT-PRIORITY {operation.&ResultPriority} + CODE code +} + +switch{OPERATION-PACKAGE:package, OBJECT IDENTIFIER:id} OPERATION-PACKAGE ::= +{ + OPERATIONS {package.&Both} + CONSUMER INVOKES {package.&Consumer} + SUPPLIER INVOKES {package.&Supplier} + ID id +} + +combine{OPERATION-PACKAGE:ConsumerConsumes, OPERATION-PACKAGE:ConsumerSupplies, + OPERATION-PACKAGE:base} OPERATION-PACKAGE ::= { + OPERATIONS {ConsumerConsumes.&Both | ConsumerSupplies.&Both} + CONSUMER INVOKES {ConsumerConsumes.&Consumer | ConsumerSupplies.&Supplier} + SUPPLIER INVOKES {ConsumerConsumes.&Supplier | ConsumerSupplies.&Consumer} + ID base.&id +} + +ROS-SingleAS{InvokeId:InvokeIdSet, OPERATION-PACKAGE:package} ::= + ROS{{InvokeIdSet}, {AllOperations {package}}, {AllOperations {package}}} + +ROS-ConsumerAS{InvokeId:InvokeIdSet, OPERATION-PACKAGE:package} ::= + ROS + {{InvokeIdSet}, {ConsumerPerforms {package}}, + {SupplierPerforms {package}}} + +ROS-SupplierAS{InvokeId:InvokeIdSet, OPERATION-PACKAGE:package} ::= + ROS + {{InvokeIdSet}, {SupplierPerforms {package}}, + {ConsumerPerforms {package}}} + +END -- end of useful definitions. + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/epan/dissectors/asn1/ros/packet-ros-template.c b/epan/dissectors/asn1/ros/packet-ros-template.c new file mode 100644 index 0000000000..6f7cc417b5 --- /dev/null +++ b/epan/dissectors/asn1/ros/packet-ros-template.c @@ -0,0 +1,530 @@ +/* packet-ros_asn1.c + * Routines for ROS packet dissection + * Graeme Lunt 2005 + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "config.h" + +#include <epan/packet.h> +#include <epan/conversation.h> +#include <epan/asn1.h> +#include <epan/expert.h> + +#include "packet-ber.h" +#include "packet-pres.h" +#include "packet-ros.h" + +#define PNAME "X.880 OSI Remote Operations Service" +#define PSNAME "ROS" +#define PFNAME "ros" + +void proto_register_ros(void); +void proto_reg_handoff_ros(void); + +/* Initialize the protocol and registered fields */ +static int proto_ros = -1; + +static proto_tree *top_tree=NULL; +static guint32 opcode; +static guint32 invokeid; + +static dissector_handle_t ros_handle = NULL; + +typedef struct ros_conv_info_t { + struct ros_conv_info_t *next; + GHashTable *unmatched; /* unmatched operations */ + GHashTable *matched; /* matched operations */ +} ros_conv_info_t; + +static ros_conv_info_t *ros_info_items = NULL; + +typedef struct ros_call_response { + gboolean is_request; + guint32 req_frame; + nstime_t req_time; + guint32 rep_frame; + guint invokeId; +} ros_call_response_t; + +static int hf_ros_response_in = -1; +static int hf_ros_response_to = -1; +static int hf_ros_time = -1; + + +#include "packet-ros-hf.c" + +/* Initialize the subtree pointers */ +static gint ett_ros = -1; +static gint ett_ros_unknown = -1; +static gint ett_ros_invoke_argument = -1; +static gint ett_ros_return_result = -1; +static gint ett_ros_bind_invoke = -1; +static gint ett_ros_bind_result = -1; +static gint ett_ros_bind_error = -1; +static gint ett_ros_unbind_invoke = -1; +static gint ett_ros_unbind_result = -1; +static gint ett_ros_unbind_error = -1; +#include "packet-ros-ett.c" + +static expert_field ei_ros_dissector_oid_not_implemented = EI_INIT; +static expert_field ei_ros_unknown_ros_pdu = EI_INIT; + +static dissector_table_t ros_oid_dissector_table=NULL; + +static GHashTable *oid_table=NULL; +static GHashTable *protocol_table=NULL; + +void +register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_rtse) +{ + dissector_add_string("ros.oid", oid, dissector); + g_hash_table_insert(oid_table, (gpointer)oid, (gpointer)name); + + if(!uses_rtse) + /* if we are not using RTSE, then we must register ROS with BER (ACSE) */ + register_ber_oid_dissector_handle(oid, ros_handle, proto, name); +} + +void +register_ros_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name, gboolean uses_rtse) +{ + g_hash_table_insert(protocol_table, (gpointer)oid, (gpointer)rinfo); + g_hash_table_insert(oid_table, (gpointer)oid, (gpointer)name); + + if(!uses_rtse) + /* if we are not using RTSE, then we must register ROS with BER (ACSE) */ + register_ber_oid_dissector_handle(oid, ros_handle, proto, name); +} + +static dissector_t ros_lookup_opr_dissector(gint32 opcode_lcl, const ros_opr_t *operations, gboolean argument) +{ + /* we don't know what order asn2wrs/module definition is, so ... */ + if(operations) { + for(;operations->arg_pdu != (dissector_t)(-1); operations++) + if(operations->opcode == opcode_lcl) + return argument ? operations->arg_pdu : operations->res_pdu; + + } + return NULL; +} + +static dissector_t ros_lookup_err_dissector(gint32 errcode, const ros_err_t *errors) +{ + /* we don't know what order asn2wrs/module definition is, so ... */ + if(errors) { + for(;errors->err_pdu != (dissector_t) (-1); errors++) { + if(errors->errcode == errcode) + return errors->err_pdu; + } + } + return NULL; +} + + +static int +ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, struct SESSION_DATA_STRUCTURE* session) +{ + ros_info_t *rinfo; + gint32 opcode_lcl = 0; + const gchar *opname = NULL; + const gchar *suffix = NULL; + dissector_t opdissector = NULL; + const value_string *lookup; + proto_item *item=NULL; + proto_tree *ros_tree=NULL; + + if((session != NULL) && ((rinfo = (ros_info_t*)g_hash_table_lookup(protocol_table, oid)) != NULL)) { + + if(tree){ + item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, ENC_NA); + ros_tree = proto_item_add_subtree(item, *(rinfo->ett_proto)); + } + + col_set_str(pinfo->cinfo, COL_PROTOCOL, rinfo->name); + + /* if this is a bind operation */ + if((session->ros_op & ROS_OP_TYPE_MASK) == ROS_OP_BIND) { + /* use the in-built operation codes */ + if((session->ros_op & ROS_OP_PDU_MASK) == ROS_OP_ERROR) + opcode_lcl = err_ros_bind; + else + opcode_lcl = op_ros_bind; + } else + /* otherwise just take the opcode */ + opcode_lcl = session->ros_op & ROS_OP_OPCODE_MASK; + + /* default lookup in the operations */ + lookup = rinfo->opr_code_strings; + + switch(session->ros_op & ROS_OP_PDU_MASK) { + case ROS_OP_ARGUMENT: + opdissector = ros_lookup_opr_dissector(opcode_lcl, rinfo->opr_code_dissectors, TRUE); + suffix = "_argument"; + break; + case ROS_OP_RESULT: + opdissector = ros_lookup_opr_dissector(opcode_lcl, rinfo->opr_code_dissectors, FALSE); + suffix = "_result"; + break; + case ROS_OP_ERROR: + opdissector = ros_lookup_err_dissector(opcode_lcl, rinfo->err_code_dissectors); + lookup = rinfo->err_code_strings; + break; + default: + break; + } + + if(opdissector) { + + opname = val_to_str(opcode_lcl, lookup, "Unknown opcode (%d)"); + + col_set_str(pinfo->cinfo, COL_INFO, opname); + if(suffix) + col_append_str(pinfo->cinfo, COL_INFO, suffix); + + return (*opdissector)(tvb, pinfo, ros_tree, NULL); + } + } + + return 0; +} + +int +call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, struct SESSION_DATA_STRUCTURE* session) +{ + tvbuff_t *next_tvb; + int len; + + next_tvb = tvb_new_subset_remaining(tvb, offset); + + if(((len = ros_try_string(oid, next_tvb, pinfo, tree, session)) == 0) && + ((len = dissector_try_string(ros_oid_dissector_table, oid, next_tvb, pinfo, tree, session)) == 0)) { + proto_item *item; + proto_tree *next_tree; + + next_tree = proto_tree_add_subtree_format(tree, next_tvb, 0, -1, ett_ros_unknown, &item, + "ROS: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); + + expert_add_info_format(pinfo, item, &ei_ros_dissector_oid_not_implemented, + "ROS: Dissector for OID %s not implemented", oid); + len = dissect_unknown_ber(pinfo, next_tvb, offset, next_tree); + } + + offset += len; + + return offset; +} + + +static guint +ros_info_hash_matched(gconstpointer k) +{ + const ros_call_response_t *key = (const ros_call_response_t *)k; + + return key->invokeId; +} + +static gint +ros_info_equal_matched(gconstpointer k1, gconstpointer k2) +{ + const ros_call_response_t *key1 = (const ros_call_response_t *)k1; + const ros_call_response_t *key2 = (const ros_call_response_t *)k2; + + if( key1->req_frame && key2->req_frame && (key1->req_frame!=key2->req_frame) ){ + return 0; + } + /* a response may span multiple frames + if( key1->rep_frame && key2->rep_frame && (key1->rep_frame!=key2->rep_frame) ){ + return 0; + } + */ + + return key1->invokeId==key2->invokeId; +} + +static guint +ros_info_hash_unmatched(gconstpointer k) +{ + const ros_call_response_t *key = (const ros_call_response_t *)k; + + return key->invokeId; +} + +static gint +ros_info_equal_unmatched(gconstpointer k1, gconstpointer k2) +{ + const ros_call_response_t *key1 = (const ros_call_response_t *)k1; + const ros_call_response_t *key2 = (const ros_call_response_t *)k2; + + return key1->invokeId==key2->invokeId; +} + +static ros_call_response_t * +ros_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint invokeId, gboolean isInvoke) +{ + ros_call_response_t rcr, *rcrp=NULL; + ros_conv_info_t *ros_info = ros_info_items; + + /* first see if we have already matched this */ + + rcr.invokeId=invokeId; + rcr.is_request = isInvoke; + + if(isInvoke) { + rcr.req_frame=pinfo->num; + rcr.rep_frame=0; + } else { + rcr.req_frame=0; + rcr.rep_frame=pinfo->num; + } + + rcrp=(ros_call_response_t *)g_hash_table_lookup(ros_info->matched, &rcr); + + if(rcrp) { + /* we have found a match */ + rcrp->is_request=rcr.is_request; + + } else { + + /* we haven't found a match - try and match it up */ + + if(isInvoke) { + /* this a a request - add it to the unmatched list */ + + /* check that we don't already have one of those in the + unmatched list and if so remove it */ + + rcr.invokeId=invokeId; + + rcrp=(ros_call_response_t *)g_hash_table_lookup(ros_info->unmatched, &rcr); + + if(rcrp){ + g_hash_table_remove(ros_info->unmatched, rcrp); + } + + /* if we can't reuse the old one, grab a new chunk */ + if(!rcrp){ + rcrp=wmem_new(wmem_file_scope(), ros_call_response_t); + } + rcrp->invokeId=invokeId; + rcrp->req_frame=pinfo->num; + rcrp->req_time=pinfo->abs_ts; + rcrp->rep_frame=0; + rcrp->is_request=TRUE; + g_hash_table_insert(ros_info->unmatched, rcrp, rcrp); + return NULL; + + } else { + + /* this is a result - it should be in our unmatched list */ + + rcr.invokeId=invokeId; + rcrp=(ros_call_response_t *)g_hash_table_lookup(ros_info->unmatched, &rcr); + + if(rcrp){ + + if(!rcrp->rep_frame){ + g_hash_table_remove(ros_info->unmatched, rcrp); + rcrp->rep_frame=pinfo->num; + rcrp->is_request=FALSE; + g_hash_table_insert(ros_info->matched, rcrp, rcrp); + } + } + } + } + + if(rcrp){ /* we have found a match */ + proto_item *item = NULL; + + if(rcrp->is_request){ + item=proto_tree_add_uint(tree, hf_ros_response_in, tvb, 0, 0, rcrp->rep_frame); + PROTO_ITEM_SET_GENERATED (item); + } else { + nstime_t ns; + item=proto_tree_add_uint(tree, hf_ros_response_to, tvb, 0, 0, rcrp->req_frame); + PROTO_ITEM_SET_GENERATED (item); + nstime_delta(&ns, &pinfo->abs_ts, &rcrp->req_time); + item=proto_tree_add_time(tree, hf_ros_time, tvb, 0, 0, &ns); + PROTO_ITEM_SET_GENERATED (item); + } + } + + return rcrp; +} + +#include "packet-ros-fn.c" + +/* +* Dissect ROS PDUs inside a PPDU. +*/ +static int +dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) +{ + int offset = 0; + int old_offset; + proto_item *item; + proto_tree *tree; + proto_tree *next_tree=NULL; + conversation_t *conversation; + ros_conv_info_t *ros_info = NULL; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + + /* do we have application context from the acse dissector? */ + if (data == NULL) + return 0; + asn1_ctx.private_data = data; + + /* save parent_tree so subdissectors can create new top nodes */ + top_tree=parent_tree; + + conversation = find_or_create_conversation(pinfo); + + /* + * Do we already have our info + */ + ros_info = (ros_conv_info_t *)conversation_get_proto_data(conversation, proto_ros); + if (ros_info == NULL) { + + /* No. Attach that information to the conversation. */ + + ros_info = (ros_conv_info_t *)g_malloc(sizeof(ros_conv_info_t)); + ros_info->matched=g_hash_table_new(ros_info_hash_matched, ros_info_equal_matched); + ros_info->unmatched=g_hash_table_new(ros_info_hash_unmatched, ros_info_equal_unmatched); + + conversation_add_proto_data(conversation, proto_ros, ros_info); + + ros_info->next = ros_info_items; + ros_info_items = ros_info; + } + + item = proto_tree_add_item(parent_tree, proto_ros, tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_ros); + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ROS"); + col_clear(pinfo->cinfo, COL_INFO); + + while (tvb_reported_length_remaining(tvb, offset) > 0){ + old_offset=offset; + offset=dissect_ros_ROS(FALSE, tvb, offset, &asn1_ctx , tree, -1); + if(offset == old_offset){ + next_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_ros_unknown, &item, "Unknown ROS PDU"); + + expert_add_info(pinfo, item, &ei_ros_unknown_ros_pdu); + dissect_unknown_ber(pinfo, tvb, offset, next_tree); + break; + } + } + + return tvb_captured_length(tvb); +} + +static void +ros_cleanup(void) +{ + ros_conv_info_t *ros_info; + + /* Free up state attached to the ros_info structures */ + for (ros_info = ros_info_items; ros_info != NULL; ) { + ros_conv_info_t *last; + + g_hash_table_destroy(ros_info->matched); + ros_info->matched=NULL; + g_hash_table_destroy(ros_info->unmatched); + ros_info->unmatched=NULL; + + last = ros_info; + ros_info = ros_info->next; + g_free(last); + } + + ros_info_items = NULL; + +} + +/*--- proto_register_ros -------------------------------------------*/ +void proto_register_ros(void) { + + /* List of fields */ + static hf_register_info hf[] = + { + { &hf_ros_response_in, + { "Response In", "ros.response_in", + FT_FRAMENUM, BASE_NONE, NULL, 0x0, + "The response to this remote operation invocation is in this frame", HFILL }}, + { &hf_ros_response_to, + { "Response To", "ros.response_to", + FT_FRAMENUM, BASE_NONE, NULL, 0x0, + "This is a response to the remote operation invocation in this frame", HFILL }}, + { &hf_ros_time, + { "Time", "ros.time", + FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, + "The time between the Invoke and the Response", HFILL }}, + +#include "packet-ros-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_ros, + &ett_ros_unknown, + &ett_ros_invoke_argument, + &ett_ros_return_result, + &ett_ros_bind_invoke, + &ett_ros_bind_result, + &ett_ros_bind_error, + &ett_ros_unbind_invoke, + &ett_ros_unbind_result, + &ett_ros_unbind_error, + +#include "packet-ros-ettarr.c" + }; + + static ei_register_info ei[] = { + { &ei_ros_dissector_oid_not_implemented, { "ros.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "ROS: Dissector for OID not implemented", EXPFILL }}, + { &ei_ros_unknown_ros_pdu, { "ros.unknown_ros_pdu", PI_UNDECODED, PI_WARN, "Unknown ROS PDU", EXPFILL }}, + }; + + expert_module_t* expert_ros; + + /* Register protocol */ + proto_ros = proto_register_protocol(PNAME, PSNAME, PFNAME); + register_dissector("ros", dissect_ros, proto_ros); + /* Register fields and subtrees */ + proto_register_field_array(proto_ros, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + expert_ros = expert_register_protocol(proto_ros); + expert_register_field_array(expert_ros, ei, array_length(ei)); + + ros_oid_dissector_table = register_dissector_table("ros.oid", "ROS OID Dissectors", FT_STRING, BASE_NONE, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); + oid_table=g_hash_table_new(g_str_hash, g_str_equal); + protocol_table=g_hash_table_new(g_str_hash, g_str_equal); + + ros_handle = find_dissector("ros"); + + register_cleanup_routine(ros_cleanup); +} + + +/*--- proto_reg_handoff_ros --- */ +void proto_reg_handoff_ros(void) { + + +} diff --git a/epan/dissectors/asn1/ros/packet-ros-template.h b/epan/dissectors/asn1/ros/packet-ros-template.h new file mode 100644 index 0000000000..8a41af0875 --- /dev/null +++ b/epan/dissectors/asn1/ros/packet-ros-template.h @@ -0,0 +1,78 @@ +/* packet-ros.h + * Routines for ROS packet dissection + * Graeme Lunt 2005 + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef PACKET_ROS_H +#define PACKET_ROS_H + +#include "packet-ros-exp.h" + +# include "packet-ses.h" + +/* for use in the SESSION_DATA_STRUCTURE ros_op argument + top byte indicates ROS invocation + bottom three bytes indicate operation code */ + +# define ROS_OP_MASK 0xff000000 + +# define ROS_OP_PDU_MASK 0xf0000000 +# define ROS_OP_ARGUMENT 0x10000000 +# define ROS_OP_RESULT 0x20000000 +# define ROS_OP_ERROR 0x30000000 +# define ROS_OP_REJECT 0x40000000 + +# define ROS_OP_TYPE_MASK 0x0f000000 +# define ROS_OP_BIND 0x01000000 +# define ROS_OP_UNBIND 0x02000000 +# define ROS_OP_INVOKE 0x03000000 + +# define ROS_OP_OPCODE_MASK (~ROS_OP_MASK) + +# define op_ros_bind (-1) /* pseudo operation code for asn2wrs generated binds */ +# define err_ros_bind (-1) /* pseudo eror code for asn2wrs generated binds */ + +typedef struct _ros_opr_t { + gint32 opcode; + dissector_t arg_pdu; + dissector_t res_pdu; +} ros_opr_t; + +typedef struct _ros_err_t { + gint32 errcode; + dissector_t err_pdu; +} ros_err_t; + +typedef struct _ros_info_t { + const gchar *name; + int *proto; + gint *ett_proto; + const value_string *opr_code_strings; + const ros_opr_t *opr_code_dissectors; + const value_string *err_code_strings; + const ros_err_t *err_code_dissectors; +} ros_info_t; + +void register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_rtse); +void register_ros_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name, gboolean uses_rtse); +int call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, struct SESSION_DATA_STRUCTURE* session); + +#endif /* PACKET_ROS_H */ diff --git a/epan/dissectors/asn1/ros/ros-err.cnf b/epan/dissectors/asn1/ros/ros-err.cnf new file mode 100644 index 0000000000..76aa331dcb --- /dev/null +++ b/epan/dissectors/asn1/ros/ros-err.cnf @@ -0,0 +1,46 @@ +# ros-err.cnf +# ROS ReturnError common code +# Copyright 2007 Tomas Kukosa + +#.FN_HDR ReturnError + dissector_handle_t err_handle = NULL; + const gchar *descr = ""; + + err_next_tvb = NULL; +#.FN_FTR ReturnError + actx->rose_ctx->d.pdu = 3; + + if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->err_local_dissector_table) { + err_handle = dissector_get_uint_handle(actx->rose_ctx->err_local_dissector_table, actx->rose_ctx->d.code_local); + } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->err_global_dissector_table) { + err_handle = dissector_get_string_handle(actx->rose_ctx->err_global_dissector_table, actx->rose_ctx->d.code_global); + } else { + err_handle = NULL; + } + + if (!err_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) { + if (actx->rose_ctx->d.code == 0) + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %d", actx->rose_ctx->d.code_local); + else if (actx->rose_ctx->d.code == 1) + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx->rose_ctx->d.code_global); + } else { + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR:"); + } + + if (actx->rose_ctx->apdu_depth >= 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); + if (actx->rose_ctx->fillin_info) + col_append_str(actx->pinfo->cinfo, COL_INFO, descr); + if (actx->rose_ctx->fillin_ptr) + g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); + + if (!err_next_tvb) { /* empty error */ + err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); + } + + call_dissector_with_data((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree, actx->rose_ctx); + if (!err_handle) { + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + } +#.END diff --git a/epan/dissectors/asn1/ros/ros-inv.cnf b/epan/dissectors/asn1/ros/ros-inv.cnf new file mode 100644 index 0000000000..1bc9251c49 --- /dev/null +++ b/epan/dissectors/asn1/ros/ros-inv.cnf @@ -0,0 +1,46 @@ +# ros-inv.cnf +# ROS Invoke common code +# Copyright 2007 Tomas Kukosa + +#.FN_HDR Invoke + dissector_handle_t arg_handle = NULL; + const gchar *descr = ""; + + arg_next_tvb = NULL; +#.FN_FTR Invoke + actx->rose_ctx->d.pdu = 1; + + if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->arg_local_dissector_table) { + arg_handle = dissector_get_uint_handle(actx->rose_ctx->arg_local_dissector_table, actx->rose_ctx->d.code_local); + } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->arg_global_dissector_table) { + arg_handle = dissector_get_string_handle(actx->rose_ctx->arg_global_dissector_table, actx->rose_ctx->d.code_global); + } else { + arg_handle = NULL; + } + + if (!arg_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) { + if (actx->rose_ctx->d.code == 0) + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %d", actx->rose_ctx->d.code_local); + else if (actx->rose_ctx->d.code == 1) + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx->rose_ctx->d.code_global); + } else { + descr = wmem_strdup_printf(wmem_packet_scope(), "INV:"); + } + + if (actx->rose_ctx->apdu_depth >= 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); + if (actx->rose_ctx->fillin_info) + col_append_str(actx->pinfo->cinfo, COL_INFO, descr); + if (actx->rose_ctx->fillin_ptr) + g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); + + if (!arg_next_tvb) { /* empty argument */ + arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); + } + + call_dissector_with_data((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree, actx->rose_ctx); + if (!arg_handle) { + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + } +#.END diff --git a/epan/dissectors/asn1/ros/ros-rej.cnf b/epan/dissectors/asn1/ros/ros-rej.cnf new file mode 100644 index 0000000000..2b991b9d13 --- /dev/null +++ b/epan/dissectors/asn1/ros/ros-rej.cnf @@ -0,0 +1,18 @@ +# ros-rej.cnf +# ROS Reject common code +# Copyright 2007 Tomas Kukosa + +#.FN_HDR Reject + const gchar *descr = ""; + + problem_str[0] = '\0'; +#.FN_FTR Reject + descr = wmem_strdup_printf(wmem_packet_scope(), "REJ: %s", problem_str); + + if (actx->rose_ctx->apdu_depth >= 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); + if (actx->rose_ctx->fillin_info) + col_append_str(actx->pinfo->cinfo, COL_INFO, descr); + if (actx->rose_ctx->fillin_ptr) + g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); +#.END diff --git a/epan/dissectors/asn1/ros/ros-res.cnf b/epan/dissectors/asn1/ros/ros-res.cnf new file mode 100644 index 0000000000..f0900906cb --- /dev/null +++ b/epan/dissectors/asn1/ros/ros-res.cnf @@ -0,0 +1,49 @@ +# ros-res.cnf +# ROS ReturnResult common code +# Copyright 2007 Tomas Kukosa + +#.FN_HDR ReturnResult + dissector_handle_t res_handle = NULL; + const gchar *descr = ""; + + actx->rose_ctx->d.code = -1; + res_next_tvb = NULL; +#.FN_FTR ReturnResult + actx->rose_ctx->d.pdu = 2; + + if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->res_local_dissector_table) { + res_handle = dissector_get_uint_handle(actx->rose_ctx->res_local_dissector_table, actx->rose_ctx->d.code_local); + } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->res_global_dissector_table) { + res_handle = dissector_get_string_handle(actx->rose_ctx->res_global_dissector_table, actx->rose_ctx->d.code_global); + } else { + res_handle = NULL; + } + + if (!res_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) { + if (actx->rose_ctx->d.code == 0) + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %d", actx->rose_ctx->d.code_local); + else if (actx->rose_ctx->d.code == 1) + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx->rose_ctx->d.code_global); + } else { + descr = wmem_strdup_printf(wmem_packet_scope(), "RES:"); + } + + if (actx->rose_ctx->apdu_depth >= 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); + if (actx->rose_ctx->fillin_info) + col_append_str(actx->pinfo->cinfo, COL_INFO, descr); + if (actx->rose_ctx->fillin_ptr) + g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); + + if (actx->rose_ctx->d.code != -1) { + if (!res_next_tvb) { /* empty result */ + res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); + } + + call_dissector_with_data((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree, actx->rose_ctx); + if (!res_handle) { + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + } + } +#.END diff --git a/epan/dissectors/asn1/ros/ros.asn b/epan/dissectors/asn1/ros/ros.asn new file mode 100644 index 0000000000..262e9b231e --- /dev/null +++ b/epan/dissectors/asn1/ros/ros.asn @@ -0,0 +1,190 @@ +-- Module Remote-Operations-Generic-ROS-PDUs (X.880:07/1994) +-- See also the README file +-- See also the index of all ASN.1 assignments needed in this Recommendation + + +Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t remote-operations(4) + generic-ROS-PDUs(6) version1(0)} DEFINITIONS IMPLICIT TAGS ::= +BEGIN + +-- exports everything +IMPORTS + OPERATION, ERROR + FROM Remote-Operations-Information-Objects {joint-iso-itu-t + remote-operations(4) informationObjects(5) version1(0)}; + + + +ROS --{InvokeId:InvokeIdSet, OPERATION:Invokable, OPERATION:Returnable} -- ::= + CHOICE { + invoke [1] Invoke --{{InvokeIdSet}, {Invokable}}--, + returnResult [2] ReturnResult --{{Returnable}}--, + returnError [3] ReturnError --{{Errors {{Returnable}}}}--, + reject [4] Reject, + + bind-invoke [16] --OPERATION.&ArgumentType({operation})-- ANY, + bind-result [17] --OPERATION.&ResultType({operation})-- ANY, + bind-error [18] --OPERATION.&Errors.&ParameterType({operation}) -- ANY, + + unbind-invoke [19] --OPERATION.&ArgumentType({operation})-- ANY, + unbind-result [20] --OPERATION.&ResultType({operation})-- ANY, + unbind-error [21] --OPERATION.&Errors.&ParameterType({operation}) -- ANY +} + + +--(CONSTRAINED BY { - - must conform to the above definition - -} ! +-- RejectProblem:general-unrecognizedPDU) + +Invoke --{InvokeId:InvokeIdSet, OPERATION:Operations}-- ::= SEQUENCE { + invokeId + InvokeId --(InvokeIdSet) +-- (CONSTRAINED BY { - - must be unambiguous - -} ! +-- RejectProblem:invoke-duplicateInvocation)--, + linkedId +-- CHOICE {present [0] IMPLICIT present < InvokeId, +-- absent [1] IMPLICIT NULL +-- } + [0] INTEGER +-- (CONSTRAINED BY { - - must identify an outstanding operation - -} ! +-- RejectProblem:invoke-unrecognizedLinkedId) +-- (CONSTRAINED BY { - - which has one or more linked operations- -} ! +-- RejectProblem:invoke-linkedResponseUnexpected)-- OPTIONAL, + opcode OperationCode +-- OPERATION.&operationCode +-- ({Operations} !RejectProblem:invoke-unrecognizedOperation)--, + argument +-- OPERATION.&ArgumentType +-- ({Operations}{@opcode} !RejectProblem:invoke-mistypedArgument) -- ANY OPTIONAL +} +OperationCode ::= INTEGER + +--(CONSTRAINED BY { - - must conform to the above definition - -} ! +-- RejectProblem:general-mistypedPDU) +--(WITH COMPONENTS { +-- ..., +-- linkedId ABSENT +-- } | +-- WITH COMPONENTS { +-- ..., +-- linkedId PRESENT, +-- opcode (CONSTRAINED BY { - - must be in the &Linked field of the associated operation - - +-- } !RejectProblem:invoke-unexpectedLinkedOperation) +-- }) + +-- continued on the next page +ReturnResult --{OPERATION:Operations}-- ::= SEQUENCE { + invokeId + InvokeId +-- (CONSTRAINED BY { - - must be that for an outstanding operation - -} ! +-- RejectProblem:returnResult-unrecognizedInvocation) +-- (CONSTRAINED BY { - - which returns a result - -} ! +-- RejectProblem:returnResult-resultResponseUnexpected)--, + result + SEQUENCE {opcode OperationCode +-- OPERATION.&operationCode({Operations}) +-- (CONSTRAINED BY { - - identified by invokeId - -} ! +-- RejectProblem:returnResult-unrecognizedInvocation)--, + result ANY +-- OPERATION.&ResultType +-- ({Operations}{@.opcode} ! +-- RejectProblem:returnResult-mistypedResult) -- } OPTIONAL +} +--(CONSTRAINED BY { - - must conform to the above definition - -} ! +-- RejectProblem:general-mistypedPDU) + +ReturnError --{ERROR:Errors}-- ::= SEQUENCE { + invokeId + InvokeId +-- (CONSTRAINED BY { - - must be that for an outstanding operation - -} ! +-- RejectProblem:returnError-unrecognizedInvocation) +-- (CONSTRAINED BY { - - which returns an error - -} ! +-- RejectProblem:returnError-errorResponseUnexpected) --, + errcode ErrorCode +-- ERROR.&errorCode({Errors} !RejectProblem:returnError-unrecognizedError) +-- (CONSTRAINED BY { - - must be in the &Errors field of the associated operation - - +-- } !RejectProblem:returnError-unexpectedError)--, + parameter ANY +-- ERROR.&ParameterType +-- ({Errors}{@errcode} !RejectProblem:returnError-mistypedParameter) + OPTIONAL +} +--(CONSTRAINED BY { - - must conform to the above definition - -} ! +-- RejectProblem:general-mistypedPDU) + +ErrorCode ::= INTEGER + +Reject ::= SEQUENCE { + invokeId InvokeId, + problem + CHOICE {general [0] GeneralProblem, + invoke [1] InvokeProblem, + returnResult [2] ReturnResultProblem, + returnError [3] ReturnErrorProblem} +} +--(CONSTRAINED BY { - - must conform to the above definition - -} ! +-- RejectProblem:general-mistypedPDU) + +GeneralProblem ::= INTEGER { + unrecognizedPDU(0), mistypedPDU(1), badlyStructuredPDU(2)} + +-- continued on the next page +InvokeProblem ::= INTEGER { + duplicateInvocation(0), unrecognizedOperation(1), mistypedArgument(2), + resourceLimitation(3), releaseInProgress(4), unrecognizedLinkedId(5), + linkedResponseUnexpected(6), unexpectedLinkedOperation(7)} + +ReturnResultProblem ::= INTEGER { + unrecognizedInvocation(0), resultResponseUnexpected(1), mistypedResult(2) +} + +ReturnErrorProblem ::= INTEGER { + unrecognizedInvocation(0), errorResponseUnexpected(1), unrecognizedError(2), + unexpectedError(3), mistypedParameter(4)} + +--RejectProblem ::= INTEGER { +-- general-unrecognizedPDU(0), general-mistypedPDU(1), +-- general-badlyStructuredPDU(2), invoke-duplicateInvocation(10), +-- invoke-unrecognizedOperation(11), invoke-mistypedArgument(12), +-- invoke-resourceLimitation(13), invoke-releaseInProgress(14), +-- invoke-unrecognizedLinkedId(15), invoke-linkedResponseUnexpected(16), +-- invoke-unexpectedLinkedOperation(17), +-- returnResult-unrecognizedInvocation(20), +-- returnResult-resultResponseUnexpected(21), returnResult-mistypedResult(22), +-- returnError-unrecognizedInvocation(30), +-- returnError-errorResponseUnexpected(31), returnError-unrecognizedError(32), +-- returnError-unexpectedError(33), returnError-mistypedParameter(34)} + +InvokeId ::= CHOICE {present INTEGER, + absent NULL +} + +--noInvokeId InvokeId ::= absent:NULL + +--NoInvokeId InvokeId ::= {noInvokeId} + +--Errors{OPERATION:Operations} ERROR ::= {Operations.&Errors} + +-- continued on the next page +--Bind{OPERATION:operation} ::= CHOICE { +-- bind-invoke [16] OPERATION.&ArgumentType({operation}), +-- bind-result [17] OPERATION.&ResultType({operation}), +-- bind-error [18] OPERATION.&Errors.&ParameterType({operation}) +--} + +--Unbind{OPERATION:operation} ::= CHOICE { +-- unbind-invoke [19] OPERATION.&ArgumentType({operation}), +-- unbind-result [20] OPERATION.&ResultType({operation}), +-- unbind-error [21] OPERATION.&Errors.&ParameterType({operation}) +--} + + +--Code ::= CHOICE { +-- local INTEGER, +-- global OBJECT IDENTIFIER +--} + +--Priority ::= INTEGER + +END -- end of generic ROS PDU definitions + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D diff --git a/epan/dissectors/asn1/ros/ros.cnf b/epan/dissectors/asn1/ros/ros.cnf new file mode 100644 index 0000000000..8511a8e20b --- /dev/null +++ b/epan/dissectors/asn1/ros/ros.cnf @@ -0,0 +1,207 @@ +#.EXPORTS +OPERATION +ERROR +OPERATION-PACKAGE +CONTRACT +InvokeId +Code +ROS + +#.OMIT_ASSIGNMENT +Priority +#.END + +#.TYPE_RENAME +ReturnResult/result/result OperationResult + +#.FIELD_RENAME +Reject/problem/invoke invokeProblem +ReturnResult/result/result operationResult +Reject/problem/returnError rejectError +Reject/problem/returnResult rejectResult + +#.FN_PARS OperationCode VAL_PTR = &opcode + +#.FN_PARS ErrorCode VAL_PTR = &opcode + +#.FN_PARS InvokeId/present VAL_PTR = &invokeid + +#.FN_BODY Invoke/argument + char *oid; + proto_tree* subtree; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_ros_invoke_argument, NULL, "invoke argument"); + + ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, TRUE); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT); + /* now add the opcode */ + session->ros_op |= opcode; + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + +#.FN_BODY ReturnResult/result/result + char *oid; + proto_tree* subtree; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + subtree = proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_return_result, NULL, "return result"); + + ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, FALSE); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_INVOKE | ROS_OP_RESULT); + /* now add the opcode */ + session->ros_op |= opcode; + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + +#.FN_BODY ReturnError/parameter + char *oid; + proto_tree* subtree; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + subtree = proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_return_result, NULL, "return result"); + + ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, FALSE); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_INVOKE | ROS_OP_ERROR); + /* now add the opcode (really the error code) */ + session->ros_op |= opcode; + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + +#.FN_BODY ROS/bind-invoke + char *oid; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_result, NULL, "bind-invoke"); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT); + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + +#.FN_BODY ROS/bind-result + char *oid; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_result, NULL, "bind-result"); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT); + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + +#.FN_BODY ROS/bind-error + char *oid; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_error, NULL, "bind-error"); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_BIND | ROS_OP_ERROR); + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + + +#.FN_BODY ROS/unbind-invoke + char *oid; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_invoke, NULL, "unbind-invoke"); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_UNBIND | ROS_OP_ARGUMENT); + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + + +#.FN_BODY ROS/unbind-result + char *oid; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_result, NULL, "unbind-result"); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_UNBIND | ROS_OP_RESULT); + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + +#.FN_BODY ROS/unbind-error + char *oid; + struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data; + + /* not sure what the length should be - -1 for now */ + proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_error, NULL, "unbind-error"); + + if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) { + /* this should be ROS! */ + session->ros_op = (ROS_OP_UNBIND | ROS_OP_ERROR); + offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session); + } + +#.FN_BODY ROS/reject + col_set_str(actx->pinfo->cinfo, COL_INFO, "Reject"); + %(DEFAULT_BODY)s + +#.FN_PARS GeneralProblem + VAL_PTR = &problem + +#.FN_BODY GeneralProblem + guint32 problem; + + %(DEFAULT_BODY)s + + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_GeneralProblem_vals, "GeneralProblem(%%d)")); + +#.FN_PARS InvokeProblem + VAL_PTR = &problem + +#.FN_BODY InvokeProblem + guint32 problem; + + %(DEFAULT_BODY)s + + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_InvokeProblem_vals, "InvokeProblem(%%d)")); + +#.FN_PARS ReturnResultProblem + VAL_PTR = &problem + +#.FN_BODY ReturnResultProblem + guint32 problem; + + %(DEFAULT_BODY)s + + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnResultProblem_vals, "ReturnResultProblem(%%d)")); + +#.FN_PARS ReturnErrorProblem + VAL_PTR = &problem + +#.FN_BODY ReturnErrorProblem + guint32 problem; + + %(DEFAULT_BODY)s + + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnErrorProblem_vals, "ReturnErrorProblem(%%d)")); + +#.END |