diff options
Diffstat (limited to 'asn1/q932')
-rw-r--r-- | asn1/q932/Facility-Information-Element-Components.asn | 165 | ||||
-rw-r--r-- | asn1/q932/Makefile | 5 | ||||
-rw-r--r-- | asn1/q932/Makefile.nmake | 5 | ||||
-rw-r--r-- | asn1/q932/packet-q932-ros-template.c | 2 | ||||
-rw-r--r-- | asn1/q932/q932-ros.asn | 112 | ||||
-rw-r--r-- | asn1/q932/q932-ros.cnf | 2 |
6 files changed, 173 insertions, 118 deletions
diff --git a/asn1/q932/Facility-Information-Element-Components.asn b/asn1/q932/Facility-Information-Element-Components.asn new file mode 100644 index 0000000000..b05a26e4b5 --- /dev/null +++ b/asn1/q932/Facility-Information-Element-Components.asn @@ -0,0 +1,165 @@ +-- Facility-Information-Element-Components.asn +-- +-- Taken from ITU ASN.1 database +-- http://www.itu.int/ITU-T/asn1/database/itu-t/q/q932/1998-Amd1/Facility-Information-Element-Components.asn +-- +-- $Id$ +-- + +-- Module Facility-Information-Element-Components (Q.932:05/1998) +Facility-Information-Element-Components {itu-t recommendation q 932 + facility-information-element-component(3)} 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) + }) + +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} ! + 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 { + unrecognizedComponent(0), mistypedComponent(1), badlyStructuredComponent(2) +} + +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} + +-- the Range of the Invoke-Id's must be restricted to -32768..32767 +Components{OPERATION:Invokable, OPERATION:Returnable} ::= CHOICE { + gfpROS ROS{{GFPInvokeIDSet}, {Invokable}, {Returnable}} +} + +GFPInvokeIDSet ::= InvokeId(WITH COMPONENTS { + present (-32768..32767) + }) + +END -- end of generic ROS PDU definitions + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/asn1/q932/Makefile b/asn1/q932/Makefile index 9a8aa75dec..135050ac3a 100644 --- a/asn1/q932/Makefile +++ b/asn1/q932/Makefile @@ -5,6 +5,7 @@ Q932_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h Q932_ROS_FILES=packet-$(PROTOCOL_NAME)-ros.c packet-$(PROTOCOL_NAME)-ros.h DISSECTOR_FILES=$(Q932_FILES) $(Q932_ROS_FILES) Q932_ASN=Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn +Q932_ROS_ASN=../ros/Remote-Operations-Information-Objects.asn Facility-Information-Element-Components.asn all: generate_dissector @@ -13,8 +14,8 @@ generate_dissector: $(DISSECTOR_FILES) $(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf python ../../tools/asn2wrs.py -b -T -X -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(Q932_ASN) -$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf - python ../../tools/asn2wrs.py -b -T -X -e -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(PROTOCOL_NAME)-ros.asn +$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(Q932_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf + python ../../tools/asn2wrs.py -b -T -X -e -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(Q932_ROS_ASN) clean: rm -f parsetab.py $(DISSECTOR_FILES) diff --git a/asn1/q932/Makefile.nmake b/asn1/q932/Makefile.nmake index fc678b0af9..02868121fb 100644 --- a/asn1/q932/Makefile.nmake +++ b/asn1/q932/Makefile.nmake @@ -11,6 +11,7 @@ Q932_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h Q932_ROS_FILES=packet-$(PROTOCOL_NAME)-ros.c packet-$(PROTOCOL_NAME)-ros.h DISSECTOR_FILES=$(Q932_FILES) $(Q932_ROS_FILES) Q932_ASN=Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn +Q932_ROS_ASN=../ros/Remote-Operations-Information-Objects.asn Facility-Information-Element-Components.asn all: generate_dissector @@ -24,9 +25,9 @@ $(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-templa @exit 1 !ENDIF -$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf +$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(Q932_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf !IFDEF PYTHON - $(PYTHON) "../../tools/asn2wrs.py" -b -T -X -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(PROTOCOL_NAME)-ros.asn + $(PYTHON) "../../tools/asn2wrs.py" -b -T -X -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(Q932_ROS_ASN) !ELSE @echo Error: You need Python to use asn2wrs.py @exit 1 diff --git a/asn1/q932/packet-q932-ros-template.c b/asn1/q932/packet-q932-ros-template.c index e038008374..944b97fdc0 100644 --- a/asn1/q932/packet-q932-ros-template.c +++ b/asn1/q932/packet-q932-ros-template.c @@ -71,7 +71,7 @@ static tvbuff_t *arg_next_tvb, *res_next_tvb, *err_next_tvb; int dissect_rose_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rose_context *rctx) { if (rctx) rose_ctx = rctx; - return dissect_RoseAPDU_PDU(tvb, pinfo, tree); + return dissect_ROS_PDU(tvb, pinfo, tree); } /*--- proto_register_rose ---------------------------------------------------*/ diff --git a/asn1/q932/q932-ros.asn b/asn1/q932/q932-ros.asn deleted file mode 100644 index 1f2d6e177b..0000000000 --- a/asn1/q932/q932-ros.asn +++ /dev/null @@ -1,112 +0,0 @@ --- Module Facility-Information-Element-Components (Q.932:05/1998) -Facility-Information-Element-Components {itu-t recommendation q 932 - facility-information-element-component(3)} DEFINITIONS IMPLICIT TAGS ::= -BEGIN - -Code ::= CHOICE { - local INTEGER, - global OBJECT IDENTIFIER -} - -RoseAPDU ::= CHOICE { - invoke [1] Invoke, - returnResult [2] ReturnResult, - returnError [3] ReturnError, - reject [4] Reject -} - -Invoke ::= SEQUENCE { - invokeId InvokeId, - linkedId CHOICE { - present [0] IMPLICIT InvokeId, - absent [1] IMPLICIT NULL - } OPTIONAL, - opcode Code, - argument ANY OPTIONAL -} - -ReturnResult ::= SEQUENCE { - invokeId InvokeId, - result SEQUENCE { - opcode Code, - result ANY OPTIONAL - } -} - -ReturnError ::= SEQUENCE { - invokeId InvokeId, - errcode Code, - parameter ANY OPTIONAL -} - -Reject ::= SEQUENCE { - invokeId InvokeId, - problem CHOICE { - general [0] GeneralProblem, - invoke [1] InvokeProblem, - returnResult [2] ReturnResultProblem, - returnError [3] ReturnErrorProblem - } -} - -GeneralProblem ::= INTEGER { - unrecognizedComponent(0), - mistypedComponent(1), - badlyStructuredComponent(2) -} - -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 -} - -END -- end of generic ROS PDU definitions - - diff --git a/asn1/q932/q932-ros.cnf b/asn1/q932/q932-ros.cnf index 8053a1ea08..600a7427d2 100644 --- a/asn1/q932/q932-ros.cnf +++ b/asn1/q932/q932-ros.cnf @@ -1,7 +1,7 @@ #.PDU_NEW -RoseAPDU +ROS #.TYPE_RENAME |