diff --git a/Makefile.am b/Makefile.am index 397a51c9fd..c95acfdb2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1122,7 +1122,6 @@ endif DIST_SUBDIRS = \ - asn1 \ capchild \ caputils \ codecs \ diff --git a/asn1/CMakeLists.txt b/asn1/CMakeLists.txt index 216c22a4ab..821af65893 100644 --- a/asn1/CMakeLists.txt +++ b/asn1/CMakeLists.txt @@ -44,7 +44,6 @@ set(ASN1_SRC_DIRS dsp ess ftam - gnm goose gprscdr gsm_map diff --git a/asn1/Makefile.am b/asn1/Makefile.am index e9a86936ac..3990709e32 100644 --- a/asn1/Makefile.am +++ b/asn1/Makefile.am @@ -45,7 +45,6 @@ SUBDIRS = \ dsp \ ess \ ftam \ - gnm \ goose \ gprscdr \ gsm_map \ diff --git a/asn1/gnm/ASN1DefinedTypesModule.asn b/asn1/gnm/ASN1DefinedTypesModule.asn deleted file mode 100644 index a6bb646aa6..0000000000 --- a/asn1/gnm/ASN1DefinedTypesModule.asn +++ /dev/null @@ -1,975 +0,0 @@ --- Module ASN1DefinedTypesModule (M.3100:04/2005) --- 8 ASN.1 modules --- --- 8.1 ASN1DefinedTypesModule -ASN1DefinedTypesModule {itu-t recommendation m gnm(3100) informationModel(0) - asn1Modules(2) asn1DefinedTypesModule(0)} DEFINITIONS IMPLICIT TAGS ::= -BEGIN - --- EXPORTS everything -IMPORTS - -- Note: RDNSequence, formerly imported - -- from X.501 InformationFramework, is imported from X.711 CMIP. - RDNSequence, ObjectInstance, ObjectClass - FROM CMIP-1 {joint-iso-itu-t ms(9) cmip(1) modules(0) protocol(3)} - MappingList, SignalRate - FROM M3100ASN1TypeModule2 {itu-t recommendation m gnm(3100) - informationModel(0) asn1Modules(2) asn1Module2(1)} - ProbableCause, AdministrativeState, AvailabilityStatus, AttributeList, - AdditionalInformation - FROM Attribute-ASN1Module {joint-iso-itu-t ms(9) smi(3) part2(2) - asn1Module(2) 1}; - -m3100InformationModel OBJECT IDENTIFIER ::= - {itu-t recommendation m gnm(3100) informationModel(0)} - -m3100standardSpecificExtension OBJECT IDENTIFIER ::= - {m3100InformationModel standardSpecificExtension(0)} - -m3100ObjectClass OBJECT IDENTIFIER ::= - {m3100InformationModel managedObjectClass(3)} - -m3100Package OBJECT IDENTIFIER ::= {m3100InformationModel package(4)} - -m3100Parameter OBJECT IDENTIFIER ::= {m3100InformationModel parameter(5)} - -m3100Attribute OBJECT IDENTIFIER ::= {m3100InformationModel attribute(7)} - -m3100NameBinding OBJECT IDENTIFIER ::= {m3100InformationModel nameBinding(6)} - -m3100Action OBJECT IDENTIFIER ::= {m3100InformationModel action(9)} - -m3100Notification OBJECT IDENTIFIER ::= - {m3100InformationModel notification(10)} - --- Reserved arcs below m3100InformationModel are (8) for attribute groups -characteristicInfo OBJECT IDENTIFIER ::= - {m3100standardSpecificExtension 0} - -opticalSTM1SPICI CharacteristicInformation ::= {characteristicInfo 1} - --- opticalSPITTP* object instances with stmLevel attribute = 1 -opticalSTM4SPICI CharacteristicInformation ::= - {characteristicInfo 2} - --- opticalSPITTP* object instances with stmLevel attribute = 4 -opticalSTM16SPICI CharacteristicInformation ::= - {characteristicInfo 3} - --- opticalSPITTP* object instances with stmLevel attribute = 16 -electricalSTM1SPICI CharacteristicInformation ::= - {characteristicInfo 4} - --- electricalSPITTP* object instances with stmLevel attribute = 1 -rsSTM1SPICI CharacteristicInformation ::= - {characteristicInfo 5} - --- rsCTP* object instances with stmLevel attribute = 1 -rsSTM4SPICI CharacteristicInformation ::= - {characteristicInfo 6} - --- rsCTP* object instances with stmLevel attribute = 4 -rsSTM16SPICI CharacteristicInformation ::= - {characteristicInfo 7} - --- rsCTP* object instances with stmLevel attribute = 16 -msSTM1SPICI CharacteristicInformation ::= - {characteristicInfo 8} - --- msCTP* object instances with stmLevel attribute = 1 -msSTM4SPICI CharacteristicInformation ::= - {characteristicInfo 9} - --- msCTP* object instances with stmLevel attribute = 4 -msSTM16SPICI CharacteristicInformation ::= - {characteristicInfo 10} - --- msCTP* object instances with stmLevel attribute = 16 -au3TU3VC3CI CharacteristicInformation ::= - {characteristicInfo 11} - -au4VC4CI CharacteristicInformation ::= {characteristicInfo 12} - -tu11VC11CI CharacteristicInformation ::= {characteristicInfo 13} - -tu12VC12CI CharacteristicInformation ::= {characteristicInfo 14} - -tu2VC2CI CharacteristicInformation ::= {characteristicInfo 15} - -tu12VC11CI CharacteristicInformation ::= {characteristicInfo 16} - -vpCI CharacteristicInformation ::= {characteristicInfo 17} - -vcCI CharacteristicInformation ::= {characteristicInfo 18} - -e0CI CharacteristicInformation ::= {characteristicInfo 19} - -e1CI CharacteristicInformation ::= {characteristicInfo 20} - -e2CI CharacteristicInformation ::= {characteristicInfo 21} - -e3CI CharacteristicInformation ::= {characteristicInfo 22} - -e4CI CharacteristicInformation ::= {characteristicInfo 23} - -e5-565M CharacteristicInformation ::= {characteristicInfo 24} - -sts3c-and-VC4-1c CharacteristicInformation ::= {characteristicInfo 25} - -sts12c-and-VC4-4c CharacteristicInformation ::= {characteristicInfo 26} - -sts48c-and-VC4-16c CharacteristicInformation ::= {characteristicInfo 27} - -sts192c-and-VC4-64c CharacteristicInformation ::= {characteristicInfo 28} - -section-OC1-STS1-and-RS-STM0 CharacteristicInformation ::= - {characteristicInfo 29} - -section-OC192-STS192-and-RS-STM64 CharacteristicInformation ::= - {characteristicInfo 30} - -line-OC1-STS1-and-MS-STM0 CharacteristicInformation ::= - {characteristicInfo 31} - -line-OC192-STS192-and-MS-STM64 CharacteristicInformation ::= - {characteristicInfo 32} - -fc-12-133M CharacteristicInformation ::= {characteristicInfo 33} - --- Fiber Channel protocol -fc-25-266M CharacteristicInformation ::= - {characteristicInfo 34} - --- Fiber Channel protocol -fc-50-531M CharacteristicInformation ::= - {characteristicInfo 35} - --- Fiber Channel protocol -fc-100-1063M CharacteristicInformation ::= - {characteristicInfo 36} - --- Fiber Channel protocol -fddi CharacteristicInformation ::= - {characteristicInfo 37} - -fast-Ethernet CharacteristicInformation ::= {characteristicInfo 38} - -gigabit-Ethernet CharacteristicInformation ::= {characteristicInfo 39} - -isdn-BRI CharacteristicInformation ::= {characteristicInfo 40} - --- ISDN Basic Rate Interface PTP layer rate -dsr-OC192-and-STM64 CharacteristicInformation ::= - {characteristicInfo 41} - -dsr-OC768-and-STM256 CharacteristicInformation ::= {characteristicInfo 42} - -section-OC24-STS24-and-RS-STM8 CharacteristicInformation ::= - {characteristicInfo 43} - -line-OC24-STS24-and-MS-STM8 CharacteristicInformation ::= - {characteristicInfo 44} - -section-OC768-STS768-and-RS-STM256 CharacteristicInformation ::= - {characteristicInfo 45} - -line-OC768-STS768-and-MS-STM256 CharacteristicInformation ::= - {characteristicInfo 46} - -tenGigabit-Ethernet CharacteristicInformation ::= {characteristicInfo 47} - --- The following value assignments are for the Probable Cause when Integer Choice is used within the --- TMN application context. These values shall always be assigned by this Recommendation in the context --- of TMN. -indeterminate ProbableCause ::= - localValue:0 - --- The following are used with communications alarm. -aIS ProbableCause ::= - localValue:1 - -callSetUpFailure ProbableCause ::= localValue:2 - -degradedSignal ProbableCause ::= localValue:3 - -farEndReceiverFailure ProbableCause ::= localValue:4 - -framingError ProbableCause ::= localValue:5 - -lossOfFrame ProbableCause ::= localValue:6 - -lossOfPointer ProbableCause ::= localValue:7 - -lossOfSignal ProbableCause ::= localValue:8 - -payloadTypeMismatch ProbableCause ::= localValue:9 - -transmissionError ProbableCause ::= localValue:10 - -remoteAlarmInterface ProbableCause ::= localValue:11 - -excessiveBER ProbableCause ::= localValue:12 - -pathTraceMismatch ProbableCause ::= localValue:13 - -unavailable ProbableCause ::= localValue:14 - -signalLabelMismatch ProbableCause ::= localValue:15 - -lossOfMultiFrame ProbableCause ::= localValue:16 - -receiveFailure ProbableCause ::= localValue:17 - -transmitFailure ProbableCause ::= localValue:18 - -modulationFailure ProbableCause ::= localValue:19 - -demodulationFailure ProbableCause ::= localValue:20 - -broadcastChannelFailure ProbableCause ::= localValue:21 - -connectionEstablishmentError ProbableCause ::= localValue:22 - -invalidMessageReceived ProbableCause ::= localValue:23 - -localNodeTransmissionError ProbableCause ::= localValue:24 - -remoteNodeTransmissionError ProbableCause ::= localValue:25 - -routingFailure ProbableCause ::= localValue:26 - --- Values 27-50 are reserved for communications alarm related probable causes --- The following are used with equipment alarm. -backplaneFailure ProbableCause ::= - localValue:51 - -dataSetProblem ProbableCause ::= localValue:52 - -equipmentIdentifierDuplication ProbableCause ::= localValue:53 - -externalIFDeviceProblem ProbableCause ::= localValue:54 - -lineCardProblem ProbableCause ::= localValue:55 - -multiplexerProblem ProbableCause ::= localValue:56 - -nEIdentifierDuplication ProbableCause ::= localValue:57 - -powerProblem ProbableCause ::= localValue:58 - -processorProblem ProbableCause ::= localValue:59 - -protectionPathFailure ProbableCause ::= localValue:60 - -receiverFailure ProbableCause ::= localValue:61 - -replaceableUnitMissing ProbableCause ::= localValue:62 - -replaceableUnitTypeMismatch ProbableCause ::= localValue:63 - -synchronizationSourceMismatch ProbableCause ::= localValue:64 - -terminalProblem ProbableCause ::= localValue:65 - -timingProblem ProbableCause ::= localValue:66 - -transmitterFailure ProbableCause ::= localValue:67 - -trunkCardProblem ProbableCause ::= localValue:68 - -replaceableUnitProblem ProbableCause ::= localValue:69 - -realTimeClockFailure ProbableCause ::= localValue:70 - --- An equipment alarm to be issued if the system detects that the real time clock has failed. -antennaFailure ProbableCause ::= - localValue:71 - -batteryChargingFailure ProbableCause ::= localValue:72 - -diskFailure ProbableCause ::= localValue:73 - -frequencyHoppingFailure ProbableCause ::= localValue:74 - -iODeviceError ProbableCause ::= localValue:75 - -lossOfSynchronisation ProbableCause ::= localValue:76 - -lossOfRedundancy ProbableCause ::= localValue:77 - -powerSupplyFailure ProbableCause ::= localValue:78 - -signalQualityEvaluationFailure ProbableCause ::= localValue:79 - -tranceiverFailure ProbableCause ::= localValue:80 - -protectionMechanismFailure ProbableCause ::= localValue:81 - -protectingResourceFailure ProbableCause ::= localValue:82 - --- Values 83-100 are reserved for equipment alarm related probable causes --- The following are used with environmental alarm. -airCompressorFailure ProbableCause ::= - localValue:101 - -airConditioningFailure ProbableCause ::= localValue:102 - -airDryerFailure ProbableCause ::= localValue:103 - -batteryDischarging ProbableCause ::= localValue:104 - -batteryFailure ProbableCause ::= localValue:105 - -commercialPowerFailure ProbableCause ::= localValue:106 - -coolingFanFailure ProbableCause ::= localValue:107 - -engineFailure ProbableCause ::= localValue:108 - -fireDetectorFailure ProbableCause ::= localValue:109 - -fuseFailure ProbableCause ::= localValue:110 - -generatorFailure ProbableCause ::= localValue:111 - -lowBatteryThreshold ProbableCause ::= localValue:112 - -pumpFailure ProbableCause ::= localValue:113 - -rectifierFailure ProbableCause ::= localValue:114 - -rectifierHighVoltage ProbableCause ::= localValue:115 - -rectifierLowFVoltage ProbableCause ::= localValue:116 - -ventilationsSystemFailure ProbableCause ::= localValue:117 - -enclosureDoorOpen ProbableCause ::= localValue:118 - -explosiveGas ProbableCause ::= localValue:119 - -fire ProbableCause ::= localValue:120 - -flood ProbableCause ::= localValue:121 - -highHumidity ProbableCause ::= localValue:122 - -highTemperature ProbableCause ::= localValue:123 - -highWind ProbableCause ::= localValue:124 - -iceBuildUp ProbableCause ::= localValue:125 - -intrusionDetection ProbableCause ::= localValue:126 - -lowFuel ProbableCause ::= localValue:127 - -lowHumidity ProbableCause ::= localValue:128 - -lowCablePressure ProbableCause ::= localValue:129 - -lowTemperature ProbableCause ::= localValue:130 - -lowWater ProbableCause ::= localValue:131 - -smoke ProbableCause ::= localValue:132 - -toxicGas ProbableCause ::= localValue:133 - -coolingSystemFailure ProbableCause ::= localValue:134 - -externalEquipmentFailure ProbableCause ::= localValue:135 - -externalPointFailure ProbableCause ::= localValue:136 - --- Values 137-150 are reserved for environmental alarm related probable causes --- The following are used with Processing error alarm. -storageCapacityProblem ProbableCause ::= - localValue:151 - -memoryMismatch ProbableCause ::= localValue:152 - -corruptData ProbableCause ::= localValue:153 - -outOfCPUCycles ProbableCause ::= localValue:154 - -sfwrEnvironmentProblem ProbableCause ::= localValue:155 - -sfwrDownloadFailure ProbableCause ::= localValue:156 - -lossOfRealTime ProbableCause ::= localValue:157 - --- A processing error alarm to be issued if the system detects that it has lost the time in --- the real time clock but the clock itself is working. This could happen e.g. during a power --- cut in a small NE which does not have battery backup for the real time clock. -reinitialized ProbableCause ::= - localValue:158 - --- A processing error alarm to be issued after the system has reinitialised. This will indicate --- to the management systems that the view they have of the managed system may no longer --- be valid. Usage example: The managed --- system issues this alarm after a reinitialization with severity warning to inform the --- management system about the event. No clearing notification will be sent. -applicationSubsystemFailure ProbableCause ::= - localValue:159 - -configurationOrCustomisationError ProbableCause ::= localValue:160 - -databaseInconsistency ProbableCause ::= localValue:161 - -fileError ProbableCause ::= localValue:162 - -outOfMemory ProbableCause ::= localValue:163 - -softwareError ProbableCause ::= localValue:164 - -timeoutExpired ProbableCause ::= localValue:165 - -underlayingResourceUnavailable ProbableCause ::= localValue:166 - -versionMismatch ProbableCause ::= localValue:167 - --- Values 168-200 are reserved for processing error alarm related probable causes. -bandwidthReduced ProbableCause ::= - localValue:201 - -congestion ProbableCause ::= localValue:202 - -excessiveErrorRate ProbableCause ::= localValue:203 - -excessiveResponseTime ProbableCause ::= localValue:204 - -excessiveRetransmissionRate ProbableCause ::= localValue:205 - -reducedLoggingCapability ProbableCause ::= localValue:206 - -systemResourcesOverload ProbableCause ::= localValue:207 - -AcceptableCircuitPackTypeList ::= SET OF PrintableString - -AddedTps ::= SEQUENCE { - gtp ObjectInstance, - tpsAdded SEQUENCE OF ObjectInstance -} - -AddLeg ::= SEQUENCE { - mpCrossConnection ObjectInstance, - legs SET OF ToTermSpecifier -} - -AddTpsToGtpInformation ::= - SEQUENCE OF - SEQUENCE {tpsAdded SEQUENCE OF TerminationPointInformation, - gtp ObjectInstance OPTIONAL} - -AddTpsToGtpResult ::= - SEQUENCE OF CHOICE {failed [0] Failed, - addedTps [1] AddedTps} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "AddTpsToGtpInformation" type. -AddTpsToTpPoolInformation ::= - SEQUENCE OF - SEQUENCE {tps SET OF TerminationPointInformation, - toTpPool ObjectInstance OPTIONAL} - -AddTpsToTpPoolResult ::= - SEQUENCE OF - CHOICE {failed [0] Failed, - tpsAddedToTpPool [1] TpsAddedToTpPool} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "AddTPsToTpPoolInformation" type. -AlarmEffectOnServiceParameter ::= BOOLEAN -- TRUE implies service is affected - -AlarmSeverityAssignment ::= SEQUENCE { - problem ProbableCause, - severityAssignedServiceAffecting [0] AlarmSeverityCode OPTIONAL, - severityAssignedNonServiceAffecting [1] AlarmSeverityCode OPTIONAL, - severityAssignedServiceIndependent [2] AlarmSeverityCode OPTIONAL -} - -AlarmSeverityAssignmentList ::= SET OF AlarmSeverityAssignment - -AlarmSeverityCode ::= ENUMERATED { - non-alarmed(0), minor(1), major(2), critical(3), warning(4)} - -AlarmStatus ::= ENUMERATED { - cleared(0), activeReportable-Indeterminate(1), activeReportable-Warning(2), - activeReportable-Minor(3), activeReportable-Major(4), - activeReportable-Critical(5), activePending(6)} - -Boolean ::= BOOLEAN - -Bundle ::= SEQUENCE { - characteristicInfoType CharacteristicInformation, - bundlingFactor INTEGER -} - -ChannelNumber ::= INTEGER - -CharacteristicInformation ::= OBJECT IDENTIFIER - -CircuitDirectionality ::= ENUMERATED {onewayOut(0), onewayIn(1), twoway(2)} - -CircuitPackAvailabilityStatus ::= - AvailabilityStatus(WITH COMPONENT (notInstalled)) - -CircuitPackType ::= PrintableString - -Connected ::= CHOICE { - pointToPoint [0] PointToPoint, - pointToMultipoint [1] PointToMultipoint -} - -ConnectInformation ::= - SEQUENCE OF - SEQUENCE {itemType - CHOICE {unidirectional [0] ConnectionType, - bidirectional [1] ConnectionTypeBi, - addleg [2] AddLeg}, - administrativeState AdministrativeState OPTIONAL, - namedCrossConnection [3] NamedCrossConnection OPTIONAL, - ..., - userLabel [4] UserLabel OPTIONAL, - redline [5] Boolean OPTIONAL, - ..., - additionalInfo [6] AdditionalInformation OPTIONAL - } - -ConnectorType ::= INTEGER - --- currently defined values for ConnectorType are -fcConnectorType ConnectorType ::= - 1 -- Fibre Connector - -lcConnectorType ConnectorType ::= 2 -- Lucent connector - -scConnectorType ConnectorType ::= 3 -- Subscriber Connector - -ConnectivityPointer ::= CHOICE { - none NULL, - single ObjectInstance, - concatenated SEQUENCE OF ObjectInstance -} - -ConnectResult ::= SEQUENCE OF CHOICE {failed Failed, - connected Connected} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "ConnectInformation" type. -ConnectionType ::= CHOICE { - explicitPToP [0] ExplicitPtoP, - ptoTpPool [1] PtoTPPool, - explicitPtoMP [2] ExplicitPtoMP, - ptoMPools [3] PtoMPools -} - -ConnectionTypeBi ::= CHOICE { - explicitPToP [0] ExplicitPtoP, - ptoTpPool [1] PtoTPPool -} - -Count ::= INTEGER - -CreateError ::= INTEGER - -CrossConnectionName ::= GraphicString - -CrossConnectionObjectPointer ::= CHOICE { - notConnected [0] ObjectInstance, -- Fabric object - connected [1] ObjectInstance, -- Cross-connection object - multipleConnections MultipleConnections -} - -CTPUpstreamPointer ::= - ConnectivityPointer - (WITH COMPONENTS { - ..., - - -- the other two choices are present - concatenated ABSENT - }) - -CTPDownstreamPointer ::= - DownstreamConnectivityPointer - (WITH COMPONENTS { - ..., - concatenated ABSENT, - broadcastConcatenated ABSENT - - -- other choices are present - }) - -CurrentProblem ::= SEQUENCE { - problem [0] ProbableCause, - alarmStatus [1] AlarmStatus -} - -CurrentProblemList ::= SET OF CurrentProblem - -Directionality ::= ENUMERATED {unidirectional(0), bidirectional(1)} - -DisconnectInformation ::= SEQUENCE OF ObjectInstance -- tps - -DisconnectResult ::= - SEQUENCE OF CHOICE {failed Failed, - disconnected ObjectInstance} -- tp - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "DisconnectInformation" type. -DownstreamConnectivityPointer ::= CHOICE { - none NULL, - single ObjectInstance, - concatenated SEQUENCE OF ObjectInstance, - broadcast SET OF ObjectInstance, - broadcastConcatenated [1] SET OF SEQUENCE OF ObjectInstance -} - -ExplicitPtoMP ::= SEQUENCE {fromTp ExplicitTP, - toTPs SET OF ExplicitTP -} - -ExplicitPtoP ::= SEQUENCE {fromTp ExplicitTP, - toTp ExplicitTP -} - -ExplicitTP ::= CHOICE { - oneTPorGTP ObjectInstance, - listofTPs SEQUENCE OF ObjectInstance -} - -ExternalTime ::= GeneralizedTime - -EquipmentHolderAddress ::= SEQUENCE OF PrintableString - -EquipmentHolderType ::= GraphicString - -Failed ::= CHOICE { - logicalProblem LogicalProblem, - resourceProblem ResourceProblem -} - -GeneralError ::= - SEQUENCE OF - SEQUENCE {cause GeneralErrorCause, - details GraphicString OPTIONAL, - relatedObjects [0] SET OF ObjectInstance OPTIONAL, - attributeList [1] AttributeList OPTIONAL} - -GeneralErrorCause ::= CHOICE { - globalValue OBJECT IDENTIFIER, - localValue INTEGER -} - -objectInIncompatibleState GeneralErrorCause ::= localValue:1 - -noValidRelatedObject GeneralErrorCause ::= localValue:2 - -involvedInOffering GeneralErrorCause ::= localValue:3 - -serviceNotSupported GeneralErrorCause ::= localValue:4 - -provisioningOrderConflict GeneralErrorCause ::= localValue:5 - -equipmentFailure GeneralErrorCause ::= localValue:6 - -maxNumberExceeded GeneralErrorCause ::= localValue:7 - -containedObjects GeneralErrorCause ::= localValue:8 - --- ObjectInIncompatibleState is used to specify that the object is in a state --- that does not allow the operation. Details of the state should be --- provided. --- NoValidRelatedObject is used to specify related objects that do not --- exist in the MIB. --- InvolvedInOffering is used to identify object(s) that are already --- involved in a conflicting service offering. --- ServiceNotSupported is used to indicate that the operation is --- attempting to initiate a service that is not supported by the --- equipment. --- ProvisioningOrderConflict is used to identify that a service is --- being provisioned in an order that is not supported by the equipment. --- EquipmentFailure is used to indicate that an equipment failure as --- occured during the operation. --- MaxNumberExceeded is used to indicate that requested create operation --- cannot be completed as the maximum number of instances are reached. --- ContainedObjects is used to indicate that requested delete operation --- cannot be completed as there are contained instances. -HolderStatus ::= CHOICE { - holderEmpty [0] NULL, - inTheAcceptableList [1] CircuitPackType, - notInTheAcceptableList [2] CircuitPackType, - unknownType [3] NULL -} - -IndividualSwitchOver ::= SEQUENCE { - connection ObjectInstance, - -- crossConnection of connectionProtection (defined in Recommendation G.774.04) - unchangedTP ObjectInstance, - newTP ObjectInstance - -- designates the newTP to which the unchanged TP has to be connected with -} - -IndividualResult ::= CHOICE {failed [0] Failed, - pass [1] Connected -} - -InformationTransferCapabilities ::= ENUMERATED { - speech(0), audio3pt1(1), audio7(2), audioComb(3), digitalRestricted56(4), - digitalUnrestricted64(5) - --- "..." these ellipses defined in ASN.1 amendment are used here to indicate that this is --- an extensible type and additional enumerations may be added in future --} - -ListOfCharacteristicInformation ::= SET OF CharacteristicInformation - -ListOfTPs ::= SET OF ObjectInstance - -LocationName ::= GraphicString - -LogicalProblem ::= SEQUENCE { - problemCause ProblemCause, - incorrectInstances SET OF ObjectInstance OPTIONAL -} - -MultipleConnections ::= - SET OF - CHOICE {downstreamNotConnected [0] ObjectInstance, - downstreamConnected [1] ObjectInstance, - upstreamNotConnected [2] ObjectInstance, - upstreamConnected [3] ObjectInstance} - -NamedCrossConnection ::= SEQUENCE { - redline BOOLEAN, - name CrossConnectionName -} - -NameType ::= CHOICE {numericName INTEGER, - pString GraphicString -} - -NumberOfCircuits ::= INTEGER - -ObjectList ::= SET OF ObjectInstance - -PhysicalPortSignalRateAndMappingList ::= CHOICE { - diverse - SEQUENCE {downstream SignalRateAndMappingList, - upStream SignalRateAndMappingList}, - uniform SignalRateAndMappingList -} - -Pointer ::= ObjectInstance - -PointerOrNull ::= CHOICE {pointer ObjectInstance, - null NULL -} - -PointToPoint ::= SEQUENCE { - fromTp ObjectInstance, - toTp ObjectInstance, - xCon ObjectInstance -} - -PointToMultipoint ::= SEQUENCE { - fromTp ObjectInstance, - toTps - SET OF SEQUENCE {tp ObjectInstance, - xConnection ObjectInstance}, - mpXCon ObjectInstance -} - -PortNumber ::= INTEGER - -ProblemCause ::= CHOICE {unknown NULL, - integerValue INTEGER -} - --- The values of integer value for ProblemCause and integerValue for ResourceProblem shall always be --- assigned by this Recommendation. No values of integerValue for ResourceProblem have been assigned. --- The following values are used for integerValue of ProblemCause. -noSuchTpInstance ProblemCause ::= - integerValue:0 - -noSuchGtpInstance ProblemCause ::= integerValue:1 - -noSuchTpPoolInstance ProblemCause ::= integerValue:2 - -mismatchingTpInstance ProblemCause ::= integerValue:3 - -mismatchingGtpInstance ProblemCause ::= integerValue:4 - -partOfGtp ProblemCause ::= integerValue:5 - -involvedInCrossConnection ProblemCause ::= integerValue:6 - -memberOfTpPool ProblemCause ::= integerValue:7 - -alreadyMemberOfGtp ProblemCause ::= integerValue:8 - -noTpInTpPool ProblemCause ::= integerValue:9 - -noMoreThanOneTpIsAllowed ProblemCause ::= integerValue:10 - -noMoreThanTwoTpsAreAllowed ProblemCause ::= integerValue:11 - -alreadyConnected ProblemCause ::= integerValue:12 - --- alreadyConnected is used to indicate the two termination points requested to be cross-connected are already --- cross-connected versus involvedInCrossConnection is used to indicate one or more termination points are --- cross-connected but not to each other. -notAlreadyConnected ProblemCause ::= - integerValue:13 - -notMulticastWithOnlyOneSubordinateLeg ProblemCause ::= integerValue:14 - -endpointsNotTheSame ProblemCause ::= integerValue:15 - -notUnidirectional ProblemCause ::= integerValue:16 - -notBidirectional ProblemCause ::= integerValue:17 - --- notMulticastWithOnlyOneSubordinateLeg is used with the convertMulticastToPtoP action --- endpointsNotTheSame is used in the joinXC action --- notUnidirectional is used in the convertPtoPtoMulticast action --- notBidirectional is used in the splitXC action -PtoMPools ::= SEQUENCE {fromTp ExplicitTP, - toTPPools ToTPPools -} - -PtoTPPool ::= SEQUENCE {fromTp ExplicitTP, - toTpPool ObjectInstance -} - -Reach ::= INTEGER - -RelatedObjectInstance ::= CHOICE { - notAvailable NULL, - relatedObject ObjectInstance -} - -RemoveTpsFromGtpInformation ::= - SEQUENCE OF SEQUENCE {fromGtp ObjectInstance, - tps SET OF ObjectInstance} - -RemoveTpsFromGtpResult ::= - SEQUENCE OF - CHOICE {failed [0] Failed, - removed [1] RemoveTpsResultInformation} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "RemoveTPsFromGtpInformation" type. -RemoveTpsFromTpPoolInformation ::= - SEQUENCE OF - SEQUENCE {fromTpPool ObjectInstance, - tps SET OF ObjectInstance} - -RemoveTpsFromTpPoolResult ::= - SEQUENCE OF - CHOICE {failed [0] Failed, - removed [1] RemoveTpsResultInformation} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "RemoveTPsFromTpPoolInformation" type. -RemoveTpsResultInformation ::= SEQUENCE { - deletedTpPoolOrGTP ObjectInstance OPTIONAL, - tps SET OF ObjectInstance -} - --- If the TP Pool or GTP is deleted, the deleted TP Pool or GTP should be provided in the --- RemoveTpsResultInformation -Replaceable ::= ENUMERATED {yes(0), no(1), notapplicable(2)} - -ResourceProblem ::= CHOICE {unknown NULL, - integerValue INTEGER -} - -SequenceOfObjectInstance ::= SEQUENCE OF ObjectInstance - -SerialNumber ::= GraphicString - -SignallingCapabilities ::= ENUMERATED { - isup(0), isup92(1), itu-tNo5(2), r2(3), itu-tNo6(4), tup(5) - --- "..." these ellipses defined in ASN.1 amendment are used here to indicate that this is --- an extensible type and additional enumerations may be added in future --} - -SignalRateAndMappingList ::= - SET OF - SEQUENCE {-- only one member in the case of TDM - signalRate SignalRate, - mappingList MappingList OPTIONAL, - wavelength WaveLength OPTIONAL} -- used for WDM - --- the SignalRateAndMappingList is a SET OF to accommodate --- multiple wavelengths on a single TTP -SignalType ::= CHOICE { - simple CharacteristicInformation, - bundle Bundle, - complex [0] SEQUENCE OF Bundle -} - -SubordinateCircuitPackSoftwareLoad ::= CHOICE { - notApplicable NULL, - softwareInstances [0] SEQUENCE OF ObjectInstance, - softwareIdentifiers [1] SEQUENCE OF PrintableString -} - -SupportableClientList ::= SET OF ObjectClass - -SystemTiming ::= SEQUENCE { - sourceType - ENUMERATED {internalTimingSource(0), remoteTimingSource(1), - slavedTimingTerminationSignal(2)}, - sourceID ObjectInstance OPTIONAL -} -- not needed for internal source - -SystemTimingSource ::= SEQUENCE { - primaryTimingSource SystemTiming, - secondaryTimingSource SystemTiming OPTIONAL -} - -SwitchOverInformation ::= SEQUENCE OF IndividualSwitchOver - -SwitchOverResult ::= SEQUENCE OF IndividualResult - -TerminationPointInformation ::= CHOICE { - tPOrGTP [0] ObjectInstance, - sourceTP [1] ObjectInstance, - sinkTP [2] ObjectInstance -} - -ToTermSpecifier ::= CHOICE { - toTpOrGTP [0] ExplicitTP, - toPool [1] ObjectInstance -} - -ToTPPools ::= - SET OF SEQUENCE {tpPoolId ObjectInstance, - numberOfTPs INTEGER} - -TpsAddedToTpPool ::= SEQUENCE { - tpPool ObjectInstance, - tps SET OF ObjectInstance -} - -TpsInGtpList ::= SEQUENCE OF ObjectInstance - -TransmissionCharacteristics ::= BIT STRING { - satellite(0), dCME(1), echoControl(2)} - -TypeText ::= GraphicString - -UserLabel ::= GraphicString - -VendorName ::= GraphicString - -Version ::= GraphicString - -WaveLength ::= INTEGER - -END -- end of ASN1 DefinedTypesModule - --- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D - diff --git a/asn1/gnm/CMakeLists.txt b/asn1/gnm/CMakeLists.txt deleted file mode 100644 index cc26b3cfae..0000000000 --- a/asn1/gnm/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -# CMakeLists.txt -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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 gnm ) - -set( PROTO_OPT ) - -set( EXT_ASN_FILE_LIST -) - -set( ASN_FILE_LIST - GNM.asn -) - -set( EXTRA_DIST - ${ASN_FILE_LIST} - packet-${PROTOCOL_NAME}-template.c - packet-${PROTOCOL_NAME}-template.h - ${PROTOCOL_NAME}.cnf -) - -set( SRC_FILES - ${EXTRA_DIST} - ${EXT_ASN_FILE_LIST} -) - -set( A2W_FLAGS -b ) - -set( EXTRA_CNF - cmip-exp.cnf -) - -ASN2WRS() - diff --git a/asn1/gnm/GNM.asn b/asn1/gnm/GNM.asn deleted file mode 100644 index e00cc76364..0000000000 --- a/asn1/gnm/GNM.asn +++ /dev/null @@ -1,684 +0,0 @@ --- Module ASN1DefinedTypesModule (M.3100:04/2005) --- 8 ASN.1 modules --- --- 8.1 ASN1DefinedTypesModule -ASN1DefinedTypesModule {itu-t recommendation m gnm(3100) informationModel(0) - asn1Modules(2) asn1DefinedTypesModule(0)} DEFINITIONS IMPLICIT TAGS ::= -BEGIN - --- EXPORTS everything -IMPORTS - -- Note: RDNSequence, formerly imported - -- from X.501 InformationFramework, is imported from X.711 CMIP. - RDNSequence, ObjectInstance, ObjectClass, Attribute - FROM CMIP-1 {joint-iso-itu-t ms(9) cmip(1) modules(0) protocol(3)} --- MappingList, SignalRate --- FROM M3100ASN1TypeModule2 {itu-t recommendation m gnm(3100) --- informationModel(0) asn1Modules(2) asn1Module2(1)} - ProbableCause, AdministrativeState, AvailabilityStatus, AttributeList, - AdditionalInformation - FROM Attribute-ASN1Module {joint-iso-itu-t ms(9) smi(3) part2(2) - asn1Module(2) 1}; --- Local imports --- MappingList, SignalRate --- FROM M3100ASN1TypeModule2 {itu-t recommendation m gnm(3100) --- informationModel(0) asn1Modules(2) asn1Module2(1)} - -MappingList ::= SEQUENCE OF PayloadLevel - -PayloadLevel ::= CharacteristicInformation - -SignalRate ::= CHOICE { - objectClass [0] OBJECT IDENTIFIER, - characteristicInformation [1] CharacteristicInformation -} --- X.745 -SupportedTOClasses ::= SET OF OBJECT IDENTIFIER - --- END Local imports -m3100InformationModel OBJECT IDENTIFIER ::= - {itu-t recommendation m gnm(3100) informationModel(0)} - -m3100standardSpecificExtension OBJECT IDENTIFIER ::= - {m3100InformationModel standardSpecificExtension(0)} - -m3100ObjectClass OBJECT IDENTIFIER ::= - {m3100InformationModel managedObjectClass(3)} - -m3100Package OBJECT IDENTIFIER ::= {m3100InformationModel package(4)} - -m3100Parameter OBJECT IDENTIFIER ::= {m3100InformationModel parameter(5)} - -m3100Attribute OBJECT IDENTIFIER ::= {m3100InformationModel attribute(7)} - -m3100NameBinding OBJECT IDENTIFIER ::= {m3100InformationModel nameBinding(6)} - -m3100Action OBJECT IDENTIFIER ::= {m3100InformationModel action(9)} - -m3100Notification OBJECT IDENTIFIER ::= - {m3100InformationModel notification(10)} - --- Reserved arcs below m3100InformationModel are (8) for attribute groups -characteristicInfo OBJECT IDENTIFIER ::= - {m3100standardSpecificExtension 0} - -opticalSTM1SPICI CharacteristicInformation ::= {characteristicInfo 1} - --- opticalSPITTP* object instances with stmLevel attribute = 1 -opticalSTM4SPICI CharacteristicInformation ::= - {characteristicInfo 2} - --- opticalSPITTP* object instances with stmLevel attribute = 4 -opticalSTM16SPICI CharacteristicInformation ::= - {characteristicInfo 3} - --- opticalSPITTP* object instances with stmLevel attribute = 16 -electricalSTM1SPICI CharacteristicInformation ::= - {characteristicInfo 4} - --- electricalSPITTP* object instances with stmLevel attribute = 1 -rsSTM1SPICI CharacteristicInformation ::= - {characteristicInfo 5} - --- rsCTP* object instances with stmLevel attribute = 1 -rsSTM4SPICI CharacteristicInformation ::= - {characteristicInfo 6} - --- rsCTP* object instances with stmLevel attribute = 4 -rsSTM16SPICI CharacteristicInformation ::= - {characteristicInfo 7} - --- rsCTP* object instances with stmLevel attribute = 16 -msSTM1SPICI CharacteristicInformation ::= - {characteristicInfo 8} - --- msCTP* object instances with stmLevel attribute = 1 -msSTM4SPICI CharacteristicInformation ::= - {characteristicInfo 9} - --- msCTP* object instances with stmLevel attribute = 4 -msSTM16SPICI CharacteristicInformation ::= - {characteristicInfo 10} - --- msCTP* object instances with stmLevel attribute = 16 -au3TU3VC3CI CharacteristicInformation ::= - {characteristicInfo 11} - -au4VC4CI CharacteristicInformation ::= {characteristicInfo 12} - -tu11VC11CI CharacteristicInformation ::= {characteristicInfo 13} - -tu12VC12CI CharacteristicInformation ::= {characteristicInfo 14} - -tu2VC2CI CharacteristicInformation ::= {characteristicInfo 15} - -tu12VC11CI CharacteristicInformation ::= {characteristicInfo 16} - -vpCI CharacteristicInformation ::= {characteristicInfo 17} - -vcCI CharacteristicInformation ::= {characteristicInfo 18} - -e0CI CharacteristicInformation ::= {characteristicInfo 19} - -e1CI CharacteristicInformation ::= {characteristicInfo 20} - -e2CI CharacteristicInformation ::= {characteristicInfo 21} - -e3CI CharacteristicInformation ::= {characteristicInfo 22} - -e4CI CharacteristicInformation ::= {characteristicInfo 23} - -e5-565M CharacteristicInformation ::= {characteristicInfo 24} - -sts3c-and-VC4-1c CharacteristicInformation ::= {characteristicInfo 25} - -sts12c-and-VC4-4c CharacteristicInformation ::= {characteristicInfo 26} - -sts48c-and-VC4-16c CharacteristicInformation ::= {characteristicInfo 27} - -sts192c-and-VC4-64c CharacteristicInformation ::= {characteristicInfo 28} - -section-OC1-STS1-and-RS-STM0 CharacteristicInformation ::= - {characteristicInfo 29} - -section-OC192-STS192-and-RS-STM64 CharacteristicInformation ::= - {characteristicInfo 30} - -line-OC1-STS1-and-MS-STM0 CharacteristicInformation ::= - {characteristicInfo 31} - -line-OC192-STS192-and-MS-STM64 CharacteristicInformation ::= - {characteristicInfo 32} - -fc-12-133M CharacteristicInformation ::= {characteristicInfo 33} - --- Fiber Channel protocol -fc-25-266M CharacteristicInformation ::= - {characteristicInfo 34} - --- Fiber Channel protocol -fc-50-531M CharacteristicInformation ::= - {characteristicInfo 35} - --- Fiber Channel protocol -fc-100-1063M CharacteristicInformation ::= - {characteristicInfo 36} - --- Fiber Channel protocol -fddi CharacteristicInformation ::= - {characteristicInfo 37} - -fast-Ethernet CharacteristicInformation ::= {characteristicInfo 38} - -gigabit-Ethernet CharacteristicInformation ::= {characteristicInfo 39} - -isdn-BRI CharacteristicInformation ::= {characteristicInfo 40} - --- ISDN Basic Rate Interface PTP layer rate -dsr-OC192-and-STM64 CharacteristicInformation ::= - {characteristicInfo 41} - -dsr-OC768-and-STM256 CharacteristicInformation ::= {characteristicInfo 42} - -section-OC24-STS24-and-RS-STM8 CharacteristicInformation ::= - {characteristicInfo 43} - -line-OC24-STS24-and-MS-STM8 CharacteristicInformation ::= - {characteristicInfo 44} - -section-OC768-STS768-and-RS-STM256 CharacteristicInformation ::= - {characteristicInfo 45} - -line-OC768-STS768-and-MS-STM256 CharacteristicInformation ::= - {characteristicInfo 46} - -tenGigabit-Ethernet CharacteristicInformation ::= {characteristicInfo 47} - --- The following value assignments are for the Probable Cause when Integer Choice is used within the --- TMN application context. These values shall always be assigned by this Recommendation in the context --- of TMN. - - -AcceptableCircuitPackTypeList ::= SET OF PrintableString - -AddedTps ::= SEQUENCE { - gtp ObjectInstance, - tpsAdded SEQUENCE OF ObjectInstance -} - -AddLeg ::= SEQUENCE { - mpCrossConnection ObjectInstance, - legs SET OF ToTermSpecifier -} - -AddTpsToGtpInformation ::= - SEQUENCE OF - SEQUENCE {tpsAdded SEQUENCE OF TerminationPointInformation, - gtp ObjectInstance OPTIONAL} - -AddTpsToGtpResult ::= - SEQUENCE OF CHOICE {failed [0] Failed, - addedTps [1] AddedTps} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "AddTpsToGtpInformation" type. -AddTpsToTpPoolInformation ::= - SEQUENCE OF - SEQUENCE {tps SET OF TerminationPointInformation, - toTpPool ObjectInstance OPTIONAL} - -AddTpsToTpPoolResult ::= - SEQUENCE OF - CHOICE {failed [0] Failed, - tpsAddedToTpPool [1] TpsAddedToTpPool} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "AddTPsToTpPoolInformation" type. -AlarmEffectOnServiceParameter ::= BOOLEAN -- TRUE implies service is affected - -AlarmSeverityAssignment ::= SEQUENCE { - problem ProbableCause, - severityAssignedServiceAffecting [0] AlarmSeverityCode OPTIONAL, - severityAssignedNonServiceAffecting [1] AlarmSeverityCode OPTIONAL, - severityAssignedServiceIndependent [2] AlarmSeverityCode OPTIONAL -} - -AlarmSeverityAssignmentList ::= SET OF AlarmSeverityAssignment - -AlarmSeverityCode ::= ENUMERATED { - non-alarmed(0), minor(1), major(2), critical(3), warning(4)} - -AlarmStatus ::= ENUMERATED { - cleared(0), activeReportable-Indeterminate(1), activeReportable-Warning(2), - activeReportable-Minor(3), activeReportable-Major(4), - activeReportable-Critical(5), activePending(6)} - -Boolean ::= BOOLEAN - -Bundle ::= SEQUENCE { - characteristicInfoType CharacteristicInformation, - bundlingFactor INTEGER -} - -ChannelNumber ::= INTEGER - -CharacteristicInformation ::= OBJECT IDENTIFIER - -CircuitDirectionality ::= ENUMERATED {onewayOut(0), onewayIn(1), twoway(2)} - -CircuitPackAvailabilityStatus ::= - AvailabilityStatus(WITH COMPONENT (notInstalled)) - -CircuitPackType ::= PrintableString - -Connected ::= CHOICE { - pointToPoint [0] PointToPoint, - pointToMultipoint [1] PointToMultipoint -} - -ConnectInformation ::= - SEQUENCE OF - SEQUENCE {itemType - CHOICE {unidirectional [0] ConnectionType, - bidirectional [1] ConnectionTypeBi, - addleg [2] AddLeg}, - administrativeState AdministrativeState OPTIONAL, - namedCrossConnection [3] NamedCrossConnection OPTIONAL, - ..., - userLabel [4] UserLabel OPTIONAL, - redline [5] Boolean OPTIONAL, - additionalInfo [6] AdditionalInformation OPTIONAL - } - -ConnectorType ::= INTEGER - --- currently defined values for ConnectorType are -fcConnectorType ConnectorType ::= - 1 -- Fibre Connector - -lcConnectorType ConnectorType ::= 2 -- Lucent connector - -scConnectorType ConnectorType ::= 3 -- Subscriber Connector - -ConnectivityPointer ::= CHOICE { - none NULL, - single ObjectInstance, - concatenated SEQUENCE OF ObjectInstance -} - -ConnectResult ::= SEQUENCE OF CHOICE {failed Failed, - connected Connected} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "ConnectInformation" type. -ConnectionType ::= CHOICE { - explicitPToP [0] ExplicitPtoP, - ptoTpPool [1] PtoTPPool, - explicitPtoMP [2] ExplicitPtoMP, - ptoMPools [3] PtoMPools -} - -ConnectionTypeBi ::= CHOICE { - explicitPToP [0] ExplicitPtoP, - ptoTpPool [1] PtoTPPool -} - -Count ::= INTEGER - -CreateError ::= INTEGER - -CrossConnectionName ::= GraphicString - -CrossConnectionObjectPointer ::= CHOICE { - notConnected [0] ObjectInstance, -- Fabric object - connected [1] ObjectInstance, -- Cross-connection object - multipleConnections MultipleConnections -} - -CTPUpstreamPointer ::= - ConnectivityPointer - (WITH COMPONENTS { - ..., - - -- the other two choices are present - concatenated ABSENT - }) - -CTPDownstreamPointer ::= - DownstreamConnectivityPointer - (WITH COMPONENTS { - ..., - concatenated ABSENT, - broadcastConcatenated ABSENT - - -- other choices are present - }) - -CurrentProblem ::= SEQUENCE { - problem [0] ProbableCause, - alarmStatus [1] AlarmStatus -} - -CurrentProblemList ::= SET OF CurrentProblem - -Directionality ::= ENUMERATED {unidirectional(0), bidirectional(1)} - -DisconnectInformation ::= SEQUENCE OF ObjectInstance -- tps - -DisconnectResult ::= - SEQUENCE OF CHOICE {failed Failed, - disconnected ObjectInstance} -- tp - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "DisconnectInformation" type. -DownstreamConnectivityPointer ::= CHOICE { - none NULL, - single ObjectInstance, - concatenated SEQUENCE OF ObjectInstance, - broadcast SET OF ObjectInstance, - broadcastConcatenated [1] SET OF SEQUENCE OF ObjectInstance -} - -ExplicitPtoMP ::= SEQUENCE {fromTp ExplicitTP, - toTPs SET OF ExplicitTP -} - -ExplicitPtoP ::= SEQUENCE {fromTp ExplicitTP, - toTp ExplicitTP -} - -ExplicitTP ::= CHOICE { - oneTPorGTP ObjectInstance, - listofTPs SEQUENCE OF ObjectInstance -} - -ExternalTime ::= GeneralizedTime - -EquipmentHolderAddress ::= SEQUENCE OF PrintableString - -EquipmentHolderType ::= GraphicString - -Failed ::= CHOICE { - logicalProblem LogicalProblem, - resourceProblem ResourceProblem -} - -GeneralError ::= - SEQUENCE OF - SEQUENCE {cause GeneralErrorCause, - details GraphicString OPTIONAL, - relatedObjects [0] SET OF ObjectInstance OPTIONAL, - attributeList [1] AttributeList OPTIONAL} - -GeneralErrorCause ::= CHOICE { - globalValue OBJECT IDENTIFIER, - localValue INTEGER -} - --- objectInIncompatibleState GeneralErrorCause ::= localValue:1 - --- noValidRelatedObject GeneralErrorCause ::= localValue:2 - --- involvedInOffering GeneralErrorCause ::= localValue:3 - --- serviceNotSupported GeneralErrorCause ::= localValue:4 - --- provisioningOrderConflict GeneralErrorCause ::= localValue:5 - --- equipmentFailure GeneralErrorCause ::= localValue:6 - --- maxNumberExceeded GeneralErrorCause ::= localValue:7 - --- containedObjects GeneralErrorCause ::= localValue:8 - --- ObjectInIncompatibleState is used to specify that the object is in a state --- that does not allow the operation. Details of the state should be --- provided. --- NoValidRelatedObject is used to specify related objects that do not --- exist in the MIB. --- InvolvedInOffering is used to identify object(s) that are already --- involved in a conflicting service offering. --- ServiceNotSupported is used to indicate that the operation is --- attempting to initiate a service that is not supported by the --- equipment. --- ProvisioningOrderConflict is used to identify that a service is --- being provisioned in an order that is not supported by the equipment. --- EquipmentFailure is used to indicate that an equipment failure as --- occured during the operation. --- MaxNumberExceeded is used to indicate that requested create operation --- cannot be completed as the maximum number of instances are reached. --- ContainedObjects is used to indicate that requested delete operation --- cannot be completed as there are contained instances. -HolderStatus ::= CHOICE { - holderEmpty [0] NULL, - inTheAcceptableList [1] CircuitPackType, - notInTheAcceptableList [2] CircuitPackType, - unknownType [3] NULL -} - -IndividualSwitchOver ::= SEQUENCE { - connection ObjectInstance, - -- crossConnection of connectionProtection (defined in Recommendation G.774.04) - unchangedTP ObjectInstance, - newTP ObjectInstance - -- designates the newTP to which the unchanged TP has to be connected with -} - -IndividualResult ::= CHOICE {failed [0] Failed, - pass [1] Connected -} - -InformationTransferCapabilities ::= ENUMERATED { - speech(0), audio3pt1(1), audio7(2), audioComb(3), digitalRestricted56(4), - digitalUnrestricted64(5) - --- "..." these ellipses defined in ASN.1 amendment are used here to indicate that this is --- an extensible type and additional enumerations may be added in future --} - -ListOfCharacteristicInformation ::= SET OF CharacteristicInformation - -ListOfTPs ::= SET OF ObjectInstance - -LocationName ::= GraphicString - -LogicalProblem ::= SEQUENCE { - problemCause ProblemCause, - incorrectInstances SET OF ObjectInstance OPTIONAL -} - -MultipleConnections ::= - SET OF - CHOICE {downstreamNotConnected [0] ObjectInstance, - downstreamConnected [1] ObjectInstance, - upstreamNotConnected [2] ObjectInstance, - upstreamConnected [3] ObjectInstance} - -NamedCrossConnection ::= SEQUENCE { - redline BOOLEAN, - name CrossConnectionName -} - -NameType ::= CHOICE {numericName INTEGER, - pString GraphicString -} - -NumberOfCircuits ::= INTEGER - -ObjectList ::= SET OF ObjectInstance - -PhysicalPortSignalRateAndMappingList ::= CHOICE { - diverse - SEQUENCE {downstream SignalRateAndMappingList, - upStream SignalRateAndMappingList}, - uniform SignalRateAndMappingList -} - -Pointer ::= ObjectInstance - -PointerOrNull ::= CHOICE {pointer ObjectInstance, - null NULL -} - -PointToPoint ::= SEQUENCE { - fromTp ObjectInstance, - toTp ObjectInstance, - xCon ObjectInstance -} - -PointToMultipoint ::= SEQUENCE { - fromTp ObjectInstance, - toTps - SET OF SEQUENCE {tp ObjectInstance, - xConnection ObjectInstance}, - mpXCon ObjectInstance -} - -PortNumber ::= INTEGER - -ProblemCause ::= CHOICE {unknown NULL, - integerValue INTEGER -} - --- The values of integer value for ProblemCause and integerValue for ResourceProblem shall always be --- assigned by this Recommendation. No values of integerValue for ResourceProblem have been assigned. --- The following values are used for integerValue of ProblemCause. - -PtoMPools ::= SEQUENCE {fromTp ExplicitTP, - toTPPools ToTPPools -} - -PtoTPPool ::= SEQUENCE {fromTp ExplicitTP, - toTpPool ObjectInstance -} - -Reach ::= INTEGER - -RelatedObjectInstance ::= CHOICE { - notAvailable NULL, - relatedObject ObjectInstance -} - -RemoveTpsFromGtpInformation ::= - SEQUENCE OF SEQUENCE {fromGtp ObjectInstance, - tps SET OF ObjectInstance} - -RemoveTpsFromGtpResult ::= - SEQUENCE OF - CHOICE {failed [0] Failed, - removed [1] RemoveTpsResultInformation} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "RemoveTPsFromGtpInformation" type. -RemoveTpsFromTpPoolInformation ::= - SEQUENCE OF - SEQUENCE {fromTpPool ObjectInstance, - tps SET OF ObjectInstance} - -RemoveTpsFromTpPoolResult ::= - SEQUENCE OF - CHOICE {failed [0] Failed, - removed [1] RemoveTpsResultInformation} - --- the n-th element in the "SEQUENCE OF" is related to the n-th element in the "SEQUENCE OF" of the --- "RemoveTPsFromTpPoolInformation" type. -RemoveTpsResultInformation ::= SEQUENCE { - deletedTpPoolOrGTP ObjectInstance OPTIONAL, - tps SET OF ObjectInstance -} - --- If the TP Pool or GTP is deleted, the deleted TP Pool or GTP should be provided in the --- RemoveTpsResultInformation -Replaceable ::= ENUMERATED {yes(0), no(1), notapplicable(2)} - -ResourceProblem ::= CHOICE {unknown NULL, - integerValue INTEGER -} - -SequenceOfObjectInstance ::= SEQUENCE OF ObjectInstance - -SerialNumber ::= GraphicString - -SignallingCapabilities ::= ENUMERATED { - isup(0), isup92(1), itu-tNo5(2), r2(3), itu-tNo6(4), tup(5) - --- "..." these ellipses defined in ASN.1 amendment are used here to indicate that this is --- an extensible type and additional enumerations may be added in future --} - -SignalRateAndMappingList ::= - SET OF - SEQUENCE {-- only one member in the case of TDM - signalRate SignalRate, - mappingList MappingList OPTIONAL, - wavelength WaveLength OPTIONAL} -- used for WDM - --- the SignalRateAndMappingList is a SET OF to accommodate --- multiple wavelengths on a single TTP -SignalType ::= CHOICE { - simple CharacteristicInformation, - bundle Bundle, - complex [0] SEQUENCE OF Bundle -} - -SubordinateCircuitPackSoftwareLoad ::= CHOICE { - notApplicable NULL, - softwareInstances [0] SEQUENCE OF ObjectInstance, - softwareIdentifiers [1] SEQUENCE OF PrintableString -} - -SupportableClientList ::= SET OF ObjectClass - -SystemTiming ::= SEQUENCE { - sourceType - ENUMERATED {internalTimingSource(0), remoteTimingSource(1), - slavedTimingTerminationSignal(2)}, - sourceID ObjectInstance OPTIONAL -} -- not needed for internal source - -SystemTimingSource ::= SEQUENCE { - primaryTimingSource SystemTiming, - secondaryTimingSource SystemTiming OPTIONAL -} - -SwitchOverInformation ::= SEQUENCE OF IndividualSwitchOver - -SwitchOverResult ::= SEQUENCE OF IndividualResult - -TerminationPointInformation ::= CHOICE { - tPOrGTP [0] ObjectInstance, - sourceTP [1] ObjectInstance, - sinkTP [2] ObjectInstance -} - -ToTermSpecifier ::= CHOICE { - toTpOrGTP [0] ExplicitTP, - toPool [1] ObjectInstance -} - -ToTPPools ::= - SET OF SEQUENCE {tpPoolId ObjectInstance, - numberOfTPs INTEGER} - -TpsAddedToTpPool ::= SEQUENCE { - tpPool ObjectInstance, - tps SET OF ObjectInstance -} - -TpsInGtpList ::= SEQUENCE OF ObjectInstance - -TransmissionCharacteristics ::= BIT STRING { - satellite(0), dCME(1), echoControl(2)} - -TypeText ::= GraphicString - -UserLabel ::= GraphicString - -VendorName ::= GraphicString - -Version ::= GraphicString - -WaveLength ::= INTEGER - -END -- end of ASN1 DefinedTypesModule - --- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D - diff --git a/asn1/gnm/Makefile.am b/asn1/gnm/Makefile.am deleted file mode 100644 index 72d28e600b..0000000000 --- a/asn1/gnm/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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/asn1/gnm/Makefile.common b/asn1/gnm/Makefile.common deleted file mode 100644 index 348bbe209b..0000000000 --- a/asn1/gnm/Makefile.common +++ /dev/null @@ -1,51 +0,0 @@ -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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=gnm - -EXT_ASN_FILE_LIST = - -ASN_FILE_LIST = \ - GNM.asn - -INCLUDED_ASN_FILE_LIST = \ - ASN1DefinedTypesModule.asn - -# 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= \ - $(builddir)/../cmip/cmip-exp.cnf - -$(builddir)/../cmip/cmip-exp.cnf: - (cd $(builddir)/../cmip && $(MAKE_CNF_EXPORT)) - diff --git a/asn1/gnm/Makefile.nmake b/asn1/gnm/Makefile.nmake deleted file mode 100644 index fc70f2382f..0000000000 --- a/asn1/gnm/Makefile.nmake +++ /dev/null @@ -1,26 +0,0 @@ -## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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/asn1/gnm/gnm.cnf b/asn1/gnm/gnm.cnf deleted file mode 100644 index 4694d8df42..0000000000 --- a/asn1/gnm/gnm.cnf +++ /dev/null @@ -1,135 +0,0 @@ -# gnm.cnf -# gnm conformation file - -#.IMPORT ../cmip/cmip-exp.cnf -#.EXPORTS - -#.PDU - - -#.NO_EMIT - - -#.TYPE_RENAME - - -#.FIELD_RENAME - -#.OMIT_ASSIGNMENT -AddedTps -AddTpsToGtpInformation -AddTpsToGtpResult -AddTpsToTpPoolInformation -AddTpsToTpPoolResult -AlarmEffectOnServiceParameter -CircuitPackAvailabilityStatus -ConnectorType -ConnectResult -CreateError -CTPUpstreamPointer -CTPDownstreamPointer -DisconnectInformation -GeneralError -GeneralErrorCause -IndividualSwitchOver -IndividualResult -ListOfTPs -LocationName -PortNumber -Reach -RemoveTpsFromGtpInformation -RemoveTpsFromGtpResult -RemoveTpsFromTpPoolInformation -RemoveTpsFromTpPoolResult -RemoveTpsResultInformation -SwitchOverInformation -SwitchOverResult -TerminationPointInformation -TpsAddedToTpPool -TypeText -#.END - -#.REGISTER -RelatedObjectInstance B "0.0.13.3100.0.7.1" "a-TPInstance(1)" -ObjectList B "0.0.13.3100.0.7.2" "affectedObjectList(2)" -AlarmSeverityAssignmentList B "0.0.13.3100.0.7.3" "alarmSeverityAssignmentList(3)" -NameType B "0.0.13.3100.0.7.4" "alarmSeverityAssignmentProfileId(4)" -PointerOrNull B "0.0.13.3100.0.7.5" "alarmSeverityAssignmentProfilePointer(5)" -AlarmStatus B "0.0.13.3100.0.7.6" "alarmStatus(6)" -ChannelNumber B "0.0.13.3100.0.7.7" "channelNumber(7)" -CharacteristicInformation B "0.0.13.3100.0.7.8" "characteristicInformation(8)" -# ObjectInstance B "0.0.13.3100.0.7.9" "clientConnection(9)" CMIP - -# ClientConnection B "0.0.13.3100.0.7.10" "clientTrail(10)" -Count B "0.0.13.3100.0.7.11" "connectedTpCount(11)" -NameType B "0.0.13.3100.0.7.12" "connectionId(12)" -NameType B "0.0.13.3100.0.7.13" "cTPId(13)" -NameType B "0.0.13.3100.0.7.14" "crossConnectionId(14)" -CrossConnectionName B "0.0.13.3100.0.7.15" "crossConnectionName(15)" -CrossConnectionObjectPointer B "0.0.13.3100.0.7.16" "crossConnectionObjectPointer(16)" -CurrentProblemList B "0.0.13.3100.0.7.17" "currentProblemList(17)" -Directionality B "0.0.13.3100.0.7.18" "directionality(18)" -DownstreamConnectivityPointer B "0.0.13.3100.0.7.19" "downstreamConnectivityPointer(19)" - -NameType B "0.0.13.3100.0.7.20" "equipmentId(20)" -ExternalTime B "0.0.13.3100.0.7.21" "externalTime(21)" -NameType B "0.0.13.3100.0.7.22" "fabricId(22)" -PointerOrNull B "0.0.13.3100.0.7.23" "fromTermination(23)" -NameType B "0.0.13.3100.0.7.24" "gtpId(24)" -Count B "0.0.13.3100.0.7.25" "idleTpCount(25)" -ListOfCharacteristicInformation B "0.0.13.3100.0.7.26" "listOfCharacteristicInfo(26)" -Replaceable B "0.0.13.3100.0.7.27" "locationName(27)" -NameType B "0.0.13.3100.0.7.28" "managedElementId(28)" -NameType B "0.0.13.3100.0.7.29" "mpCrossConnectionId(29)" - -NameType B "0.0.13.3100.0.7.30" "networkId(30)" -#ObjectInstance B "0.0.13.3100.0.7.31" "networkLevelPointer(31)" -Boolean B "0.0.13.3100.0.7.32" "protected(32)" -Boolean B "0.0.13.3100.0.7.33" "redline(33)" -Replaceable B "0.0.13.3100.0.7.34" "replaceable(34)" -SequenceOfObjectInstance B "0.0.13.3100.0.7.35" "serverConnectionList(35)" -ObjectList B "0.0.13.3100.0.7.36" "serverTrailList(36)" -SignalType B "0.0.13.3100.0.7.37" "signalType(37)" -NameType B "0.0.13.3100.0.7.38" "softwareId(38)" -SupportableClientList B "0.0.13.3100.0.7.39" "supportableClientList(39)" - -ObjectList B "0.0.13.3100.0.7.40" "supportedByObjectList(40)" -SystemTimingSource B "0.0.13.3100.0.7.41" "systemTimingSource(41)" -Count B "0.0.13.3100.0.7.42" "totalTpCount(42)" -Pointer B "0.0.13.3100.0.7.43" "toTermination(43)" -NameType B "0.0.13.3100.0.7.44" "tpPoolId(44)" -TpsInGtpList B "0.0.13.3100.0.7.45" "tpsInGtpList(45)" -#ObjectInstance B "0.0.13.3100.0.7.46" "tpsInTpPoolList(46)" -NameType B "0.0.13.3100.0.7.47" "trailId(47)" -NameType B "0.0.13.3100.0.7.48" "tTPId(48)" -ConnectivityPointer B "0.0.13.3100.0.7.49" "upstreamConnectivityPointer(49)" - -UserLabel B "0.0.13.3100.0.7.50" "userLabel(50)" -VendorName B "0.0.13.3100.0.7.51" "vendorName(51)" -Version B "0.0.13.3100.0.7.52" "version(52)" -ObjectList B "0.0.13.3100.0.7.53" "clientConnectionList(53)" -CircuitPackType B "0.0.13.3100.0.7.54" "circuitPackType(54)" -RelatedObjectInstance B "0.0.13.3100.0.7.55" "z-TPInstance(55)" -EquipmentHolderAddress B "0.0.13.3100.0.7.56" "equipmentHolderAddress(56)" -EquipmentHolderType B "0.0.13.3100.0.7.57" "equipmentHolderType(57)" -AcceptableCircuitPackTypeList B "0.0.13.3100.0.7.58" "acceptableCircuitPackTypeList(58)" -HolderStatus B "0.0.13.3100.0.7.59" "holderStatus(59)" - -SubordinateCircuitPackSoftwareLoad B "0.0.13.3100.0.7.60" "subordinateCircuitPackSoftwareLoad(60)" -NameType B "0.0.13.3100.0.7.61" "circuitEndPointSubgroupId(61)" -NumberOfCircuits B "0.0.13.3100.0.7.62" "numberOfCircuits(62)" -UserLabel B "0.0.13.3100.0.7.63" "labelOfFarEndExchange(63)" -SignallingCapabilities B "0.0.13.3100.0.7.64" "signallingCapabilities(64)" -InformationTransferCapabilities B "0.0.13.3100.0.7.65" "informationTransferCapabilities(65)" -CircuitDirectionality B "0.0.13.3100.0.7.66" "circuitDirectionality(66)" -TransmissionCharacteristics B "0.0.13.3100.0.7.67" "transmissionCharacteristics(67)" -NameType B "0.0.13.3100.0.7.68" "managedElementComplexId(68)" -SerialNumber B "0.0.13.3100.0.7.69" "serialNumber(69)" - -# Actions -ConnectInformation B "0.0.13.3100.0.9.4" "connect(4)" -DisconnectResult B "0.0.13.3100.0.9.5" "disconnect(5)" - -SupportedTOClasses B "2.9.2.12.7.7" "supportedTOClasses(7)" - -#.END diff --git a/asn1/gnm/packet-gnm-template.c b/asn1/gnm/packet-gnm-template.c deleted file mode 100644 index ebaa11326f..0000000000 --- a/asn1/gnm/packet-gnm-template.c +++ /dev/null @@ -1,108 +0,0 @@ -/* packet-gnm.c - * Routines for GENERIC NETWORK INFORMATION MODEL Data dissection - * - * Copyright 2005 , Anders Broman - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * 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. - * - * - * References: - * ITU-T recommendatiom M.3100 - */ - -#include "config.h" - -#include -#include -#include - -#include "packet-ber.h" -#include "packet-cmip.h" -#include "packet-gnm.h" - -#define PNAME "ITU M.3100 Generic Network Information Model" -#define PSNAME "GNM" -#define PFNAME "gnm" - -void proto_register_gnm(void); -void proto_reg_handoff_gnm(void); - -/* Initialize the protocol and registered fields */ -static int proto_gnm = -1; - -#include "packet-gnm-hf.c" - -/* Initialize the subtree pointers */ -#include "packet-gnm-ett.c" - -#include "packet-gnm-fn.c" - - - -static void -dissect_gnm_attribute_ObjectInstance(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) -{ - asn1_ctx_t asn1_ctx; - - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - - dissect_cmip_ObjectInstance(FALSE, tvb, 0, &asn1_ctx, parent_tree, -1); - -} - -static void -dissect_gnm(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_) -{ - /* Dymmy function */ -} - -/*--- proto_register_gnm -------------------------------------------*/ -void proto_register_gnm(void) { - - /* List of fields */ - static hf_register_info hf[] = { - -#include "packet-gnm-hfarr.c" - }; - - /* List of subtrees */ - static gint *ett[] = { -#include "packet-gnm-ettarr.c" - }; - - /* Register protocol */ - proto_gnm = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("gnm", dissect_gnm, proto_gnm); - /* Register fields and subtrees */ - proto_register_field_array(proto_gnm, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - -} - - -/*--- proto_reg_handoff_gnm ---------------------------------------*/ -void proto_reg_handoff_gnm(void) { -#include "packet-gnm-dis-tab.c" - /* Wrapper to call CMIP */ - register_ber_oid_dissector("0.0.13.3100.0.7.9", dissect_gnm_attribute_ObjectInstance, proto_gnm, "clientConnection(9)"); - register_ber_oid_dissector("0.0.13.3100.0.7.10", dissect_gnm_attribute_ObjectInstance, proto_gnm, "clientTrail(10)"); - register_ber_oid_dissector("0.0.13.3100.0.7.31", dissect_gnm_attribute_ObjectInstance, proto_gnm, "networkLevelPointer(31)"); - register_ber_oid_dissector("0.0.13.3100.0.7.46", dissect_gnm_attribute_ObjectInstance, proto_gnm, "networkLevelPointer(31)"); - -} diff --git a/asn1/gnm/packet-gnm-template.h b/asn1/gnm/packet-gnm-template.h deleted file mode 100644 index b9e2c0286e..0000000000 --- a/asn1/gnm/packet-gnm-template.h +++ /dev/null @@ -1,33 +0,0 @@ -/* packet-gnm.c - * Routines for GENERIC NETWORK INFORMATION MODEL Data dissection - * - * Copyright 2005 , Anders Broman - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * 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. - * - * - * References: - * ITU-T recommendatiom M.3100 - */ -#ifndef PACKET_GNM_H -#define PACKET_GNM_H - -/*#include "packet-gni-exp.h"*/ - -#endif /* PACKET_GNM_H */ diff --git a/configure.ac b/configure.ac index 29aa70c4b6..ed5e851b31 100644 --- a/configure.ac +++ b/configure.ac @@ -2820,7 +2820,6 @@ AC_OUTPUT( asn1/dsp/Makefile asn1/ess/Makefile asn1/ftam/Makefile - asn1/gnm/Makefile asn1/goose/Makefile asn1/gprscdr/Makefile asn1/gsm_map/Makefile diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common index cd5cc4b0fc..c37bfe7e14 100644 --- a/epan/dissectors/Makefile.common +++ b/epan/dissectors/Makefile.common @@ -202,7 +202,6 @@ DIRTY_ASN1_DISSECTOR_SRC = \ packet-ansi_map.c \ packet-coseventcomm.c \ packet-cosnaming.c \ - packet-gnm.c \ packet-gprscdr.c \ packet-gsm_map.c \ packet-ldap.c \ diff --git a/epan/dissectors/packet-gnm.c b/epan/dissectors/packet-gnm.c deleted file mode 100644 index 30a5f6b674..0000000000 --- a/epan/dissectors/packet-gnm.c +++ /dev/null @@ -1,2904 +0,0 @@ -/* Do not modify this file. Changes will be overwritten. */ -/* Generated automatically by the ASN.1 to Wireshark dissector compiler */ -/* packet-gnm.c */ -/* ../../tools/asn2wrs.py -b -p gnm -c ./gnm.cnf -s ./packet-gnm-template -D . -O ../../epan/dissectors GNM.asn */ - -/* Input file: packet-gnm-template.c */ - -#line 1 "../../asn1/gnm/packet-gnm-template.c" -/* packet-gnm.c - * Routines for GENERIC NETWORK INFORMATION MODEL Data dissection - * - * Copyright 2005 , Anders Broman - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * 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. - * - * - * References: - * ITU-T recommendatiom M.3100 - */ - -#include "config.h" - -#include -#include -#include - -#include "packet-ber.h" -#include "packet-cmip.h" -#include "packet-gnm.h" - -#define PNAME "ITU M.3100 Generic Network Information Model" -#define PSNAME "GNM" -#define PFNAME "gnm" - -void proto_register_gnm(void); -void proto_reg_handoff_gnm(void); - -/* Initialize the protocol and registered fields */ -static int proto_gnm = -1; - - -/*--- Included file: packet-gnm-hf.c ---*/ -#line 1 "../../asn1/gnm/packet-gnm-hf.c" -static int hf_gnm_SupportedTOClasses_PDU = -1; /* SupportedTOClasses */ -static int hf_gnm_AcceptableCircuitPackTypeList_PDU = -1; /* AcceptableCircuitPackTypeList */ -static int hf_gnm_AlarmSeverityAssignmentList_PDU = -1; /* AlarmSeverityAssignmentList */ -static int hf_gnm_AlarmStatus_PDU = -1; /* AlarmStatus */ -static int hf_gnm_Boolean_PDU = -1; /* Boolean */ -static int hf_gnm_ChannelNumber_PDU = -1; /* ChannelNumber */ -static int hf_gnm_CharacteristicInformation_PDU = -1; /* CharacteristicInformation */ -static int hf_gnm_CircuitDirectionality_PDU = -1; /* CircuitDirectionality */ -static int hf_gnm_CircuitPackType_PDU = -1; /* CircuitPackType */ -static int hf_gnm_ConnectInformation_PDU = -1; /* ConnectInformation */ -static int hf_gnm_ConnectivityPointer_PDU = -1; /* ConnectivityPointer */ -static int hf_gnm_Count_PDU = -1; /* Count */ -static int hf_gnm_CrossConnectionName_PDU = -1; /* CrossConnectionName */ -static int hf_gnm_CrossConnectionObjectPointer_PDU = -1; /* CrossConnectionObjectPointer */ -static int hf_gnm_CurrentProblemList_PDU = -1; /* CurrentProblemList */ -static int hf_gnm_Directionality_PDU = -1; /* Directionality */ -static int hf_gnm_DisconnectResult_PDU = -1; /* DisconnectResult */ -static int hf_gnm_DownstreamConnectivityPointer_PDU = -1; /* DownstreamConnectivityPointer */ -static int hf_gnm_ExternalTime_PDU = -1; /* ExternalTime */ -static int hf_gnm_EquipmentHolderAddress_PDU = -1; /* EquipmentHolderAddress */ -static int hf_gnm_EquipmentHolderType_PDU = -1; /* EquipmentHolderType */ -static int hf_gnm_HolderStatus_PDU = -1; /* HolderStatus */ -static int hf_gnm_InformationTransferCapabilities_PDU = -1; /* InformationTransferCapabilities */ -static int hf_gnm_ListOfCharacteristicInformation_PDU = -1; /* ListOfCharacteristicInformation */ -static int hf_gnm_NameType_PDU = -1; /* NameType */ -static int hf_gnm_NumberOfCircuits_PDU = -1; /* NumberOfCircuits */ -static int hf_gnm_ObjectList_PDU = -1; /* ObjectList */ -static int hf_gnm_Pointer_PDU = -1; /* Pointer */ -static int hf_gnm_PointerOrNull_PDU = -1; /* PointerOrNull */ -static int hf_gnm_RelatedObjectInstance_PDU = -1; /* RelatedObjectInstance */ -static int hf_gnm_Replaceable_PDU = -1; /* Replaceable */ -static int hf_gnm_SequenceOfObjectInstance_PDU = -1; /* SequenceOfObjectInstance */ -static int hf_gnm_SerialNumber_PDU = -1; /* SerialNumber */ -static int hf_gnm_SignallingCapabilities_PDU = -1; /* SignallingCapabilities */ -static int hf_gnm_SignalType_PDU = -1; /* SignalType */ -static int hf_gnm_SubordinateCircuitPackSoftwareLoad_PDU = -1; /* SubordinateCircuitPackSoftwareLoad */ -static int hf_gnm_SupportableClientList_PDU = -1; /* SupportableClientList */ -static int hf_gnm_SystemTimingSource_PDU = -1; /* SystemTimingSource */ -static int hf_gnm_TpsInGtpList_PDU = -1; /* TpsInGtpList */ -static int hf_gnm_TransmissionCharacteristics_PDU = -1; /* TransmissionCharacteristics */ -static int hf_gnm_UserLabel_PDU = -1; /* UserLabel */ -static int hf_gnm_VendorName_PDU = -1; /* VendorName */ -static int hf_gnm_Version_PDU = -1; /* Version */ -static int hf_gnm_MappingList_item = -1; /* PayloadLevel */ -static int hf_gnm_objectClass = -1; /* OBJECT_IDENTIFIER */ -static int hf_gnm_characteristicInformation = -1; /* CharacteristicInformation */ -static int hf_gnm_SupportedTOClasses_item = -1; /* OBJECT_IDENTIFIER */ -static int hf_gnm_AcceptableCircuitPackTypeList_item = -1; /* PrintableString */ -static int hf_gnm_mpCrossConnection = -1; /* ObjectInstance */ -static int hf_gnm_legs = -1; /* SET_OF_ToTermSpecifier */ -static int hf_gnm_legs_item = -1; /* ToTermSpecifier */ -static int hf_gnm_problem = -1; /* ProbableCause */ -static int hf_gnm_severityAssignedServiceAffecting = -1; /* AlarmSeverityCode */ -static int hf_gnm_severityAssignedNonServiceAffecting = -1; /* AlarmSeverityCode */ -static int hf_gnm_severityAssignedServiceIndependent = -1; /* AlarmSeverityCode */ -static int hf_gnm_AlarmSeverityAssignmentList_item = -1; /* AlarmSeverityAssignment */ -static int hf_gnm_characteristicInfoType = -1; /* CharacteristicInformation */ -static int hf_gnm_bundlingFactor = -1; /* INTEGER */ -static int hf_gnm_pointToPoint = -1; /* PointToPoint */ -static int hf_gnm_pointToMultipoint = -1; /* PointToMultipoint */ -static int hf_gnm_ConnectInformation_item = -1; /* ConnectInformation_item */ -static int hf_gnm_itemType = -1; /* T_itemType */ -static int hf_gnm_unidirectional = -1; /* ConnectionType */ -static int hf_gnm_bidirectional = -1; /* ConnectionTypeBi */ -static int hf_gnm_addleg = -1; /* AddLeg */ -static int hf_gnm_administrativeState = -1; /* AdministrativeState */ -static int hf_gnm_namedCrossConnection = -1; /* NamedCrossConnection */ -static int hf_gnm_userLabel = -1; /* UserLabel */ -static int hf_gnm_redline = -1; /* Boolean */ -static int hf_gnm_additionalInfo = -1; /* AdditionalInformation */ -static int hf_gnm_none = -1; /* NULL */ -static int hf_gnm_single = -1; /* ObjectInstance */ -static int hf_gnm_concatenated = -1; /* SEQUENCE_OF_ObjectInstance */ -static int hf_gnm_concatenated_item = -1; /* ObjectInstance */ -static int hf_gnm_explicitPToP = -1; /* ExplicitPtoP */ -static int hf_gnm_ptoTpPool = -1; /* PtoTPPool */ -static int hf_gnm_explicitPtoMP = -1; /* ExplicitPtoMP */ -static int hf_gnm_ptoMPools = -1; /* PtoMPools */ -static int hf_gnm_notConnected = -1; /* ObjectInstance */ -static int hf_gnm_connected = -1; /* ObjectInstance */ -static int hf_gnm_multipleConnections = -1; /* MultipleConnections */ -static int hf_gnm_alarmStatus = -1; /* AlarmStatus */ -static int hf_gnm_CurrentProblemList_item = -1; /* CurrentProblem */ -static int hf_gnm_DisconnectResult_item = -1; /* DisconnectResult_item */ -static int hf_gnm_failed = -1; /* Failed */ -static int hf_gnm_disconnected = -1; /* ObjectInstance */ -static int hf_gnm_broadcast = -1; /* SET_OF_ObjectInstance */ -static int hf_gnm_broadcast_item = -1; /* ObjectInstance */ -static int hf_gnm_broadcastConcatenated = -1; /* T_broadcastConcatenated */ -static int hf_gnm_broadcastConcatenated_item = -1; /* SEQUENCE_OF_ObjectInstance */ -static int hf_gnm__item_item = -1; /* ObjectInstance */ -static int hf_gnm_fromTp = -1; /* ExplicitTP */ -static int hf_gnm_toTPs = -1; /* SET_OF_ExplicitTP */ -static int hf_gnm_toTPs_item = -1; /* ExplicitTP */ -static int hf_gnm_toTp = -1; /* ExplicitTP */ -static int hf_gnm_oneTPorGTP = -1; /* ObjectInstance */ -static int hf_gnm_listofTPs = -1; /* SEQUENCE_OF_ObjectInstance */ -static int hf_gnm_listofTPs_item = -1; /* ObjectInstance */ -static int hf_gnm_EquipmentHolderAddress_item = -1; /* PrintableString */ -static int hf_gnm_logicalProblem = -1; /* LogicalProblem */ -static int hf_gnm_resourceProblem = -1; /* ResourceProblem */ -static int hf_gnm_holderEmpty = -1; /* NULL */ -static int hf_gnm_inTheAcceptableList = -1; /* CircuitPackType */ -static int hf_gnm_notInTheAcceptableList = -1; /* CircuitPackType */ -static int hf_gnm_unknownType = -1; /* NULL */ -static int hf_gnm_ListOfCharacteristicInformation_item = -1; /* CharacteristicInformation */ -static int hf_gnm_problemCause = -1; /* ProblemCause */ -static int hf_gnm_incorrectInstances = -1; /* SET_OF_ObjectInstance */ -static int hf_gnm_incorrectInstances_item = -1; /* ObjectInstance */ -static int hf_gnm_MultipleConnections_item = -1; /* MultipleConnections_item */ -static int hf_gnm_downstreamNotConnected = -1; /* ObjectInstance */ -static int hf_gnm_downstreamConnected = -1; /* ObjectInstance */ -static int hf_gnm_upstreamNotConnected = -1; /* ObjectInstance */ -static int hf_gnm_upstreamConnected = -1; /* ObjectInstance */ -static int hf_gnm_redline_01 = -1; /* BOOLEAN */ -static int hf_gnm_name = -1; /* CrossConnectionName */ -static int hf_gnm_numericName = -1; /* INTEGER */ -static int hf_gnm_pString = -1; /* GraphicString */ -static int hf_gnm_ObjectList_item = -1; /* ObjectInstance */ -static int hf_gnm_diverse = -1; /* T_diverse */ -static int hf_gnm_downstream = -1; /* SignalRateAndMappingList */ -static int hf_gnm_upStream = -1; /* SignalRateAndMappingList */ -static int hf_gnm_uniform = -1; /* SignalRateAndMappingList */ -static int hf_gnm_pointer = -1; /* ObjectInstance */ -static int hf_gnm_null = -1; /* NULL */ -static int hf_gnm_fromTp_01 = -1; /* ObjectInstance */ -static int hf_gnm_toTp_01 = -1; /* ObjectInstance */ -static int hf_gnm_xCon = -1; /* ObjectInstance */ -static int hf_gnm_toTps = -1; /* T_toTps */ -static int hf_gnm_toTps_item = -1; /* T_toTps_item */ -static int hf_gnm_tp = -1; /* ObjectInstance */ -static int hf_gnm_xConnection = -1; /* ObjectInstance */ -static int hf_gnm_mpXCon = -1; /* ObjectInstance */ -static int hf_gnm_unknown = -1; /* NULL */ -static int hf_gnm_integerValue = -1; /* INTEGER */ -static int hf_gnm_toTPPools = -1; /* ToTPPools */ -static int hf_gnm_toTpPool = -1; /* ObjectInstance */ -static int hf_gnm_notAvailable = -1; /* NULL */ -static int hf_gnm_relatedObject = -1; /* ObjectInstance */ -static int hf_gnm_SequenceOfObjectInstance_item = -1; /* ObjectInstance */ -static int hf_gnm_SignalRateAndMappingList_item = -1; /* SignalRateAndMappingList_item */ -static int hf_gnm_signalRate = -1; /* SignalRate */ -static int hf_gnm_mappingList = -1; /* MappingList */ -static int hf_gnm_wavelength = -1; /* WaveLength */ -static int hf_gnm_simple = -1; /* CharacteristicInformation */ -static int hf_gnm_bundle = -1; /* Bundle */ -static int hf_gnm_complex = -1; /* SEQUENCE_OF_Bundle */ -static int hf_gnm_complex_item = -1; /* Bundle */ -static int hf_gnm_notApplicable = -1; /* NULL */ -static int hf_gnm_softwareInstances = -1; /* SEQUENCE_OF_ObjectInstance */ -static int hf_gnm_softwareInstances_item = -1; /* ObjectInstance */ -static int hf_gnm_softwareIdentifiers = -1; /* T_softwareIdentifiers */ -static int hf_gnm_softwareIdentifiers_item = -1; /* PrintableString */ -static int hf_gnm_SupportableClientList_item = -1; /* ObjectClass */ -static int hf_gnm_sourceType = -1; /* T_sourceType */ -static int hf_gnm_sourceID = -1; /* ObjectInstance */ -static int hf_gnm_primaryTimingSource = -1; /* SystemTiming */ -static int hf_gnm_secondaryTimingSource = -1; /* SystemTiming */ -static int hf_gnm_toTpOrGTP = -1; /* ExplicitTP */ -static int hf_gnm_toPool = -1; /* ObjectInstance */ -static int hf_gnm_ToTPPools_item = -1; /* ToTPPools_item */ -static int hf_gnm_tpPoolId = -1; /* ObjectInstance */ -static int hf_gnm_numberOfTPs = -1; /* INTEGER */ -static int hf_gnm_TpsInGtpList_item = -1; /* ObjectInstance */ -/* named bits */ -static int hf_gnm_TransmissionCharacteristics_satellite = -1; -static int hf_gnm_TransmissionCharacteristics_dCME = -1; -static int hf_gnm_TransmissionCharacteristics_echoControl = -1; - -/*--- End of included file: packet-gnm-hf.c ---*/ -#line 50 "../../asn1/gnm/packet-gnm-template.c" - -/* Initialize the subtree pointers */ - -/*--- Included file: packet-gnm-ett.c ---*/ -#line 1 "../../asn1/gnm/packet-gnm-ett.c" -static gint ett_gnm_MappingList = -1; -static gint ett_gnm_SignalRate = -1; -static gint ett_gnm_SupportedTOClasses = -1; -static gint ett_gnm_AcceptableCircuitPackTypeList = -1; -static gint ett_gnm_AddLeg = -1; -static gint ett_gnm_SET_OF_ToTermSpecifier = -1; -static gint ett_gnm_AlarmSeverityAssignment = -1; -static gint ett_gnm_AlarmSeverityAssignmentList = -1; -static gint ett_gnm_Bundle = -1; -static gint ett_gnm_Connected = -1; -static gint ett_gnm_ConnectInformation = -1; -static gint ett_gnm_ConnectInformation_item = -1; -static gint ett_gnm_T_itemType = -1; -static gint ett_gnm_ConnectivityPointer = -1; -static gint ett_gnm_SEQUENCE_OF_ObjectInstance = -1; -static gint ett_gnm_ConnectionType = -1; -static gint ett_gnm_ConnectionTypeBi = -1; -static gint ett_gnm_CrossConnectionObjectPointer = -1; -static gint ett_gnm_CurrentProblem = -1; -static gint ett_gnm_CurrentProblemList = -1; -static gint ett_gnm_DisconnectResult = -1; -static gint ett_gnm_DisconnectResult_item = -1; -static gint ett_gnm_DownstreamConnectivityPointer = -1; -static gint ett_gnm_SET_OF_ObjectInstance = -1; -static gint ett_gnm_T_broadcastConcatenated = -1; -static gint ett_gnm_ExplicitPtoMP = -1; -static gint ett_gnm_SET_OF_ExplicitTP = -1; -static gint ett_gnm_ExplicitPtoP = -1; -static gint ett_gnm_ExplicitTP = -1; -static gint ett_gnm_EquipmentHolderAddress = -1; -static gint ett_gnm_Failed = -1; -static gint ett_gnm_HolderStatus = -1; -static gint ett_gnm_ListOfCharacteristicInformation = -1; -static gint ett_gnm_LogicalProblem = -1; -static gint ett_gnm_MultipleConnections = -1; -static gint ett_gnm_MultipleConnections_item = -1; -static gint ett_gnm_NamedCrossConnection = -1; -static gint ett_gnm_NameType = -1; -static gint ett_gnm_ObjectList = -1; -static gint ett_gnm_PhysicalPortSignalRateAndMappingList = -1; -static gint ett_gnm_T_diverse = -1; -static gint ett_gnm_PointerOrNull = -1; -static gint ett_gnm_PointToPoint = -1; -static gint ett_gnm_PointToMultipoint = -1; -static gint ett_gnm_T_toTps = -1; -static gint ett_gnm_T_toTps_item = -1; -static gint ett_gnm_ProblemCause = -1; -static gint ett_gnm_PtoMPools = -1; -static gint ett_gnm_PtoTPPool = -1; -static gint ett_gnm_RelatedObjectInstance = -1; -static gint ett_gnm_ResourceProblem = -1; -static gint ett_gnm_SequenceOfObjectInstance = -1; -static gint ett_gnm_SignalRateAndMappingList = -1; -static gint ett_gnm_SignalRateAndMappingList_item = -1; -static gint ett_gnm_SignalType = -1; -static gint ett_gnm_SEQUENCE_OF_Bundle = -1; -static gint ett_gnm_SubordinateCircuitPackSoftwareLoad = -1; -static gint ett_gnm_T_softwareIdentifiers = -1; -static gint ett_gnm_SupportableClientList = -1; -static gint ett_gnm_SystemTiming = -1; -static gint ett_gnm_SystemTimingSource = -1; -static gint ett_gnm_ToTermSpecifier = -1; -static gint ett_gnm_ToTPPools = -1; -static gint ett_gnm_ToTPPools_item = -1; -static gint ett_gnm_TpsInGtpList = -1; -static gint ett_gnm_TransmissionCharacteristics = -1; - -/*--- End of included file: packet-gnm-ett.c ---*/ -#line 53 "../../asn1/gnm/packet-gnm-template.c" - - -/*--- Included file: packet-gnm-fn.c ---*/ -#line 1 "../../asn1/gnm/packet-gnm-fn.c" - - -static int -dissect_gnm_CharacteristicInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); - - return offset; -} - - - -static int -dissect_gnm_PayloadLevel(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_gnm_CharacteristicInformation(implicit_tag, tvb, offset, actx, tree, hf_index); - - return offset; -} - - -static const ber_sequence_t MappingList_sequence_of[1] = { - { &hf_gnm_MappingList_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_gnm_PayloadLevel }, -}; - -static int -dissect_gnm_MappingList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - MappingList_sequence_of, hf_index, ett_gnm_MappingList); - - return offset; -} - - - -static int -dissect_gnm_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); - - return offset; -} - - -static const value_string gnm_SignalRate_vals[] = { - { 0, "objectClass" }, - { 1, "characteristicInformation" }, - { 0, NULL } -}; - -static const ber_choice_t SignalRate_choice[] = { - { 0, &hf_gnm_objectClass , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_OBJECT_IDENTIFIER }, - { 1, &hf_gnm_characteristicInformation, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_CharacteristicInformation }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_SignalRate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - SignalRate_choice, hf_index, ett_gnm_SignalRate, - NULL); - - return offset; -} - - -static const ber_sequence_t SupportedTOClasses_set_of[1] = { - { &hf_gnm_SupportedTOClasses_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_gnm_OBJECT_IDENTIFIER }, -}; - -static int -dissect_gnm_SupportedTOClasses(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - SupportedTOClasses_set_of, hf_index, ett_gnm_SupportedTOClasses); - - return offset; -} - - - -static int -dissect_gnm_PrintableString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t AcceptableCircuitPackTypeList_set_of[1] = { - { &hf_gnm_AcceptableCircuitPackTypeList_item, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_gnm_PrintableString }, -}; - -static int -dissect_gnm_AcceptableCircuitPackTypeList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - AcceptableCircuitPackTypeList_set_of, hf_index, ett_gnm_AcceptableCircuitPackTypeList); - - return offset; -} - - -static const ber_sequence_t SEQUENCE_OF_ObjectInstance_sequence_of[1] = { - { &hf_gnm_concatenated_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, -}; - -static int -dissect_gnm_SEQUENCE_OF_ObjectInstance(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_OF_ObjectInstance_sequence_of, hf_index, ett_gnm_SEQUENCE_OF_ObjectInstance); - - return offset; -} - - -static const value_string gnm_ExplicitTP_vals[] = { - { 0, "oneTPorGTP" }, - { 1, "listofTPs" }, - { 0, NULL } -}; - -static const ber_choice_t ExplicitTP_choice[] = { - { 0, &hf_gnm_oneTPorGTP , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { 1, &hf_gnm_listofTPs , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_SEQUENCE_OF_ObjectInstance }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ExplicitTP(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - ExplicitTP_choice, hf_index, ett_gnm_ExplicitTP, - NULL); - - return offset; -} - - -static const value_string gnm_ToTermSpecifier_vals[] = { - { 0, "toTpOrGTP" }, - { 1, "toPool" }, - { 0, NULL } -}; - -static const ber_choice_t ToTermSpecifier_choice[] = { - { 0, &hf_gnm_toTpOrGTP , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_ExplicitTP }, - { 1, &hf_gnm_toPool , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_cmip_ObjectInstance }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ToTermSpecifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - ToTermSpecifier_choice, hf_index, ett_gnm_ToTermSpecifier, - NULL); - - return offset; -} - - -static const ber_sequence_t SET_OF_ToTermSpecifier_set_of[1] = { - { &hf_gnm_legs_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ToTermSpecifier }, -}; - -static int -dissect_gnm_SET_OF_ToTermSpecifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - SET_OF_ToTermSpecifier_set_of, hf_index, ett_gnm_SET_OF_ToTermSpecifier); - - return offset; -} - - -static const ber_sequence_t AddLeg_sequence[] = { - { &hf_gnm_mpCrossConnection, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { &hf_gnm_legs , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_SET_OF_ToTermSpecifier }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_AddLeg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - AddLeg_sequence, hf_index, ett_gnm_AddLeg); - - return offset; -} - - -static const value_string gnm_AlarmSeverityCode_vals[] = { - { 0, "non-alarmed" }, - { 1, "minor" }, - { 2, "major" }, - { 3, "critical" }, - { 4, "warning" }, - { 0, NULL } -}; - - -static int -dissect_gnm_AlarmSeverityCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t AlarmSeverityAssignment_sequence[] = { - { &hf_gnm_problem , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ProbableCause }, - { &hf_gnm_severityAssignedServiceAffecting, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gnm_AlarmSeverityCode }, - { &hf_gnm_severityAssignedNonServiceAffecting, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gnm_AlarmSeverityCode }, - { &hf_gnm_severityAssignedServiceIndependent, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gnm_AlarmSeverityCode }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_AlarmSeverityAssignment(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - AlarmSeverityAssignment_sequence, hf_index, ett_gnm_AlarmSeverityAssignment); - - return offset; -} - - -static const ber_sequence_t AlarmSeverityAssignmentList_set_of[1] = { - { &hf_gnm_AlarmSeverityAssignmentList_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_AlarmSeverityAssignment }, -}; - -static int -dissect_gnm_AlarmSeverityAssignmentList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - AlarmSeverityAssignmentList_set_of, hf_index, ett_gnm_AlarmSeverityAssignmentList); - - return offset; -} - - -static const value_string gnm_AlarmStatus_vals[] = { - { 0, "cleared" }, - { 1, "activeReportable-Indeterminate" }, - { 2, "activeReportable-Warning" }, - { 3, "activeReportable-Minor" }, - { 4, "activeReportable-Major" }, - { 5, "activeReportable-Critical" }, - { 6, "activePending" }, - { 0, NULL } -}; - - -static int -dissect_gnm_AlarmStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - - -static int -dissect_gnm_Boolean(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); - - return offset; -} - - - -static int -dissect_gnm_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t Bundle_sequence[] = { - { &hf_gnm_characteristicInfoType, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_gnm_CharacteristicInformation }, - { &hf_gnm_bundlingFactor , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gnm_INTEGER }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_Bundle(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - Bundle_sequence, hf_index, ett_gnm_Bundle); - - return offset; -} - - - -static int -dissect_gnm_ChannelNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const value_string gnm_CircuitDirectionality_vals[] = { - { 0, "onewayOut" }, - { 1, "onewayIn" }, - { 2, "twoway" }, - { 0, NULL } -}; - - -static int -dissect_gnm_CircuitDirectionality(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - - -static int -dissect_gnm_CircuitPackType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t PointToPoint_sequence[] = { - { &hf_gnm_fromTp_01 , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { &hf_gnm_toTp_01 , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { &hf_gnm_xCon , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_PointToPoint(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - PointToPoint_sequence, hf_index, ett_gnm_PointToPoint); - - return offset; -} - - -static const ber_sequence_t T_toTps_item_sequence[] = { - { &hf_gnm_tp , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { &hf_gnm_xConnection , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_T_toTps_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - T_toTps_item_sequence, hf_index, ett_gnm_T_toTps_item); - - return offset; -} - - -static const ber_sequence_t T_toTps_set_of[1] = { - { &hf_gnm_toTps_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_T_toTps_item }, -}; - -static int -dissect_gnm_T_toTps(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - T_toTps_set_of, hf_index, ett_gnm_T_toTps); - - return offset; -} - - -static const ber_sequence_t PointToMultipoint_sequence[] = { - { &hf_gnm_fromTp_01 , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { &hf_gnm_toTps , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_T_toTps }, - { &hf_gnm_mpXCon , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_PointToMultipoint(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - PointToMultipoint_sequence, hf_index, ett_gnm_PointToMultipoint); - - return offset; -} - - -static const value_string gnm_Connected_vals[] = { - { 0, "pointToPoint" }, - { 1, "pointToMultipoint" }, - { 0, NULL } -}; - -static const ber_choice_t Connected_choice[] = { - { 0, &hf_gnm_pointToPoint , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_PointToPoint }, - { 1, &hf_gnm_pointToMultipoint, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_PointToMultipoint }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_Connected(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - Connected_choice, hf_index, ett_gnm_Connected, - NULL); - - return offset; -} - - -static const ber_sequence_t ExplicitPtoP_sequence[] = { - { &hf_gnm_fromTp , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ExplicitTP }, - { &hf_gnm_toTp , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ExplicitTP }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ExplicitPtoP(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - ExplicitPtoP_sequence, hf_index, ett_gnm_ExplicitPtoP); - - return offset; -} - - -static const ber_sequence_t PtoTPPool_sequence[] = { - { &hf_gnm_fromTp , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ExplicitTP }, - { &hf_gnm_toTpPool , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_PtoTPPool(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - PtoTPPool_sequence, hf_index, ett_gnm_PtoTPPool); - - return offset; -} - - -static const ber_sequence_t SET_OF_ExplicitTP_set_of[1] = { - { &hf_gnm_toTPs_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ExplicitTP }, -}; - -static int -dissect_gnm_SET_OF_ExplicitTP(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - SET_OF_ExplicitTP_set_of, hf_index, ett_gnm_SET_OF_ExplicitTP); - - return offset; -} - - -static const ber_sequence_t ExplicitPtoMP_sequence[] = { - { &hf_gnm_fromTp , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ExplicitTP }, - { &hf_gnm_toTPs , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_SET_OF_ExplicitTP }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ExplicitPtoMP(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - ExplicitPtoMP_sequence, hf_index, ett_gnm_ExplicitPtoMP); - - return offset; -} - - -static const ber_sequence_t ToTPPools_item_sequence[] = { - { &hf_gnm_tpPoolId , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { &hf_gnm_numberOfTPs , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gnm_INTEGER }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ToTPPools_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - ToTPPools_item_sequence, hf_index, ett_gnm_ToTPPools_item); - - return offset; -} - - -static const ber_sequence_t ToTPPools_set_of[1] = { - { &hf_gnm_ToTPPools_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_ToTPPools_item }, -}; - -static int -dissect_gnm_ToTPPools(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - ToTPPools_set_of, hf_index, ett_gnm_ToTPPools); - - return offset; -} - - -static const ber_sequence_t PtoMPools_sequence[] = { - { &hf_gnm_fromTp , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ExplicitTP }, - { &hf_gnm_toTPPools , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_ToTPPools }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_PtoMPools(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - PtoMPools_sequence, hf_index, ett_gnm_PtoMPools); - - return offset; -} - - -static const value_string gnm_ConnectionType_vals[] = { - { 0, "explicitPToP" }, - { 1, "ptoTpPool" }, - { 2, "explicitPtoMP" }, - { 3, "ptoMPools" }, - { 0, NULL } -}; - -static const ber_choice_t ConnectionType_choice[] = { - { 0, &hf_gnm_explicitPToP , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_ExplicitPtoP }, - { 1, &hf_gnm_ptoTpPool , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_PtoTPPool }, - { 2, &hf_gnm_explicitPtoMP , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gnm_ExplicitPtoMP }, - { 3, &hf_gnm_ptoMPools , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_gnm_PtoMPools }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ConnectionType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - ConnectionType_choice, hf_index, ett_gnm_ConnectionType, - NULL); - - return offset; -} - - -static const value_string gnm_ConnectionTypeBi_vals[] = { - { 0, "explicitPToP" }, - { 1, "ptoTpPool" }, - { 0, NULL } -}; - -static const ber_choice_t ConnectionTypeBi_choice[] = { - { 0, &hf_gnm_explicitPToP , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_ExplicitPtoP }, - { 1, &hf_gnm_ptoTpPool , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_PtoTPPool }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ConnectionTypeBi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - ConnectionTypeBi_choice, hf_index, ett_gnm_ConnectionTypeBi, - NULL); - - return offset; -} - - -static const value_string gnm_T_itemType_vals[] = { - { 0, "unidirectional" }, - { 1, "bidirectional" }, - { 2, "addleg" }, - { 0, NULL } -}; - -static const ber_choice_t T_itemType_choice[] = { - { 0, &hf_gnm_unidirectional , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_ConnectionType }, - { 1, &hf_gnm_bidirectional , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_ConnectionTypeBi }, - { 2, &hf_gnm_addleg , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gnm_AddLeg }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_T_itemType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - T_itemType_choice, hf_index, ett_gnm_T_itemType, - NULL); - - return offset; -} - - - -static int -dissect_gnm_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); - - return offset; -} - - - -static int -dissect_gnm_CrossConnectionName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t NamedCrossConnection_sequence[] = { - { &hf_gnm_redline_01 , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_gnm_BOOLEAN }, - { &hf_gnm_name , BER_CLASS_UNI, BER_UNI_TAG_GraphicString, BER_FLAGS_NOOWNTAG, dissect_gnm_CrossConnectionName }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_NamedCrossConnection(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - NamedCrossConnection_sequence, hf_index, ett_gnm_NamedCrossConnection); - - return offset; -} - - - -static int -dissect_gnm_UserLabel(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t ConnectInformation_item_sequence[] = { - { &hf_gnm_itemType , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_T_itemType }, - { &hf_gnm_administrativeState, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmip_AdministrativeState }, - { &hf_gnm_namedCrossConnection, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gnm_NamedCrossConnection }, - { &hf_gnm_userLabel , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gnm_UserLabel }, - { &hf_gnm_redline , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gnm_Boolean }, - { &hf_gnm_additionalInfo , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cmip_AdditionalInformation }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ConnectInformation_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - ConnectInformation_item_sequence, hf_index, ett_gnm_ConnectInformation_item); - - return offset; -} - - -static const ber_sequence_t ConnectInformation_sequence_of[1] = { - { &hf_gnm_ConnectInformation_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_ConnectInformation_item }, -}; - -static int -dissect_gnm_ConnectInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - ConnectInformation_sequence_of, hf_index, ett_gnm_ConnectInformation); - - return offset; -} - - - -static int -dissect_gnm_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index); - - return offset; -} - - -static const value_string gnm_ConnectivityPointer_vals[] = { - { 0, "none" }, - { 1, "single" }, - { 2, "concatenated" }, - { 0, NULL } -}; - -static const ber_choice_t ConnectivityPointer_choice[] = { - { 0, &hf_gnm_none , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_gnm_NULL }, - { 1, &hf_gnm_single , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { 2, &hf_gnm_concatenated , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_SEQUENCE_OF_ObjectInstance }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ConnectivityPointer(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - ConnectivityPointer_choice, hf_index, ett_gnm_ConnectivityPointer, - NULL); - - return offset; -} - - - -static int -dissect_gnm_Count(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const value_string gnm_MultipleConnections_item_vals[] = { - { 0, "downstreamNotConnected" }, - { 1, "downstreamConnected" }, - { 2, "upstreamNotConnected" }, - { 3, "upstreamConnected" }, - { 0, NULL } -}; - -static const ber_choice_t MultipleConnections_item_choice[] = { - { 0, &hf_gnm_downstreamNotConnected, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_cmip_ObjectInstance }, - { 1, &hf_gnm_downstreamConnected, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_cmip_ObjectInstance }, - { 2, &hf_gnm_upstreamNotConnected, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_cmip_ObjectInstance }, - { 3, &hf_gnm_upstreamConnected, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_cmip_ObjectInstance }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_MultipleConnections_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - MultipleConnections_item_choice, hf_index, ett_gnm_MultipleConnections_item, - NULL); - - return offset; -} - - -static const ber_sequence_t MultipleConnections_set_of[1] = { - { &hf_gnm_MultipleConnections_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_MultipleConnections_item }, -}; - -static int -dissect_gnm_MultipleConnections(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - MultipleConnections_set_of, hf_index, ett_gnm_MultipleConnections); - - return offset; -} - - -static const value_string gnm_CrossConnectionObjectPointer_vals[] = { - { 0, "notConnected" }, - { 1, "connected" }, - { 2, "multipleConnections" }, - { 0, NULL } -}; - -static const ber_choice_t CrossConnectionObjectPointer_choice[] = { - { 0, &hf_gnm_notConnected , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_cmip_ObjectInstance }, - { 1, &hf_gnm_connected , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_cmip_ObjectInstance }, - { 2, &hf_gnm_multipleConnections, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_MultipleConnections }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_CrossConnectionObjectPointer(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - CrossConnectionObjectPointer_choice, hf_index, ett_gnm_CrossConnectionObjectPointer, - NULL); - - return offset; -} - - -static const ber_sequence_t CurrentProblem_sequence[] = { - { &hf_gnm_problem , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_cmip_ProbableCause }, - { &hf_gnm_alarmStatus , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_AlarmStatus }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_CurrentProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - CurrentProblem_sequence, hf_index, ett_gnm_CurrentProblem); - - return offset; -} - - -static const ber_sequence_t CurrentProblemList_set_of[1] = { - { &hf_gnm_CurrentProblemList_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_CurrentProblem }, -}; - -static int -dissect_gnm_CurrentProblemList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - CurrentProblemList_set_of, hf_index, ett_gnm_CurrentProblemList); - - return offset; -} - - -static const value_string gnm_Directionality_vals[] = { - { 0, "unidirectional" }, - { 1, "bidirectional" }, - { 0, NULL } -}; - - -static int -dissect_gnm_Directionality(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const value_string gnm_ProblemCause_vals[] = { - { 0, "unknown" }, - { 1, "integerValue" }, - { 0, NULL } -}; - -static const ber_choice_t ProblemCause_choice[] = { - { 0, &hf_gnm_unknown , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_gnm_NULL }, - { 1, &hf_gnm_integerValue , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gnm_INTEGER }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ProblemCause(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - ProblemCause_choice, hf_index, ett_gnm_ProblemCause, - NULL); - - return offset; -} - - -static const ber_sequence_t SET_OF_ObjectInstance_set_of[1] = { - { &hf_gnm_broadcast_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, -}; - -static int -dissect_gnm_SET_OF_ObjectInstance(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - SET_OF_ObjectInstance_set_of, hf_index, ett_gnm_SET_OF_ObjectInstance); - - return offset; -} - - -static const ber_sequence_t LogicalProblem_sequence[] = { - { &hf_gnm_problemCause , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_ProblemCause }, - { &hf_gnm_incorrectInstances, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gnm_SET_OF_ObjectInstance }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_LogicalProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - LogicalProblem_sequence, hf_index, ett_gnm_LogicalProblem); - - return offset; -} - - -static const value_string gnm_ResourceProblem_vals[] = { - { 0, "unknown" }, - { 1, "integerValue" }, - { 0, NULL } -}; - -static const ber_choice_t ResourceProblem_choice[] = { - { 0, &hf_gnm_unknown , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_gnm_NULL }, - { 1, &hf_gnm_integerValue , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gnm_INTEGER }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_ResourceProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - ResourceProblem_choice, hf_index, ett_gnm_ResourceProblem, - NULL); - - return offset; -} - - -static const value_string gnm_Failed_vals[] = { - { 0, "logicalProblem" }, - { 1, "resourceProblem" }, - { 0, NULL } -}; - -static const ber_choice_t Failed_choice[] = { - { 0, &hf_gnm_logicalProblem , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_LogicalProblem }, - { 1, &hf_gnm_resourceProblem , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_gnm_ResourceProblem }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_Failed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - Failed_choice, hf_index, ett_gnm_Failed, - NULL); - - return offset; -} - - -static const value_string gnm_DisconnectResult_item_vals[] = { - { -1/*choice*/, "failed" }, - { -1/*choice*/, "disconnected" }, - { 0, NULL } -}; - -static const ber_choice_t DisconnectResult_item_choice[] = { - { -1/*choice*/, &hf_gnm_failed , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_gnm_Failed }, - { -1/*choice*/, &hf_gnm_disconnected , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_DisconnectResult_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - DisconnectResult_item_choice, hf_index, ett_gnm_DisconnectResult_item, - NULL); - - return offset; -} - - -static const ber_sequence_t DisconnectResult_sequence_of[1] = { - { &hf_gnm_DisconnectResult_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_DisconnectResult_item }, -}; - -static int -dissect_gnm_DisconnectResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - DisconnectResult_sequence_of, hf_index, ett_gnm_DisconnectResult); - - return offset; -} - - -static const ber_sequence_t T_broadcastConcatenated_set_of[1] = { - { &hf_gnm_broadcastConcatenated_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_SEQUENCE_OF_ObjectInstance }, -}; - -static int -dissect_gnm_T_broadcastConcatenated(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - T_broadcastConcatenated_set_of, hf_index, ett_gnm_T_broadcastConcatenated); - - return offset; -} - - -static const value_string gnm_DownstreamConnectivityPointer_vals[] = { - { 0, "none" }, - { 1, "single" }, - { 2, "concatenated" }, - { 3, "broadcast" }, - { 4, "broadcastConcatenated" }, - { 0, NULL } -}; - -static const ber_choice_t DownstreamConnectivityPointer_choice[] = { - { 0, &hf_gnm_none , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_gnm_NULL }, - { 1, &hf_gnm_single , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { 2, &hf_gnm_concatenated , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_SEQUENCE_OF_ObjectInstance }, - { 3, &hf_gnm_broadcast , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_SET_OF_ObjectInstance }, - { 4, &hf_gnm_broadcastConcatenated, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_T_broadcastConcatenated }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_DownstreamConnectivityPointer(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - DownstreamConnectivityPointer_choice, hf_index, ett_gnm_DownstreamConnectivityPointer, - NULL); - - return offset; -} - - - -static int -dissect_gnm_ExternalTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index); - - return offset; -} - - -static const ber_sequence_t EquipmentHolderAddress_sequence_of[1] = { - { &hf_gnm_EquipmentHolderAddress_item, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_gnm_PrintableString }, -}; - -static int -dissect_gnm_EquipmentHolderAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - EquipmentHolderAddress_sequence_of, hf_index, ett_gnm_EquipmentHolderAddress); - - return offset; -} - - - -static int -dissect_gnm_EquipmentHolderType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const value_string gnm_HolderStatus_vals[] = { - { 0, "holderEmpty" }, - { 1, "inTheAcceptableList" }, - { 2, "notInTheAcceptableList" }, - { 3, "unknownType" }, - { 0, NULL } -}; - -static const ber_choice_t HolderStatus_choice[] = { - { 0, &hf_gnm_holderEmpty , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_NULL }, - { 1, &hf_gnm_inTheAcceptableList, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_CircuitPackType }, - { 2, &hf_gnm_notInTheAcceptableList, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gnm_CircuitPackType }, - { 3, &hf_gnm_unknownType , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_gnm_NULL }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_HolderStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - HolderStatus_choice, hf_index, ett_gnm_HolderStatus, - NULL); - - return offset; -} - - -static const value_string gnm_InformationTransferCapabilities_vals[] = { - { 0, "speech" }, - { 1, "audio3pt1" }, - { 2, "audio7" }, - { 3, "audioComb" }, - { 4, "digitalRestricted56" }, - { 5, "digitalUnrestricted64" }, - { 0, NULL } -}; - - -static int -dissect_gnm_InformationTransferCapabilities(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t ListOfCharacteristicInformation_set_of[1] = { - { &hf_gnm_ListOfCharacteristicInformation_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_gnm_CharacteristicInformation }, -}; - -static int -dissect_gnm_ListOfCharacteristicInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - ListOfCharacteristicInformation_set_of, hf_index, ett_gnm_ListOfCharacteristicInformation); - - return offset; -} - - - -static int -dissect_gnm_GraphicString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const value_string gnm_NameType_vals[] = { - { 0, "numericName" }, - { 1, "pString" }, - { 0, NULL } -}; - -static const ber_choice_t NameType_choice[] = { - { 0, &hf_gnm_numericName , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gnm_INTEGER }, - { 1, &hf_gnm_pString , BER_CLASS_UNI, BER_UNI_TAG_GraphicString, BER_FLAGS_NOOWNTAG, dissect_gnm_GraphicString }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_NameType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - NameType_choice, hf_index, ett_gnm_NameType, - NULL); - - return offset; -} - - - -static int -dissect_gnm_NumberOfCircuits(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t ObjectList_set_of[1] = { - { &hf_gnm_ObjectList_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, -}; - -static int -dissect_gnm_ObjectList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - ObjectList_set_of, hf_index, ett_gnm_ObjectList); - - return offset; -} - - - -static int -dissect_gnm_WaveLength(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t SignalRateAndMappingList_item_sequence[] = { - { &hf_gnm_signalRate , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gnm_SignalRate }, - { &hf_gnm_mappingList , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gnm_MappingList }, - { &hf_gnm_wavelength , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gnm_WaveLength }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_SignalRateAndMappingList_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - SignalRateAndMappingList_item_sequence, hf_index, ett_gnm_SignalRateAndMappingList_item); - - return offset; -} - - -static const ber_sequence_t SignalRateAndMappingList_set_of[1] = { - { &hf_gnm_SignalRateAndMappingList_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_SignalRateAndMappingList_item }, -}; - -static int -dissect_gnm_SignalRateAndMappingList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - SignalRateAndMappingList_set_of, hf_index, ett_gnm_SignalRateAndMappingList); - - return offset; -} - - -static const ber_sequence_t T_diverse_sequence[] = { - { &hf_gnm_downstream , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_SignalRateAndMappingList }, - { &hf_gnm_upStream , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_SignalRateAndMappingList }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_T_diverse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - T_diverse_sequence, hf_index, ett_gnm_T_diverse); - - return offset; -} - - -static const value_string gnm_PhysicalPortSignalRateAndMappingList_vals[] = { - { 0, "diverse" }, - { 1, "uniform" }, - { 0, NULL } -}; - -static const ber_choice_t PhysicalPortSignalRateAndMappingList_choice[] = { - { 0, &hf_gnm_diverse , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_T_diverse }, - { 1, &hf_gnm_uniform , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_gnm_SignalRateAndMappingList }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_PhysicalPortSignalRateAndMappingList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - PhysicalPortSignalRateAndMappingList_choice, hf_index, ett_gnm_PhysicalPortSignalRateAndMappingList, - NULL); - - return offset; -} - - - -static int -dissect_gnm_Pointer(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_cmip_ObjectInstance(implicit_tag, tvb, offset, actx, tree, hf_index); - - return offset; -} - - -static const value_string gnm_PointerOrNull_vals[] = { - { 0, "pointer" }, - { 1, "null" }, - { 0, NULL } -}; - -static const ber_choice_t PointerOrNull_choice[] = { - { 0, &hf_gnm_pointer , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { 1, &hf_gnm_null , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_gnm_NULL }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_PointerOrNull(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - PointerOrNull_choice, hf_index, ett_gnm_PointerOrNull, - NULL); - - return offset; -} - - -static const value_string gnm_RelatedObjectInstance_vals[] = { - { 0, "notAvailable" }, - { 1, "relatedObject" }, - { 0, NULL } -}; - -static const ber_choice_t RelatedObjectInstance_choice[] = { - { 0, &hf_gnm_notAvailable , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_gnm_NULL }, - { 1, &hf_gnm_relatedObject , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_RelatedObjectInstance(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - RelatedObjectInstance_choice, hf_index, ett_gnm_RelatedObjectInstance, - NULL); - - return offset; -} - - -static const value_string gnm_Replaceable_vals[] = { - { 0, "yes" }, - { 1, "no" }, - { 2, "notapplicable" }, - { 0, NULL } -}; - - -static int -dissect_gnm_Replaceable(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t SequenceOfObjectInstance_sequence_of[1] = { - { &hf_gnm_SequenceOfObjectInstance_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, -}; - -static int -dissect_gnm_SequenceOfObjectInstance(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - SequenceOfObjectInstance_sequence_of, hf_index, ett_gnm_SequenceOfObjectInstance); - - return offset; -} - - - -static int -dissect_gnm_SerialNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const value_string gnm_SignallingCapabilities_vals[] = { - { 0, "isup" }, - { 1, "isup92" }, - { 2, "itu-tNo5" }, - { 3, "r2" }, - { 4, "itu-tNo6" }, - { 5, "tup" }, - { 0, NULL } -}; - - -static int -dissect_gnm_SignallingCapabilities(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t SEQUENCE_OF_Bundle_sequence_of[1] = { - { &hf_gnm_complex_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_Bundle }, -}; - -static int -dissect_gnm_SEQUENCE_OF_Bundle(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_OF_Bundle_sequence_of, hf_index, ett_gnm_SEQUENCE_OF_Bundle); - - return offset; -} - - -static const value_string gnm_SignalType_vals[] = { - { 0, "simple" }, - { 1, "bundle" }, - { 2, "complex" }, - { 0, NULL } -}; - -static const ber_choice_t SignalType_choice[] = { - { 0, &hf_gnm_simple , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_gnm_CharacteristicInformation }, - { 1, &hf_gnm_bundle , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_Bundle }, - { 2, &hf_gnm_complex , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_SEQUENCE_OF_Bundle }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_SignalType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - SignalType_choice, hf_index, ett_gnm_SignalType, - NULL); - - return offset; -} - - -static const ber_sequence_t T_softwareIdentifiers_sequence_of[1] = { - { &hf_gnm_softwareIdentifiers_item, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_gnm_PrintableString }, -}; - -static int -dissect_gnm_T_softwareIdentifiers(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - T_softwareIdentifiers_sequence_of, hf_index, ett_gnm_T_softwareIdentifiers); - - return offset; -} - - -static const value_string gnm_SubordinateCircuitPackSoftwareLoad_vals[] = { - { 0, "notApplicable" }, - { 1, "softwareInstances" }, - { 2, "softwareIdentifiers" }, - { 0, NULL } -}; - -static const ber_choice_t SubordinateCircuitPackSoftwareLoad_choice[] = { - { 0, &hf_gnm_notApplicable , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_gnm_NULL }, - { 1, &hf_gnm_softwareInstances, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gnm_SEQUENCE_OF_ObjectInstance }, - { 2, &hf_gnm_softwareIdentifiers, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gnm_T_softwareIdentifiers }, - { 0, NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_SubordinateCircuitPackSoftwareLoad(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_choice(actx, tree, tvb, offset, - SubordinateCircuitPackSoftwareLoad_choice, hf_index, ett_gnm_SubordinateCircuitPackSoftwareLoad, - NULL); - - return offset; -} - - -static const ber_sequence_t SupportableClientList_set_of[1] = { - { &hf_gnm_SupportableClientList_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectClass }, -}; - -static int -dissect_gnm_SupportableClientList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, - SupportableClientList_set_of, hf_index, ett_gnm_SupportableClientList); - - return offset; -} - - -static const value_string gnm_T_sourceType_vals[] = { - { 0, "internalTimingSource" }, - { 1, "remoteTimingSource" }, - { 2, "slavedTimingTerminationSignal" }, - { 0, NULL } -}; - - -static int -dissect_gnm_T_sourceType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const ber_sequence_t SystemTiming_sequence[] = { - { &hf_gnm_sourceType , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_gnm_T_sourceType }, - { &hf_gnm_sourceID , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_SystemTiming(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - SystemTiming_sequence, hf_index, ett_gnm_SystemTiming); - - return offset; -} - - -static const ber_sequence_t SystemTimingSource_sequence[] = { - { &hf_gnm_primaryTimingSource, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gnm_SystemTiming }, - { &hf_gnm_secondaryTimingSource, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gnm_SystemTiming }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_gnm_SystemTimingSource(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, - SystemTimingSource_sequence, hf_index, ett_gnm_SystemTimingSource); - - return offset; -} - - -static const ber_sequence_t TpsInGtpList_sequence_of[1] = { - { &hf_gnm_TpsInGtpList_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_cmip_ObjectInstance }, -}; - -static int -dissect_gnm_TpsInGtpList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, - TpsInGtpList_sequence_of, hf_index, ett_gnm_TpsInGtpList); - - return offset; -} - - -static const asn_namedbit TransmissionCharacteristics_bits[] = { - { 0, &hf_gnm_TransmissionCharacteristics_satellite, -1, -1, "satellite", NULL }, - { 1, &hf_gnm_TransmissionCharacteristics_dCME, -1, -1, "dCME", NULL }, - { 2, &hf_gnm_TransmissionCharacteristics_echoControl, -1, -1, "echoControl", NULL }, - { 0, NULL, 0, 0, NULL, NULL } -}; - -static int -dissect_gnm_TransmissionCharacteristics(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset, - TransmissionCharacteristics_bits, hf_index, ett_gnm_TransmissionCharacteristics, - NULL); - - return offset; -} - - - -static int -dissect_gnm_VendorName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - - -static int -dissect_gnm_Version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString, - actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - -/*--- PDUs ---*/ - -static void dissect_SupportedTOClasses_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SupportedTOClasses(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SupportedTOClasses_PDU); -} -static void dissect_AcceptableCircuitPackTypeList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_AcceptableCircuitPackTypeList(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_AcceptableCircuitPackTypeList_PDU); -} -static void dissect_AlarmSeverityAssignmentList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_AlarmSeverityAssignmentList(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_AlarmSeverityAssignmentList_PDU); -} -static void dissect_AlarmStatus_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_AlarmStatus(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_AlarmStatus_PDU); -} -static void dissect_Boolean_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_Boolean(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_Boolean_PDU); -} -static void dissect_ChannelNumber_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_ChannelNumber(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_ChannelNumber_PDU); -} -static void dissect_CharacteristicInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_CharacteristicInformation(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_CharacteristicInformation_PDU); -} -static void dissect_CircuitDirectionality_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_CircuitDirectionality(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_CircuitDirectionality_PDU); -} -static void dissect_CircuitPackType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_CircuitPackType(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_CircuitPackType_PDU); -} -static void dissect_ConnectInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_ConnectInformation(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_ConnectInformation_PDU); -} -static void dissect_ConnectivityPointer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_ConnectivityPointer(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_ConnectivityPointer_PDU); -} -static void dissect_Count_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_Count(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_Count_PDU); -} -static void dissect_CrossConnectionName_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_CrossConnectionName(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_CrossConnectionName_PDU); -} -static void dissect_CrossConnectionObjectPointer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_CrossConnectionObjectPointer(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_CrossConnectionObjectPointer_PDU); -} -static void dissect_CurrentProblemList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_CurrentProblemList(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_CurrentProblemList_PDU); -} -static void dissect_Directionality_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_Directionality(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_Directionality_PDU); -} -static void dissect_DisconnectResult_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_DisconnectResult(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_DisconnectResult_PDU); -} -static void dissect_DownstreamConnectivityPointer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_DownstreamConnectivityPointer(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_DownstreamConnectivityPointer_PDU); -} -static void dissect_ExternalTime_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_ExternalTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_ExternalTime_PDU); -} -static void dissect_EquipmentHolderAddress_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_EquipmentHolderAddress(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_EquipmentHolderAddress_PDU); -} -static void dissect_EquipmentHolderType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_EquipmentHolderType(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_EquipmentHolderType_PDU); -} -static void dissect_HolderStatus_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_HolderStatus(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_HolderStatus_PDU); -} -static void dissect_InformationTransferCapabilities_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_InformationTransferCapabilities(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_InformationTransferCapabilities_PDU); -} -static void dissect_ListOfCharacteristicInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_ListOfCharacteristicInformation(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_ListOfCharacteristicInformation_PDU); -} -static void dissect_NameType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_NameType(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_NameType_PDU); -} -static void dissect_NumberOfCircuits_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_NumberOfCircuits(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_NumberOfCircuits_PDU); -} -static void dissect_ObjectList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_ObjectList(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_ObjectList_PDU); -} -static void dissect_Pointer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_Pointer(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_Pointer_PDU); -} -static void dissect_PointerOrNull_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_PointerOrNull(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_PointerOrNull_PDU); -} -static void dissect_RelatedObjectInstance_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_RelatedObjectInstance(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_RelatedObjectInstance_PDU); -} -static void dissect_Replaceable_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_Replaceable(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_Replaceable_PDU); -} -static void dissect_SequenceOfObjectInstance_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SequenceOfObjectInstance(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SequenceOfObjectInstance_PDU); -} -static void dissect_SerialNumber_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SerialNumber(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SerialNumber_PDU); -} -static void dissect_SignallingCapabilities_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SignallingCapabilities(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SignallingCapabilities_PDU); -} -static void dissect_SignalType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SignalType(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SignalType_PDU); -} -static void dissect_SubordinateCircuitPackSoftwareLoad_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SubordinateCircuitPackSoftwareLoad(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SubordinateCircuitPackSoftwareLoad_PDU); -} -static void dissect_SupportableClientList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SupportableClientList(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SupportableClientList_PDU); -} -static void dissect_SystemTimingSource_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_SystemTimingSource(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_SystemTimingSource_PDU); -} -static void dissect_TpsInGtpList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_TpsInGtpList(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_TpsInGtpList_PDU); -} -static void dissect_TransmissionCharacteristics_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_TransmissionCharacteristics(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_TransmissionCharacteristics_PDU); -} -static void dissect_UserLabel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_UserLabel(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_UserLabel_PDU); -} -static void dissect_VendorName_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_VendorName(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_VendorName_PDU); -} -static void dissect_Version_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_gnm_Version(FALSE, tvb, 0, &asn1_ctx, tree, hf_gnm_Version_PDU); -} - - -/*--- End of included file: packet-gnm-fn.c ---*/ -#line 55 "../../asn1/gnm/packet-gnm-template.c" - - - -static void -dissect_gnm_attribute_ObjectInstance(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) -{ - asn1_ctx_t asn1_ctx; - - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - - dissect_cmip_ObjectInstance(FALSE, tvb, 0, &asn1_ctx, parent_tree, -1); - -} - -static void -dissect_gnm(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_) -{ - /* Dymmy function */ -} - -/*--- proto_register_gnm -------------------------------------------*/ -void proto_register_gnm(void) { - - /* List of fields */ - static hf_register_info hf[] = { - - -/*--- Included file: packet-gnm-hfarr.c ---*/ -#line 1 "../../asn1/gnm/packet-gnm-hfarr.c" - { &hf_gnm_SupportedTOClasses_PDU, - { "SupportedTOClasses", "gnm.SupportedTOClasses", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_AcceptableCircuitPackTypeList_PDU, - { "AcceptableCircuitPackTypeList", "gnm.AcceptableCircuitPackTypeList", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_AlarmSeverityAssignmentList_PDU, - { "AlarmSeverityAssignmentList", "gnm.AlarmSeverityAssignmentList", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_AlarmStatus_PDU, - { "AlarmStatus", "gnm.AlarmStatus", - FT_UINT32, BASE_DEC, VALS(gnm_AlarmStatus_vals), 0, - NULL, HFILL }}, - { &hf_gnm_Boolean_PDU, - { "Boolean", "gnm.Boolean", - FT_BOOLEAN, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ChannelNumber_PDU, - { "ChannelNumber", "gnm.ChannelNumber", - FT_INT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_CharacteristicInformation_PDU, - { "CharacteristicInformation", "gnm.CharacteristicInformation", - FT_OID, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_CircuitDirectionality_PDU, - { "CircuitDirectionality", "gnm.CircuitDirectionality", - FT_UINT32, BASE_DEC, VALS(gnm_CircuitDirectionality_vals), 0, - NULL, HFILL }}, - { &hf_gnm_CircuitPackType_PDU, - { "CircuitPackType", "gnm.CircuitPackType", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ConnectInformation_PDU, - { "ConnectInformation", "gnm.ConnectInformation", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ConnectivityPointer_PDU, - { "ConnectivityPointer", "gnm.ConnectivityPointer", - FT_UINT32, BASE_DEC, VALS(gnm_ConnectivityPointer_vals), 0, - NULL, HFILL }}, - { &hf_gnm_Count_PDU, - { "Count", "gnm.Count", - FT_INT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_CrossConnectionName_PDU, - { "CrossConnectionName", "gnm.CrossConnectionName", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_CrossConnectionObjectPointer_PDU, - { "CrossConnectionObjectPointer", "gnm.CrossConnectionObjectPointer", - FT_UINT32, BASE_DEC, VALS(gnm_CrossConnectionObjectPointer_vals), 0, - NULL, HFILL }}, - { &hf_gnm_CurrentProblemList_PDU, - { "CurrentProblemList", "gnm.CurrentProblemList", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_Directionality_PDU, - { "Directionality", "gnm.Directionality", - FT_UINT32, BASE_DEC, VALS(gnm_Directionality_vals), 0, - NULL, HFILL }}, - { &hf_gnm_DisconnectResult_PDU, - { "DisconnectResult", "gnm.DisconnectResult", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_DownstreamConnectivityPointer_PDU, - { "DownstreamConnectivityPointer", "gnm.DownstreamConnectivityPointer", - FT_UINT32, BASE_DEC, VALS(gnm_DownstreamConnectivityPointer_vals), 0, - NULL, HFILL }}, - { &hf_gnm_ExternalTime_PDU, - { "ExternalTime", "gnm.ExternalTime", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_EquipmentHolderAddress_PDU, - { "EquipmentHolderAddress", "gnm.EquipmentHolderAddress", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_EquipmentHolderType_PDU, - { "EquipmentHolderType", "gnm.EquipmentHolderType", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_HolderStatus_PDU, - { "HolderStatus", "gnm.HolderStatus", - FT_UINT32, BASE_DEC, VALS(gnm_HolderStatus_vals), 0, - NULL, HFILL }}, - { &hf_gnm_InformationTransferCapabilities_PDU, - { "InformationTransferCapabilities", "gnm.InformationTransferCapabilities", - FT_UINT32, BASE_DEC, VALS(gnm_InformationTransferCapabilities_vals), 0, - NULL, HFILL }}, - { &hf_gnm_ListOfCharacteristicInformation_PDU, - { "ListOfCharacteristicInformation", "gnm.ListOfCharacteristicInformation", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_NameType_PDU, - { "NameType", "gnm.NameType", - FT_UINT32, BASE_DEC, VALS(gnm_NameType_vals), 0, - NULL, HFILL }}, - { &hf_gnm_NumberOfCircuits_PDU, - { "NumberOfCircuits", "gnm.NumberOfCircuits", - FT_INT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ObjectList_PDU, - { "ObjectList", "gnm.ObjectList", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_Pointer_PDU, - { "Pointer", "gnm.Pointer", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_PointerOrNull_PDU, - { "PointerOrNull", "gnm.PointerOrNull", - FT_UINT32, BASE_DEC, VALS(gnm_PointerOrNull_vals), 0, - NULL, HFILL }}, - { &hf_gnm_RelatedObjectInstance_PDU, - { "RelatedObjectInstance", "gnm.RelatedObjectInstance", - FT_UINT32, BASE_DEC, VALS(gnm_RelatedObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_Replaceable_PDU, - { "Replaceable", "gnm.Replaceable", - FT_UINT32, BASE_DEC, VALS(gnm_Replaceable_vals), 0, - NULL, HFILL }}, - { &hf_gnm_SequenceOfObjectInstance_PDU, - { "SequenceOfObjectInstance", "gnm.SequenceOfObjectInstance", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_SerialNumber_PDU, - { "SerialNumber", "gnm.SerialNumber", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_SignallingCapabilities_PDU, - { "SignallingCapabilities", "gnm.SignallingCapabilities", - FT_UINT32, BASE_DEC, VALS(gnm_SignallingCapabilities_vals), 0, - NULL, HFILL }}, - { &hf_gnm_SignalType_PDU, - { "SignalType", "gnm.SignalType", - FT_UINT32, BASE_DEC, VALS(gnm_SignalType_vals), 0, - NULL, HFILL }}, - { &hf_gnm_SubordinateCircuitPackSoftwareLoad_PDU, - { "SubordinateCircuitPackSoftwareLoad", "gnm.SubordinateCircuitPackSoftwareLoad", - FT_UINT32, BASE_DEC, VALS(gnm_SubordinateCircuitPackSoftwareLoad_vals), 0, - NULL, HFILL }}, - { &hf_gnm_SupportableClientList_PDU, - { "SupportableClientList", "gnm.SupportableClientList", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_SystemTimingSource_PDU, - { "SystemTimingSource", "gnm.SystemTimingSource_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_TpsInGtpList_PDU, - { "TpsInGtpList", "gnm.TpsInGtpList", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_TransmissionCharacteristics_PDU, - { "TransmissionCharacteristics", "gnm.TransmissionCharacteristics", - FT_BYTES, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_UserLabel_PDU, - { "UserLabel", "gnm.UserLabel", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_VendorName_PDU, - { "VendorName", "gnm.VendorName", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_Version_PDU, - { "Version", "gnm.Version", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_MappingList_item, - { "PayloadLevel", "gnm.PayloadLevel", - FT_OID, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_objectClass, - { "objectClass", "gnm.objectClass", - FT_OID, BASE_NONE, NULL, 0, - "OBJECT_IDENTIFIER", HFILL }}, - { &hf_gnm_characteristicInformation, - { "characteristicInformation", "gnm.characteristicInformation", - FT_OID, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_SupportedTOClasses_item, - { "SupportedTOClasses item", "gnm.SupportedTOClasses_item", - FT_OID, BASE_NONE, NULL, 0, - "OBJECT_IDENTIFIER", HFILL }}, - { &hf_gnm_AcceptableCircuitPackTypeList_item, - { "AcceptableCircuitPackTypeList item", "gnm.AcceptableCircuitPackTypeList_item", - FT_STRING, BASE_NONE, NULL, 0, - "PrintableString", HFILL }}, - { &hf_gnm_mpCrossConnection, - { "mpCrossConnection", "gnm.mpCrossConnection", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_legs, - { "legs", "gnm.legs", - FT_UINT32, BASE_DEC, NULL, 0, - "SET_OF_ToTermSpecifier", HFILL }}, - { &hf_gnm_legs_item, - { "ToTermSpecifier", "gnm.ToTermSpecifier", - FT_UINT32, BASE_DEC, VALS(gnm_ToTermSpecifier_vals), 0, - NULL, HFILL }}, - { &hf_gnm_problem, - { "problem", "gnm.problem", - FT_UINT32, BASE_DEC, VALS(cmip_ProbableCause_vals), 0, - "ProbableCause", HFILL }}, - { &hf_gnm_severityAssignedServiceAffecting, - { "severityAssignedServiceAffecting", "gnm.severityAssignedServiceAffecting", - FT_UINT32, BASE_DEC, VALS(gnm_AlarmSeverityCode_vals), 0, - "AlarmSeverityCode", HFILL }}, - { &hf_gnm_severityAssignedNonServiceAffecting, - { "severityAssignedNonServiceAffecting", "gnm.severityAssignedNonServiceAffecting", - FT_UINT32, BASE_DEC, VALS(gnm_AlarmSeverityCode_vals), 0, - "AlarmSeverityCode", HFILL }}, - { &hf_gnm_severityAssignedServiceIndependent, - { "severityAssignedServiceIndependent", "gnm.severityAssignedServiceIndependent", - FT_UINT32, BASE_DEC, VALS(gnm_AlarmSeverityCode_vals), 0, - "AlarmSeverityCode", HFILL }}, - { &hf_gnm_AlarmSeverityAssignmentList_item, - { "AlarmSeverityAssignment", "gnm.AlarmSeverityAssignment_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_characteristicInfoType, - { "characteristicInfoType", "gnm.characteristicInfoType", - FT_OID, BASE_NONE, NULL, 0, - "CharacteristicInformation", HFILL }}, - { &hf_gnm_bundlingFactor, - { "bundlingFactor", "gnm.bundlingFactor", - FT_INT32, BASE_DEC, NULL, 0, - "INTEGER", HFILL }}, - { &hf_gnm_pointToPoint, - { "pointToPoint", "gnm.pointToPoint_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_pointToMultipoint, - { "pointToMultipoint", "gnm.pointToMultipoint_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ConnectInformation_item, - { "ConnectInformation item", "gnm.ConnectInformation_item_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_itemType, - { "itemType", "gnm.itemType", - FT_UINT32, BASE_DEC, VALS(gnm_T_itemType_vals), 0, - NULL, HFILL }}, - { &hf_gnm_unidirectional, - { "unidirectional", "gnm.unidirectional", - FT_UINT32, BASE_DEC, VALS(gnm_ConnectionType_vals), 0, - "ConnectionType", HFILL }}, - { &hf_gnm_bidirectional, - { "bidirectional", "gnm.bidirectional", - FT_UINT32, BASE_DEC, VALS(gnm_ConnectionTypeBi_vals), 0, - "ConnectionTypeBi", HFILL }}, - { &hf_gnm_addleg, - { "addleg", "gnm.addleg_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_administrativeState, - { "administrativeState", "gnm.administrativeState", - FT_UINT32, BASE_DEC, VALS(cmip_AdministrativeState_vals), 0, - NULL, HFILL }}, - { &hf_gnm_namedCrossConnection, - { "namedCrossConnection", "gnm.namedCrossConnection_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_userLabel, - { "userLabel", "gnm.userLabel", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_redline, - { "redline", "gnm.redline", - FT_BOOLEAN, BASE_NONE, NULL, 0, - "Boolean", HFILL }}, - { &hf_gnm_additionalInfo, - { "additionalInfo", "gnm.additionalInfo", - FT_UINT32, BASE_DEC, NULL, 0, - "AdditionalInformation", HFILL }}, - { &hf_gnm_none, - { "none", "gnm.none_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_single, - { "single", "gnm.single", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_concatenated, - { "concatenated", "gnm.concatenated", - FT_UINT32, BASE_DEC, NULL, 0, - "SEQUENCE_OF_ObjectInstance", HFILL }}, - { &hf_gnm_concatenated_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_explicitPToP, - { "explicitPToP", "gnm.explicitPToP_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ptoTpPool, - { "ptoTpPool", "gnm.ptoTpPool_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_explicitPtoMP, - { "explicitPtoMP", "gnm.explicitPtoMP_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ptoMPools, - { "ptoMPools", "gnm.ptoMPools_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_notConnected, - { "notConnected", "gnm.notConnected", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_connected, - { "connected", "gnm.connected", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_multipleConnections, - { "multipleConnections", "gnm.multipleConnections", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_alarmStatus, - { "alarmStatus", "gnm.alarmStatus", - FT_UINT32, BASE_DEC, VALS(gnm_AlarmStatus_vals), 0, - NULL, HFILL }}, - { &hf_gnm_CurrentProblemList_item, - { "CurrentProblem", "gnm.CurrentProblem_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_DisconnectResult_item, - { "DisconnectResult item", "gnm.DisconnectResult_item", - FT_UINT32, BASE_DEC, VALS(gnm_DisconnectResult_item_vals), 0, - NULL, HFILL }}, - { &hf_gnm_failed, - { "failed", "gnm.failed", - FT_UINT32, BASE_DEC, VALS(gnm_Failed_vals), 0, - NULL, HFILL }}, - { &hf_gnm_disconnected, - { "disconnected", "gnm.disconnected", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_broadcast, - { "broadcast", "gnm.broadcast", - FT_UINT32, BASE_DEC, NULL, 0, - "SET_OF_ObjectInstance", HFILL }}, - { &hf_gnm_broadcast_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_broadcastConcatenated, - { "broadcastConcatenated", "gnm.broadcastConcatenated", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_broadcastConcatenated_item, - { "broadcastConcatenated item", "gnm.broadcastConcatenated_item", - FT_UINT32, BASE_DEC, NULL, 0, - "SEQUENCE_OF_ObjectInstance", HFILL }}, - { &hf_gnm__item_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_fromTp, - { "fromTp", "gnm.fromTp", - FT_UINT32, BASE_DEC, VALS(gnm_ExplicitTP_vals), 0, - "ExplicitTP", HFILL }}, - { &hf_gnm_toTPs, - { "toTPs", "gnm.toTPs", - FT_UINT32, BASE_DEC, NULL, 0, - "SET_OF_ExplicitTP", HFILL }}, - { &hf_gnm_toTPs_item, - { "ExplicitTP", "gnm.ExplicitTP", - FT_UINT32, BASE_DEC, VALS(gnm_ExplicitTP_vals), 0, - NULL, HFILL }}, - { &hf_gnm_toTp, - { "toTp", "gnm.toTp", - FT_UINT32, BASE_DEC, VALS(gnm_ExplicitTP_vals), 0, - "ExplicitTP", HFILL }}, - { &hf_gnm_oneTPorGTP, - { "oneTPorGTP", "gnm.oneTPorGTP", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_listofTPs, - { "listofTPs", "gnm.listofTPs", - FT_UINT32, BASE_DEC, NULL, 0, - "SEQUENCE_OF_ObjectInstance", HFILL }}, - { &hf_gnm_listofTPs_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_EquipmentHolderAddress_item, - { "EquipmentHolderAddress item", "gnm.EquipmentHolderAddress_item", - FT_STRING, BASE_NONE, NULL, 0, - "PrintableString", HFILL }}, - { &hf_gnm_logicalProblem, - { "logicalProblem", "gnm.logicalProblem_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_resourceProblem, - { "resourceProblem", "gnm.resourceProblem", - FT_UINT32, BASE_DEC, VALS(gnm_ResourceProblem_vals), 0, - NULL, HFILL }}, - { &hf_gnm_holderEmpty, - { "holderEmpty", "gnm.holderEmpty_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_inTheAcceptableList, - { "inTheAcceptableList", "gnm.inTheAcceptableList", - FT_STRING, BASE_NONE, NULL, 0, - "CircuitPackType", HFILL }}, - { &hf_gnm_notInTheAcceptableList, - { "notInTheAcceptableList", "gnm.notInTheAcceptableList", - FT_STRING, BASE_NONE, NULL, 0, - "CircuitPackType", HFILL }}, - { &hf_gnm_unknownType, - { "unknownType", "gnm.unknownType_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_ListOfCharacteristicInformation_item, - { "CharacteristicInformation", "gnm.CharacteristicInformation", - FT_OID, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_problemCause, - { "problemCause", "gnm.problemCause", - FT_UINT32, BASE_DEC, VALS(gnm_ProblemCause_vals), 0, - NULL, HFILL }}, - { &hf_gnm_incorrectInstances, - { "incorrectInstances", "gnm.incorrectInstances", - FT_UINT32, BASE_DEC, NULL, 0, - "SET_OF_ObjectInstance", HFILL }}, - { &hf_gnm_incorrectInstances_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_MultipleConnections_item, - { "MultipleConnections item", "gnm.MultipleConnections_item", - FT_UINT32, BASE_DEC, VALS(gnm_MultipleConnections_item_vals), 0, - NULL, HFILL }}, - { &hf_gnm_downstreamNotConnected, - { "downstreamNotConnected", "gnm.downstreamNotConnected", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_downstreamConnected, - { "downstreamConnected", "gnm.downstreamConnected", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_upstreamNotConnected, - { "upstreamNotConnected", "gnm.upstreamNotConnected", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_upstreamConnected, - { "upstreamConnected", "gnm.upstreamConnected", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_redline_01, - { "redline", "gnm.redline", - FT_BOOLEAN, BASE_NONE, NULL, 0, - "BOOLEAN", HFILL }}, - { &hf_gnm_name, - { "name", "gnm.name", - FT_STRING, BASE_NONE, NULL, 0, - "CrossConnectionName", HFILL }}, - { &hf_gnm_numericName, - { "numericName", "gnm.numericName", - FT_INT32, BASE_DEC, NULL, 0, - "INTEGER", HFILL }}, - { &hf_gnm_pString, - { "pString", "gnm.pString", - FT_STRING, BASE_NONE, NULL, 0, - "GraphicString", HFILL }}, - { &hf_gnm_ObjectList_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_diverse, - { "diverse", "gnm.diverse_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_downstream, - { "downstream", "gnm.downstream", - FT_UINT32, BASE_DEC, NULL, 0, - "SignalRateAndMappingList", HFILL }}, - { &hf_gnm_upStream, - { "upStream", "gnm.upStream", - FT_UINT32, BASE_DEC, NULL, 0, - "SignalRateAndMappingList", HFILL }}, - { &hf_gnm_uniform, - { "uniform", "gnm.uniform", - FT_UINT32, BASE_DEC, NULL, 0, - "SignalRateAndMappingList", HFILL }}, - { &hf_gnm_pointer, - { "pointer", "gnm.pointer", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_null, - { "null", "gnm.null_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_fromTp_01, - { "fromTp", "gnm.fromTp", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_toTp_01, - { "toTp", "gnm.toTp", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_xCon, - { "xCon", "gnm.xCon", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_toTps, - { "toTps", "gnm.toTps", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_toTps_item, - { "toTps item", "gnm.toTps_item_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_tp, - { "tp", "gnm.tp", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_xConnection, - { "xConnection", "gnm.xConnection", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_mpXCon, - { "mpXCon", "gnm.mpXCon", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_unknown, - { "unknown", "gnm.unknown_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_integerValue, - { "integerValue", "gnm.integerValue", - FT_INT32, BASE_DEC, NULL, 0, - "INTEGER", HFILL }}, - { &hf_gnm_toTPPools, - { "toTPPools", "gnm.toTPPools", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_toTpPool, - { "toTpPool", "gnm.toTpPool", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_notAvailable, - { "notAvailable", "gnm.notAvailable_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_relatedObject, - { "relatedObject", "gnm.relatedObject", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_SequenceOfObjectInstance_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_SignalRateAndMappingList_item, - { "SignalRateAndMappingList item", "gnm.SignalRateAndMappingList_item_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_signalRate, - { "signalRate", "gnm.signalRate", - FT_UINT32, BASE_DEC, VALS(gnm_SignalRate_vals), 0, - NULL, HFILL }}, - { &hf_gnm_mappingList, - { "mappingList", "gnm.mappingList", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_wavelength, - { "wavelength", "gnm.wavelength", - FT_INT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_simple, - { "simple", "gnm.simple", - FT_OID, BASE_NONE, NULL, 0, - "CharacteristicInformation", HFILL }}, - { &hf_gnm_bundle, - { "bundle", "gnm.bundle_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_complex, - { "complex", "gnm.complex", - FT_UINT32, BASE_DEC, NULL, 0, - "SEQUENCE_OF_Bundle", HFILL }}, - { &hf_gnm_complex_item, - { "Bundle", "gnm.Bundle_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_notApplicable, - { "notApplicable", "gnm.notApplicable_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_softwareInstances, - { "softwareInstances", "gnm.softwareInstances", - FT_UINT32, BASE_DEC, NULL, 0, - "SEQUENCE_OF_ObjectInstance", HFILL }}, - { &hf_gnm_softwareInstances_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_softwareIdentifiers, - { "softwareIdentifiers", "gnm.softwareIdentifiers", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_softwareIdentifiers_item, - { "softwareIdentifiers item", "gnm.softwareIdentifiers_item", - FT_STRING, BASE_NONE, NULL, 0, - "PrintableString", HFILL }}, - { &hf_gnm_SupportableClientList_item, - { "ObjectClass", "gnm.ObjectClass", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectClass_vals), 0, - NULL, HFILL }}, - { &hf_gnm_sourceType, - { "sourceType", "gnm.sourceType", - FT_UINT32, BASE_DEC, VALS(gnm_T_sourceType_vals), 0, - NULL, HFILL }}, - { &hf_gnm_sourceID, - { "sourceID", "gnm.sourceID", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_primaryTimingSource, - { "primaryTimingSource", "gnm.primaryTimingSource_element", - FT_NONE, BASE_NONE, NULL, 0, - "SystemTiming", HFILL }}, - { &hf_gnm_secondaryTimingSource, - { "secondaryTimingSource", "gnm.secondaryTimingSource_element", - FT_NONE, BASE_NONE, NULL, 0, - "SystemTiming", HFILL }}, - { &hf_gnm_toTpOrGTP, - { "toTpOrGTP", "gnm.toTpOrGTP", - FT_UINT32, BASE_DEC, VALS(gnm_ExplicitTP_vals), 0, - "ExplicitTP", HFILL }}, - { &hf_gnm_toPool, - { "toPool", "gnm.toPool", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_ToTPPools_item, - { "ToTPPools item", "gnm.ToTPPools_item_element", - FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL }}, - { &hf_gnm_tpPoolId, - { "tpPoolId", "gnm.tpPoolId", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - "ObjectInstance", HFILL }}, - { &hf_gnm_numberOfTPs, - { "numberOfTPs", "gnm.numberOfTPs", - FT_INT32, BASE_DEC, NULL, 0, - "INTEGER", HFILL }}, - { &hf_gnm_TpsInGtpList_item, - { "ObjectInstance", "gnm.ObjectInstance", - FT_UINT32, BASE_DEC, VALS(cmip_ObjectInstance_vals), 0, - NULL, HFILL }}, - { &hf_gnm_TransmissionCharacteristics_satellite, - { "satellite", "gnm.satellite", - FT_BOOLEAN, 8, NULL, 0x80, - NULL, HFILL }}, - { &hf_gnm_TransmissionCharacteristics_dCME, - { "dCME", "gnm.dCME", - FT_BOOLEAN, 8, NULL, 0x40, - NULL, HFILL }}, - { &hf_gnm_TransmissionCharacteristics_echoControl, - { "echoControl", "gnm.echoControl", - FT_BOOLEAN, 8, NULL, 0x20, - NULL, HFILL }}, - -/*--- End of included file: packet-gnm-hfarr.c ---*/ -#line 82 "../../asn1/gnm/packet-gnm-template.c" - }; - - /* List of subtrees */ - static gint *ett[] = { - -/*--- Included file: packet-gnm-ettarr.c ---*/ -#line 1 "../../asn1/gnm/packet-gnm-ettarr.c" - &ett_gnm_MappingList, - &ett_gnm_SignalRate, - &ett_gnm_SupportedTOClasses, - &ett_gnm_AcceptableCircuitPackTypeList, - &ett_gnm_AddLeg, - &ett_gnm_SET_OF_ToTermSpecifier, - &ett_gnm_AlarmSeverityAssignment, - &ett_gnm_AlarmSeverityAssignmentList, - &ett_gnm_Bundle, - &ett_gnm_Connected, - &ett_gnm_ConnectInformation, - &ett_gnm_ConnectInformation_item, - &ett_gnm_T_itemType, - &ett_gnm_ConnectivityPointer, - &ett_gnm_SEQUENCE_OF_ObjectInstance, - &ett_gnm_ConnectionType, - &ett_gnm_ConnectionTypeBi, - &ett_gnm_CrossConnectionObjectPointer, - &ett_gnm_CurrentProblem, - &ett_gnm_CurrentProblemList, - &ett_gnm_DisconnectResult, - &ett_gnm_DisconnectResult_item, - &ett_gnm_DownstreamConnectivityPointer, - &ett_gnm_SET_OF_ObjectInstance, - &ett_gnm_T_broadcastConcatenated, - &ett_gnm_ExplicitPtoMP, - &ett_gnm_SET_OF_ExplicitTP, - &ett_gnm_ExplicitPtoP, - &ett_gnm_ExplicitTP, - &ett_gnm_EquipmentHolderAddress, - &ett_gnm_Failed, - &ett_gnm_HolderStatus, - &ett_gnm_ListOfCharacteristicInformation, - &ett_gnm_LogicalProblem, - &ett_gnm_MultipleConnections, - &ett_gnm_MultipleConnections_item, - &ett_gnm_NamedCrossConnection, - &ett_gnm_NameType, - &ett_gnm_ObjectList, - &ett_gnm_PhysicalPortSignalRateAndMappingList, - &ett_gnm_T_diverse, - &ett_gnm_PointerOrNull, - &ett_gnm_PointToPoint, - &ett_gnm_PointToMultipoint, - &ett_gnm_T_toTps, - &ett_gnm_T_toTps_item, - &ett_gnm_ProblemCause, - &ett_gnm_PtoMPools, - &ett_gnm_PtoTPPool, - &ett_gnm_RelatedObjectInstance, - &ett_gnm_ResourceProblem, - &ett_gnm_SequenceOfObjectInstance, - &ett_gnm_SignalRateAndMappingList, - &ett_gnm_SignalRateAndMappingList_item, - &ett_gnm_SignalType, - &ett_gnm_SEQUENCE_OF_Bundle, - &ett_gnm_SubordinateCircuitPackSoftwareLoad, - &ett_gnm_T_softwareIdentifiers, - &ett_gnm_SupportableClientList, - &ett_gnm_SystemTiming, - &ett_gnm_SystemTimingSource, - &ett_gnm_ToTermSpecifier, - &ett_gnm_ToTPPools, - &ett_gnm_ToTPPools_item, - &ett_gnm_TpsInGtpList, - &ett_gnm_TransmissionCharacteristics, - -/*--- End of included file: packet-gnm-ettarr.c ---*/ -#line 87 "../../asn1/gnm/packet-gnm-template.c" - }; - - /* Register protocol */ - proto_gnm = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("gnm", dissect_gnm, proto_gnm); - /* Register fields and subtrees */ - proto_register_field_array(proto_gnm, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - -} - - -/*--- proto_reg_handoff_gnm ---------------------------------------*/ -void proto_reg_handoff_gnm(void) { - -/*--- Included file: packet-gnm-dis-tab.c ---*/ -#line 1 "../../asn1/gnm/packet-gnm-dis-tab.c" - register_ber_oid_dissector("0.0.13.3100.0.7.1", dissect_RelatedObjectInstance_PDU, proto_gnm, "a-TPInstance(1)"); - register_ber_oid_dissector("0.0.13.3100.0.7.2", dissect_ObjectList_PDU, proto_gnm, "affectedObjectList(2)"); - register_ber_oid_dissector("0.0.13.3100.0.7.3", dissect_AlarmSeverityAssignmentList_PDU, proto_gnm, "alarmSeverityAssignmentList(3)"); - register_ber_oid_dissector("0.0.13.3100.0.7.4", dissect_NameType_PDU, proto_gnm, "alarmSeverityAssignmentProfileId(4)"); - register_ber_oid_dissector("0.0.13.3100.0.7.5", dissect_PointerOrNull_PDU, proto_gnm, "alarmSeverityAssignmentProfilePointer(5)"); - register_ber_oid_dissector("0.0.13.3100.0.7.6", dissect_AlarmStatus_PDU, proto_gnm, "alarmStatus(6)"); - register_ber_oid_dissector("0.0.13.3100.0.7.7", dissect_ChannelNumber_PDU, proto_gnm, "channelNumber(7)"); - register_ber_oid_dissector("0.0.13.3100.0.7.8", dissect_CharacteristicInformation_PDU, proto_gnm, "characteristicInformation(8)"); - register_ber_oid_dissector("0.0.13.3100.0.7.11", dissect_Count_PDU, proto_gnm, "connectedTpCount(11)"); - register_ber_oid_dissector("0.0.13.3100.0.7.12", dissect_NameType_PDU, proto_gnm, "connectionId(12)"); - register_ber_oid_dissector("0.0.13.3100.0.7.13", dissect_NameType_PDU, proto_gnm, "cTPId(13)"); - register_ber_oid_dissector("0.0.13.3100.0.7.14", dissect_NameType_PDU, proto_gnm, "crossConnectionId(14)"); - register_ber_oid_dissector("0.0.13.3100.0.7.15", dissect_CrossConnectionName_PDU, proto_gnm, "crossConnectionName(15)"); - register_ber_oid_dissector("0.0.13.3100.0.7.16", dissect_CrossConnectionObjectPointer_PDU, proto_gnm, "crossConnectionObjectPointer(16)"); - register_ber_oid_dissector("0.0.13.3100.0.7.17", dissect_CurrentProblemList_PDU, proto_gnm, "currentProblemList(17)"); - register_ber_oid_dissector("0.0.13.3100.0.7.18", dissect_Directionality_PDU, proto_gnm, "directionality(18)"); - register_ber_oid_dissector("0.0.13.3100.0.7.19", dissect_DownstreamConnectivityPointer_PDU, proto_gnm, "downstreamConnectivityPointer(19)"); - register_ber_oid_dissector("0.0.13.3100.0.7.20", dissect_NameType_PDU, proto_gnm, "equipmentId(20)"); - register_ber_oid_dissector("0.0.13.3100.0.7.21", dissect_ExternalTime_PDU, proto_gnm, "externalTime(21)"); - register_ber_oid_dissector("0.0.13.3100.0.7.22", dissect_NameType_PDU, proto_gnm, "fabricId(22)"); - register_ber_oid_dissector("0.0.13.3100.0.7.23", dissect_PointerOrNull_PDU, proto_gnm, "fromTermination(23)"); - register_ber_oid_dissector("0.0.13.3100.0.7.24", dissect_NameType_PDU, proto_gnm, "gtpId(24)"); - register_ber_oid_dissector("0.0.13.3100.0.7.25", dissect_Count_PDU, proto_gnm, "idleTpCount(25)"); - register_ber_oid_dissector("0.0.13.3100.0.7.26", dissect_ListOfCharacteristicInformation_PDU, proto_gnm, "listOfCharacteristicInfo(26)"); - register_ber_oid_dissector("0.0.13.3100.0.7.27", dissect_Replaceable_PDU, proto_gnm, "locationName(27)"); - register_ber_oid_dissector("0.0.13.3100.0.7.28", dissect_NameType_PDU, proto_gnm, "managedElementId(28)"); - register_ber_oid_dissector("0.0.13.3100.0.7.29", dissect_NameType_PDU, proto_gnm, "mpCrossConnectionId(29)"); - register_ber_oid_dissector("0.0.13.3100.0.7.30", dissect_NameType_PDU, proto_gnm, "networkId(30)"); - register_ber_oid_dissector("0.0.13.3100.0.7.32", dissect_Boolean_PDU, proto_gnm, "protected(32)"); - register_ber_oid_dissector("0.0.13.3100.0.7.33", dissect_Boolean_PDU, proto_gnm, "redline(33)"); - register_ber_oid_dissector("0.0.13.3100.0.7.34", dissect_Replaceable_PDU, proto_gnm, "replaceable(34)"); - register_ber_oid_dissector("0.0.13.3100.0.7.35", dissect_SequenceOfObjectInstance_PDU, proto_gnm, "serverConnectionList(35)"); - register_ber_oid_dissector("0.0.13.3100.0.7.36", dissect_ObjectList_PDU, proto_gnm, "serverTrailList(36)"); - register_ber_oid_dissector("0.0.13.3100.0.7.37", dissect_SignalType_PDU, proto_gnm, "signalType(37)"); - register_ber_oid_dissector("0.0.13.3100.0.7.38", dissect_NameType_PDU, proto_gnm, "softwareId(38)"); - register_ber_oid_dissector("0.0.13.3100.0.7.39", dissect_SupportableClientList_PDU, proto_gnm, "supportableClientList(39)"); - register_ber_oid_dissector("0.0.13.3100.0.7.40", dissect_ObjectList_PDU, proto_gnm, "supportedByObjectList(40)"); - register_ber_oid_dissector("0.0.13.3100.0.7.41", dissect_SystemTimingSource_PDU, proto_gnm, "systemTimingSource(41)"); - register_ber_oid_dissector("0.0.13.3100.0.7.42", dissect_Count_PDU, proto_gnm, "totalTpCount(42)"); - register_ber_oid_dissector("0.0.13.3100.0.7.43", dissect_Pointer_PDU, proto_gnm, "toTermination(43)"); - register_ber_oid_dissector("0.0.13.3100.0.7.44", dissect_NameType_PDU, proto_gnm, "tpPoolId(44)"); - register_ber_oid_dissector("0.0.13.3100.0.7.45", dissect_TpsInGtpList_PDU, proto_gnm, "tpsInGtpList(45)"); - register_ber_oid_dissector("0.0.13.3100.0.7.47", dissect_NameType_PDU, proto_gnm, "trailId(47)"); - register_ber_oid_dissector("0.0.13.3100.0.7.48", dissect_NameType_PDU, proto_gnm, "tTPId(48)"); - register_ber_oid_dissector("0.0.13.3100.0.7.49", dissect_ConnectivityPointer_PDU, proto_gnm, "upstreamConnectivityPointer(49)"); - register_ber_oid_dissector("0.0.13.3100.0.7.50", dissect_UserLabel_PDU, proto_gnm, "userLabel(50)"); - register_ber_oid_dissector("0.0.13.3100.0.7.51", dissect_VendorName_PDU, proto_gnm, "vendorName(51)"); - register_ber_oid_dissector("0.0.13.3100.0.7.52", dissect_Version_PDU, proto_gnm, "version(52)"); - register_ber_oid_dissector("0.0.13.3100.0.7.53", dissect_ObjectList_PDU, proto_gnm, "clientConnectionList(53)"); - register_ber_oid_dissector("0.0.13.3100.0.7.54", dissect_CircuitPackType_PDU, proto_gnm, "circuitPackType(54)"); - register_ber_oid_dissector("0.0.13.3100.0.7.55", dissect_RelatedObjectInstance_PDU, proto_gnm, "z-TPInstance(55)"); - register_ber_oid_dissector("0.0.13.3100.0.7.56", dissect_EquipmentHolderAddress_PDU, proto_gnm, "equipmentHolderAddress(56)"); - register_ber_oid_dissector("0.0.13.3100.0.7.57", dissect_EquipmentHolderType_PDU, proto_gnm, "equipmentHolderType(57)"); - register_ber_oid_dissector("0.0.13.3100.0.7.58", dissect_AcceptableCircuitPackTypeList_PDU, proto_gnm, "acceptableCircuitPackTypeList(58)"); - register_ber_oid_dissector("0.0.13.3100.0.7.59", dissect_HolderStatus_PDU, proto_gnm, "holderStatus(59)"); - register_ber_oid_dissector("0.0.13.3100.0.7.60", dissect_SubordinateCircuitPackSoftwareLoad_PDU, proto_gnm, "subordinateCircuitPackSoftwareLoad(60)"); - register_ber_oid_dissector("0.0.13.3100.0.7.61", dissect_NameType_PDU, proto_gnm, "circuitEndPointSubgroupId(61)"); - register_ber_oid_dissector("0.0.13.3100.0.7.62", dissect_NumberOfCircuits_PDU, proto_gnm, "numberOfCircuits(62)"); - register_ber_oid_dissector("0.0.13.3100.0.7.63", dissect_UserLabel_PDU, proto_gnm, "labelOfFarEndExchange(63)"); - register_ber_oid_dissector("0.0.13.3100.0.7.64", dissect_SignallingCapabilities_PDU, proto_gnm, "signallingCapabilities(64)"); - register_ber_oid_dissector("0.0.13.3100.0.7.65", dissect_InformationTransferCapabilities_PDU, proto_gnm, "informationTransferCapabilities(65)"); - register_ber_oid_dissector("0.0.13.3100.0.7.66", dissect_CircuitDirectionality_PDU, proto_gnm, "circuitDirectionality(66)"); - register_ber_oid_dissector("0.0.13.3100.0.7.67", dissect_TransmissionCharacteristics_PDU, proto_gnm, "transmissionCharacteristics(67)"); - register_ber_oid_dissector("0.0.13.3100.0.7.68", dissect_NameType_PDU, proto_gnm, "managedElementComplexId(68)"); - register_ber_oid_dissector("0.0.13.3100.0.7.69", dissect_SerialNumber_PDU, proto_gnm, "serialNumber(69)"); - register_ber_oid_dissector("0.0.13.3100.0.9.4", dissect_ConnectInformation_PDU, proto_gnm, "connect(4)"); - register_ber_oid_dissector("0.0.13.3100.0.9.5", dissect_DisconnectResult_PDU, proto_gnm, "disconnect(5)"); - register_ber_oid_dissector("2.9.2.12.7.7", dissect_SupportedTOClasses_PDU, proto_gnm, "supportedTOClasses(7)"); - - -/*--- End of included file: packet-gnm-dis-tab.c ---*/ -#line 102 "../../asn1/gnm/packet-gnm-template.c" - /* Wrapper to call CMIP */ - register_ber_oid_dissector("0.0.13.3100.0.7.9", dissect_gnm_attribute_ObjectInstance, proto_gnm, "clientConnection(9)"); - register_ber_oid_dissector("0.0.13.3100.0.7.10", dissect_gnm_attribute_ObjectInstance, proto_gnm, "clientTrail(10)"); - register_ber_oid_dissector("0.0.13.3100.0.7.31", dissect_gnm_attribute_ObjectInstance, proto_gnm, "networkLevelPointer(31)"); - register_ber_oid_dissector("0.0.13.3100.0.7.46", dissect_gnm_attribute_ObjectInstance, proto_gnm, "networkLevelPointer(31)"); - -} diff --git a/plugins/asn1/AUTHORS b/plugins/asn1/AUTHORS deleted file mode 100644 index a8e414799e..0000000000 --- a/plugins/asn1/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Author: -Matthijs Melchior diff --git a/plugins/asn1/CMakeLists.txt b/plugins/asn1/CMakeLists.txt deleted file mode 100644 index 07bb50519e..0000000000 --- a/plugins/asn1/CMakeLists.txt +++ /dev/null @@ -1,70 +0,0 @@ -# CMakeLists.txt -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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(DISSECTOR_SRC - packet-asn1.c -) - -set(DISSECTOR_SUPPORT_SRC - asn1.c -) - -set(PLUGIN_FILES - plugin.c - ${DISSECTOR_SRC} - ${DISSECTOR_SUPPORT_SRC} -) - -set(CLEAN_FILES - ${PLUGIN_FILES} -) - -if (WERROR) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS -Werror - ) -endif() - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -register_dissector_files(plugin.c - plugin - ${DISSECTOR_SRC} -) - -add_library(asn1 ${LINK_MODE_MODULE} - ${PLUGIN_FILES} - plugin.rc -) -set_target_properties(asn1 PROPERTIES PREFIX "") -set_target_properties(asn1 PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}") -set_target_properties(asn1 PROPERTIES FOLDER "Plugins") - -target_link_libraries(asn1 epan) - -install(TARGETS asn1 - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP - RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} -) - diff --git a/plugins/asn1/COPYING b/plugins/asn1/COPYING deleted file mode 100644 index f7962229f1..0000000000 --- a/plugins/asn1/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/plugins/asn1/ChangeLog b/plugins/asn1/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/plugins/asn1/INSTALL b/plugins/asn1/INSTALL deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/plugins/asn1/Makefile.am b/plugins/asn1/Makefile.am deleted file mode 100644 index b52680af33..0000000000 --- a/plugins/asn1/Makefile.am +++ /dev/null @@ -1,120 +0,0 @@ -# Makefile.am -# Automake file for ASN.1 plugin -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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 $(top_srcdir)/Makefile.am.inc - -AM_CPPFLAGS = -I$(top_srcdir) - -include Makefile.common - -if HAVE_WARNINGS_AS_ERRORS -AM_CFLAGS = -Werror -endif - -plugindir = @plugindir@ - -plugin_LTLIBRARIES = asn1.la - -asn1_la_SOURCES = \ - plugin.c \ - moduleinfo.h \ - $(SRC_FILES) \ - $(HEADER_FILES) - -asn1_la_LDFLAGS = -module -avoid-version -asn1_la_LIBADD = @PLUGIN_LIBS@ - -# Libs must be cleared, or else libtool won't create a shared module. -# If your module needs to be linked against any particular libraries, -# add them here. -LIBS = - -# -# Build plugin.c, which contains the plugin version[] string, a -# function plugin_register() that calls the register routines for all -# protocols, and a function plugin_reg_handoff() that calls the handoff -# registration routines for all protocols. -# -# We do this by scanning sources. If that turns out to be too slow, -# maybe we could just require every .o file to have an register routine -# of a given name (packet-aarp.o -> proto_register_aarp, etc.). -# -# Formatting conventions: The name of the proto_register_* routines an -# proto_reg_handoff_* routines must start in column zero, or must be -# preceded only by "void " starting in column zero, and must not be -# inside #if. -# -# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned. -# -# For some unknown reason, having a big "for" loop in the Makefile -# to scan all the files doesn't work with some "make"s; they seem to -# pass only the first few names in the list to the shell, for some -# reason. -# -# Therefore, we use a script to generate the register.c file. -# The first argument is the directory in which the source files live. -# The second argument is "plugin", to indicate that we should build -# a plugin.c file for a plugin. -# All subsequent arguments are the files to scan. -# -plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py - @echo Making plugin.c - @$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \ - plugin $(REGISTER_SRC_FILES) - -# -# Currently plugin.c can be included in the distribution because -# we always build all protocol dissectors. We used to have to check -# whether or not to build the snmp dissector. If we again need to -# variably build something, making plugin.c non-portable, uncomment -# the dist-hook line below. -# -# Oh, yuk. We don't want to include "plugin.c" in the distribution, as -# its contents depend on the configuration, and therefore we want it -# to be built when the first "make" is done; however, Automake insists -# on putting *all* source into the distribution. -# -# We work around this by having a "dist-hook" rule that deletes -# "plugin.c", so that "dist" won't pick it up. -# -#dist-hook: -# @rm -f $(distdir)/plugin.c - -CLEANFILES = \ - asn1 \ - *~ - -MAINTAINERCLEANFILES = \ - Makefile.in \ - plugin.c - -EXTRA_DIST = \ - Makefile.common \ - Makefile.nmake \ - moduleinfo.nmake \ - plugin.rc.in \ - CMakeLists.txt - -checkapi: - $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \ - -sourcedir=$(srcdir) \ - $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES) diff --git a/plugins/asn1/Makefile.common b/plugins/asn1/Makefile.common deleted file mode 100644 index c24fc7a33f..0000000000 --- a/plugins/asn1/Makefile.common +++ /dev/null @@ -1,44 +0,0 @@ -# Makefile.common for ASN.1 plugin -# Contains the stuff from Makefile.am and Makefile.nmake that is -# a) common to both files and -# b) portable between both files -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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. - -# the name of the plugin -PLUGIN_NAME = asn1 - -# Non-generated sources to be scanned for registration routines -NONGENERATED_REGISTER_C_FILES = \ - packet-asn1.c - -# Non-generated sources -NONGENERATED_C_FILES = \ - $(NONGENERATED_REGISTER_C_FILES) \ - asn1.c - -# Headers. -CLEAN_HEADER_FILES = \ - asn1.h - -HEADER_FILES = \ - $(FLEX_GENERATED_HEADER_FILES) \ - $(CLEAN_HEADER_FILES) - -include ../Makefile.common.inc diff --git a/plugins/asn1/Makefile.nmake b/plugins/asn1/Makefile.nmake deleted file mode 100644 index 3f1f2a5838..0000000000 --- a/plugins/asn1/Makefile.nmake +++ /dev/null @@ -1,90 +0,0 @@ -# Makefile.nmake -# nmake file for ASN.1 plugin -# - -include ..\..\config.nmake -include ..\..\Makefile.nmake.inc - -include moduleinfo.nmake - -include Makefile.common - -CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ - /I../.. $(GLIB_CFLAGS) \ - /I$(PCAP_DIR)\include - -.c.obj:: - $(CC) $(CFLAGS) -Fd.\ -c $< - -LDFLAGS = $(PLUGIN_LDFLAGS) - -!IFDEF ENABLE_LIBWIRESHARK -LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib -CFLAGS=$(CFLAGS) - -OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj - -RESOURCE=$(PLUGIN_NAME).res - -all: $(PLUGIN_NAME).dll - -$(PLUGIN_NAME).rc : moduleinfo.nmake - sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \ - -e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \ - -e s/@RC_VERSION@/$(RC_VERSION)/ \ - -e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \ - -e s/@PACKAGE@/$(PACKAGE)/ \ - -e s/@VERSION@/$(VERSION)/ \ - -e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \ - < plugin.rc.in > $@ - -$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE) - link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \ - $(GLIB_LIBS) $(RESOURCE) - -# -# Build plugin.c, which contains the plugin version[] string, a -# function plugin_register() that calls the register routines for all -# protocols, and a function plugin_reg_handoff() that calls the handoff -# registration routines for all protocols. -# -# We do this by scanning sources. If that turns out to be too slow, -# maybe we could just require every .o file to have an register routine -# of a given name (packet-aarp.o -> proto_register_aarp, etc.). -# -# Formatting conventions: The name of the proto_register_* routines an -# proto_reg_handoff_* routines must start in column zero, or must be -# preceded only by "void " starting in column zero, and must not be -# inside #if. -# -# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned. -# -# For some unknown reason, having a big "for" loop in the Makefile -# to scan all the files doesn't work with some "make"s; they seem to -# pass only the first few names in the list to the shell, for some -# reason. -# -# Therefore, we use a script to generate the register.c file. -# The first argument is the directory in which the source files live. -# The second argument is "plugin", to indicate that we should build -# a plugin.c file for a plugin. -# All subsequent arguments are the files to scan. -# -plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py - @echo Making plugin.c - @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES) - -!ENDIF - -clean: - rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb *.sbr \ - $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \ - $(PLUGIN_NAME).exp $(PLUGIN_NAME).rc - -distclean: clean - -maintainer-clean: distclean - -checkapi: - $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \ - $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES) diff --git a/plugins/asn1/NEWS b/plugins/asn1/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/plugins/asn1/asn1.c b/plugins/asn1/asn1.c deleted file mode 100644 index dae429a1b4..0000000000 --- a/plugins/asn1/asn1.c +++ /dev/null @@ -1,1081 +0,0 @@ -/* asn1.c - * Routines for ASN.1 BER dissection - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * - * Based on "g_asn1.c" from: - * - * GXSNMP -- An snmp mangament application - * Copyright (C) 1998 Gregory McLean & Jochen Friedrich - * Beholder RMON ethernet network monitor, Copyright (C) 1993 DNPAP group - * - * 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. - */ - -/* - * MODULE INFORMATION - * ------------------ - * FILE NAME: g_asn1.c - * SYSTEM NAME: ASN1 Basic Encoding - * ORIGINAL AUTHOR(S): Dirk Wisse - * VERSION NUMBER: 1 - * CREATION DATE: 1990/11/22 - * - * DESCRIPTION: ASN1 Basic Encoding Rules. - * - * To decode this we must do: - * - * asn1_open (asn1, tvb, offset); - * asn1_header_decode (asn1, &end_of_seq, cls, con, tag, def, len); - * asn1_header_decode (asn1, &end_of_octs, cls, con, tag, def, len); - * asn1_octets_decode (asn1, end_of_octs, str, len); - * asn1_header_decode (asn1, &end_of_int, cls, con, tag); - * asn1_int_decode (asn1, end_of_int, &integer); - * asn1_eoc_decode (asn1, end_of_seq); - * asn1_close (asn1, &offset); - * - * For indefinite encoding end_of_seq and &end_of_seq in the - * example above should be replaced by NULL. - * For indefinite decoding nothing has to be changed. - * This can be very useful if you want to decode both - * definite and indefinite encodings. - */ - -#include "config.h" - -#include - -#define subid_t guint32 /* ugly hack to get it to compile this symbol should be suppressed! */ - -#include -#include -#include - -void proto_register_asn1(void); -/* - * NAME: asn1_open [API] - * SYNOPSIS: void asn1_open - * ( - * ASN1_SCK *asn1, - * tvbuff_t *tvb, - * int offset - * ) - * DESCRIPTION: Opens an ASN1 socket. - * Parameters: - * asn1: pointer to ASN1 socket. - * tvb: Tvbuff for encoding. - * offset: Current offset in tvbuff. - * Encoding starts at the end of the buffer, and - * proceeds to the beginning. - * RETURNS: void - */ - -void -asn1_open(ASN1_SCK *asn1, tvbuff_t *tvb, int offset) -{ - asn1->tvb = tvb; - asn1->offset = offset; -} - -/* - * NAME: asn1_close [API] - * SYNOPSIS: void asn1_close - * ( - * ASN1_SCK *asn1, - * int *offset - * ) - * DESCRIPTION: Closes an ASN1 socket. - * Parameters: - * asn1: pointer to ASN1 socket. - * offset: pointer to variable into which current offset is - * to be put. - * RETURNS: void - */ - -void -asn1_close(ASN1_SCK *asn1, int *offset) -{ - *offset = asn1->offset; -} - -/* - * NAME: asn1_octet_decode - * SYNOPSIS: int asn1_octet_decode - * ( - * ASN1_SCK *asn1, - * guchar *ch - * ) - * DESCRIPTION: Decodes an octet. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_octet_decode(ASN1_SCK *asn1, guchar *ch) -{ - *ch = tvb_get_guint8(asn1->tvb, asn1->offset); - asn1->offset++; - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_tag_get - * SYNOPSIS: int asn1_tag_get - * ( - * ASN1_SCK *asn1, - * guint *tag - * ) - * DESCRIPTION: Decodes a tag number, combining it with existing tag bits. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -static int -asn1_tag_get(ASN1_SCK *asn1, guint *tag) -{ - int ret; - guchar ch; - - do { - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *tag <<= 7; - *tag |= ch & 0x7F; - } while ((ch & 0x80) == 0x80); - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_tag_decode - * SYNOPSIS: int asn1_tag_decode - * ( - * ASN1_SCK *asn1, - * guint *tag - * ) - * DESCRIPTION: Decodes a tag number. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_tag_decode(ASN1_SCK *asn1, guint *tag) -{ - *tag = 0; - return asn1_tag_get(asn1, tag); -} - -/* - * NAME: asn1_id_decode - * SYNOPSIS: int asn1_id_decode - * ( - * ASN1_SCK *asn1, - * guint *cls, - * guint *con, - * guint *tag - * ) - * DESCRIPTION: Decodes an identifier. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_id_decode(ASN1_SCK *asn1, guint *cls, guint *con, guint *tag) -{ - int ret; - guchar ch; - - *tag = 0; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *cls = (ch & 0xC0) >> 6; - *con = (ch & 0x20) >> 5; - *tag = (ch & 0x1F); - if (*tag == 0x1F) { - ret = asn1_tag_decode (asn1, tag); - if (ret != ASN1_ERR_NOERROR) - return ret; - } - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_id_decode1 - * SYNOPSIS: int asn1_id_decode1 - * ( - * ASN1_SCK *asn1, - * guint *tag - * ) - * DESCRIPTION: Decodes an identifier. - * Like asn1_id_decode() except that the Class and Constructor - * bits are returned in the tag. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_id_decode1(ASN1_SCK *asn1, guint *tag) -{ - int ret; - guchar ch; - - *tag = 0; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - - *tag = ch; - if ((*tag & 0x1F) == 0x1F) { /* high-tag-number format */ - *tag = ch >> 5; /* leave just the Class and Constructor bits */ - ret = asn1_tag_get (asn1, tag); - if (ret != ASN1_ERR_NOERROR) - return ret; - } - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_length_decode - * SYNOPSIS: int asn1_length_decode - * ( - * ASN1_SCK *asn1, - * gboolean *def, - * guint *len - * ) - * DESCRIPTION: Decodes an ASN1 length. - * Parameters: - * asn1: pointer to ASN1 socket. - * def: Boolean - TRUE if length definite, FALSE if not - * len: length, if length is definite - * DESCRIPTION: Decodes a definite or indefinite length. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_length_decode(ASN1_SCK *asn1, gboolean *def, guint *len) -{ - int ret; - guchar ch, cnt; - - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - if (ch == 0x80) - *def = FALSE; /* indefinite length */ - else { - *def = TRUE; /* definite length */ - if (ch < 0x80) - *len = ch; - else { - cnt = (guchar) (ch & 0x7F); - *len = 0; - while (cnt > 0) { - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *len <<= 8; - *len |= ch; - cnt--; - } - } - } - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_header_decode [API] - * SYNOPSIS: int asn1_header_decode - * ( - * ASN1_SCK *asn1, - * guint *cls, - * guint *con, - * guint *tag - * gboolean *defp, - * guint *lenp - * ) - * DESCRIPTION: Decodes an ASN1 header. - * Parameters: - * asn1: pointer to ASN1 socket. - * cls: Class (see asn1.h) - * con: Primitive, Constructed (ASN1_PRI, ASN1_CON) - * tag: Tag (see asn1.h) - * defp: Boolean - TRUE if length definite, FALSE if not - * lenp: length, if length is definite - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_header_decode(ASN1_SCK *asn1, guint *cls, guint *con, guint *tag, - gboolean *defp, guint *lenp) -{ - int ret; - guint len = 0; - gboolean def; - - ret = asn1_id_decode (asn1, cls, con, tag); - if (ret != ASN1_ERR_NOERROR) - return ret; - ret = asn1_length_decode (asn1, &def, &len); - if (ret != ASN1_ERR_NOERROR) - return ret; - *defp = def; - *lenp = len; - return ASN1_ERR_NOERROR; -} - - -/* - * NAME: asn1_eoc [API] - * SYNOPSIS: gboolean asn1_eoc - * ( - * ASN1_SCK *asn1, - * int eoc - * ) - * DESCRIPTION: Checks if decoding is at End Of Contents. - * Parameters: - * asn1: pointer to ASN1 socket. - * eoc: offset of end of encoding, or -1 if indefinite. - * RETURNS: gboolean success - */ -gboolean -asn1_eoc ( ASN1_SCK *asn1, int eoc) -{ - if (eoc == -1) - return (tvb_get_guint8(asn1->tvb, asn1->offset) == 0x00 - && tvb_get_guint8(asn1->tvb, asn1->offset + 1) == 0x00); - else - return (asn1->offset >= eoc); -} - -/* - * NAME: asn1_eoc_decode [API] - * SYNOPSIS: int asn1_eoc_decode - * ( - * ASN1_SCK *asn1, - * int eoc - * ) - * DESCRIPTION: Decodes End Of Contents. - * Parameters: - * asn1: pointer to ASN1 socket. - * eoc: offset of end of encoding, or -1 if indefinite. - * If eoc is -1 it decodes an ASN1 End Of - * Contents (0x00 0x00), so it has to be an - * indefinite length encoding. If eoc is a non-negative - * integer, it probably was filled by asn1_header_decode, - * and should refer to the octet after the last of the encoding. - * It is checked if this offset refers to the octet to be - * decoded. This only takes place in decoding a - * definite length encoding. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_eoc_decode (ASN1_SCK *asn1, int eoc) -{ - int ret; - guchar ch; - - if (eoc == -1) { - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - if (ch != 0x00) - return ASN1_ERR_EOC_MISMATCH; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - if (ch != 0x00) - return ASN1_ERR_EOC_MISMATCH; - return ASN1_ERR_NOERROR; - } else { - if (asn1->offset != eoc) - return ASN1_ERR_LENGTH_MISMATCH; - return ASN1_ERR_NOERROR; - } -} - -/* - * NAME: asn1_null_decode [API] - * SYNOPSIS: int asn1_null_decode - * ( - * ASN1_SCK *asn1, - * int enc_len - * ) - * DESCRIPTION: Decodes Null. - * Parameters: - * asn1: pointer to ASN1 socket. - * enc_len: length of encoding of value. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_null_decode ( ASN1_SCK *asn1, int enc_len) -{ - int start_off = asn1->offset; - - asn1->offset += enc_len; - /* - * Check for integer overflows. - * XXX - ASN1_ERR_LENGTH_MISMATCH seemed like the most appropriate - * error from the ones available. Should we make a new one? - */ - if (asn1->offset < 0 || asn1->offset < start_off) - return ASN1_ERR_LENGTH_MISMATCH; - - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_bool_decode [API] - * SYNOPSIS: int asn1_bool_decode - * ( - * ASN1_SCK *asn1, - * int enc_len, - * gboolean *boolean - * ) - * DESCRIPTION: Decodes Boolean. - * Parameters: - * asn1: pointer to ASN1 socket. - * enc_len: length of encoding of value. - * bool: False, True (0, !0). - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_bool_decode ( ASN1_SCK *asn1, int enc_len, gboolean *boolean) -{ - int ret; - guchar ch; - - if (enc_len != 1) - return ASN1_ERR_LENGTH_MISMATCH; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *boolean = ch ? TRUE : FALSE; - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_int32_value_decode [API] - * SYNOPSIS: int asn1_int32_value_decode - * ( - * ASN1_SCK *asn1, - * int enc_len, - * gint32 *integer - * ) - * DESCRIPTION: Decodes value portion of Integer (which must be no more - * than 32 bits). - * Parameters: - * asn1: pointer to ASN1 socket. - * enc_len: length of encoding of value. - * integer: Integer. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_int32_value_decode ( ASN1_SCK *asn1, int enc_len, gint32 *integer) -{ - int ret; - int eoc; - guchar ch; - guint len; - - eoc = asn1->offset + enc_len; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *integer = (gint) ch; - len = 1; - while (asn1->offset < eoc) { - if (++len > sizeof (gint32)) - return ASN1_ERR_WRONG_LENGTH_FOR_TYPE; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *integer <<= 8; - *integer |= ch; - } - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_int32_decode [API] - * SYNOPSIS: int asn1_int32_decode - * ( - * ASN1_SCK *asn1, - * gint32 *integer, - * guint *nbytes, - * ) - * DESCRIPTION: Decodes Integer (which must be no more than 32 bits). - * Parameters: - * asn1: pointer to ASN1 socket. - * integer: Integer. - * nbytes: number of bytes used to encode it. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_int32_decode ( ASN1_SCK *asn1, gint32 *integer, guint *nbytes) -{ - int ret; - int start; - guint cls; - guint con; - guint tag; - gboolean def; - guint enc_len; - - start = asn1->offset; - ret = asn1_header_decode (asn1, &cls, &con, &tag, &def, &enc_len); - if (ret != ASN1_ERR_NOERROR) - goto done; - if (cls != ASN1_UNI || con != ASN1_PRI || tag != ASN1_INT) { - ret = ASN1_ERR_WRONG_TYPE; - goto done; - } - if (!def) { - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - goto done; - } - ret = asn1_int32_value_decode (asn1, enc_len, integer); - -done: - *nbytes = asn1->offset - start; - return ret; -} - -/* - * NAME: asn1_uint32_value_decode [API] - * SYNOPSIS: int asn1_uint32_value_decode - * ( - * ASN1_SCK *asn1, - * int enc_len, - * guint32 *integer - * ) - * DESCRIPTION: Decodes value part of Unsigned Integer (which must be no - * more than 32 bits). - * Parameters: - * asn1: pointer to ASN1 socket. - * enc_len: length of encoding of value. - * integer: Integer. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_uint32_value_decode ( ASN1_SCK *asn1, int enc_len, guint32 *integer) -{ - int ret; - int eoc; - guchar ch; - guint len; - - eoc = asn1->offset + enc_len; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *integer = ch; - if (ch == 0) - len = 0; - else - len = 1; - while (asn1->offset < eoc) { - if (++len > sizeof (guint32)) - return ASN1_ERR_WRONG_LENGTH_FOR_TYPE; - ret = asn1_octet_decode (asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *integer <<= 8; - *integer |= ch; - } - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_uint32_decode [API] - * SYNOPSIS: int asn1_uint32_decode - * ( - * ASN1_SCK *asn1, - * guint32 *integer, - * guint *nbytes, - * ) - * DESCRIPTION: Decodes Unsigned Integer (which must be no more than 32 bits). - * Parameters: - * asn1: pointer to ASN1 socket. - * integer: Integer. - * nbytes: number of bytes used to encode it. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_uint32_decode ( ASN1_SCK *asn1, guint32 *integer, guint *nbytes) -{ - int ret; - int start; - guint cls; - guint con; - guint tag; - gboolean def; - guint enc_len; - - start = asn1->offset; - ret = asn1_header_decode (asn1, &cls, &con, &tag, &def, &enc_len); - if (ret != ASN1_ERR_NOERROR) - goto done; - if (cls != ASN1_UNI || con != ASN1_PRI || tag != ASN1_INT) { - ret = ASN1_ERR_WRONG_TYPE; - goto done; - } - if (!def) { - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - goto done; - } - ret = asn1_uint32_value_decode (asn1, enc_len, integer); - -done: - *nbytes = asn1->offset - start; - return ret; -} - -/* - * NAME: asn1_bits_decode [API] - * SYNOPSIS: int asn1_bits_decode - * ( - * ASN1_SCK *asn1, - * int eoc, - * guchar *bits, - * guint size, - * guint len, - * guchar unused - * ) - * DESCRIPTION: Decodes Bit String. - * Parameters: - * asn1: pointer to ASN1 socket. - * enc_len: length of value. - * bits: pointer to variable we set to point to strring - * len: Size of Bit String in characters. - * unused: Number of unused bits in last character. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_bits_decode ( ASN1_SCK *asn1, int enc_len, guchar **bits, - guint *len, guchar *unused) -{ - int ret; - int eoc; - guchar *ptr; - - eoc = asn1->offset + enc_len; - *bits = NULL; - ret = asn1_octet_decode (asn1, unused); - if (ret != ASN1_ERR_NOERROR) - return ret; - *len = 0; - - /* - * First, make sure the entire string is in the tvbuff, and throw - * an exception if it isn't. If the length is bogus, this should - * keep us from trying to allocate an immensely large buffer. - * (It won't help if the length is *valid* but immensely large, - * but that's another matter; in any case, that would happen only - * if we had an immensely large tvbuff....) - */ - if (enc_len != 0) { - tvb_ensure_bytes_exist(asn1->tvb, asn1->offset, enc_len); - *bits = (guchar *)g_malloc (enc_len); - } else { - /* - * If the length is 0, we allocate a 1-byte buffer, as - * "g_malloc()" returns NULL if passed 0 as an argument, - * and our caller expects us to return a pointer to a - * buffer. - */ - *bits = (guchar *)g_malloc (1); - } - - ptr = *bits; - while (asn1->offset < eoc) { - ret = asn1_octet_decode (asn1, (guchar *)ptr++); - if (ret != ASN1_ERR_NOERROR) { - g_free(*bits); - *bits = NULL; - return ret; - } - } - *len = (guint) (ptr - *bits); - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_string_value_decode [API] - * SYNOPSIS: int asn1_string_value_decode - * ( - * ASN1_SCK *asn1, - * int enc_len, - * guchar **octets - * ) - * DESCRIPTION: Decodes value portion of string (Octet String, various - * character string types) - * Parameters: - * asn1: pointer to ASN1 socket. - * enc_len: length of encoding of value. - * octets: pointer to variable we set to point to string, - * which is '\0' terminated for ease of use as C-string - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_string_value_decode ( ASN1_SCK *asn1, int enc_len, guchar **octets) -{ - int ret; - int eoc; - guchar *ptr; - - /* - * First, make sure the entire string is in the tvbuff, and throw - * an exception if it isn't. If the length is bogus, this should - * keep us from trying to allocate an immensely large buffer. - * (It won't help if the length is *valid* but immensely large, - * but that's another matter; in any case, that would happen only - * if we had an immensely large tvbuff....) - */ - if (enc_len != 0) - tvb_ensure_bytes_exist(asn1->tvb, asn1->offset, enc_len); - *octets = (guchar *)g_malloc (enc_len+1); - - eoc = asn1->offset + enc_len; - ptr = *octets; - while (asn1->offset < eoc) { - ret = asn1_octet_decode (asn1, (guchar *)ptr++); - if (ret != ASN1_ERR_NOERROR) { - g_free(*octets); - *octets = NULL; - return ret; - } - } - *(guchar *)ptr = '\0'; - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_string_decode [API] - * SYNOPSIS: int asn1_string_decode - * ( - * ASN1_SCK *asn1, - * guchar **octets, - * guint *str_len, - * guint *nbytes, - * guint expected_tag - * ) - * DESCRIPTION: Decodes string (Octet String, various character string - * types) - * Parameters: - * asn1: pointer to ASN1 socket. - * octets: pointer to variable we set to point to string. - * str_len: length of octet_string. - * nbytes: number of bytes used to encode. - * expected_tag: tag expected for this type of string. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_string_decode ( ASN1_SCK *asn1, guchar **octets, guint *str_len, - guint *nbytes, guint expected_tag) -{ - int ret; - int start; - guint enc_len; - guint cls; - guint con; - guint tag; - gboolean def; - - start = asn1->offset; - ret = asn1_header_decode (asn1, &cls, &con, &tag, &def, &enc_len); - if (ret != ASN1_ERR_NOERROR) - goto done; - if (cls != ASN1_UNI || con != ASN1_PRI || tag != expected_tag) { - /* XXX - handle the constructed encoding? */ - ret = ASN1_ERR_WRONG_TYPE; - goto done; - } - if (!def) { - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - goto done; - } - - ret = asn1_string_value_decode (asn1, enc_len, octets); - *str_len = enc_len; - -done: - *nbytes = asn1->offset - start; - return ret; -} - -/* - * NAME: asn1_octet_string_decode [API] - * SYNOPSIS: int asn1_octet_string_decode - * ( - * ASN1_SCK *asn1, - * guchar **octets, - * guint *str_len, - * guint *nbytes, - * ) - * DESCRIPTION: Decodes Octet String. - * Parameters: - * asn1: pointer to ASN1 socket. - * octets: pointer to variable we set to point to string. - * str_len: length of octet_string. - * nbytes: number of bytes used to encode. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_octet_string_decode ( ASN1_SCK *asn1, guchar **octets, guint *str_len, - guint *nbytes) -{ - return asn1_string_decode(asn1, octets, str_len, nbytes, ASN1_OTS); -} - -/* - * NAME: asn1_subid_decode - * SYNOPSIS: int asn1_subid_decode - * ( - * ASN1_SCK *asn1, - * subid_t *subid - * ) - * DESCRIPTION: Decodes Sub Identifier. - * Parameters: - * asn1: pointer to ASN1 socket. - * subid: Sub Identifier. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_subid_decode ( ASN1_SCK *asn1, subid_t *subid) -{ - int ret; - guchar ch; - - *subid = 0; - do { - ret = asn1_octet_decode(asn1, &ch); - if (ret != ASN1_ERR_NOERROR) - return ret; - *subid <<= 7; - *subid |= ch & 0x7F; - } while ((ch & 0x80) == 0x80); - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_oid_value_decode [API] - * SYNOPSIS: int asn1_oid_value_decode - * ( - * ASN1_SCK *asn1, - * int enc_len, - * subid_t **oid, - * guint *len - * ) - * DESCRIPTION: Decodes value portion of Object Identifier. - * Parameters: - * asn1: pointer to ASN1 socket. - * enc_len: length of encoding of value. - * oid: pointer to variable we set to Object Identifier. - * len: Length of Object Identifier in gulongs. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_oid_value_decode ( ASN1_SCK *asn1, int enc_len, subid_t **oid, guint *len) -{ - int ret; - int eoc; - subid_t subid; - guint size; - subid_t *optr; - - /* - * First, make sure the entire string is in the tvbuff, and throw - * an exception if it isn't. If the length is bogus, this should - * keep us from trying to allocate an immensely large buffer. - * (It won't help if the length is *valid* but immensely large, - * but that's another matter; in any case, that would happen only - * if we had an immensely large tvbuff....) - */ - if (enc_len < 1) { - *oid = NULL; - return ASN1_ERR_LENGTH_MISMATCH; - } - tvb_ensure_bytes_exist(asn1->tvb, asn1->offset, enc_len); - - eoc = asn1->offset + enc_len; - - size = enc_len + 1; - *oid = (guint32 *)g_malloc(size * sizeof(gulong)); - optr = *oid; - - ret = asn1_subid_decode (asn1, &subid); - if (ret != ASN1_ERR_NOERROR) { - g_free(*oid); - *oid = NULL; - return ret; - } - if (subid < 40) { - optr[0] = 0; - optr[1] = subid; - } else if (subid < 80) { - optr[0] = 1; - optr[1] = subid - 40; - } else { - optr[0] = 2; - optr[1] = subid - 80; - } - *len = 2; - optr += 2; - while (asn1->offset < eoc) { - if (++(*len) > size) { - g_free(*oid); - *oid = NULL; - return ASN1_ERR_WRONG_LENGTH_FOR_TYPE; - } - ret = asn1_subid_decode (asn1, optr++); - if (ret != ASN1_ERR_NOERROR) { - g_free(*oid); - *oid = NULL; - return ret; - } - } - return ASN1_ERR_NOERROR; -} - -/* - * NAME: asn1_oid_decode [API] - * SYNOPSIS: int asn1_oid_decode - * ( - * ASN1_SCK *asn1, - * subid_t **oid, - * guint *len, - * guint *nbytes - * ) - * DESCRIPTION: Decodes Object Identifier. - * Parameters: - * asn1: pointer to ASN1 socket. - * oid: pointer to variable we set to Object Identifier. - * len: Length of Object Identifier in gulongs. - * nbytes: number of bytes used to encode. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_oid_decode ( ASN1_SCK *asn1, subid_t **oid, guint *len, guint *nbytes) -{ - int ret; - int start; - guint cls; - guint con; - guint tag; - gboolean def; - guint enc_len; - - start = asn1->offset; - ret = asn1_header_decode (asn1, &cls, &con, &tag, &def, &enc_len); - if (ret != ASN1_ERR_NOERROR) - goto done; - if (cls != ASN1_UNI || con != ASN1_PRI || tag != ASN1_OJI) { - ret = ASN1_ERR_WRONG_TYPE; - goto done; - } - if (!def) { - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - goto done; - } - - ret = asn1_oid_value_decode (asn1, enc_len, oid, len); - -done: - *nbytes = asn1->offset - start; - return ret; -} - -/* - * NAME: asn1_sequence_decode [API] - * SYNOPSIS: int asn1_sequence_decode - * ( - * ASN1_SCK *asn1, - * guint *seq_len, - * guint *nbytes - * ) - * DESCRIPTION: Decodes header for SEQUENCE. - * Parameters: - * asn1: pointer to ASN1 socket. - * seq_len: length of sequence. - * nbytes: number of bytes used to encode header. - * RETURNS: ASN1_ERR value (ASN1_ERR_NOERROR on success) - */ -int -asn1_sequence_decode ( ASN1_SCK *asn1, guint *seq_len, guint *nbytes) -{ - int ret; - int start; - guint cls; - guint con; - guint tag; - gboolean def; - - start = asn1->offset; - ret = asn1_header_decode(asn1, &cls, &con, &tag, - &def, seq_len); - if (ret != ASN1_ERR_NOERROR) - goto done; - if (cls != ASN1_UNI || con != ASN1_CON || tag != ASN1_SEQ) { - ret = ASN1_ERR_WRONG_TYPE; - goto done; - } - if (!def) { - /* XXX - might some sequences have an indefinite length? */ - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - goto done; - } - ret = ASN1_ERR_NOERROR; - -done: - *nbytes = asn1->offset - start; - return ret; -} - -/* - * NAME: asn1_err_to_str [API] - * SYNOPSIS: const char *asn1_err_to_str - * ( - * int err - * ) - * DESCRIPTION: Returns the string corresponding to an ASN.1 library error. - * Parameters: - * err: the error code - * RETURNS: string for the error - */ -const char * -asn1_err_to_str(int err) -{ - const char *errstr; - char errstrbuf[14+1+1+11+1+1]; /* "Unknown error (%d)\0" */ - - switch (err) { - - case ASN1_ERR_EOC_MISMATCH: - errstr = "EOC mismatch"; - break; - - case ASN1_ERR_WRONG_TYPE: - errstr = "Wrong type for that item"; - break; - - case ASN1_ERR_LENGTH_NOT_DEFINITE: - errstr = "Length was indefinite"; - break; - - case ASN1_ERR_LENGTH_MISMATCH: - errstr = "Length mismatch"; - break; - - case ASN1_ERR_WRONG_LENGTH_FOR_TYPE: - errstr = "Wrong length for that item's type"; - break; - - default: - g_snprintf(errstrbuf, sizeof errstrbuf, "Unknown error (%d)", err); - errstr = ep_strdup(errstrbuf); - break; - } - return errstr; -} diff --git a/plugins/asn1/asn1.h b/plugins/asn1/asn1.h deleted file mode 100644 index 621acf08e8..0000000000 --- a/plugins/asn1/asn1.h +++ /dev/null @@ -1,162 +0,0 @@ -/* asn1.h - * Definitions for ASN.1 BER dissection - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * - * Based on "g_asn1.h" from: - * - * GXSNMP -- An snmp mangament application - * Copyright (C) 1998 Gregory McLean & Jochen Friedrich - * Beholder RMON ethernet network monitor,Copyright (C) 1993 DNPAP group - * - * 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 __ASN1_H__ -#define __ASN1_H__ - -#define ASN1_UNI 0 /* Universal */ -#define ASN1_APL 1 /* Application */ -#define ASN1_CTX 2 /* Context */ -#define ASN1_PRV 3 /* Private */ - -#define BER_CLASS_UNI 0 -#define BER_CLASS_APP 1 -#define BER_CLASS_CON 2 -#define BER_CLASS_PRI 3 -#define BER_CLASS_ANY 99 /* dont check class nor tag */ - -#define BER_UNI_TAG_EOC 0 /* 'end-of-content' */ -#define BER_UNI_TAG_BOOLEAN 1 -#define BER_UNI_TAG_INTEGER 2 -#define BER_UNI_TAG_BITSTRING 3 -#define BER_UNI_TAG_OCTETSTRING 4 -#define BER_UNI_TAG_NULL 5 -#define BER_UNI_TAG_OID 6 /* OBJECT IDENTIFIER */ -#define BER_UNI_TAG_ObjectDescriptor 7 -#define BER_UNI_TAG_EXTERNAL 8 -#define BER_UNI_TAG_REAL 9 -#define BER_UNI_TAG_ENUMERATED 10 -#define BER_UNI_TAG_EMBEDDED_PDV 11 -#define BER_UNI_TAG_UTF8String 12 -#define BER_UNI_TAG_RELATIVE_OID 13 -/* UNIVERSAL 14-15 - * Reserved for future editions of this - * Recommendation | International Standard - */ -#define BER_UNI_TAG_SEQUENCE 16 /* SEQUENCE, SEQUENCE OF */ -#define BER_UNI_TAG_SET 17 /* SET, SET OF */ -/* UNIVERSAL 18-22 Character string types */ -#define BER_UNI_TAG_NumericString 18 -#define BER_UNI_TAG_PrintableString 19 -#define BER_UNI_TAG_TeletexString 20 /* TeletextString, T61String */ -#define BER_UNI_TAG_VideotexString 21 -#define BER_UNI_TAG_IA5String 22 -/* UNIVERSAL 23-24 Time types */ -#define BER_UNI_TAG_UTCTime 23 -#define BER_UNI_TAG_GeneralizedTime 24 -/* UNIVERSAL 25-30 Character string types */ -#define BER_UNI_TAG_GraphicString 25 -#define BER_UNI_TAG_VisibleString 26 /* VisibleString, ISO64String */ -#define BER_UNI_TAG_GeneralString 27 -#define BER_UNI_TAG_UniversalString 28 -#define BER_UNI_TAG_CHARACTERSTRING 29 -#define BER_UNI_TAG_BMPString 30 -/* UNIVERSAL 31- ... - * Reserved for addenda to this Recommendation | International Standard - */ - /* Tag */ -#define ASN1_EOC 0 /* End Of Contents */ -#define ASN1_BOL 1 /* Boolean */ -#define ASN1_INT 2 /* Integer */ -#define ASN1_BTS 3 /* Bit String */ -#define ASN1_OTS 4 /* Octet String */ -#define ASN1_NUL 5 /* Null */ -#define ASN1_OJI 6 /* Object Identifier */ -#define ASN1_OJD 7 /* Object Description */ -#define ASN1_EXT 8 /* External */ -#define ASN1_REAL 9 /* Real */ -#define ASN1_ENUM 10 /* Enumerated */ -#define ASN1_SEQ 16 /* Sequence */ -#define ASN1_SET 17 /* Set */ -#define ASN1_NUMSTR 18 /* Numerical String */ -#define ASN1_PRNSTR 19 /* Printable String */ -#define ASN1_TEXSTR 20 /* Teletext String */ -#define ASN1_VIDSTR 21 /* Video String */ -#define ASN1_IA5STR 22 /* IA5 String */ -#define ASN1_UNITIM 23 /* Universal Time */ -#define ASN1_GENTIM 24 /* General Time */ -#define ASN1_GRASTR 25 /* Graphical String */ -#define ASN1_VISSTR 26 /* Visible String */ -#define ASN1_GENSTR 27 /* General String */ - - /* Primitive / Constructed */ -#define ASN1_PRI 0 /* Primitive */ -#define ASN1_CON 1 /* Constructed */ - - -#define ASN1_ERR_NOERROR 0 /* no error */ -#define ASN1_ERR_EOC_MISMATCH 1 -#define ASN1_ERR_WRONG_TYPE 2 /* type not right */ -#define ASN1_ERR_LENGTH_NOT_DEFINITE 3 /* length should be definite */ -#define ASN1_ERR_LENGTH_MISMATCH 4 -#define ASN1_ERR_WRONG_LENGTH_FOR_TYPE 5 /* length wrong for type */ - -typedef struct _ASN1_SCK ASN1_SCK; - -struct _ASN1_SCK -{ /* ASN1 socket */ - tvbuff_t *tvb; /* Tvbuff whence the data comes */ - int offset; /* Current offset in tvbuff */ -}; - -extern void asn1_open (ASN1_SCK *asn1, tvbuff_t *tvb, int offset); -extern void asn1_close (ASN1_SCK *asn1, int *offset); -extern int asn1_octet_decode (ASN1_SCK *asn1, guchar *ch); -extern int asn1_tag_decode (ASN1_SCK *asn1, guint *tag); -extern int asn1_id_decode (ASN1_SCK *asn1, guint *cls, guint *con, guint *tag); -extern int asn1_id_decode1 (ASN1_SCK *asn1, guint *tag); -extern int asn1_length_decode (ASN1_SCK *asn1, gboolean *def, guint *len); -extern int asn1_header_decode(ASN1_SCK *asn1, guint *cls, guint *con, - guint *tag, gboolean *defp, guint *lenp); -extern int asn1_eoc (ASN1_SCK *asn1, int eoc); -extern int asn1_eoc_decode (ASN1_SCK *asn1, int eoc); -extern int asn1_null_decode (ASN1_SCK *asn1, int enc_len); -extern int asn1_bool_decode (ASN1_SCK *asn1, int enc_len, gboolean *boolean); -extern int asn1_int32_value_decode (ASN1_SCK *asn1, int enc_len, - gint32 *integer); -extern int asn1_int32_decode (ASN1_SCK *asn1, gint32 *integer, guint *nbytes); -extern int asn1_uint32_value_decode (ASN1_SCK *asn1, int enc_len, - guint32 *integer); -extern int asn1_uint32_decode (ASN1_SCK *asn1, guint32 *integer, guint *nbytes); -extern int asn1_bits_decode (ASN1_SCK *asn1, int enc_len, guchar **bits, - guint *len, guchar *unused); -extern int asn1_string_value_decode (ASN1_SCK *asn1, int enc_len, - guchar **octets); -extern int asn1_string_decode (ASN1_SCK *asn1, guchar **octets, guint *str_len, - guint *nbytes, guint expected_tag); -extern int asn1_octet_string_decode (ASN1_SCK *asn1, guchar **octets, - guint *str_len, guint *nbytes); -extern int asn1_subid_decode (ASN1_SCK *asn1, subid_t *subid); -extern int asn1_oid_value_decode (ASN1_SCK *asn1, int enc_len, subid_t **oid, - guint *len); -extern int asn1_oid_decode (ASN1_SCK *asn1, subid_t **oid, guint *len, - guint *nbytes); -extern int asn1_sequence_decode (ASN1_SCK *asn1, guint *seq_len, guint *nbytes); - -extern const char *asn1_err_to_str (int err); - -#endif diff --git a/plugins/asn1/moduleinfo.h b/plugins/asn1/moduleinfo.h deleted file mode 100644 index e649a20b67..0000000000 --- a/plugins/asn1/moduleinfo.h +++ /dev/null @@ -1,40 +0,0 @@ -/* moduleinfo.h - * - * Module info header for wireshark plugins. - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * 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. - */ - -/* Included *after* config.h, in order to re-define these macros */ - -#ifdef PACKAGE -#undef PACKAGE -#endif - -/* Name of package */ -#define PACKAGE "asn1" - - -#ifdef VERSION -#undef VERSION -#endif - -/* Version number of package */ -#define VERSION "0.5.0" - diff --git a/plugins/asn1/moduleinfo.nmake b/plugins/asn1/moduleinfo.nmake deleted file mode 100644 index 109a0827c9..0000000000 --- a/plugins/asn1/moduleinfo.nmake +++ /dev/null @@ -1,26 +0,0 @@ -# - -# The name -PACKAGE=asn1 - -# The version -MODULE_VERSION_MAJOR=0 -MODULE_VERSION_MINOR=5 -MODULE_VERSION_MICRO=0 -MODULE_VERSION_EXTRA=0 - -# -# The RC_VERSION should be comma-separated, not dot-separated, -# as per Graham Bloice's message in -# -# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html -# -# "The RC_VERSION variable in config.nmake should be comma separated. -# This allows the resources to be built correctly and the version -# number to be correctly displayed in the explorer properties dialog -# for the executables, and XP's tooltip, rather than 0.0.0.0." -# - -MODULE_VERSION=$(MODULE_VERSION_MAJOR).$(MODULE_VERSION_MINOR).$(MODULE_VERSION_MICRO).$(MODULE_VERSION_EXTRA) -RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA) - diff --git a/plugins/asn1/packet-asn1.c b/plugins/asn1/packet-asn1.c deleted file mode 100644 index 07bce98395..0000000000 --- a/plugins/asn1/packet-asn1.c +++ /dev/null @@ -1,5542 +0,0 @@ -/******************************************************************************************************/ -/* packet-asn1.c - * - * Copyright (c) 2003 by Matthijs Melchior - * - * A plugin for: - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1999 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. - */ - - -/************************************************************************** - * This plugin will dissect BER encoded ASN.1 messages in UDP packets or in - * a TCP stream. It relies on wireshark to do defragmentation and re-assembly - * to construct complete messages. - * - * To produce packet display with good annotations it needs to know about - * the ASN.1 definition of the messages it reads. To this end, it can read - * the 'type-table' output file of the ASN.1 to C compiler 'snacc'. The - * version I have used came from: http://packages.debian.org/testing/devel/snacc.html - * - * The type-table files produced by snacc are themselves ASN.1 BER encoded - * data structures. Knowledge of the structure of that table, as specified - * in the tbl.asn1 file in the snacc distribution, is hand coded in some - * functions in this plugin. - * - * This also means that this dissector can show its own specification. - * On a unix machine, do the following to see this in action: - * - cd /tmp - * - snacc -u /usr/include/snacc/asn1/asn-useful.asn1 -T tbl.tt /usr/include/snacc/asn1/tbl.asn1 - * - od -Ax -tx1 tbl.tt | text2pcap -T 801,801 - tbl.tt.pcap - * - wireshark tbl.tt.pcap - * GUI: Edit->Preferences->Protocols->ASN1 - * type table file: /tmp/tbl.tt - * PDU name: TBL - * [OK] - * you can now browse the tbl.tt definition. - * - */ - - -/* Include files */ - -#include "config.h" - -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef DISSECTOR_WITH_GUI -#include -#endif - -/* buffer lengths */ -#define BUFLS 32 -#define BUFLM 64 -#define BUFLL 128 - -/* Define default ports */ - -#define TCP_PORT_ASN1 0 -#define UDP_PORT_ASN1 0 -#define SCTP_PORT_ASN1 0 - -void proto_reg_handoff_asn1(void); - -/* Define the asn1 proto */ - -static int proto_asn1 = -1; - -/* Define the tree for asn1*/ - -static int ett_asn1 = -1; - -#define MAXPDU 64 /* max # PDU's in one packet */ -static int ett_pdu[MAXPDU]; - -#define MAX_NEST 32 /* max nesting level for ASN.1 elements */ -static int ett_seq[MAX_NEST]; - -/* - * Global variables associated with the preferences for asn1 - */ - -#ifdef JUST_ONE_PORT -static guint global_tcp_port_asn1 = TCP_PORT_ASN1; -static guint global_udp_port_asn1 = UDP_PORT_ASN1; -static guint global_sctp_port_asn1 = SCTP_PORT_ASN1; -#else -static range_t *global_tcp_ports_asn1; -static range_t *global_udp_ports_asn1; -static range_t *global_sctp_ports_asn1; -#endif /* JUST_ONE_PORT */ - -static gboolean asn1_desegment = TRUE; -static const char *asn1_filename = NULL; -static char *old_default_asn1_filename = NULL; -#define OLD_DEFAULT_ASN1FILE "asn1" G_DIR_SEPARATOR_S "default.tt" -#ifdef _WIN32 -#define BAD_SEPARATOR_OLD_DEFAULT_ASN1FILE "asn1/default.tt" -static char *bad_separator_old_default_asn1_filename = NULL; -#endif -static char *current_asn1 = NULL; -static const char *asn1_pduname = NULL; -static char *current_pduname = NULL; -static gboolean asn1_debug = FALSE; -static guint first_pdu_offset = 0; -static gboolean asn1_message_win = FALSE; -static gboolean asn1_verbose = FALSE; /* change to TRUE for logging the startup phase */ -static gboolean asn1_full = FALSE; /* show full names */ -static guint type_recursion_level = 1; /* eliminate 1 level of references */ -static char *asn1_logfile = NULL; - -#define ASN1LOGFILE "wireshark.log" - -/* PDU counter, for correlation between GUI display and log file in debug mode */ -static int pcount = 0; - -static tvbuff_t *asn1_desc; /* the PDU description */ -static GNode *asn1_nodes = NULL; /* GNode tree pointing to every asn1 data element */ -static GNode *data_nodes = NULL; /* GNode tree describing the syntax data */ -static GNode *PDUtree = NULL; /* GNode tree describing the expected PDU format */ - -static guint PDUerrcount = 0; /* count of parse errors in one ASN.1 message */ - -#define NEL(x) (sizeof(x)/sizeof(*x)) /* # elements in static array */ - - -static char pabbrev[] = "asn1"; /* field prefix */ - -static char fieldname[512]; /* for constructing full names */ -static guint pabbrev_pdu_len; /* length initial part of fieldname with 'abbrev.asn1pdu.' */ - -/* - * Text strings describing the standard, universal, ASN.1 names. - */ - -#define ASN1_EOI 4 /* this is in the class number space... */ -#define ASN1_BEG 2 /* to be merged with constructed flag, first entry in sequence */ - -static const char tag_class[] = "UACPX"; - -static const char *asn1_cls[] = { "Universal", "Application", "Context", "Private" }; - -static const char *asn1_con[] = { "Primitive", "Constructed" }; - -static const char *asn1_tag[] = { - /* 0 */ "EOC", "Boolean", "Integer", "BitString", - /* 4 */ "OctetString", "Null", "ObjectIdentifier", "ObjectDescriptor", - /* 8 */ "External", "Real", "Enumerated", "tag11", - /* 12 */ "UTF8String", "tag13", "tag14", "tag15", - /* 16 */ "Sequence", "Set", "NumericString", "PrintableString", - /* 20 */ "TeletexString", "VideotexString", "IA5String", "UTCTime", - /* 24 */ "GeneralTime", "GraphicString", "ISO646String", "GeneralString", - /* 28 */ "UniversalString", "tag29", "BMPString", "Long tag prefix" -/* TT61 == TELETEX */ -/* ISO646 == VISIBLE*/ -}; - -/* type names used in the output of the snacc ASN.1 compiler, the TBLTypeId enum */ -static gboolean tbl_types_verified = FALSE; - -typedef enum { /* copied from .../snacc/c-lib/boot/tbl.h */ - TBL_BOOLEAN = 0, - TBL_INTEGER = 1, - TBL_BITSTRING = 2, - TBL_OCTETSTRING = 3, - TBL_NULL = 4, - TBL_OID = 5, - TBL_REAL = 6, - TBL_ENUMERATED = 7, - TBL__SIMPLE = 8, /* values smaller than this can have a value */ - TBL_SEQUENCE = 8, - TBL_SET = 9, - TBL_SEQUENCEOF = 10, - TBL_SETOF = 11, - TBL_CHOICE = 12, - TBL_TYPEREF = 13, - - TBL_SEQUENCEOF_start, /* to mark potential sequence-of repeat */ - TBL_TYPEREF_nopop, /* typeref has been handled immediately */ - TBL_CHOICE_done, /* choice is finished */ - TBL_reserved, /* this sequence has been visited */ - TBL_CHOICE_immediate, /* immediate choice, no next */ - - TBL_INVALID /* incorrect value for this enum */ -} TBLTypeId; - -/* Universal tags mapped to snacc ASN.1 table types */ -static int asn1_uni_type[] = { - /* 0 */ TBL_INVALID, TBL_BOOLEAN, TBL_INTEGER, TBL_BITSTRING, - /* 4 */ TBL_OCTETSTRING, TBL_NULL, TBL_OID, TBL_INVALID, - /* 8 */ TBL_INVALID, TBL_REAL, TBL_ENUMERATED, TBL_INVALID, - /* 12 */ TBL_OCTETSTRING, TBL_INVALID, TBL_INVALID, TBL_INVALID, - /* 16 */ TBL_SEQUENCE, TBL_SET, TBL_OCTETSTRING, TBL_OCTETSTRING, - /* 20 */ TBL_OCTETSTRING, TBL_OCTETSTRING, TBL_OCTETSTRING, TBL_OCTETSTRING, - /* 24 */ TBL_OCTETSTRING, TBL_OCTETSTRING, TBL_OCTETSTRING, TBL_OCTETSTRING, - /* 28 */ TBL_OCTETSTRING, TBL_INVALID, TBL_OCTETSTRING, TBL_INVALID, -}; - - -#define TBL_REPEAT 0x00010000 /* This type may be repeated, a flag in word TBLTypeId */ -#define TBL_REPEAT_choice 0x00020000 /* repeating a choice */ -#define TBL_CHOICE_made 0x00040000 /* This was a choice entry */ -#define TBL_SEQUENCE_done 0x00080000 /* children have been processed */ -#define TBL_CHOICE_repeat 0x00100000 /* a repeating choice */ -#define TBL_REFERENCE 0x00200000 /* This entry is result of a typeref */ -#define TBL_REFERENCE_pop 0x00400000 /* reference handled, do pop i.s.o. next */ -#define TBL_SEQUENCE_choice 0x00800000 /* this sequence is a first of a repeating choice */ -#define TBL_CONSTRUCTED 0x01000000 /* unexpectedly constructed entry */ -#define TBL_TYPEmask 0x0000FFFF /* Mask just the type */ - -/* XXX - Should we use val_to_str here? */ -#define TBLTYPE(x) (tbl_types[x&TBL_TYPEmask]) - -/* text tables for debugging and GUI */ -static const char *tbl_types[] = { - /* 0 */ "tbl-boolean", - /* 1 */ "tbl-integer", - /* 2 */ "tbl-bitstring", - /* 2 */ "tbl-octetstring", - /* 4 */ "tbl-null", - /* 5 */ "tbl-oid", - /* 6 */ "tbl-real", - /* 7 */ "tbl-enumerated", - /* 8 */ "tbl-sequence", - /* 9 */ "tbl-set", - /* 10 */ "tbl-sequenceof", - /* 11 */ "tbl-setof", - /* 12 */ "tbl-choice", - /* 13 */ "tbl-typeref", - - /* 14 */ "tbl-sequenceof-start", - /* 15 */ "tbl-typeref-nopop", - /* 16 */ "tbl-choice-done", - /* 17 */ "tbl-reserved", - /* 18 */ "tbl-choice-immediate", - - /* 19 */ "tbl-invalid", -}; -static const char *tbl_types_asn1[] = { - /* 0 */ "BOOLEAN", - /* 1 */ "INTEGER", - /* 2 */ "BITSTRING", - /* 2 */ "OCTET STRING", - /* 4 */ "NULL", - /* 5 */ "OBJECT IDENTIFIER", - /* 6 */ "REAL", - /* 7 */ "ENUMERATED", - /* 8 */ "SEQUENCE", - /* 9 */ "SET", - /* 10 */ "SEQUENCE OF", - /* 11 */ "SET OF", - /* 12 */ "CHOICE", - /* 13 */ "TYPEREF", - - /* 14 */ "start-SEQUENCE OF", - /* 15 */ "TYPEREF nopop", - /* 16 */ "CHOICE done", - /* 17 */ "Reserved", - /* 18 */ "CHOICE immediate", - - /* 19 */ "INVALID entry", -}; -/* conversion from snacc type to appropriate wireshark type */ -static enum ftenum tbl_types_wireshark[] = { - /* 0 */ FT_BOOLEAN, /* TBL_BOOLEAN */ - /* 1 */ FT_UINT32, /* TBL_INTEGER */ - /* 2 */ FT_UINT32, /* TBL_BITSTRING */ - /* 2 */ FT_STRINGZ, /* TBL_OCTETSTRING */ - /* 4 */ FT_NONE, /* TBL_NULL */ - /* 5 */ FT_BYTES, /* TBL_OID */ - /* 6 */ FT_DOUBLE, /* TBL_REAL */ - /* 7 */ FT_UINT32, /* TBL_ENUMERATED */ - /* 8 */ FT_NONE, /* TBL_SEQUENCE */ - /* 9 */ FT_NONE, /* TBL_SET */ - /* 10 */ FT_NONE, /* TBL_SEQUENCEOF */ - /* 11 */ FT_NONE, /* TBL_SETOF */ - /* 12 */ FT_NONE, /* TBL_CHOICE */ - /* 13 */ FT_NONE, /* TBL_TYPEREF */ - - /* 14 */ FT_NONE, /* TBL_SEQUENCEOF_start */ - /* 15 */ FT_NONE, /* TBL_TYPEREF_nopop */ - /* 16 */ FT_NONE, /* TBL_CHOICE_done */ - /* 17 */ FT_NONE, /* TBL_reserved */ - /* 18 */ FT_NONE, /* TBL_CHOICE_immediate */ - - /* 19 */ FT_NONE, /* TBL_INVALID */ -}; - -/* conversion from snacc type to appropriate wireshark display type */ -static guint tbl_display_wireshark[] = { - /* 0 */ BASE_DEC, /* TBL_BOOLEAN */ - /* 1 */ BASE_DEC_HEX, /* TBL_INTEGER */ - /* 2 */ BASE_HEX, /* TBL_BITSTRING */ - /* 2 */ BASE_NONE, /* TBL_OCTETSTRING */ - /* 4 */ BASE_NONE, /* TBL_NULL */ - /* 5 */ BASE_DEC, /* TBL_OID */ - /* 6 */ BASE_DEC, /* TBL_REAL */ - /* 7 */ BASE_DEC, /* TBL_ENUMERATED */ - /* 8 */ BASE_NONE, /* TBL_SEQUENCE */ - /* 9 */ BASE_NONE, /* TBL_SET */ - /* 10 */ BASE_NONE, /* TBL_SEQUENCEOF */ - /* 11 */ BASE_NONE, /* TBL_SETOF */ - /* 12 */ BASE_NONE, /* TBL_CHOICE */ - /* 13 */ BASE_NONE, /* TBL_TYPEREF */ - - /* 14 */ BASE_NONE, /* TBL_SEQUENCEOF_start */ - /* 15 */ BASE_NONE, /* TBL_TYPEREF_nopop */ - /* 16 */ BASE_NONE, /* TBL_CHOICE_done */ - /* 17 */ BASE_NONE, /* TBL_reserved */ - /* 18 */ BASE_NONE, /* TBL_CHOICE_immediate */ - - /* 19 */ BASE_NONE, /* TBL_INVALID */ -}; - -static const char *tbl_types_wireshark_txt[] = { - /* 0 */ "FT_BOOLEAN", /* TBL_BOOLEAN */ - /* 1 */ "FT_UINT32", /* TBL_INTEGER */ - /* 2 */ "FT_UINT32", /* TBL_BITSTRING */ - /* 2 */ "FT_STRINGZ", /* TBL_OCTETSTRING */ - /* 4 */ "FT_NONE", /* TBL_NULL */ - /* 5 */ "FT_BYTES", /* TBL_OID */ - /* 6 */ "FT_DOUBLE", /* TBL_REAL */ - /* 7 */ "FT_UINT32", /* TBL_ENUMERATED */ - /* 8 */ "FT_NONE", /* TBL_SEQUENCE */ - /* 9 */ "FT_NONE", /* TBL_SET */ - /* 10 */ "FT_NONE", /* TBL_SEQUENCEOF */ - /* 11 */ "FT_NONE", /* TBL_SETOF */ - /* 12 */ "FT_NONE", /* TBL_CHOICE */ - /* 13 */ "FT_NONE", /* TBL_TYPEREF */ - - /* 14 */ "FT_NONE", /* TBL_SEQUENCEOF_start */ - /* 15 */ "FT_NONE", /* TBL_TYPEREF_nopop */ - /* 16 */ "FT_NONE", /* TBL_CHOICE_done */ - /* 17 */ "FT_NONE", /* TBL_reserved */ - /* 18 */ "FT_NONE", /* TBL_CHOICE_immediate */ - - /* 19 */ "FT_NONE", /* TBL_INVALID */ -}; - -typedef struct _PDUinfo PDUinfo; -struct _PDUinfo { - guint type; - const char *name; - const char *asn1typename; - const char *fullname; - guchar tclass; - guint tag; - guint flags; - GNode *reference; - gint typenum; - gint basetype; /* parent type */ - gint mytype; /* original type number, typenum may have gone through a reference */ - gint value_id; /* wireshark field id for the value in this PDU */ - gint type_id; /* wireshark field id for the type of this PDU */ - hf_register_info value_hf; /* wireshark field info for this value */ -}; - - -/* bits in the flags collection */ -#define PDU_OPTIONAL 1 -#define PDU_IMPLICIT 2 -#define PDU_NAMEDNUM 4 -#define PDU_REFERENCE 8 -#define PDU_TYPEDEF 0x10 -#define PDU_ANONYMOUS 0x20 -#define PDU_TYPETREE 0x40 - -#define PDU_CHOICE 0x08000000 /* manipulated by the PDUname routine */ - -static guint PDUinfo_initflags = 0; /* default flags for newly allocated PDUinfo structs */ - -/* description of PDU properties as passed from the matching routine - * to the decoder and GUI. - */ -typedef struct _PDUprops PDUprops; -struct _PDUprops { - guint type; /* value from enum TBLTypeId */ - const char *name; - const char *asn1typename; - const char *fullname; - guint flags; - gpointer data; - gint value_id; - gint type_id; -}; -/* flags defined in PDUprops.flags */ -#define OUT_FLAG_type 1 -#define OUT_FLAG_data 2 -#define OUT_FLAG_typename 4 -#define OUT_FLAG_dontshow 8 -#define OUT_FLAG_noname 0x10 -#define OUT_FLAG_constructed 0x20 - -static PDUprops *getPDUprops(PDUprops *out, guint offset, guint cls, guint tag, guint cons); -static const char *getPDUenum(PDUprops *props, guint offset, guint cls, guint tag, guint value); - -static const char empty[] = ""; /* address of the empt string, avoids many tests for NULL */ -#define MAX_OTSLEN 256 /* max printed size for an octet string */ - - -#undef NEST /* show nesting of asn.1 enties */ - -#ifdef NEST /* only for debugging */ -/* show nesting, only for debugging... */ -#define MAXTAGS MAX_NEST -static struct { - guchar cls; - guchar tag; -} taglist[MAXTAGS]; - -static char *showtaglist(guint level) -{ - static char tagtxt[BUFLM]; - guint i; - int idx; - - idx = 0; -#ifdef ALLTAGS - for(i=0; i<= level; i++) { - switch(taglist[i].cls) { - case BER_CLASS_UNI: - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "U"); - break; - case BER_CLASS_APP: - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "A"); - break; - case BER_CLASS_CON: - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "C"); - break; - case BER_CLASS_PRI: - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "P"); - break; - default: - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "x"); - break; - } - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "%d.", taglist[i].tag); - } -#else /* only context tags */ - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "C"); - for(i=0; i<= level; i++) { - if (taglist[i].cls == BER_CLASS_CON) { - idx += g_snprintf(&tagtxt[idx], BUFLM - idx, "%d.", taglist[i].tag); - } - } -#endif - idx--; - tagtxt[idx] = '\0'; /* remove trailing '.' */ - return tagtxt; -} - -static guint -get_context(guint level) -{ - guint ctx = 0; - guint i; - - for(i=0; i<=level; i++) { - if (taglist[i].cls == BER_CLASS_CON) - ctx = (ctx << 8) | taglist[i].tag; - } - return ctx; -} -#endif /* NEST, only for debugging */ - - -/* Convert a bit string to an ascii representation for printing - * -- not thread safe ... - */ -static const char *showbits(guchar *val, guint count) -{ - static char str[BUFLM]; - guint i; - char *p = str; - - if (count > 32) - return "*too many bits*"; - - if (val != 0) { - for(i=0; i>3] & (0x80 >> (i & 7))) ? '1' : '0'; - } - } - *p = 0; - return str; -} - -/* get bitnames string for bits set */ -static const char * -showbitnames(guchar *val, guint count, PDUprops *props, guint offset) -{ - static char str[BUFLL]; - guint i; - int idx; - - if (props->flags & OUT_FLAG_noname) - return empty; - - if (count > 32) - return "*too many bits, no names...*"; - - idx = 0; - if (val != NULL) { - for(i=0; i>3] & (0x80 >> (i & 7))) { /* bit i is set */ - idx += g_snprintf(&str[idx], BUFLL-idx, "%s,", getPDUenum(props, offset, 0, 0, i)); - } - } - if (idx > 0) - --idx; /* remove terminating , */ - } - str[idx] = '\0'; - return str; - - - -} -/* Convert an oid to its conventional text representation - * -- not thread safe... - */ -static char *showoid(subid_t *oid, guint len) -{ - static char str[BUFLM]; - guint i; - int idx; - - idx = 0; - if (oid != NULL) { - for(i=0; i MAX_OTSLEN) { /* limit the maximum output.... */ - len = MAX_OTSLEN; - endstr = "...."; /* this is 5 bytes !! */ - } - if (dohex) { - str = (char *)g_malloc(len*2 + 5); - idx = 0; - for (i=0; i 131071) - newlen = 64; - } else { - switch (tag) { - case BER_UNI_TAG_EOC: /* End Of Contents */ - case BER_UNI_TAG_NULL: /* Null */ - newlen = 0; - break; - case BER_UNI_TAG_BOOLEAN: /* Boolean */ - newlen = 1; - break; - case BER_UNI_TAG_INTEGER: /* Integer */ - case BER_UNI_TAG_ENUMERATED: /* Enumerated */ - if (len > 8) - newlen = 4; - break; - case BER_UNI_TAG_BITSTRING: /* Bit String */ - if (len > 8) - newlen = 4; - break; - case BER_UNI_TAG_OCTETSTRING: /* Octet String */ - case BER_UNI_TAG_NumericString: /* Numerical String */ - case BER_UNI_TAG_PrintableString: /* Printable String */ - case BER_UNI_TAG_TeletexString: /* Teletext String */ - case BER_UNI_TAG_VideotexString: /* Video String */ - case BER_UNI_TAG_IA5String: /* IA5 String */ - case BER_UNI_TAG_GraphicString: /* Graphical String */ - case BER_UNI_TAG_VisibleString: /* Visible String */ - case BER_UNI_TAG_GeneralString: /* General String */ - if (len > 65535) - newlen = 32; - break; - case BER_UNI_TAG_OID: /* Object Identifier */ - case BER_UNI_TAG_ObjectDescriptor: /* Description */ - case ASN1_EXT: /* External */ - if (len > 64) - newlen = 16; - break; - case BER_UNI_TAG_REAL: /* Real */ - if (len >16) - newlen = 8; - break; - case BER_UNI_TAG_SEQUENCE: /* Sequence */ - case BER_UNI_TAG_SET: /* Set */ - if (len > 65535) - newlen = 64; - break; - case BER_UNI_TAG_UTCTime: /* Universal Time */ - case BER_UNI_TAG_GeneralizedTime: /* General Time */ - if (len > 32) - newlen = 15; - break; - - default: - if (len > 131071) - newlen = 64; - break; - } - } - - if (newlen != len) { - /* a change was needed.... */ - g_snprintf(lenstr, strmax, "%d(changed from %d)", newlen, len); - } else { - g_snprintf(lenstr, strmax, "%d", len); - } - return newlen; -} - -static guint decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint len, proto_tree *pt, int level); -static void PDUreset(int count, int counr2); - -static int -dissect_asn1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, struct tcpinfo *info, gboolean is_tcp) { - ASN1_SCK asn1; - guint cls, con, tag, len, offset, reassembled; - gboolean def; - char lenstr[BUFLS]; - char tagstr[BUFLS]; - char headstr[BUFLL]; - char offstr[BUFLS]; - const char *name, *tname; - volatile guint boffset; - volatile int i = 0; /* PDU counter */ - proto_tree * volatile ti = 0, * volatile ti2 = 0, *asn1_tree, *tree2; - proto_item *hidden_item; - PDUprops props; - static guint lastseq; - gint delta; - - /* Reject the packet if info is NULL under conditions where it'll be used. */ - if (is_tcp && info == NULL) - return 0; - - pcount++; - boffset = 0; - - reassembled = 1; /* UDP is not a stream, and thus always reassembled .... */ - if (is_tcp) { /* we have tcpinfo */ - delta = info->seq - lastseq; - reassembled = info->is_reassembled; - lastseq = info->seq; - - if (asn1_verbose) - g_message("dissect_asn1: tcp - seq=%u, delta=%d, reassembled=%d", - info->seq, delta, reassembled); - } else { - if (asn1_verbose) - g_message("dissect_asn1: udp"); - } - - /* Set the protocol column */ - col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "ASN.1 %s", current_pduname); - - col_clear(pinfo->cinfo, COL_INFO); - - - offstr[0] = 0; - if ((first_pdu_offset > 0) && !reassembled) { - boffset = first_pdu_offset; - g_snprintf(offstr, sizeof(offstr), " at %d", boffset); - } - - /* open BER decoding */ - asn1_open(&asn1, tvb, boffset); - - asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - - asn1_close(&asn1, &offset); - - PDUreset(pcount, 0); /* arguments are just for debugging */ - getPDUprops(&props, boffset, cls, tag, con); - name = props.name; - tname = props.asn1typename; - - len = checklength(len, def, cls, tag, lenstr, sizeof(lenstr)); - - if (asn1_debug) { - - g_snprintf(tagstr, sizeof(tagstr), "%ctag%d", tag_class[cls], tag); - - g_snprintf(headstr, sizeof(headstr), "first%s: (%s)%s %d %s, %s, %s, len=%s, off=%d, size=%d ", - offstr, - tname, - name, - pcount, - asn1_cls[cls], - asn1_con[con], - ((cls == BER_CLASS_UNI) && (tag < 32)) ? asn1_tag[tag] : tagstr, - lenstr, - boffset, - tvb_length(tvb) - ); - } else { - if (props.flags & OUT_FLAG_noname) { - g_snprintf(tagstr, sizeof(tagstr), "%ctag%d", tag_class[cls], tag); - name = ((cls == BER_CLASS_UNI) && (tag < 32)) ? asn1_tag[tag] : tagstr; - } - g_snprintf(headstr, sizeof(headstr), "first pdu%s: (%s)%s ", offstr, tname, name ); - } - - /* Set the info column */ - col_add_str(pinfo->cinfo, COL_INFO, headstr ); - - /* - * If we have a non-null tree (ie we are building the proto_tree - * instead of just filling out the columns ), then add a BER - * tree node - */ - - /* ignore the tree here, must decode BER to know how to reassemble!! */ -/* if(tree) { */ - - TRY { /* catch incomplete PDU's */ - - ti = proto_tree_add_protocol_format(tree, proto_asn1, tvb, boffset, - def? (int) (offset - boffset + len) : -1, - "ASN.1 %s", current_pduname); - - tree2 = proto_item_add_subtree(ti, ett_asn1); - - switch (((PDUinfo *)PDUtree->data)->type) { - - case TBL_BOOLEAN: - case TBL_INTEGER: - case TBL_BITSTRING: - case TBL_REAL: - case TBL_ENUMERATED: - hidden_item = proto_tree_add_item(tree2, ((PDUinfo *)PDUtree->data)->value_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_LITTLE_ENDIAN); - break; - - case TBL_OCTETSTRING: - hidden_item = proto_tree_add_item(tree2, ((PDUinfo *)PDUtree->data)->value_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_ASCII|ENC_NA); - break; - - default: - hidden_item = proto_tree_add_item(tree2, ((PDUinfo *)PDUtree->data)->value_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - - offset = boffset; /* the first packet */ - while((i < MAXPDU) && (tvb_length_remaining(tvb, offset) > 0)) { - ti2 = 0; - boffset = offset; - /* open BER decoding */ - asn1_open(&asn1, tvb, offset); - asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - asn1_close(&asn1, &offset); - - PDUreset(pcount, i+1); - getPDUprops(&props, boffset, cls, tag, con); - name = props.name; - tname = props.asn1typename; - - if (!def) - len = tvb_length_remaining(tvb, offset); - - len = checklength(len, def, cls, tag, lenstr, sizeof(lenstr)); - - if (asn1_debug) { - - g_snprintf(tagstr, sizeof(tagstr), "%ctag%d", tag_class[cls], tag); - - g_snprintf(headstr, sizeof(headstr), "%s, %s, %s, len=%s, off=%d, remaining=%d", - asn1_cls[cls], - asn1_con[con], - ((cls == BER_CLASS_UNI) && (tag < 32)) ? asn1_tag[tag] : tagstr, - lenstr, - boffset, - tvb_length_remaining(tvb, offset) ); - - if (props.value_id == -1) - ti2 = proto_tree_add_text(tree2, tvb, boffset, - def? (int) (offset - boffset + len) : -1, - "%s: (%s)%s %d-%d %s", current_pduname, - tname, name, pcount, i+1, headstr); - else { - ti2 = proto_tree_add_none_format(tree2, props.value_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, - "%s: (%s)%s %d-%d %s ~", current_pduname, - tname, name, pcount, i+1, headstr); - - if (props.type_id != -1){ - switch (proto_registrar_get_ftype(props.type_id)) { - - case FT_INT8: - case FT_INT16: - case FT_INT24: - case FT_INT32: - case FT_INT64: - case FT_UINT8: - case FT_UINT16: - case FT_UINT24: - case FT_UINT32: - case FT_UINT64: - case FT_BOOLEAN: - case FT_FLOAT: - case FT_DOUBLE: - case FT_IPv4: - hidden_item = proto_tree_add_item(tree2, props.type_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_LITTLE_ENDIAN); - break; - - case FT_STRING: - case FT_STRINGZ: - hidden_item = proto_tree_add_item(tree2, props.type_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_ASCII|ENC_NA); - break; - - default: - hidden_item = proto_tree_add_item(tree2, props.type_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if (props.flags & OUT_FLAG_noname) { - g_snprintf(tagstr, sizeof(tagstr), "%ctag%d", tag_class[cls], tag); - name = ((cls == BER_CLASS_UNI) && (tag < 32)) ? asn1_tag[tag] : tagstr; - } - if (props.value_id == -1) - ti2 = proto_tree_add_text(tree2, tvb, boffset, - def? (int) (offset - boffset + len) : -1, - "%s: (%s)%s", current_pduname, tname, name); - else { - ti2 = proto_tree_add_none_format(tree2, props.value_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, - "%s: (%s)%s ~", current_pduname, tname, name); - if (props.type_id != -1){ - switch (proto_registrar_get_ftype(props.type_id)) { - - case FT_INT8: - case FT_INT16: - case FT_INT24: - case FT_INT32: - case FT_INT64: - case FT_UINT8: - case FT_UINT16: - case FT_UINT24: - case FT_UINT32: - case FT_UINT64: - case FT_BOOLEAN: - case FT_FLOAT: - case FT_DOUBLE: - case FT_IPv4: - hidden_item = proto_tree_add_item(tree2, props.type_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_LITTLE_ENDIAN); - break; - - case FT_STRING: - case FT_STRINGZ: - hidden_item = proto_tree_add_item(tree2, props.type_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_ASCII|ENC_NA); - break; - - default: - hidden_item = proto_tree_add_item(tree2, props.type_id, tvb, boffset, - def? (int) (offset - boffset + len) : -1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - asn1_tree = proto_item_add_subtree(ti2, ett_pdu[i]); - -#ifdef NEST - taglist[0].cls = cls; - taglist[0].tag = tag; -#endif /* NEST */ - - if (!def) len++; /* make sure we get an exception if we run off the end! */ - - offset = decode_asn1_sequence(tvb, offset, len, asn1_tree, 1); - - proto_item_set_len(ti2, offset - boffset); /* mark length for hex display */ - - i++; /* one more full message handled */ - - if (ti2 && PDUerrcount && asn1_debug) /* show error counts only when in debug mode.... */ - proto_item_append_text(ti2," (%d error%s)", PDUerrcount, (PDUerrcount>1)?"s":empty); - } - col_append_fstr(pinfo->cinfo, COL_INFO, "[%d msg%s]", i, (i>1)?"s":empty); - if (ti) - proto_item_append_text(ti, ", %d msg%s", i, (i>1)?"s":empty); - } - CATCH(ReportedBoundsError) { - col_append_fstr(pinfo->cinfo, COL_INFO, "[%d+1 msg%s]", i, (i>0)?"s":empty); - if (ti) - proto_item_append_text(ti, ", %d+1 msg%s", i, (i>1)?"s":empty); - if (ti2) - proto_item_append_text(ti2, " (incomplete)"); - if (asn1_desegment) { - pinfo->desegment_offset = boffset; - pinfo->desegment_len = 1; - if (asn1_verbose) - g_message("ReportedBoundsError: offset=%d len=%d can_desegment=%d", - boffset, 1, pinfo->can_desegment); - } else { - RETHROW; - } - } - ENDTRY; -/* } */ - if (asn1_verbose) - g_message("dissect_asn1 finished: desegment_offset=%d desegment_len=%d can_desegment=%d", - pinfo->desegment_offset, pinfo->desegment_len, pinfo->can_desegment); - - return tvb_length(tvb); -} - -static int -dissect_asn1_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { - return dissect_asn1(tvb, pinfo, tree, (struct tcpinfo*)data, TRUE); -} - -static int -dissect_asn1_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { - return dissect_asn1(tvb, pinfo, tree, NULL, FALSE); -} - -/* decode an ASN.1 sequence, until we have consumed the specified length */ -static guint -decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, int level) -{ - ASN1_SCK asn1; - guint ret, cls, con, tag, len, boffset, soffset, eos; - gboolean def; - guint value; - const char *clsstr, *constr, *tagstr; - char tagbuf[BUFLM]; - char lenbuf[BUFLM]; - char nnbuf[BUFLS]; - proto_tree *ti, *pt2; - proto_item *hidden_item; - guchar *octets, *bits, unused; - subid_t *oid; - /* the debugging formats */ - static char textfmt_d[] = "off=%d: [%s %s %s] (%s)%s: %d%s"; /* decimal */ - static char textfmt_e[] = "off=%d: [%s %s %s] (%s)%s: %d:%s%s"; /* enum */ - static char textfmt_s[] = "off=%d: [%s %s %s] (%s)%s: '%s'%s"; /* octet string */ - static char textfmt_b[] = "off=%d: [%s %s %s] (%s)%s: %s:%s%s"; /* bit field */ - static char textfmt_c[] = "off=%d: [%s %s %s] (%s)%s%s%s"; /* constructed */ - static char matchind[] = " ~"; /* indication of possible match */ - const char *name, *ename, *tname; - char *oname; - PDUprops props; - - ti = 0; /* suppress gcc warning */ - - soffset = offset; /* where this sequence starts */ - eos = offset + tlen; - while (offset < eos) { /* while this entity has not ended... */ - boffset = offset; - asn1_open(&asn1, tvb, offset); - ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - asn1_close(&asn1, &offset); /* mark current position */ - if (ret != ASN1_ERR_NOERROR) { - proto_tree_add_text(pt, tvb, offset, 1, "ASN1 ERROR: %s", asn1_err_to_str(ret) ); - break; - } - - getPDUprops(&props, boffset, cls, tag, con); - name = props.name; - tname = props.asn1typename; - if (asn1_full) - name = &props.fullname[pabbrev_pdu_len]; /* no abbrev.pduname */ - if (asn1_debug) { /* show both names */ - g_snprintf(fieldname, sizeof(fieldname), "%s[%s]", props.name, props.fullname); - name = fieldname; - } - - clsstr = asn1_cls[cls]; - constr = asn1_con[con]; - if ((cls == BER_CLASS_UNI) && ( tag < 32 )) { - tagstr = asn1_tag[tag]; - } else { - g_snprintf(tagbuf, sizeof(tagbuf), "%ctag%d", tag_class[cls], tag); - tagstr = tagbuf; - } - - len = checklength(len, def, cls, tag, lenbuf, sizeof(lenbuf)); - - if (def) { - g_snprintf(nnbuf, sizeof(nnbuf), "NN%d", len); - } else { - g_snprintf(nnbuf, sizeof(nnbuf), "NN-"); - /* make sure we get an exception if we run off the end! */ - len = tvb_length_remaining(tvb, offset) + 1; - } - if ( ( ! asn1_debug) && (props.flags & OUT_FLAG_noname) ) { - /* just give type name if we don't know any better */ - tname = tagstr; - name = nnbuf; /* this is better than just empty.... */ - } - -#ifdef NEST - taglist[level].cls = cls; - taglist[level].tag = tag; -#endif /* NEST */ - - oname = 0; - if (level >= MAX_NEST) { /* nesting too deep..., handle as general octet string */ - cls = BER_CLASS_UNI; - tag = BER_UNI_TAG_GeneralString; - oname = (char *)g_malloc(strlen(name) + 32); - g_snprintf(oname, (gulong)(strlen(name) + 32), "%s ** nesting cut off **", name); - name = oname; - } - switch(cls) { - case BER_CLASS_UNI: /* fprintf(stderr, "Universal\n"); */ - switch(tag) { - case BER_UNI_TAG_INTEGER: - asn1_int32_value_decode(&asn1, len, &value); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are now */ - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected: just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, textfmt_d, boffset, - clsstr, constr, tagstr, tname, name, value, - empty); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, boffset, - offset - boffset, value, textfmt_d, boffset, - clsstr, constr, tagstr, tname, name, value, - matchind); - if (props.type_id != -1) { - hidden_item = proto_tree_add_uint(pt, props.type_id, tvb, - boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - "(%s)%s: %d", tname, name, value); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, boffset, - offset - boffset, value, - "(%s)%s: %d ~", tname, name, value); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, tvb, - boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - break; - - case BER_UNI_TAG_ENUMERATED: - asn1_int32_value_decode(&asn1, len, &value); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are now */ - ename = getPDUenum(&props, boffset, cls, tag, value); - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - textfmt_e, boffset, clsstr, constr, tagstr, - tname, name, value, ename, empty); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, boffset, - offset - boffset, value, - textfmt_e, boffset, clsstr, constr, tagstr, - tname, name, value, ename, matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, tvb, - boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - "(%s)%s: %d:%s", tname, name, value, ename); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, boffset, - offset - boffset, value, - "(%s)%s: %d:%s ~", tname, name, value, ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, tvb, - boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - break; - - case BER_UNI_TAG_BOOLEAN: - asn1_bool_decode(&asn1, len, (gboolean *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_BOOLEAN) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - textfmt_s, boffset, clsstr, constr, tagstr, - tname, name, value? "true" : "false", empty); - else { - proto_tree_add_boolean_format(pt, props.value_id, tvb, boffset, - offset - boffset, value != 0, - textfmt_s, boffset, clsstr, constr, tagstr, - tname, name, value? "true" : "false", matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_boolean(pt, props.type_id, tvb, - boffset, offset - boffset, value != 0); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_BOOLEAN) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - "(%s)%s: %s", tname, name, - value? "true" : "false"); - else { - proto_tree_add_boolean_format(pt, props.value_id, tvb, boffset, - offset - boffset, value != 0, - "(%s)%s: %s ~", tname, name, - value? "true" : "false"); - if (props.type_id != -1){ - hidden_item = proto_tree_add_boolean(pt, props.type_id, tvb, - boffset, offset - boffset, value != 0); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - break; - - case BER_UNI_TAG_OCTETSTRING: - case BER_UNI_TAG_NumericString: - case BER_UNI_TAG_PrintableString: - case BER_UNI_TAG_TeletexString: - case BER_UNI_TAG_IA5String: - case BER_UNI_TAG_GeneralString: - case BER_UNI_TAG_UTCTime: - case BER_UNI_TAG_GeneralizedTime: - /* read value, \0 terminated */ - asn1_string_value_decode(&asn1, len, &octets); - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ - ename = showoctets(octets, len, (tag == BER_UNI_TAG_OCTETSTRING) ? 4 : 0 ); - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_STRINGZ) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - textfmt_s, boffset, clsstr, constr, tagstr, - tname, name, ename, empty); - else { - proto_tree_add_string_format(pt, props.value_id, tvb, boffset, - offset - boffset, octets, /* \0 termnated */ - textfmt_s, boffset, clsstr, constr, tagstr, - tname, name, ename, matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_string(pt, props.type_id, tvb, - boffset, offset - boffset, octets); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_STRINGZ) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - "(%s)%s: %s", tname, name, ename); - else { - proto_tree_add_string_format(pt, props.value_id, tvb, boffset, - offset - boffset, octets, /* \0 terminated */ - "(%s)%s: %s ~", tname, name, ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_string(pt, props.type_id, tvb, - boffset, offset - boffset, octets); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - g_free(octets); - g_free( (gpointer) ename); - break; - - case BER_UNI_TAG_BITSTRING: - asn1_bits_decode(&asn1, len, &bits, &con, &unused); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are now */ - ename = showbitnames(bits, (con*8)-unused, &props, offset); - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - textfmt_b, boffset, clsstr, constr, tagstr, - tname, name, - showbits(bits, (con*8)-unused), ename, empty); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, boffset, - offset - boffset, *bits, /* XXX length ? XXX */ - textfmt_b, boffset, clsstr, constr, tagstr, - tname, name, - showbits(bits, (con*8)-unused),ename, matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, tvb, - boffset, offset - boffset, *bits); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - "(%s)%s: %s:%s", tname, name, - showbits(bits, (con*8)-unused), ename); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, boffset, - offset - boffset, *bits, /* XXX length ? XXX */ - "(%s)%s: %s:%s ~", tname, name, - showbits(bits, (con*8)-unused), ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, tvb, - boffset, offset - boffset, *bits); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - g_free(bits); - break; - - case BER_UNI_TAG_SET: - case BER_UNI_TAG_SEQUENCE: - /* show full sequence length */ - if (asn1_debug) { - ename = empty; - if ( (props.flags & OUT_FLAG_dontshow) || asn1_full) - ename = ", noshow"; - if ( (props.flags & OUT_FLAG_constructed)) - ename = ", unexpected constructed"; - - if (props.value_id == -1) - ti = proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - textfmt_c, boffset, clsstr, constr, tagstr, - tname, name, ename, empty); - else { - switch (props.type) { - - case TBL_BOOLEAN: - case TBL_INTEGER: - case TBL_BITSTRING: - case TBL_REAL: - case TBL_ENUMERATED: - ti = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case TBL_OCTETSTRING: - ti = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - ti = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_NA); - break; - } - /* change te text to to what I really want */ - proto_item_set_text(ti, textfmt_c, boffset, clsstr, constr, - tagstr, tname, name, ename, matchind); - if (props.type_id != -1){ - switch (proto_registrar_get_ftype(props.type_id)) { - - case FT_INT8: - case FT_INT16: - case FT_INT24: - case FT_INT32: - case FT_INT64: - case FT_UINT8: - case FT_UINT16: - case FT_UINT24: - case FT_UINT32: - case FT_UINT64: - case FT_BOOLEAN: - case FT_FLOAT: - case FT_DOUBLE: - case FT_IPv4: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case FT_STRING: - case FT_STRINGZ: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if (props.value_id == -1) { - if ( (! asn1_full) && ((props.flags & OUT_FLAG_dontshow) == 0) ) - ti = proto_tree_add_text(pt, tvb, boffset, - offset - boffset + len, - "(%s)%s", tname, name); - } else { - if ( (! asn1_full) && ((props.flags & OUT_FLAG_dontshow) == 0) ) - ti = proto_tree_add_none_format(pt, props.value_id, tvb, - boffset, offset - boffset + len, - "(%s)%s ~", tname, name); - else { - /* don't care about the text */ - switch (props.type) { - - case TBL_BOOLEAN: - case TBL_INTEGER: - case TBL_BITSTRING: - case TBL_REAL: - case TBL_ENUMERATED: - ti = hidden_item = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case TBL_OCTETSTRING: - ti = hidden_item = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - ti = hidden_item = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - if (props.type_id != -1){ - switch (proto_registrar_get_ftype(props.type_id)) { - - case FT_INT8: - case FT_INT16: - case FT_INT24: - case FT_INT32: - case FT_INT64: - case FT_UINT8: - case FT_UINT16: - case FT_UINT24: - case FT_UINT32: - case FT_UINT64: - case FT_BOOLEAN: - case FT_FLOAT: - case FT_DOUBLE: - case FT_IPv4: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case FT_STRING: - case FT_STRINGZ: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - if (len == 0) return offset; /* don't recurse if offset isn't going to change */ - - if ( ( ! asn1_full) && (asn1_debug || ((props.flags & OUT_FLAG_dontshow) == 0))) - pt2 = proto_item_add_subtree(ti, ett_seq[level]); - else - pt2 = pt; - - offset = decode_asn1_sequence(tvb, offset, len, pt2, level+1); /* recurse */ - - if ( ( ! asn1_full) && (asn1_debug || ((props.flags & OUT_FLAG_dontshow) == 0))) - proto_item_set_len(ti, offset - boffset); - - break; - - case BER_UNI_TAG_EOC: - if (asn1_debug) { /* don't show if not debugging */ - proto_tree_add_text(pt, tvb, boffset, offset - boffset, textfmt_d, - boffset, clsstr, constr, tagstr, tname, name, - offset - soffset, empty); - } - getPDUprops(&props, soffset, ASN1_EOI, 1, 0); /* mark end of this sequence */ - return offset; - - case BER_UNI_TAG_OID: - asn1_oid_value_decode(&asn1, len, &oid, &con); - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ - ename = showoid(oid, con); - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_BYTES) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, offset - boffset, textfmt_s, - boffset, clsstr, constr, tagstr, tname, name, - ename, empty); - else { - proto_tree_add_bytes_format(pt, props.value_id, tvb, boffset, - offset - boffset, ename,/* XXX length?*/ - "(%s)%s: %s ~", tname, name, ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_bytes(pt, props.type_id, tvb, - boffset, offset - boffset, ename); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_BYTES) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, - offset - boffset, - "(%s)%s: %s", tname, name, ename); - else { - proto_tree_add_bytes_format(pt, props.value_id, tvb, boffset, - offset - boffset, ename, /* XXX length ? */ - "(%s)%s: %s ~", tname, name, ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_bytes(pt, props.type_id, tvb, - boffset, offset - boffset, ename); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - g_free(oid); - break; - - case BER_UNI_TAG_NULL: - if (asn1_debug) { - proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, textfmt_s, - boffset, clsstr, constr, tagstr, tname, name, - "[NULL]", empty); - } else { - proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - "(%s)%s: [NULL]", tname, name); - } - offset += len; /* skip value ... */ - break; - - case BER_UNI_TAG_ObjectDescriptor: - case ASN1_EXT: - case BER_UNI_TAG_REAL: - case BER_UNI_TAG_VideotexString: - case BER_UNI_TAG_GraphicString: - case BER_UNI_TAG_VisibleString: - - default: - if (asn1_debug) { - ti = proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - textfmt_s, boffset, clsstr, constr, tagstr, - tname, name, lenbuf, empty); - } else { - ti = proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - "(%s)%s: %s bytes", tname, name, lenbuf); - } - proto_item_append_text(ti, " *"); /* indicate default is used */ - offset += len; /* skip value ... */ - break; - }; - break; - - case BER_CLASS_CON: /* fprintf(stderr, "Context\n"); */ - case BER_CLASS_APP: /* fprintf(stderr, "Application\n"); */ - case BER_CLASS_PRI: /* fprintf(stderr, "Private\n"); */ - - if (def && !con) { - if (props.value_id == -1) /* type unknown, handle as string */ - goto dostring; - switch(props.type) { - /* this is via the asn1 description, don't trust the length */ - case TBL_INTEGER: - if (len > 4) - goto dostring; - asn1_int32_value_decode(&asn1, len, (gint32 *)&value); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are now */ - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - textfmt_d, boffset, clsstr, constr, - tagstr, tname, name, value, empty); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, - boffset, offset - boffset, value, - textfmt_d, boffset, clsstr, constr, - tagstr, tname, name, value, matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, - tvb, boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - "(%s)%s: %d", tname, name, value); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, - boffset, offset - boffset, value, - "(%s)%s: %d ~", tname, name, value); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, - tvb, boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - break; - - case TBL_ENUMERATED: - if (len > 4) - goto dostring; - asn1_int32_value_decode(&asn1, len, &value); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are now */ - ename = getPDUenum(&props, boffset, cls, tag, value); - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - textfmt_e, boffset, clsstr, constr, - tagstr, tname, name, value, ename, empty); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, - boffset, offset - boffset, value, - textfmt_e, boffset, clsstr, constr, - tagstr, tname, name, value, ename, matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, - tvb, boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - "(%s)%s: %d:%s", tname, name, value, ename); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, - boffset, offset - boffset, value, - "(%s)%s: %d:%s ~", tname, name, value, ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, - tvb, boffset, offset - boffset, value); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - break; - case TBL_BITSTRING: - if (len > (1+4)) /* max 32 bits ...?.. */ - goto dostring; - /* read value */ - asn1_bits_decode(&asn1, len, &bits, &con, &unused); - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ - ename = showbitnames(bits, (con*8)-unused, &props, offset); - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - textfmt_b, boffset, clsstr, constr, - tagstr, tname, name, - showbits(bits, (con*8)-unused), ename, - empty); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, - boffset, offset - boffset, *bits, - textfmt_b, boffset, clsstr, constr, - tagstr, tname, name, - showbits(bits, (con*8)-unused), ename, - matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, - tvb, boffset, offset - boffset, *bits); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_UINT32) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, offset - boffset, - "(%s)%s: %s:%s", tname, name, - showbits(bits, (con*8)-unused), ename); - else { - proto_tree_add_uint_format(pt, props.value_id, tvb, - boffset, offset - boffset, *bits, - "(%s)%s: %s:%s ~", tname, name, - showbits(bits, (con*8)-unused), ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_uint(pt, props.type_id, - tvb, boffset, offset - boffset, *bits); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - g_free(bits); - break; - case TBL_BOOLEAN: - if (len > 1) - goto dostring; - asn1_bool_decode(&asn1, len, (gboolean *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_BOOLEAN) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - textfmt_s, boffset, clsstr, constr, - tagstr, tname, name, - value? "true" : "false", empty); - else { - proto_tree_add_boolean_format(pt, props.value_id, tvb, - boffset, offset - boffset, value != 0, - textfmt_s, boffset, clsstr, constr, - tagstr, tname, name, - value? "true" : "false", matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_boolean(pt, props.type_id, - tvb, boffset, offset - boffset, value != 0); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_BOOLEAN) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - "(%s)%s: %s", tname, name, - value? "true" : "false"); - else { - proto_tree_add_boolean_format(pt, props.value_id, tvb, - boffset, offset - boffset, value != 0, - "(%s)%s: %s ~", tname, name, - value? "true" : "false"); - if (props.type_id != -1){ - hidden_item = proto_tree_add_boolean(pt, props.type_id, - tvb, boffset, offset - boffset, value != 0); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - break; - case TBL_NULL: - if (len > 0) - goto dostring; - if (asn1_debug) { - proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - textfmt_s, boffset, clsstr, constr, - tagstr, tname, name, "[NULL]", empty); - } else { - proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - "(%s)%s: [NULL]", tname, name); - } - offset += len; /* skip value ... */ - break; - default: - dostring: - props.value_id = -1; /* unlikely this is correct, dont use it */ - /* fallthrough */ - case TBL_OCTETSTRING: - /* defined length, not constructed, must be a string.... */ - asn1_string_value_decode(&asn1, len, &octets); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ - ename = showoctets(octets, len, 2); /* convert octets to printable */ - if (asn1_debug) { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_STRINGZ) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, - boffset, offset - boffset, - textfmt_s, boffset, clsstr, constr, - tagstr, tname, name, ename, empty); - else { - proto_tree_add_string_format(pt, props.value_id, tvb, - boffset, offset - boffset, (gchar *)octets, /* XXX */ - textfmt_s, boffset, clsstr, constr, - tagstr, tname, name, ename, matchind); - if (props.type_id != -1){ - hidden_item = proto_tree_add_string(pt, props.type_id, - tvb, boffset, offset - boffset, (gchar *)octets); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } else { - if ( (props.value_id == -1) || - (tbl_types_wireshark[props.type] != FT_STRINGZ) ) - /* unknown or unexpected, just text */ - proto_tree_add_text(pt, tvb, boffset, offset - boffset, - "(%s)%s: %s", tname, name, ename); - else { - proto_tree_add_string_format(pt, props.value_id, tvb, - boffset, offset - boffset, (gchar *)octets, /* XXX */ - "(%s)%s: %s ~", tname, name, ename); - if (props.type_id != -1){ - hidden_item = proto_tree_add_string(pt, props.type_id, - tvb, boffset, offset - boffset, (gchar *)octets); - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - g_free(octets); - g_free( (gpointer) ename); - break; - } - } else { - /* indefinite length or constructed.... must be a sequence .... */ - /* show full sequence length */ - if (asn1_debug) { - ename = empty; - if ( (props.flags & OUT_FLAG_dontshow) || asn1_full) - ename = ", noshow"; - if ( (props.flags & OUT_FLAG_constructed)) - ename = ", unexpected constructed"; - - if (props.value_id == -1) - ti = proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - textfmt_c, boffset, clsstr, constr, - tagstr, tname, name, ename, empty); - else { - switch (props.type) { - - case TBL_BOOLEAN: - case TBL_INTEGER: - case TBL_BITSTRING: - case TBL_REAL: - case TBL_ENUMERATED: - ti = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case TBL_OCTETSTRING: - ti = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - ti = proto_tree_add_item(pt, props.value_id, tvb, - boffset, 1, ENC_NA); - break; - } - /* change te text to to what I really want */ - if (ti) { - proto_item_set_text(ti, textfmt_c, boffset, clsstr, constr, - tagstr, tname, name, ename, matchind); - if (props.type_id != -1){ - switch (proto_registrar_get_ftype(props.type_id)) { - - case FT_INT8: - case FT_INT16: - case FT_INT24: - case FT_INT32: - case FT_INT64: - case FT_UINT8: - case FT_UINT16: - case FT_UINT24: - case FT_UINT32: - case FT_UINT64: - case FT_BOOLEAN: - case FT_FLOAT: - case FT_DOUBLE: - case FT_IPv4: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case FT_STRING: - case FT_STRINGZ: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - hidden_item = proto_tree_add_item(pt, props.type_id, tvb, - boffset, 1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } else { - ti = proto_tree_add_text(pt, tvb, boffset, - offset - boffset + len, - textfmt_c, boffset, clsstr, constr, - tagstr, tname, name, ename, empty); - } - } - } else { - if (props.value_id == -1) { - if ( ( ! asn1_full) && ((props.flags & OUT_FLAG_dontshow) == 0)) - ti = proto_tree_add_text(pt, tvb, boffset, - offset - boffset + len, "(%s)%s", tname, name); - } else { - if ( ( ! asn1_full) && ((props.flags & OUT_FLAG_dontshow) == 0)) - ti = proto_tree_add_none_format(pt, props.value_id, tvb, - boffset, 1, - "(%s)%s ~", tname, name); - else { - /* don't care about the text */ - switch (props.type) { - - case TBL_BOOLEAN: - case TBL_INTEGER: - case TBL_BITSTRING: - case TBL_REAL: - case TBL_ENUMERATED: - ti = proto_tree_add_item(pt, props.value_id, - tvb, boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case TBL_OCTETSTRING: - ti = proto_tree_add_item(pt, props.value_id, - tvb, boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - ti = proto_tree_add_item(pt, props.value_id, - tvb, boffset, 1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(ti); - } - if (props.type_id != -1){ - switch (proto_registrar_get_ftype(props.type_id)) { - - case FT_INT8: - case FT_INT16: - case FT_INT24: - case FT_INT32: - case FT_INT64: - case FT_UINT8: - case FT_UINT16: - case FT_UINT24: - case FT_UINT32: - case FT_UINT64: - case FT_BOOLEAN: - case FT_FLOAT: - case FT_DOUBLE: - case FT_IPv4: - hidden_item = proto_tree_add_item(pt, props.type_id, - tvb, boffset, 1, ENC_LITTLE_ENDIAN); - break; - - case FT_STRING: - case FT_STRINGZ: - hidden_item = proto_tree_add_item(pt, props.type_id, - tvb, boffset, 1, ENC_ASCII|ENC_NA); - break; - - default: - hidden_item = proto_tree_add_item(pt, props.type_id, - tvb, boffset, 1, ENC_NA); - break; - } - PROTO_ITEM_SET_HIDDEN(hidden_item); - } - } - } - - if (len == 0) return offset; /* don't recurse if offset isn't going to change */ - - if ( ( ! asn1_full) && (asn1_debug || ((props.flags & OUT_FLAG_dontshow) == 0))) - pt2 = proto_item_add_subtree(ti, ett_seq[level]); - else - pt2 = pt; - - offset = decode_asn1_sequence(tvb, offset, len, pt2, level+1); /* recurse */ - - if ( ( ! asn1_full) && (asn1_debug || ((props.flags & OUT_FLAG_dontshow) == 0))) - proto_item_set_len(ti, offset - boffset); - } - break; - - default: /* fprintf(stderr, "Other\n"); */ - if (asn1_debug) { - ti = proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - textfmt_s, boffset, clsstr, constr, tagstr, - tname, name, lenbuf, empty); - } else { - ti = proto_tree_add_text(pt, tvb, boffset, offset - boffset + len, - "(%s)%s: %s bytes %s data", tname, name, - lenbuf, clsstr); - } - proto_item_append_text(ti, " *"); /* indicate default is used */ - offset += len; /* skip value ... */ - break; - } - g_free(oname); /* XXX, memory management ? */ - } - /* proto_tree_add_text(pt, tvb, offset, 1, "Marker: offset=%d", offset); */ - - getPDUprops(&props, soffset, ASN1_EOI, 0, 0); /* mark end of this sequence */ - - return offset; -} -#define READSYNTAX -#ifdef READSYNTAX - -/************************************************************************************************/ -/* search throug the ASN.1 description for appropriate names */ -/************************************************************************************************/ - -guint lev_limit = G_MAXINT; - -int icount = 0; /* item counter */ - -static guint -parse_tt3(tvbuff_t *tvb, guint offset, guint size, guint level, GNode *ptr) -{ - ASN1_SCK asn1; - guint eos, cls, con, tag, len, value; - gboolean def; - guchar *octets, *bits, unused; - subid_t *oid; - GNode *cur_node = 0; - - eos = offset + size; - - if (level > lev_limit) - return eos; - - while(offset < eos) { - if (ptr) /* build pointer tree to all asn1 entities */ - cur_node = g_node_append_data(ptr, GUINT_TO_POINTER(offset)); - - asn1_open(&asn1, tvb, offset); - asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - asn1_close(&asn1, (gint *)&offset); /* mark where we are */ - icount++; - if (!def) { - len = tvb_length_remaining(tvb, offset); - } - - switch(cls) { - case BER_CLASS_UNI: /* fprintf(stderr, "Universal\n"); */ - switch(tag) { - case BER_UNI_TAG_INTEGER: - case BER_UNI_TAG_ENUMERATED: - asn1_int32_value_decode(&asn1, len, (gint32 *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are */ - break; - - case BER_UNI_TAG_BOOLEAN: - asn1_bool_decode(&asn1, len, (gboolean *)&value); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are */ - break; - - case BER_UNI_TAG_OCTETSTRING: - case BER_UNI_TAG_NumericString: - case BER_UNI_TAG_PrintableString: - case BER_UNI_TAG_TeletexString: - case BER_UNI_TAG_IA5String: - case BER_UNI_TAG_GeneralString: - case BER_UNI_TAG_UTCTime: - case BER_UNI_TAG_GeneralizedTime: - asn1_string_value_decode(&asn1, len, &octets); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are */ - g_free(octets); - break; - - case BER_UNI_TAG_BITSTRING: - asn1_bits_decode(&asn1, len, &bits, &con, &unused); - asn1_close(&asn1, &offset); /* mark where we are */ - g_free(bits); - break; - - case BER_UNI_TAG_SET: - case BER_UNI_TAG_SEQUENCE: - if (len == 0) /* don't recurse if offset isn't going to change */ - return offset; - - offset = parse_tt3(tvb, offset, len, level+1, cur_node); /* recurse */ - break; - - case BER_UNI_TAG_EOC: - return offset; - - case BER_UNI_TAG_OID: - asn1_oid_value_decode(&asn1, len, &oid, &con); - asn1_close(&asn1, &offset); /* mark where we are */ - g_free(oid); - break; - - case BER_UNI_TAG_NULL: - offset += len; - break; - - case BER_UNI_TAG_ObjectDescriptor: - case ASN1_EXT: - case BER_UNI_TAG_REAL: - case BER_UNI_TAG_VideotexString: - case BER_UNI_TAG_GraphicString: - case BER_UNI_TAG_VisibleString: - - default: - if (asn1_verbose) g_message("%d skip1 %d", offset, len); - offset += len; /* skip value ... */ - break; - }; - break; - - case BER_CLASS_CON: /* fprintf(stderr, "Context\n"); */ - if (def && !con) { - /* defined length, not constructed, must be a string.... */ - asn1_string_value_decode(&asn1, len, &octets); /* read value */ - asn1_close(&asn1, &offset); /* mark where we are */ - g_free(octets); - } else { - /* indefinite length or constructed.... must be a sequence .... */ - if (len == 0) /* don't recurse if offset isn't going to change */ - return offset; - - offset = parse_tt3(tvb, offset, len, level+1, cur_node); /* recurse */ - } - break; - - default: /* fprintf(stderr, "Other\n"); */ - if (asn1_verbose) g_message("%d skip2 %d", offset, len); - offset += len; /* skip value ... */ - break; - } - } - return offset; -} - -static void showGNodes(GNode *p, int n); - -#if 0 -static gboolean -myLeaf(GNode *node, gpointer data) -{ - ASN1_SCK asn1; - guint ret, cls, con, tag, def, len; - char *clsstr, *constr, *tagstr; - char tagbuf[BUFLM]; - char lenbuf[BUFLM]; - - (void) data; /* make a reference */ - asn1_open(&asn1, asn1_desc, (int)node->data); - - ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - - clsstr = asn1_cls[cls]; - constr = asn1_con[con]; - if ((cls == BER_CLASS_UNI) && ( tag < 32 )) { - tagstr = asn1_tag[tag]; - } else { - g_snprintf(tagbuf, sizeof(tagbuf), "tag%d", tag); - tagstr = tagbuf; - } - if (def) { - g_snprintf(lenbuf, sizeof(lenbuf), "%d", len); - } else { - g_snprintf(lenbuf, sizeof(lenbuf), "indefinite"); - } - - if (asn1_verbose) - g_message("off=%d: [%s %s %s] len=%s", (int)node->data, clsstr, constr, tagstr, lenbuf); - - return FALSE; -} - -static void -list_modules(void) -{ - if (asn1_verbose) g_message("build GNode tree:"); - showGNodes(g_node_first_child(asn1_nodes), 0); - if (asn1_verbose) g_message("end of tree: %d nodes, %d deep, %d leafs, %d branches", - g_node_n_nodes(asn1_nodes, G_TRAVERSE_ALL), - g_node_max_height (asn1_nodes), - g_node_n_nodes(asn1_nodes, G_TRAVERSE_LEAFS), - g_node_n_nodes(asn1_nodes, G_TRAVERSE_NON_LEAFS) ); - - g_node_traverse(g_node_first_child(asn1_nodes), G_PRE_ORDER, G_TRAVERSE_LEAFS, -1, myLeaf, 0); - -} -#endif - -static void -tt_build_tree(void) /* build a GNode tree with all offset's to ASN.1 entities */ -{ - if (asn1_nodes) - g_node_destroy(asn1_nodes); - asn1_nodes = g_node_new(0); - icount = 0; - parse_tt3(asn1_desc, 0, tvb_length(asn1_desc), 0, asn1_nodes); -} - - -/*****************************************************************************************************/ - -static guint anonCount; /* for naming anonymous types */ - -typedef struct _TBLModule TBLModule; -typedef struct _TBLTypeDef TBLTypeDef; -typedef struct _TBLTag TBLTag; -typedef struct _TBLType TBLType; -typedef struct _TBLTypeRef TBLTypeRef; -typedef struct _TBLNamedNumber TBLNamedNumber; -typedef struct _TBLRange TBLRange; - -enum _tbl_t { - TBLTYPE_Module, - TBLTYPE_TypeDef, - TBLTYPE_Tag, - TBLTYPE_Type, - TBLTYPE_TypeRef, - TBLTYPE_NamedNumber, - TBLTYPE_Range -}; -typedef enum _tbl_t tbl_t; -/* text for 'tbl_t' type for debugging */ -static const char *data_types[] = { - "Module", - "TypeDef", - "Tag", - "Type", - "TypeRef", - "NamedNumber", - "Range", -}; - -enum _TBLTypeContent_t { - TBLTYPETYPE_None, - TBLTYPETYPE_Primitive, - TBLTYPETYPE_Elements, - TBLTYPETYPE_TypeRef -}; -typedef enum _TBLTypeContent_t TBLTypeContent_t; - -struct _TBLNamedNumber { - tbl_t type; - guchar *name; - guint value; -}; - -struct _TBLRange { - tbl_t type; - guint from; - guint to; -}; - -struct _TBLTypeRef { - tbl_t type; - guint typeDefId; - gboolean implicit; -}; - -struct _TBLTag { - tbl_t type; - guint tclass; - guint code; -}; - -struct _TBLType { - tbl_t type; - guint typeId; - gboolean optional; - TBLTypeContent_t content; - guchar *fieldName; - gboolean anonymous; - gboolean constraint; -}; - -struct _TBLTypeDef { - tbl_t type; - guint typeDefId; - guchar *typeName; - guchar isPdu; -}; - -struct _TBLModule { - tbl_t type; - guchar *name; - subid_t *id; - guint isUseful; -}; - -struct _TT { - guint totalNumModules; - guint totalNumTypeDefs; - guint totalNumTypes; - guint totalNumTags; - guint totalNumStrings; - guint totalLenStrings; -} TT; - -#define CHECKP(p) {if (p==0){g_warning("pointer==0, line %d **********", __LINE__);return;}} - -static guint -get_asn1_int(guint want_tag, guint offset) -{ - ASN1_SCK asn1; - guint ret, cls, con, tag, len; - gboolean def; - guint value; - - /* g_message("%d get_asn1_int", offset); */ - - asn1_open(&asn1, asn1_desc, offset); - - ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - if (ret == ASN1_ERR_NOERROR) { - /* do not check class, both Unversal and Context are OK */ - if (con == ASN1_PRI && tag == want_tag) { - if (def) { - asn1_uint32_value_decode(&asn1, len, &value); - return value; - } else - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - } else - ret = ASN1_ERR_WRONG_TYPE; - } - g_warning("ASN.1 int mismatch at offset %d, %s", offset, asn1_err_to_str(ret)); - - return 0; -} - -static subid_t * /* with prepended length ..... */ -get_asn1_oid(guint want_tag, guint offset) -{ - ASN1_SCK asn1; - guint ret, cls, con, tag, len; - gboolean def; - subid_t *oid; - - /* g_message("%d get_asn1_oid", offset); */ - - asn1_open(&asn1, asn1_desc, offset); - - ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - if (ret == ASN1_ERR_NOERROR) { - /* do not check class, both Unversal and Context are OK */ - if ((con == ASN1_PRI) && (tag == want_tag)) { - if (def) { - asn1_oid_value_decode(&asn1, len, &oid, &con); - oid = (subid_t *)g_realloc(oid, con + sizeof(guint)); /* prepend the length */ - memmove(&oid[1], oid, con*sizeof(guint)); - oid[0] = con; - return oid; - } else - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - } else - ret = ASN1_ERR_WRONG_TYPE; - } - g_warning("ASN.1 oid mismatch at offset %d, %s", offset, asn1_err_to_str(ret)); - - return 0; -} - -static guchar * /* 0 terminated string */ -get_asn1_string(guint want_tag, guint offset) -{ - ASN1_SCK asn1; - guint ret, cls, con, tag, len; - gboolean def; - guchar *octets; - - /* g_message("%d get_asn1_string", offset); */ - - asn1_open(&asn1, asn1_desc, offset); - - ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - if (ret == ASN1_ERR_NOERROR) { - /* do not check class, both Unversal and Context are OK */ - if ((con == ASN1_PRI) && (tag == want_tag)) { - if (def) { - asn1_string_value_decode(&asn1, len, &octets); - octets = (guchar *)g_realloc(octets, len+1); /* need space for sentinel */ - octets[len] = 0; - return octets; - } else - ret = ASN1_ERR_LENGTH_NOT_DEFINITE; - } else - ret = ASN1_ERR_WRONG_TYPE; - } - g_warning("ASN.1 string mismatch at offset %d, %s", offset, asn1_err_to_str(ret)); - - return 0; -} - -static guint -get_asn1_uint(guint offset) -{ - ASN1_SCK asn1; - guint ret, len, value; - - /* g_message( "%d get_asn1_uint", offset); */ - - asn1_open(&asn1, asn1_desc, offset); - - ret = asn1_uint32_decode(&asn1, &value, &len); - - if (ret != ASN1_ERR_NOERROR) { - g_warning("ASN.1 uint mismatch at offset %d, %s", offset, asn1_err_to_str(ret)); - value = 0; - } - return value; -} - -static gboolean -check_tag(guint want_tag, guint offset) -{ - ASN1_SCK asn1; - guint ret, cls, con, tag, len; - gboolean def; - - asn1_open(&asn1, asn1_desc, offset); - - ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - if (ret == ASN1_ERR_NOERROR) { - ret = (tag == want_tag) ? TRUE : FALSE; - /* g_message("%d check tag %d, %s", offset, want_tag, ret? "true" : "false"); */ - return ret; - } - g_warning("ASN.1 check_tag at offset %d, %s", offset, asn1_err_to_str(ret)); - - return FALSE; -} - -#if 0 -static gboolean -constructed(guint offset) -{ - ASN1_SCK asn1; - guint ret, cls, con, tag, def, len; - - /* g_message("%d constructed?", offset); */ - - asn1_open(&asn1, asn1_desc, offset); - - ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - if (ret == ASN1_ERR_NOERROR) { - if (con) { - return TRUE; - } - return FALSE; - } - /* g_warning("ASN.1 constructed? at offset %d, %s", offset, asn1_err_to_str(ret)); */ - - return FALSE; -} -#endif - -static void -define_constraint(GNode *p, GNode *q) -{ - TBLRange *range = (TBLRange *)g_malloc(sizeof(TBLRange)); - g_node_append_data(q, range); - - range->type = TBLTYPE_Range; - - /* g_message("define_constraint %p, %p", p, q); */ - - p = g_node_first_child(p); - - if (!p) { - return; - } - - range->from = get_asn1_int(0, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - if (!p) { - return; - } - - range->to = get_asn1_int(1, GPOINTER_TO_UINT(p->data)); - -} - -static void -define_namednumber(GNode *p, GNode *q) -{ - TBLNamedNumber *num = (TBLNamedNumber *)g_malloc(sizeof(TBLNamedNumber)); - g_node_append_data(q, num); - - num->type = TBLTYPE_NamedNumber; - - /* g_message("define_namednumber %p, %p", p, q); */ - - p = g_node_first_child(p); - - if (!p) { - return; - } - - num->name = get_asn1_string(0, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - if (!p) { - return; - } - - num->value = get_asn1_int(1, GPOINTER_TO_UINT(p->data)); -} - -static void -define_typeref(GNode *p, GNode *q) -{ - TBLTypeRef *ref = (TBLTypeRef *)g_malloc(sizeof(TBLTypeRef)); - g_node_append_data(q, ref); - - ref->type = TBLTYPE_TypeRef; - - /* g_message("define_typeref %p, %p", p, q); */ - - p = g_node_first_child(p); - - if (!p) { - return; - } - - ref->typeDefId = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - if (!p) { - return; - } - - ref->implicit = get_asn1_int(BER_UNI_TAG_BOOLEAN, GPOINTER_TO_UINT(p->data)); -} - -static void -define_tag(GNode *p, GNode *q) -{ - TBLTag *type = (TBLTag *)g_malloc(sizeof(TBLTag)); - g_node_append_data(q, type); - - type->type = TBLTYPE_Tag; - - /* g_message("define_tag %p, %p", p, q); */ - - p = g_node_first_child(p); - - if (!p) { - return; - } - - type->tclass = get_asn1_int(BER_UNI_TAG_ENUMERATED, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - if (!p) { - return; - } - - type->code = get_asn1_int(BER_UNI_TAG_INTEGER, GPOINTER_TO_UINT(p->data)); - -} - -static void -define_type(GNode *p, GNode *q) -{ - GNode *r; - TBLType *type = (TBLType *)g_malloc(sizeof(TBLType)); - - GNode *t = g_node_append_data(q, type); - - type->type = TBLTYPE_Type; - - /* g_message("define_type %p, %p", p, q); */ - - type->typeId = get_asn1_int(0, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - type->optional = get_asn1_int(1, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - if (check_tag(2, GPOINTER_TO_UINT(p->data))) { /* optional, need empty node if not there ?*/ - r = g_node_first_child(p); - while (r) { - define_tag(r, t); - r = g_node_next_sibling(r); - } - p = g_node_next_sibling(p); - } - - if (!check_tag(3, GPOINTER_TO_UINT(p->data))) { - g_warning("expect tag 3, ERROR"); - } - r = g_node_first_child(p); - /* a choice ... */ - type->content = TBLTYPETYPE_None; - if (check_tag(0, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_Primitive; - if (check_tag(1, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_Elements; - if (check_tag(2, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_TypeRef; - switch(type->content) { - case TBLTYPETYPE_Primitive: - break; - case TBLTYPETYPE_Elements: - r = g_node_first_child(r); - while (r) { - define_type(g_node_first_child(r), t); - r = g_node_next_sibling(r); - } - break; - case TBLTYPETYPE_TypeRef: - define_typeref(r, t); - break; - case TBLTYPETYPE_None: - g_warning("expected a contents choice, error"); - break; - } - p = g_node_next_sibling(p); - - type->fieldName = 0; - type->anonymous = FALSE; - if (p && check_tag(4, GPOINTER_TO_UINT(p->data))) { - type->fieldName = get_asn1_string(4, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - } else { - type->anonymous = TRUE; - } - - type->constraint = FALSE; - if (p && check_tag(5, GPOINTER_TO_UINT(p->data))) { - type->constraint = TRUE; - define_constraint(p, t); - p = g_node_next_sibling(p); - } - - if (p && check_tag(6, GPOINTER_TO_UINT(p->data))) { - r = g_node_first_child(p); - while(r) { - define_namednumber(r, t); - r = g_node_next_sibling(r); - } - } -} - -static void -define_typedef(GNode *p, GNode *q) -{ - TBLTypeDef *type_def = (TBLTypeDef *)g_malloc(sizeof(TBLTypeDef)); - - GNode *t = g_node_append_data(q, type_def); - - /* g_message("define_typedef %p, %p", p, q); */ - - type_def->type = TBLTYPE_TypeDef; - - p = g_node_first_child(p); - - if (!p) { - return; - } - - type_def->typeDefId = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - if (!p) { - return; - } - - type_def->typeName = get_asn1_string(BER_UNI_TAG_PrintableString, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - if (!p) { - return; - } - - define_type(g_node_first_child(p), t); - p = g_node_next_sibling(p); - - type_def->isPdu = (p != 0); /* true if it exists, value ignored */ -} - -static void -define_module(GNode *p, GNode *q) -{ - TBLModule *module = (TBLModule *)g_malloc(sizeof(TBLModule)); - - GNode *m = g_node_append_data(q, module); - - /* g_message("define_module %p %p", p, q); */ - - module->type = TBLTYPE_Module; - - p = g_node_first_child(p); - - if (!p) { - return; - } - - module->name = get_asn1_string(0, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - module->id = 0; - if (check_tag(1, GPOINTER_TO_UINT(p->data))) { /* optional */ - module->id = get_asn1_oid(1, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - } - - module->isUseful = get_asn1_int(2, GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - p = g_node_first_child(p); - while (p) { - define_typedef(p, m); - p = g_node_next_sibling(p); - } -} - -typedef struct _SearchDef SearchDef; -struct _SearchDef { - const char *key; - GNode *here; -}; - -static gboolean -is_typedef(GNode *node, gpointer data) -{ - TBLTypeDef *d = (TBLTypeDef *)node->data; - SearchDef *s = (SearchDef *)data; - - if (d == 0) return FALSE; - if (d->type != TBLTYPE_TypeDef) return FALSE; - if (strcmp(s->key, d->typeName) == 0) { - s->here = node; - return TRUE; - } - return FALSE; -} - -typedef struct _TypeRef TypeRef; -struct _TypeRef { - GNode *type; - char *name; - guchar defclass; - guint deftag; - GNode *pdu; /* location in PDU descriptor tree */ - guint level; /* recursion counter */ - GNode *typetree; - GPtrArray *refs; /* pointers to PDUinfo structures teferencing this entry */ -}; - -typedef struct _NameDefs NameDefs; -struct _NameDefs { - guint max; - guint used; - TypeRef *info; -}; -#define ALLOC_INCR 4 -#define CLASSREF (BER_CLASS_PRI+1) - -static gboolean -is_named(GNode *node, gpointer data) -{ - TBLNamedNumber *num = (TBLNamedNumber *)node->data; - NameDefs *n = (NameDefs *)data; - guint oldmax; - - if (num == 0) return FALSE; - if (num->type != TBLTYPE_NamedNumber) return FALSE; - - if (num->value >= n->max) { /* need larger array */ - oldmax = n->max; - n->max = num->value + ALLOC_INCR; - n->info = (TypeRef *)g_realloc(n->info, n->max * sizeof(TypeRef)); - memset(&n->info[oldmax], 0, (n->max - oldmax) * sizeof(TypeRef)); - } - if (num->value > n->used) /* track max used value, there may be holes... */ - n->used = num->value; - - n->info[num->value].name = num->name; - - return FALSE; -} - -static gboolean -index_typedef(GNode *node, gpointer data) -{ - TBLTypeDef *d = (TBLTypeDef *)node->data; - NameDefs *n = (NameDefs *)data; - TypeRef *t; - TBLTag *tag; - guint oldmax; - - if (d == 0) return FALSE; - if (d->type != TBLTYPE_TypeDef) return FALSE; - - if (d->typeDefId >= n->max) { /* need larger array */ - oldmax = n->max; - n->max = d->typeDefId + ALLOC_INCR; - n->info = (TypeRef *)g_realloc(n->info, n->max * sizeof(TypeRef)); - memset(&n->info[oldmax], 0, (n->max - oldmax) * sizeof(TypeRef)); - } - if (d->typeDefId > n->used) /* track max used value, there may be holes... */ - n->used = d->typeDefId; - - t = &(n->info[d->typeDefId]); - t->name = d->typeName; - t->type = node; - t->refs = g_ptr_array_new(); /* collect references here */ - node = g_node_first_child(node); /* the real type */ - tag = (TBLTag *)node->data; - if ((tag->type == TBLTYPE_Type) && (((TBLType *)(void *)tag)->typeId == TBL_CHOICE)) { - /* no reasonable default... ! */ - t->defclass = 3; /* Private .... */ - t->deftag= 9999; /* a random value */ - } else { - node = g_node_first_child(node); /* the default tag */ - tag = (TBLTag *)node->data; - switch(tag->type) { - case TBLTYPE_Tag: - t->defclass = tag->tclass; - t->deftag = tag->code; - break; - case TBLTYPE_TypeRef: /* take values from another one, may not be defined yet... */ - t->defclass = CLASSREF; /* invalid class.. */ - t->deftag = ((TBLTypeRef *)tag)->typeDefId; - break; - default: - g_warning("***** index_typedef: expecting a tag or typeref, found %s *****", - data_types[tag->type]); - t->defclass = 3; /* Private .... */ - t->deftag= 9998; /* another random value */ - break; - } - } - - return FALSE; -} - -static TypeRef *typeDef_names = 0; -static guint numTypedefs = 0; - -static gboolean -free_node_data(GNode *node, gpointer data _U_) -{ - g_free(node->data); - return FALSE; -} - -static void -get_values(void) /* collect values from ASN.1 tree */ - /* coded according to the tbl.asn1 description of snacc output */ -{ /* This routine does not leave references to the tvbuff or */ - /* to the asn1_nodes, both can be freed by the caller of this.*/ - GNode *p; - SearchDef sd; - NameDefs nd; - guint i; - char X; - const char *t, *s, *E; - static char missing[] = " **missing** "; - - if (asn1_verbose) g_message("interpreting tree"); - typeDef_names = 0; /* just forget allocated any data .... */ - - if (data_nodes) { - g_node_traverse(data_nodes, G_POST_ORDER, G_TRAVERSE_ALL, -1, - free_node_data, NULL); - g_node_destroy(data_nodes); - } - - data_nodes = g_node_new(0); - - p = g_node_first_child(asn1_nodes); /* top of the data tree */ - - p = g_node_first_child(p); - if (!p) return; - TT.totalNumModules = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - if (!p) return; - TT.totalNumTypeDefs = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - if (!p) return; - TT.totalNumTypes = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - if (!p) return; - TT.totalNumTags = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - if (!p) return; - TT.totalNumStrings = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - if (!p) return; - TT.totalLenStrings = get_asn1_uint(GPOINTER_TO_UINT(p->data)); - p = g_node_next_sibling(p); - - p = g_node_first_child(p); - while (p) { - define_module(p, data_nodes); - p = g_node_next_sibling(p); - } - - /* g_message("finished with tree"); */ - - if (!tbl_types_verified) { /* verify snacc TBLTypeId contents */ - sd.key = "TBLTypeId"; - sd.here = 0; - g_node_traverse(data_nodes, G_PRE_ORDER, G_TRAVERSE_ALL, -1, is_typedef, (gpointer)&sd); - if (asn1_verbose) g_message("%s %sfound, %p", sd.key, sd.here?empty:"not ", (void *)sd.here); - if (sd.here) { - nd.max = 8; - nd.used = 0; - nd.info = (TypeRef *)g_malloc0(nd.max * sizeof(TypeRef)); - g_node_traverse(sd.here, G_PRE_ORDER, G_TRAVERSE_ALL, -1, is_named, - (gpointer)&nd); - if (asn1_verbose) g_message("tbltypenames: max=%d, info=%p", nd.max, (void *)nd.info); - E = empty; - for (i=0; i<=nd.used; i++) { /* we have entries in addition to snacc's */ - X = 'X'; - t = TBLTYPE(i); - s = nd.info[i].name; - if (s == 0) s = missing; - if (g_strcmp(t, s) == 0) { /* OK ! */ - X = ' '; - t = empty; - } else { - E = ", X with errors X"; - } - if (asn1_verbose) g_message(" %c %2d %s %s", X, i, s, t); - } - if (asn1_verbose) g_message("OK, TBLTypeId's index verified%s", E); - } - tbl_types_verified = TRUE; - } - /* build table with typedef names */ - nd.max = 8; - nd.used = 0; - nd.info = (TypeRef *)g_malloc0(nd.max * sizeof(TypeRef)); - g_node_traverse(data_nodes, G_PRE_ORDER, G_TRAVERSE_ALL, -1, index_typedef, (gpointer)&nd); - if (asn1_verbose) g_message("tbltypedefs: max=%d, info=%p", nd.max, (void *)nd.info); - - for (i=0; i<=nd.used; i++) { /* show what we have in the index now */ - TypeRef *ref = &(nd.info[i]); - t = ref->name; - if (t == 0) { - t = ref->name = missing; - if (asn1_verbose) g_message(" %3d %s", i, t); - } else { - if (asn1_verbose) g_message(" %3d %s, %c%d", i, t, - tag_class[ref->defclass], ref->deftag); - } - if (ref->pdu) { /* should be 0 */ - if (asn1_verbose) g_message("* %3d %s pdu=%p", i, t, (void *)ref->pdu); - } - } - typeDef_names = nd.info; - numTypedefs = i; - if (asn1_verbose) g_message("OK, %d TBLTypeDef's index set up", numTypedefs); - -} - -static void -showGNode(GNode *p, int n) -{ - - const char *fn, *s = empty; - if (p == 0) return; - n *=2; /* 2 spaces per level */ - if (p->data) { /* show value ... */ - /* g_message("show %p, type %d", p, ((TBLTag *)p->data)->type); */ - switch (((TBLTag *)p->data)->type) { - case TBLTYPE_Module: { - TBLModule *m = (TBLModule *)p->data; - if (asn1_verbose) - g_message("%*smodule %s%s", n, empty, m->name, - m->isUseful ? ", useful" : empty); - }; - break; - case TBLTYPE_TypeDef: { - TBLTypeDef *t = (TBLTypeDef *)p->data; - if (asn1_verbose) - g_message("%*stypedef %d %s%s", n, empty, t->typeDefId, t->typeName, - t->isPdu ? ", isPDU" : empty); - }; - break; - case TBLTYPE_Type: { - TBLType *t = (TBLType *)p->data; - if (t->fieldName) - s = t->fieldName; - /* typeId is a value from enum TBLTypeId */ - fn = TBLTYPE(t->typeId); - if (asn1_verbose) g_message("%*stype %d[%s]%s [%s]", n, empty, t->typeId, fn, - t->optional ? " opt" : empty, s ); - }; - break; - case TBLTYPE_Tag: { - TBLTag *t = (TBLTag *)p->data; - if ((t->tclass == BER_CLASS_UNI) && (t->code < 32)) - s = asn1_tag[t->code]; - if (asn1_verbose) g_message("%*stag %c%d[%s]", n, empty, - tag_class[t->tclass], t->code, s); - }; - break; - case TBLTYPE_NamedNumber: { - TBLNamedNumber *nn = (TBLNamedNumber *)p->data; - if (asn1_verbose) g_message("%*snamednumber %2d %s", n, empty, - nn->value, nn->name); - }; - break; - case TBLTYPE_Range: { - TBLRange *r = (TBLRange *)p->data; - if (asn1_verbose) g_message("%*srange %d .. %d", n, empty, - r->from, r->to ); - }; - break; - case TBLTYPE_TypeRef: { - TBLTypeRef *r = (TBLTypeRef *)p->data; - if (typeDef_names) - s = typeDef_names[r->typeDefId].name; - if (asn1_verbose) g_message("%*styperef %d[%s]%s", n, empty, - r->typeDefId, s, r->implicit ? ", implicit" : empty ); - }; - break; - default: { - TBLTag *x = (TBLTag *)p->data; - if (asn1_verbose) g_message("%*s--default-- type=%d", n, empty, x->type); - }; - break; - } - } else { /* just show tree */ - if (asn1_verbose) - g_message("%*snode=%p, data=%p, next=%p, prev=%p, parent=%p, child=%p", - n, empty, (void *)p, (void *)p->data, (void *)p->next, (void *)p->prev, (void *)p->parent, (void *)p->children); - } -} - -static void -showGNodes(GNode *p, int n) -{ - if (p == 0) return; - showGNode(p, n); - showGNodes(p->children, n+1); - showGNodes(p->next, n); -} - -#if 0 -static void showGenv(GNode *p, int n, int m) -{ - int i; - - if (p == 0) return; - if (n > m) { - if (asn1_verbose) g_message("%*s.....", n*2, empty); - return; - } - - for(i=0; p && (i < 3); p = p->next, i++) { - showGNode(p, n); - showGenv(p->children, n+1, m); - } - if (p && asn1_verbose) g_message("%*s.....", n*2, empty); - -} -#endif - -static void -debug_dump_TT(void) /* dump contents of TT struct, for debugging */ -{ - if (asn1_verbose) - g_message("modules=%d, defs=%d, types=%d, tags=%d, strings=%d, lenstrings=%d", - TT.totalNumModules, - TT.totalNumTypeDefs, - TT.totalNumTypes, - TT.totalNumTags, - TT.totalNumStrings, - TT.totalLenStrings); -} - -static void -my_log_handler(const gchar *log_domain, GLogLevelFlags log_level, - const gchar *message, gpointer user_data) -{ -static FILE* logf = 0; -static char eol[] = "\r\n"; - - (void) log_domain; (void) log_level; (void) user_data; /* make references */ - - if (logf == NULL && asn1_logfile) { - logf = ws_fopen(asn1_logfile, "w"); - } - if (logf) { - fputs(message, logf); - fputs(eol, logf); - fflush(logf); /* debugging ... */ - } -} - -static void -read_asn1_type_table(const char *filename) -{ - FILE *f; - int ret; - guint size = 0; - guchar *data; - ws_statb64 file_stat; - static guint mylogh = 0; - - if ((filename == 0) || (strlen(filename) == 0)) - return; /* no filename provided */ - - f = ws_fopen(filename, "rb"); - if (f == 0) { - /* - * Ignore "file not found" errors if it's the old default - * ASN.1 file name, as we never shipped such a file. - * Also, on Win32, ignore the earlier default, which - * had a "/" rather than a "\" as the last pathname - * separator. - */ -#ifdef _WIN32 - if (strcmp(filename, bad_separator_old_default_asn1_filename) != 0) -#endif - if ((strcmp(filename, old_default_asn1_filename) != 0) || errno != ENOENT) - report_open_failure(filename, errno, FALSE); - return; - } - ret = ws_fstat64(fileno(f), &file_stat); - if (ret!=-1) - size = (int)file_stat.st_size; - if (size == 0) { - if (asn1_verbose) g_message("file %s is empty or size is unknown, ignored", filename); - fclose(f); - return; - } - if (asn1_verbose) g_message("reading %d bytes from %s", size, filename); - - data = (guchar *)g_malloc(size); - if (fread(data, size, 1, f) < 1) { - g_warning("error reading %s, %s", filename, g_strerror(errno)); - } - fclose(f); - - if (asn1_verbose) { - /* ***** from the time when logging was just in a console... ***** - * g_message("******* Type ^S and change console buffer size to 9999 and type ^Q *******\n" - * " Sleep 5 sec..."); - * Sleep(5 * 1000); - */ - - - g_message("logging to file %s", asn1_logfile); - - if (mylogh == 0) { - mylogh = g_log_set_handler (NULL, (GLogLevelFlags)(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL - | G_LOG_FLAG_RECURSION), my_log_handler, NULL); - } - } - - asn1_desc = tvb_new_real_data(data, size, size); - - tt_build_tree(); - if (asn1_verbose) g_message("read %d items from %s", icount, filename); - -#if 0 - list_modules(); -#endif - - get_values(); - - g_node_destroy(asn1_nodes); - asn1_nodes = NULL; - - tvb_free(asn1_desc); - asn1_desc = NULL; - - g_free(data); - data = NULL; - - showGNodes(data_nodes, 0); - - debug_dump_TT(); -} - - -/* XXX - Shoudn't we make sure we're not dereferencing a NULL pointer here? */ -#define CHECKTYPE(p,x) {if (((TBLTag *)(p)->data)->type != (x)) \ - g_warning("**** unexpected type %s, want %s, at line %d", \ - data_types[((TBLTag *)p->data)->type], data_types[(x)], __LINE__);} - - -static void -save_reference(PDUinfo *p) -{ - gint i = p->mytype; - - if (i == -1) - i = p->basetype; - - g_ptr_array_add(typeDef_names[i].refs, (gpointer)p); -} - -static void -tbl_type(gint n, GNode *pdu, GNode *list, guint fullindex); - - - - /* evaluate typeref, pointer to current pdu node and typedef */ -static void -tbl_typeref(gint n, GNode *pdu, GNode *tree, guint fullindex) -{ - GNode *q; - PDUinfo *p = (PDUinfo *)pdu->data, *p1; - guint nvals; - value_string *v; - char ss[128]; - int i; - - if (n > 40) { /* don't believe this....! ...... stop recursion ...... */ - g_warning("****tbl_typeref: n>40, return [recursion too deep] ****************"); - return; - } - - CHECKTYPE(tree, TBLTYPE_TypeDef); - - if (asn1_verbose) g_message("%*s+tbl_typeref %s [%s, tag %c%d]", n*2, empty, - p->name, TBLTYPE(p->type), tag_class[p->tclass], p->tag); - - p->typenum = ((TBLTypeDef *)tree->data)->typeDefId; /* name of current type */ - p->flags |= PDU_TYPEDEF; - - tree = g_node_first_child(tree); /* move to its underlying type */ - CHECKTYPE(tree, TBLTYPE_Type); - p->type = ((TBLType *)tree->data)->typeId; - - q = g_node_first_child(tree); /* the tag of this type entry ... is optional... */ - if (((TBLTag *)q->data)->type == TBLTYPE_Tag) { - if ((p->flags & PDU_IMPLICIT) == 0) { /* not implicit, use this tag */ - guint xcls, xtag; - xcls = p->tclass; - xtag = p->tag; - /* XXX -- hack -- hack -- hack -- hack -- hack -- - * only change tag when class+tag == EOC, - * or class is a reference, - * or new class is not universal. - */ - if ( ((xcls|xtag) == 0) || (xcls == CLASSREF) || - (((TBLTag *)q->data)->tclass != BER_CLASS_UNI) ) { - p->tclass = ((TBLTag *)q->data)->tclass; - p->tag = ((TBLTag *)q->data)->code; - if (asn1_verbose) - g_message("%*s*change typeref tag from %c%d to %c%d", - n*2, empty, - tag_class[xcls], - xtag, - tag_class[p->tclass], - p->tag); - } else { - if (asn1_verbose) - g_message("%*sNOT changing tag from %c%d to %c%d", - n*2, empty, - tag_class[xcls], - xtag, - tag_class[((TBLTag *)q->data)->tclass], - ((TBLTag *)q->data)->code); - - } - } - } else { - - ss[0] = 0; - if (p->tclass==CLASSREF) - g_snprintf(ss, 128, ", CLASSREF %d", p->tag); - if (asn1_verbose) g_message("%*sno typeref tag%s", n*2, empty, ss); - - if (p->tclass==CLASSREF) { - TypeRef *tr; - i = p->basetype; - /* CLASSREF....., get it defined using type of the reference */ - - /* p->basetype may be -1 .... ? XXX */ - if (i == -1) - i = p->tag; - tr = &typeDef_names[i]; - if (asn1_verbose) - g_message("%*s*refer2 to type#%d %s, %p", n*2, empty, - p->tag, tr->name, (void *)tr->pdu); - - tbl_typeref(n+1, pdu, tr->type, fullindex); - - return; - } - } - - if (asn1_verbose) - g_message("%*sinclude typedef %d %s %s [%p:%s, tag %c%d]", n*2, empty, p->typenum, - p->name, p->asn1typename, (void *)p, TBLTYPE(p->type), tag_class[p->tclass], p->tag); - - switch(p->type) { - case TBL_BITSTRING: - case TBL_ENUMERATED: - /* names do not have a fullname */ - if (asn1_verbose) g_message("%*s*collection T %s", n*2, empty, p->name); - /* read the enumeration [save min-max somewhere ?] */ - p->value_hf.hfinfo.type = tbl_types_wireshark[p->type]; /* XXX change field type... */ - p->value_hf.hfinfo.display = tbl_display_wireshark[p->type]; - - proto_register_field_array(proto_asn1, &(p->value_hf) , 1); - - save_reference(p); - - if (asn1_verbose) - g_message("regtype1: %3d %3d [%3d] F%2.2x (%s)%s %s %s -> id=%d", - p->mytype, p->typenum, p->basetype, p->flags, p->asn1typename, - p->name, p->fullname, - tbl_types_wireshark_txt[p->type], p->value_id); - p1 = p; - nvals = 0; - while((q = g_node_next_sibling(q))) { - CHECKTYPE(q, TBLTYPE_NamedNumber); - p = (PDUinfo *)g_malloc0(sizeof(PDUinfo)); - nvals++; - p->type = TBL_ENUMERATED; - p->name = (((TBLNamedNumber *)q->data)->name); - p->tag = (((TBLNamedNumber *)q->data)->value); - p->flags = PDU_NAMEDNUM; - if (asn1_verbose) g_message("%*s %3d %s", n*2, empty, p->tag, p->name); - g_node_append_data(pdu, p); - } - - /* list all enum values in the field structure for matching */ - p1->value_hf.hfinfo.strings = v = (value_string *)g_malloc0((nvals+1) * sizeof(value_string)); - q = g_node_first_child(pdu); - nvals = 0; - while(q) { - p = (PDUinfo *)q->data; - v[nvals].value = p->tag; - v[nvals].strptr = p->name; -/* g_message("enumval2: %d %s %d %s %s", nvals, p1->name, p->tag, p->name, tbl_types_asn1[p1->type]); */ - nvals++; - q = g_node_next_sibling(q); - } - /* last entry is already initialized to { 0, NULL } */ - - break; - - case TBL_CHOICE: - if (p->value_id == -1) { /* not yet registered ..... */ - p->value_hf.hfinfo.type = tbl_types_wireshark[p->type]; - p->value_hf.hfinfo.display = tbl_display_wireshark[p->type]; - proto_register_field_array(proto_asn1, &(p->value_hf) , 1); - - save_reference(p); - - if (asn1_verbose) - g_message("regtype2: %3d %3d [%3d] F%2.2x (%s)%s %s %s -> id=%d", - p->mytype, p->typenum, p->basetype, p->flags, p->asn1typename, - p->name, p->fullname, - tbl_types_wireshark_txt[p->type], p->value_id); - } - tbl_type(n, pdu, q, fullindex); - break; - - default: - if (p->value_id == -1) { /* not yet registered ..... */ - p->value_hf.hfinfo.type = tbl_types_wireshark[p->type]; - p->value_hf.hfinfo.display = tbl_display_wireshark[p->type]; - proto_register_field_array(proto_asn1, &(p->value_hf) , 1); - - save_reference(p); - - if (asn1_verbose) - g_message("regtype3: %3d %3d [%3d] F%2.2x (%s)%s %s %s -> id=%d", - p->mytype, p->typenum, p->basetype, p->flags, p->asn1typename, - p->name, p->fullname, - tbl_types_wireshark_txt[p->type], p->value_id); - } - tbl_type(n, pdu, g_node_next_sibling(q), fullindex); - } -} - -static void -tbl_type(gint n, GNode *pdu, GNode *list, guint fullindex) /* indent, pdu, source type node list */ -{ - GNode *q, *pdu1; - PDUinfo *p, *p1; - guint ni; - guint nvals; - value_string *v; - - if (n > 40) { /* don't believe this....! ...... stop recursion ...... */ - g_warning("****tbl_type: n>40, return [recursion too deep] ****************"); - return; - } - - /* showGenv(list, n, n+1); */ - - ni = fullindex; - pdu1 = pdu; /* save start location for append */ - while (list) { /* handle all entries */ - if (asn1_verbose) - g_message("%*s+handle a %s, list=%p", n*2, empty, - data_types[((TBLTag *)list->data)->type], (void *)list); - - if (((TBLTag *)list->data)->type == TBLTYPE_Range) { /* ignore this ..... */ - list = g_node_next_sibling(list); - if (asn1_verbose) g_message("%*s*skip range", n*2, empty); - if (list == 0) - break; - } - - /******* change to positive comparation, but leave comment for reference - * if (((TBLTag *)list->data)->type != TBLTYPE_TypeRef) { - * CHECKTYPE(list, TBLTYPE_Type); - */ - - if (((TBLTag *)list->data)->type == TBLTYPE_Type) { - CHECKTYPE(list, TBLTYPE_Type); - - p = (PDUinfo *)g_malloc0(sizeof(PDUinfo)); - pdu = g_node_append_data(pdu1, p); - - p->type = ((TBLType *)list->data)->typeId; - p->asn1typename = tbl_types_asn1[p->type]; /* the default type */ - p->typenum = -1; - p->mytype = -1; - p->basetype = ((PDUinfo *)pdu1->data)->typenum; - p->flags = PDUinfo_initflags; - p->flags |= (((TBLType *)list->data)->anonymous ? PDU_ANONYMOUS : 0); - p->flags |= (((TBLType *)list->data)->optional ? PDU_OPTIONAL : 0); - - if (((TBLType *)list->data)->fieldName == 0) { /* no name assigned */ - /* assign an anonymous name [XXX refer to parent asn1typename...] */ - ((TBLType *)list->data)->fieldName = - g_strdup_printf("anon%d", anonCount++); - } - p->name = ((TBLType *)list->data)->fieldName; - - ni = fullindex; - ni += g_snprintf(&fieldname[ni], sizeof(fieldname) - ni, ".%s", p->name); - p->fullname = g_strdup(fieldname); - - /* initialize field info */ - p->value_id = -1; - p->type_id = -1; - p->value_hf.p_id = &(p->value_id); - p->value_hf.hfinfo.name = p->fullname; - p->value_hf.hfinfo.abbrev = p->fullname; - p->value_hf.hfinfo.type = tbl_types_wireshark[p->type]; - p->value_hf.hfinfo.display = tbl_display_wireshark[p->type]; - p->value_hf.hfinfo.blurb = p->fullname; - /* all the other fields are already 0 ! */ - - if (p->type < TBL__SIMPLE) { - /* only register fields with a value here, postpone others */ - proto_register_field_array(proto_asn1, &(p->value_hf) , 1); - - save_reference(p); - - if (asn1_verbose) - g_message("register: %3d %3d [%3d] F%2.2x (%s)%s %s %s -> id=%d", - p->mytype, p->typenum, p->basetype, p->flags, - p->asn1typename, p->name, p->fullname, - tbl_types_wireshark_txt[p->type], p->value_id); - } - - q = g_node_first_child(list); - } else { - p = (PDUinfo *)pdu->data; - q = list; - } - - - if (asn1_verbose) g_message("%*s*switch %s %s", n*2, empty, p->name, TBLTYPE(p->type)); - - switch (p->type) { - case TBL_BOOLEAN: - case TBL_INTEGER: - case TBL_OCTETSTRING: - case TBL_NULL: - case TBL_OID: - case TBL_REAL: - CHECKTYPE(q, TBLTYPE_Tag); - p->tclass = ((TBLTag *)q->data)->tclass; - p->tag = ((TBLTag *)q->data)->code; - break; - - case TBL_BITSTRING: - case TBL_ENUMERATED: - CHECKTYPE(q, TBLTYPE_Tag); - p->tclass = ((TBLTag *)q->data)->tclass; - p->tag = ((TBLTag *)q->data)->code; - if (asn1_verbose) g_message("%*s*collection %s", n*2, empty, p->name); - /* read the enumeration [save min-max somewhere ?] */ - nvals = 0; - p1 = p; - while((q = g_node_next_sibling(q))) { - CHECKTYPE(q, TBLTYPE_NamedNumber); - p = (PDUinfo *)g_malloc0(sizeof(PDUinfo)); - nvals++; - p->type = TBL_ENUMERATED; - p->name = (gchar *)(((TBLNamedNumber *)q->data)->name); - p->tag = (((TBLNamedNumber *)q->data)->value); - p->flags = PDU_NAMEDNUM; - if (asn1_verbose) g_message("%*s %3d %s", n*2, empty, p->tag, p->name); - g_node_append_data(pdu, p); - } - - /* list all enum values in the field structure for matching */ - p1->value_hf.hfinfo.strings = v = (value_string *)g_malloc0((nvals+1) * sizeof(value_string)); - q = g_node_first_child(pdu); - nvals = 0; - while(q) { - p = (PDUinfo *)q->data; - v[nvals].value = p->tag; - v[nvals].strptr = p->name; - /* g_message("enumval1: %d %s %d %s", nvals, p1->name, p->tag, p->name); */ - nvals++; - q = g_node_next_sibling(q); - } - /* last entry is already initialized to { 0, NULL } */ - - break; - - case TBL_SEQUENCE: - case TBL_SET: - case TBL_SEQUENCEOF: - case TBL_SETOF: - case TBL_CHOICE: - CHECKTYPE(q, TBLTYPE_Tag); - q = g_node_first_child(list); - tbl_type(n+1, pdu, q, ni); - break; - - case TBL_TYPEREF: { /* may have a tag ... */ - TypeRef *tr; - guint i; - if(!q){ - break; - } - if ( ((TBLTag *)q->data)->type == TBLTYPE_Tag) { - if ((p->flags & PDU_IMPLICIT) == 0) { /* not implicit, use this tag */ - p->tclass = ((TBLTag *)q->data)->tclass; - p->tag = ((TBLTag *)q->data)->code; - if (asn1_verbose) - g_message("%*s*insert type tag %c%d", n*2, empty, - tag_class[p->tclass], p->tag); - } - q = g_node_next_sibling(q); - } else { /* use default tag for this type */ - tr = &typeDef_names[((TBLTypeRef *)q->data)->typeDefId]; - if ((((p->flags & PDU_IMPLICIT) == 0) && (tr->defclass != BER_CLASS_UNI)) || - ((p->tclass | p->tag) == 0 )) { - /* not implicit, use this tag */ - p->tclass = tr->defclass; - p->tag = tr->deftag; - if (asn1_verbose) g_message("%*s*set tag %c%d", n*2, empty, - tag_class[p->tclass], p->tag); - } - } - CHECKTYPE(q, TBLTYPE_TypeRef); - i = ((TBLTypeRef *)q->data)->typeDefId; - p->mytype = i; - tr = &typeDef_names[i]; - if (asn1_verbose) - g_message("%*s*type#%d %s, %p", n*2, empty, i, tr->name, (void *)tr->pdu); - p->asn1typename = tr->name; - - if (tr->defclass == CLASSREF) { - if (tr->pdu == 0) - tr->pdu = pdu; /* remember this reference */ - i = tr->deftag; - tr = &typeDef_names[i]; - if (asn1_verbose) - g_message("%*s*refer to type#%d %s, %p", n*2, empty, - i, tr->name, (void *)tr->pdu); - } - /* evaluate reference if not done before or when below recursion limit */ - if ((tr->pdu == 0) || (tr->level < type_recursion_level)) { - tr->level++; - if (tr->pdu == 0) { - tr->pdu = pdu; /* save for references we leave */ - } - p->flags |= ((TBLTypeRef *)q->data)->implicit? PDU_IMPLICIT : 0; - if (asn1_verbose) - g_message("%*s*typeref %s > %s%s at %p", n*2, empty, - p->name, - ((TBLTypeRef *)q->data)->implicit?"implicit ":empty, - tr->name, - (void *)pdu); - tbl_typeref(n+1, pdu, tr->type, ni); - tr->level--; - } else { - if (asn1_verbose) - g_message("%*s*typeref %s > %s already at %p", n*2, empty, - p->name, tr->name, (void *)tr->pdu); - p->flags |= PDU_REFERENCE; - p->reference = tr->pdu; - } - }; - break; - default: - g_warning("**** unknown tbl-type %d at line %d", p->type, __LINE__); - break; - } - - if (asn1_verbose) - g_message("%*sinclude type %s %s [%p:%s, tag %c%d]", - n*2, empty, p->name, p->asn1typename, (void *)p, TBLTYPE(p->type), - tag_class[p->tclass], p->tag); - - if (p->value_id == -1) { /* not registered before, do it now */ - proto_register_field_array(proto_asn1, &(p->value_hf) , 1); - - save_reference(p); - - if (asn1_verbose) - g_message("regist-2: %3d %3d [%3d] F%2.2x (%s)%s %s %s -> id=%d", - p->mytype, p->typenum, p->basetype, p->flags, p->asn1typename, - p->name, p->fullname, - tbl_types_wireshark_txt[p->type], p->value_id); - } - list = g_node_next_sibling(list); - } -} - -static void -PDUtext(char *txt, gulong txt_size, PDUinfo *info) /* say everything we know about this entry */ -{ - PDUinfo *rinfo; - const char *tt, *nn, *tn, *fn, *oo, *ii, *an, *tr, *ty; - int idx; - - idx = 0; - if (info) { - tt = TBLTYPE(info->type); - nn = info->name; - tn = info->asn1typename; - fn = info->fullname; - if (info->flags & PDU_NAMEDNUM) - g_snprintf(&txt[idx], txt_size - idx, "name: %2d %s", info->tag, nn); - else { - if (info->flags & PDU_TYPEDEF) - idx += g_snprintf(&txt[idx], txt_size - idx, "def %d: ", info->typenum); - else - idx += g_snprintf(&txt[idx], txt_size - idx, " "); - ty = (info->flags & PDU_TYPETREE) ? "typ" : "val"; - idx += g_snprintf(&txt[idx], txt_size - idx, "%s %s (%s)%s [%s] tag %c%d hf=%d tf=%d",ty,tt, tn, nn, fn, - tag_class[info->tclass], info->tag, info->value_id, info->type_id); - idx += g_snprintf(&txt[idx], txt_size - idx, ", mt=%d, bt=%d", info->mytype, info->basetype); - oo = (info->flags & PDU_OPTIONAL) ? ", optional" : empty; - ii = (info->flags & PDU_IMPLICIT) ? ", implicit" : empty; - nn = (info->flags & PDU_NAMEDNUM) ? ", namednum" : empty; - an = (info->flags & PDU_ANONYMOUS) ? ", anonymous" : empty; - idx += g_snprintf(&txt[idx], txt_size - idx, "%s%s%s%s", oo, ii, nn, an); - if (info->flags & PDU_REFERENCE) { - rinfo = (PDUinfo *)((GNode *)(info->reference))->data; - tt = TBLTYPE(rinfo->type); - nn = rinfo->name; - tn = rinfo->asn1typename; - fn = rinfo->fullname; - idx += g_snprintf(&txt[idx], txt_size - idx, ", reference to %s (%s)%s [%s]", tt, tn, nn, fn); - if (rinfo->flags & PDU_TYPEDEF) - idx += g_snprintf(&txt[idx], txt_size - idx, " T%d", rinfo->typenum); - idx += g_snprintf(&txt[idx], txt_size - idx, " tag %c%d", tag_class[rinfo->tclass], rinfo->tag); - oo = (rinfo->flags & PDU_OPTIONAL) ? ", optional" : empty; - ii = (rinfo->flags & PDU_IMPLICIT) ? ", implicit" : empty; - nn = (rinfo->flags & PDU_NAMEDNUM) ? ", namednum" : empty; - tn = (rinfo->flags & PDU_REFERENCE) ? ", reference" : empty; - tt = (rinfo->flags & PDU_TYPEDEF) ? ", typedef" : empty; - an = (rinfo->flags & PDU_ANONYMOUS) ? ", anonymous" : empty; - tr = (rinfo->flags & PDU_TYPETREE) ? ", typetree" : empty; - g_snprintf(&txt[idx], txt_size - idx, "%s%s%s%s%s%s%s", oo, ii, nn, tn, tt, an, tr); - } - } - } else { - g_snprintf(&txt[idx], txt_size - idx, "no info available"); - } - - return; -} - - -static void -showPDUtree(GNode *p, int n) -{ - PDUinfo *info; - char text[400]; - - while (p != 0) { - info = (PDUinfo *)p->data; - - PDUtext(text, sizeof(text), info); - - if (asn1_verbose) g_message("%*s%s", n*2, empty, text); - - showPDUtree(g_node_first_child(p), n+1); - - p = g_node_next_sibling(p); - } - - return; -} - -static gboolean -build_pdu_tree(const char *pduname) -{ - SearchDef sd; - guint pdudef, i, tcount; - guint sav_len; - PDUinfo *info; - char text[400]; - guint j, k; - gint defid; - PDUinfo *p, *q; - TypeRef *tr; - - if (asn1_verbose) g_message("build msg tree from '%s' for '%s'", current_asn1, pduname); - - if (!data_nodes) { - if (asn1_verbose) g_message("no data nodes"); - return FALSE; - } - sd.key = pduname; - sd.here = 0; - g_node_traverse(data_nodes, G_PRE_ORDER, G_TRAVERSE_ALL, -1, is_typedef, (gpointer)&sd); - if (sd.here) { - pdudef = ((TBLTypeDef *)(sd.here->data))->typeDefId; - if (asn1_verbose) g_message("%s found, %p, typedef %d", sd.key, (void *)sd.here, pdudef); - } else { - if (asn1_verbose) g_message("%s not found, ignored", sd.key); - return FALSE; - } - - /* If there's an existing PDU tree, free it */ - if (PDUtree) { - g_node_traverse(PDUtree, G_POST_ORDER, G_TRAVERSE_ALL, -1, - free_node_data, NULL); - g_node_destroy(PDUtree); - } - - /* initialize the PDU tree, hand craft the root entry */ - - info = (PDUinfo *)g_malloc0(sizeof(PDUinfo)); - info->name = pduname; - info->asn1typename = pduname; - info->type = TBL_SEQUENCEOF; - info->fullname = g_strdup_printf("%s.%s", pabbrev, pduname); - info->flags = PDUinfo_initflags = 0; - info->value_id = -1; - info->type_id = -1; - info->basetype = -1; - info->mytype = pdudef; - - info->value_hf.p_id = &(info->value_id); - info->value_hf.hfinfo.name = info->fullname; - info->value_hf.hfinfo.abbrev = info->fullname; - info->value_hf.hfinfo.type = tbl_types_wireshark[info->type]; - info->value_hf.hfinfo.display = tbl_display_wireshark[info->type]; - info->value_hf.hfinfo.blurb = info->fullname; - - anonCount = 0; /* anonymous types counter */ - - PDUtree = g_node_new(info); - pabbrev_pdu_len = g_snprintf(fieldname, sizeof(fieldname), "%s.%s.", pabbrev, pduname); - sav_len = pabbrev_pdu_len; - - /* Now build the tree for this top level PDU */ - if (asn1_verbose) - g_message("******** Define main type %d, %s", pdudef, pduname); - tbl_typeref(0, PDUtree, sd.here, pabbrev_pdu_len-1); /* strip initial . for new names */ - - if (asn1_verbose) - g_message("%d anonymous types", anonCount); - - /* Now make all types used available for matching */ - if (asn1_verbose) - g_message("Define the types that are actually referenced through the top level PDU"); - for (i=0, tcount=0; ipdu) { /* ignore if not used in main pdu */ - tcount++; - if (i == pdudef) - g_warning("pdu %d %s defined twice, TopLevel & type", pdudef, pduname); - if (asn1_verbose) - g_message("******** Define type %d, %s", i, tr->name); - - /* .... do definition ..... */ - info = (PDUinfo *)g_malloc0(sizeof(PDUinfo)); - info->name = tr->name; - info->asn1typename = tr->name; - info->tclass = tr->defclass; - info->tag = tr->deftag; - info->type = TBL_TYPEREF; - info->fullname = g_strdup_printf("%s.--.%s", pabbrev, tr->name); - info->flags = PDUinfo_initflags = PDU_TYPETREE; - info->value_id = -1; - info->type_id = -1; - info->basetype = -1; - info->mytype = i; - - info->value_hf.p_id = &(info->value_id); - info->value_hf.hfinfo.name = info->fullname; - info->value_hf.hfinfo.abbrev = info->fullname; - info->value_hf.hfinfo.type = tbl_types_wireshark[info->type]; - info->value_hf.hfinfo.display = tbl_display_wireshark[info->type]; - info->value_hf.hfinfo.blurb = info->fullname; - - tr->typetree = g_node_new(info); - pabbrev_pdu_len = g_snprintf(fieldname, sizeof(fieldname), "%s.--.%s.", pabbrev, tr->name); - tbl_typeref(0, tr->typetree, tr->type, pabbrev_pdu_len-1); - } - } - if (asn1_verbose) - g_message("%d types used", tcount); - - pabbrev_pdu_len = sav_len; - - /* and show the result */ - if (asn1_verbose) - g_message("Type index:"); - for (i=0; ipdu == 0) /* skip if not used */ - continue; - - if (asn1_verbose) - g_message(" %3d %s, %c%d, refs: %d", - i, tr->name, tag_class[tr->defclass], tr->deftag, - g_ptr_array_len(tr->refs)); - - /* get defining node for this type */ - defid = -1; - if (tr->typetree) { - p = (PDUinfo *)(tr->typetree->data); - defid = p->value_id; - if (asn1_verbose) - g_message(" -- defining id=%d", defid); - } - for(j=0; j < g_ptr_array_len(tr->refs); j++) { /* show refs, and set type_id */ - p = (PDUinfo *)g_ptr_array_index(tr->refs, j); - if (p->mytype == (gint)i) - p->type_id = defid; /* normal reference */ - else { - if ((p->flags & PDU_TYPETREE) == 0) { - /* we have a primitive value, find its real type */ - for(k=0; k < g_ptr_array_len(tr->refs); k++) { - /* look at all refs */ - q = (PDUinfo *)g_ptr_array_index(tr->refs, k); - if ((q->flags & PDU_TYPETREE) == 0) - continue; /* only type trees are interresting */ - if (q->type != p->type) - continue; /* must be same types */ - if (strcmp(q->name, p->name) == 0) { - /* OK, take the first we find, not entirely - * correct, it may be from a different - * base-base type...... XXX */ - p->type_id = q->value_id; - break; - } - } - } - } - - if (asn1_verbose) { - PDUtext(text, sizeof(text), p); - g_message(" %s", text); - } - } - } - - if (asn1_verbose) - g_message("The resulting PDU tree:"); - showPDUtree(PDUtree, 0); - - return TRUE; -} - - -#ifdef DISSECTOR_WITH_GUI -/* This cannot work in tshark.... don't include for now */ -#define SHOWPDU -#endif /* DISSECTOR_WITH_GUI */ -#ifdef SHOWPDU - -static GtkWidget *window = NULL; - -/* the columns in the tree view */ -enum -{ - TITLE_COLUMN, /* text in this row */ - DEF_COLUMN, /* definition in this row, if any */ - REF_COLUMN, /* referennce from this column, if any */ - VALUE_COLUMN, /* indicate this is a value */ - NAME_COLUMN, /* name of this row */ - N_COLUMNS -}; - -static FILE *namelist = 0; - -static void -build_tree_view(GtkTreeStore *store, GNode *p, GtkTreeIter *iter) -{ - GtkTreeIter iter2; - PDUinfo *info, *rinfo; - gint def, ref; - guchar *pb; - - char text[400]; - - while (p != 0) { - info = (PDUinfo *)p->data; - - gtk_tree_store_append (store, &iter2, iter); /* Acquire iterator */ - - PDUtext(text, sizeof(text), info); - - def = ref = -1; - if (info->flags & PDU_TYPEDEF) - def = info->typenum; - - if (info->flags & PDU_REFERENCE) { - rinfo = (PDUinfo *)((GNode *)(info->reference))->data; - ref = rinfo->typenum; - } - pb = GTK_STOCK_CANCEL; - if (G_NODE_IS_LEAF(p)) { - if (info->flags & PDU_NAMEDNUM) - pb = GTK_STOCK_BOLD; - else { - pb = GTK_STOCK_YES; - if (namelist) - fprintf(namelist, "%16s %s\n", - &(TBLTYPE(info->type)[4]), info->fullname); - } - } else { - switch (info->type) { - case TBL_ENUMERATED: - case TBL_BITSTRING: - pb = GTK_STOCK_ADD; - if (namelist) - fprintf(namelist, "%16s %s\n", - &(TBLTYPE(info->type)[4]), info->fullname); - break; - default: - break; - } - } - - gtk_tree_store_set (store, &iter2, - TITLE_COLUMN, text, - DEF_COLUMN, def, - REF_COLUMN, ref, - VALUE_COLUMN, pb, - NAME_COLUMN, info->fullname, - -1); - - build_tree_view(store, g_node_first_child(p), &iter2); - - p = g_node_next_sibling(p); - } - - return; -} - - -struct DefFind { - gint def; - GtkTreePath *path; -}; - -#define PATHSTACKMAX 10 -static GtkTreePath *pathstack[PATHSTACKMAX]; -static gint pathstackp = 0; - -static void add_path(GtkTreePath *p) -{ - if (pathstackp >= PATHSTACKMAX) { /* shift old contents */ - gtk_tree_path_free(pathstack[0]); /* we forget about this one */ - memmove(&pathstack[0], &pathstack[1], (PATHSTACKMAX-1)*sizeof(GtkTreePath *)); - pathstackp--; - } - pathstack[pathstackp++] = p; -} - -static GtkTreePath *pop_path(void) -{ - if (pathstackp > 0) - return pathstack[--pathstackp]; - return 0; -} - -static gboolean -find_definition(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) -{ - gint def; - - struct DefFind *df = (struct DefFind *)data; - - gtk_tree_model_get (model, iter, DEF_COLUMN, &def, -1); - - if (def == df->def) { - df->path = gtk_tree_path_copy (path); - return TRUE; - } - return FALSE; - -} - -static void -my_signal_handler(GtkTreeView *treeview, GtkTreePath *spath, GtkTreeViewColumn *arg2, gpointer model) -{ - GtkTreeIter iter; - GtkTreePath *path, *path2; - gchar *text, *oldpath, *newpath; - gint def, ref; - struct DefFind df; - - (void) arg2; - - path = gtk_tree_path_copy (spath); - - gtk_tree_model_get_iter (model, &iter, path); - gtk_tree_model_get (model, &iter, TITLE_COLUMN, &text, DEF_COLUMN, &def, REF_COLUMN, &ref, -1); - - oldpath = gtk_tree_path_to_string(path); - path2 = gtk_tree_path_copy (path); - - add_path(gtk_tree_path_copy(path)); - - if (ref != -1) { /* this is a reference, find matching definition */ - df.def = ref; - df.path = 0; - gtk_tree_model_foreach (model, find_definition, &df); - if (df.path) { - gtk_tree_path_free(path); - path = df.path; - } - } else { /* just move to the next entry, if it exists */ - gtk_tree_path_next(path2); - - if (gtk_tree_model_get_iter (model, &iter, path2)) { - gtk_tree_path_free(path); - path = path2; /* OK */ - } else { - if (gtk_tree_path_get_depth (path) > 1) - gtk_tree_path_up (path); - } - } - - if (path != path2) - gtk_tree_path_free (path2); - - gtk_tree_view_expand_to_path (treeview, path); - gtk_tree_view_expand_row (treeview, path, FALSE); - - gtk_tree_view_scroll_to_cell (treeview, path, NULL, TRUE, 0.2, 0.0); - - gtk_tree_view_set_cursor (treeview, path, NULL, FALSE); - - newpath = gtk_tree_path_to_string(path); - - if (asn1_debug) - g_message("my_signal_handler: treeview=%p, moving from %s to %s", - treeview, oldpath, newpath); - - g_free(text); - g_free(oldpath); - g_free(newpath); - /* if (df.path) */ - /* gtk_tree_path_free(df.path); */ -} - - -static void -menuitem_cb (gpointer callback_data, - guint callback_action, - GtkWidget *widget) -{ - GtkWidget *dialog; - GtkTreeModel *model; - GtkTreeView *treeview = gtk_item_factory_popup_data_from_widget(widget); - GtkTreeSelection *selection; - GtkTreeIter iter; - gchar *text, *name; - gint def, ref; - GtkTreePath *path; - gchar *oldpath, *newpath; - GtkTreeViewColumn *focus_column; - - selection = gtk_tree_view_get_selection(treeview); - - model = gtk_tree_view_get_model(treeview); - gtk_tree_view_get_cursor (treeview, &path, &focus_column); - - if (gtk_tree_model_get_iter (model, &iter, path)) { - - gtk_tree_model_get (model, &iter, TITLE_COLUMN, &text, DEF_COLUMN, &def, REF_COLUMN, &ref, - NAME_COLUMN, &name, -1); - oldpath = gtk_tree_path_to_string(path); - newpath = empty; - - switch (callback_action) { - case 0: /* Select */ - gtk_tree_selection_select_path (selection, path); - break; - case 1: /* back */ - path = pop_path(); - if (path) { - gtk_tree_view_expand_to_path (treeview, path); - gtk_tree_view_expand_row (treeview, path, FALSE); - - gtk_tree_view_scroll_to_cell (treeview, path, NULL, TRUE, 0.2, 0.0); - - gtk_tree_view_set_cursor (treeview, path, NULL, FALSE); - - newpath = gtk_tree_path_to_string(path); - - gtk_tree_path_free(path); - } else - newpath = g_strdup("** no path **"); - if (asn1_debug) - g_message("menueitem_cb: treeview=%p, moving from %s to %s", - treeview, oldpath, newpath); - break; - - case 2: /* Find */ - /* get all non anonymous names to the root */ - - default: - dialog = gtk_message_dialog_new (GTK_WINDOW (callback_data), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, - "You selected the menu item: \"%s\" [%d]\n%s\npath=%s, %s\nname='%s'", - gtk_item_factory_path_from_widget (widget), - callback_action, text, oldpath, newpath, name); - - /* Close dialog on user response */ - g_signal_connect (dialog, - "response", - G_CALLBACK (gtk_widget_destroy), - NULL); - - gtk_widget_show (dialog); - break; - } - g_free(text); - g_free(name); - if (newpath != empty) - g_free(newpath); - g_free(oldpath); - } else - g_message("menuitem_cb: no iterator..."); -} - -static GtkItemFactoryEntry menu_items[] = { - { "/Select", NULL, menuitem_cb, 0, NULL, 0 }, - { "/Back", "B", menuitem_cb, 1, NULL, 0 }, - { "/Find", "F", menuitem_cb, 2, NULL, 0 }, - { "/Save", "S", menuitem_cb, 3, NULL, 0 }, -}; - -static gint button_press_callback( GtkWidget *widget, - GdkEventButton *event, - gpointer data ) -{ - GtkTreeView *treeview = GTK_TREE_VIEW(widget); - - /* g_message("button_press_callback, widget=%p, button=%d, type=%d, x=%g, y=%g, x_root=%g," - * " y_root=%g", widget, event->button, event->type, event->x, event->y, event->x_root, - * event->y_root ); - */ - if (event->button == 3) { - gtk_item_factory_popup_with_data ((GtkItemFactory *)data, treeview, NULL, - event->x_root, - event->y_root, - event->button, - event->time); - return TRUE; - } - return FALSE; /* continue handling this event */ -} - - -static void -create_message_window(void) -{ - GtkCellRenderer *renderer; - GtkTreeStore *model; - GtkWidget *vbox; - GtkWidget *sw; - GtkWidget *treeview; - gchar *text; - GtkItemFactory *item_factory; - GtkAccelGroup *accel_group; - gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); - - if ( ! window) { - - /* create window, etc */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), current_pduname); - g_signal_connect (window, "destroy", - G_CALLBACK (gtk_widget_destroyed), &window); - - vbox = gtk_vbox_new (FALSE, 8); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 4); - gtk_container_add (GTK_CONTAINER (window), vbox); - - text = g_strdup_printf("ASN.1 message structure from %s, %s", current_asn1, current_pduname); - - gtk_box_pack_start (GTK_BOX (vbox), - gtk_label_new (text), - FALSE, FALSE, 0); - g_free(text); - - sw = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), - GTK_SHADOW_ETCHED_IN); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0); - - model = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, - G_TYPE_STRING, G_TYPE_STRING); - - namelist = ws_fopen("namelist.txt", "w"); - if (!namelist) - fprintf(stderr, "unable to open file: namelist.txt for writing!\n"); - build_tree_view(model, PDUtree, NULL); - if (namelist) { - fclose(namelist); - namelist = 0; - } - - /* create tree view */ - treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); - g_object_unref (model); - gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); - gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)), - GTK_SELECTION_MULTIPLE); - - renderer = gtk_cell_renderer_text_new (); - -#if 0 /* testing pango attributes */ -{ - PangoAttribute* bg; - PangoAttrList* attr; - - attr = pango_attr_list_new(); - bg = pango_attr_background_new(50000,55000,50000); - bg->start_index = 0; - bg->end_index = 10000; - pango_attr_list_insert(attr, bg); - - g_object_set(renderer, "attributes", attr, NULL); -} -#endif /* testing pango attributes */ - - gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(treeview), - TITLE_COLUMN, "asn1 entities", renderer, - "text", TITLE_COLUMN, NULL ); - - /* renderer = gtk_cell_renderer_text_new (); - * gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(treeview), - * DEF_COLUMN, "type definition", renderer, - * "text", DEF_COLUMN, NULL ); - * - * renderer = gtk_cell_renderer_text_new (); - * gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(treeview), - * REF_COLUMN, "reference", renderer, - * "text", REF_COLUMN, NULL ); - */ - renderer = gtk_cell_renderer_pixbuf_new (); - gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(treeview), - VALUE_COLUMN, "value", renderer, - "stock_id", VALUE_COLUMN, NULL ); - - renderer = gtk_cell_renderer_text_new (); - gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(treeview), - NAME_COLUMN, "fieldname", renderer, - "text", NAME_COLUMN, NULL ); - - gtk_container_add (GTK_CONTAINER (sw), treeview); - - /* gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(treeview), FALSE); */ - - /* create menu */ - - accel_group = gtk_accel_group_new (); - - /* This function initializes the item factory. - * Param 1: The type of menu - can be GTK_TYPE_MENU_BAR, GTK_TYPE_MENU, - * or GTK_TYPE_OPTION_MENU. - * Param 2: The path of the menu. - * Param 3: A pointer to a gtk_accel_group. The item factory sets up - * the accelerator table while generating menus. - */ - - item_factory = gtk_item_factory_new (GTK_TYPE_MENU, "", accel_group); - - /* This function generates the menu items. Pass the item factory, - the number of items in the array, the array itself, and any - callback data for the the menu items. */ - gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); - - /* Attach the new accelerator group to the window. */ - gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); - - - /* expand all rows after the treeview widget has been realized */ - g_signal_connect (treeview, "realize", - G_CALLBACK (gtk_tree_view_expand_all), NULL); - g_signal_connect (treeview, "row-activated", - G_CALLBACK (my_signal_handler), (gpointer)model); - - g_signal_connect (treeview, "button_press_event", - G_CALLBACK (button_press_callback), item_factory); - - /* g_signal_connect_swapped (treeview, "event", - * G_CALLBACK (button_press_handler), - * menu); - */ - gtk_window_set_default_size (GTK_WINDOW (window), 650, 400); - } - - if (!GTK_WIDGET_VISIBLE (window)) - gtk_widget_show_all (window); - else - { - gtk_widget_destroy (window); - window = NULL; - } -} -#endif /* SHOWPDU */ - -/************************************************************************************************ - * routines to find names to go with the decoded data stream * - ************************************************************************************************/ -#define PDUSTATE_STACK_SIZE 1024 -typedef struct _statestack statestack; -static struct _statestack { - GNode *node; - guint type; - guint offset; - const char *name; -} PDUstate[PDUSTATE_STACK_SIZE]; -static gint PDUstatec = 0; - -/* XXX - Shouldn't we do bounds checking here? */ -#define PUSHNODE(x) { PDUstate[PDUstatec++] = (x); } -#define POPSTATE PDUstate[--PDUstatec] - -static const char * -getname(GNode *node) { - if (node == NULL || node->data == NULL) - THROW(ReportedBoundsError); - - return ((PDUinfo *)node->data)->name; -} - -static guint -gettype(GNode *node) { - if (node == NULL || node->data == NULL) - THROW(ReportedBoundsError); - - return ((PDUinfo *)node->data)->type & TBL_TYPEmask; -} - -static PDUinfo * -getinfo(GNode *node) { - if (node == NULL) - THROW(ReportedBoundsError); - - return (PDUinfo *)node->data; -} - -#define NEXT {pos.node = g_node_next_sibling(pos.node);pos.type=0;} -#define CHILD {pos.node = g_node_first_child(pos.node);pos.type=0;} -#define MATCH (info && (cls == info->tclass) && (tag == info->tag)) -#define ISOPTIONAL (info && (info->flags & PDU_OPTIONAL)) -#define ISIMPLICIT (info && (info->flags & PDU_IMPLICIT)) -#define ISREFERENCE (info && (info->flags & PDU_REFERENCE)) -#define ISCHOICE (info && (info->flags & PDU_CHOICE)) -#define ISANONYMOUS (info && (info->flags & PDU_ANONYMOUS)) - -#undef CHECKP -#define CHECKP(p) {if ((p==0)||(PDUstatec<0)){g_warning("pointer==0, line %d **********", __LINE__);\ - pos.node=NULL;PUSHNODE(pos);return ret;}} - - -static void -showstack(statestack *pos, char *txt, int n) -{ - char buf[1024]; - const char /* *name, *type,*/ *stype; - const char *rep, *chs, *done, *ref, *pop, *chr, *rch, *sch, *con; - int i, j; - /* GNode *g;*/ - statestack *p; - guint typef; - - if ( ! asn1_verbose) - return; - - if (n>PDUstatec) - n = PDUstatec; - if (n<0) { - g_message("==underflow"); - return; - } - rep = chs = done = ref = pop = chr = rch = sch = con = empty; - -#if 0 /* XXX: not used ??? */ - g = pos->node; - if (g) { - name = ((PDUinfo *)g->data)->name; - type = TBLTYPE(((PDUinfo *)g->data)->type); - } else { - name = "node"; - type = "?"; - } -#endif - typef = pos->type; - stype = TBLTYPE(typef); - if (typef & TBL_REPEAT) rep = "[repeat]"; - if (typef & TBL_CHOICE_made) chs = "[choice]"; - if (typef & TBL_SEQUENCE_done) done = "[done]"; - if (typef & TBL_REFERENCE) ref = "[ref]"; - if (typef & TBL_REFERENCE_pop) pop = "[ref-pop]"; - if (typef & TBL_CHOICE_repeat) chr = "[chs-rep]"; - if (typef & TBL_REPEAT_choice) rch = "[rep-chs]"; - if (typef & TBL_SEQUENCE_choice)sch = "[seq-chs]"; - if (typef & TBL_CONSTRUCTED) con = "[constr]"; - - i = g_snprintf(buf, sizeof(buf), "%s sp=%d,pos=%p,%s%s%s%s%s%s%s%s%s%s:%s,%d", txt, PDUstatec, - (void *)pos->node, stype, rep, chs, done, ref, pop, chr, rch, sch, con, - pos->name, pos->offset); - - for(j=1, n--; n>0; j++, n--) { - p = &PDUstate[PDUstatec-j]; - typef = p->type; - stype = TBLTYPE(typef); - rep = (typef & TBL_REPEAT) ? "[repeat]" : empty; - chs = (typef & TBL_CHOICE_made) ? "[choice]" : empty; - done = (typef & TBL_SEQUENCE_done) ? "[done]" : empty; - ref = (typef & TBL_REFERENCE) ? "[ref]" : empty; - pop = (typef & TBL_REFERENCE_pop) ? "[ref-pop]" : empty; - chr = (typef & TBL_CHOICE_repeat) ? "[chs-rep]" : empty; - rch = (typef & TBL_REPEAT_choice) ? "[rep-chs]" : empty; - sch = (typef & TBL_SEQUENCE_choice)? "[seq-chs]" : empty; - con = (typef & TBL_CONSTRUCTED) ? "[constr]" : empty; - - i += g_snprintf(&buf[i], sizeof(buf) - i, "| sp=%d,st=%p,%s%s%s%s%s%s%s%s%s%s:%s,%d", PDUstatec-j, - (void *)p->node, stype, rep, chs, done, ref, pop, chr, rch, sch, con, - p->name, p->offset); - } - g_message("%s", buf); -} - -#if 0 -static void -showrefNode(GNode *node, int n) -{ - const char *name = empty, *type = empty, *tname = empty; - int cls = 0, tag = 0; - PDUinfo *info; - GNode *ref = 0; - - if (n > 10) { - g_message("%*sstop, nesting too deep", 2*n, empty); - return; - } - if (node->data) { - info = (PDUinfo *)(node->data); - type = TBLTYPE(info->type); - name = info->name; - tname = info->asn1typename; - ref = info->reference; - cls = info->tclass; - tag = info->tag; - } - g_message("%*sreference '(%s)%s:%s' at %p: data=%p, reference=%p, %c%d", - 2*n, empty, tname, type, name, node, node->data, - ref, tag_class[cls], tag); - - if (ref) - showrefNode(ref, n+1); -} -#endif - -#if 0 -static void -showNode(GNode *node, int n, int m) -{ - const char *name = empty, *type = empty; - GNode *ref = 0; - - if (n > m) - return; - - if (node->data) { - type = TBLTYPE(((PDUinfo *)(node->data))->type); - name = ((PDUinfo *)(node->data))->name; - ref = ((PDUinfo *)(node->data))->reference; - } - g_message("%*snode '%s:%s' at %p: data=%p, next=%p, prev=%p, parent=%p, child=%p", - 2*n, empty, type, name, node, node->data, node->next, node->prev, - node->parent, node->children); - - if (m > 10) { - g_message("%*sstop, nesting too deep", 2*n, empty); - return; - } - - if (ref) showrefNode(ref, n+2); - - if (node->children) showNode(node->children, n+1, m); - if (node->next) showNode(node->next, n, m); -} -#endif - -static void -PDUreset(int count, int count2) -{ - statestack pos; - - if (asn1_verbose) g_message("PDUreset %d-%d", count, count2); - - PDUstatec = 0; /* stackpointer */ - PDUerrcount = 0; /* error counter per asn.1 message */ - - pos.node = NULL; /* sentinel */ - pos.name = "sentinel"; - pos.type = TBL_SEQUENCEOF; - pos.offset = 0; - PUSHNODE(pos); - - if (PDUtree) { - pos.node = PDUtree; /* root of the tree */ - pos.name = getname(pos.node); - pos.type = gettype(pos.node) | TBL_REPEAT; - pos.offset = 0; - PUSHNODE(pos); - } -} - -static GNode * /* find GNode for a choice element, 0 if none */ -makechoice(GNode *p, guint cls, guint tag) -{ - GNode *q; - PDUinfo *info; - - p = g_node_first_child(p); /* the list of choices */ - info = 0; /* avoid gcc warning */ - - while (p) { - info = ((PDUinfo *)p->data); - - if (info->type == TBL_CHOICE) { - if (asn1_verbose) - g_message(" using sub choice (%s)%s", info->asn1typename, info->name); - - q = makechoice(p, cls, tag); - if (q) { /* found it */ - p = q; - info = ((PDUinfo *)p->data); - break; - } /* continue with this level */ - - } else { - if (asn1_verbose) - g_message(" have %c%d, found %c%d, %s", tag_class[cls], tag, - tag_class[info->tclass], info->tag, info->name); - - if ((cls == info->tclass) && (tag == info->tag)) - break; /* found it */ - } - - p = g_node_next_sibling(p); - } - if (asn1_verbose) { - if (p) g_message(" OK, '%s:(%s)%s' chosen", tbl_types[info->type], info->asn1typename, - info->name); - else g_message(" ...no matching choice..."); - } - return p; -} - - /* offset is for debugging only, a reference to output on screen */ -static PDUprops * -getPDUprops(PDUprops *out, guint offset, guint cls, guint tag, guint cons) -{ - statestack pos, pos2, save_pos; - PDUinfo *info; - const char *ret, *tmp; - int typeflags = 0, donext = 0, pushed = 0, cons_handled = 0; - static char namestr[64]; /* enough ? */ - static char posstr[40]; - static char noname[] = "*noname*"; - static PDUprops constructed_save; /* for unexpectedly constructed entities */ - - if (PDUstatec > 0) /* don't read from below the stack */ - pos = POPSTATE; - /* pos refers to the last asn1 node handled */ - - /* a very simple, too simple??, way to handle constructed entities */ - if ((PDUstatec > 0) && (pos.type & TBL_CONSTRUCTED)) { - /* unexpectedly constructed, return same info as last time */ - g_snprintf(posstr, sizeof(posstr), "==off=%d %c%d%c", offset, tag_class[cls], tag, cons?'c':'p'); - showstack(&pos, posstr, 3); - pos.offset = offset; - pos.type &= ~TBL_CONSTRUCTED; /* remove the flag */ - PUSHNODE(pos); /* push extra, to match with a EOI operation */ - PUSHNODE(pos); /* restore the stack */ - *out = constructed_save; - if (asn1_verbose) - g_message(" return for constructed %s (%s)%s", - TBLTYPE(out->type), out->asn1typename, out->name); - return out; - } - - save_pos = pos; /* may need it again */ - - out->type = 0; - out->name = 0; - out->asn1typename = "*error*"; - out->fullname = 0; - out->flags = 0; - out->data = 0; - out->value_id = -1; - out->type_id = -1; - - if (PDUstatec <= 0) { - if (PDUstatec > -10) { - if (asn1_verbose) - g_message(">>off=%d stack underflow, return", offset); - } - if (PDUstatec == -10) { - if (asn1_verbose) - g_message(">>off=%d stack underflow, return, no more messages", offset); - } - out->name = "*underflow*"; - out->flags |= OUT_FLAG_noname; - PDUerrcount++; - return out; - } - g_snprintf(posstr, sizeof(posstr), "==off=%d %c%d%c", offset, tag_class[cls], tag, cons?'c':'p'); - - showstack(&pos, posstr, 3); - - if (cls == ASN1_EOI) { /* end of this input sequence */ - - if (pos.type & TBL_REFERENCE_pop) { /* reference finished, return to caller */ - if (asn1_verbose) g_message(" EOI: reference pop"); - pos = POPSTATE; - } else - switch(pos.type & TBL_TYPEmask) { - case TBL_TYPEREF: - if (asn1_verbose) g_message(" EOI: pop typeref"); - pos = POPSTATE; /* remove typeref */ - break; - case TBL_CHOICE_done: - if (asn1_verbose) g_message(" EOI: mark choice"); - pos = POPSTATE; - pos.type |= TBL_CHOICE_made; /* poropagate this up the stack */ - PUSHNODE(pos); - break; - default: - break; - } - - - pos = POPSTATE; /* this is pushed back on the stack later */ - if (pos.node == NULL) { - if (asn1_verbose) g_message(" EOI, pos.node == NULL"); - out->name = "*no-name-EOI*"; - out->flags |= OUT_FLAG_noname; - PDUerrcount++; - return out; - } - - info = getinfo(pos.node); - ret = info->name; - tmp = TBLTYPE(info->type); - if (offset != pos.offset) { - if (asn1_verbose) - g_message(" *EOI %s:%s mismatch, EOIoffset=%d, stack=%d", - tmp, ret, offset, pos.offset); - while ((offset < pos.offset) && (PDUstatec > 0)) { - pos = POPSTATE; - if (asn1_verbose) - g_message(" EOI extra pop, EOIoffset=%d, stack=%d", - offset, pos.offset); - } - if (offset != pos.offset) - PDUerrcount++; /* only count if still unequal */ - } else { - if (asn1_verbose) g_message(" EOI %s:%s OK, offset=%d", tmp, ret, offset); - } - } else { - /* EOC is only present for indefinite length sequences, etc. end of sequence is always - * indicated by the synthetic EOI call. */ - if ((cls == BER_CLASS_UNI) && (tag == BER_UNI_TAG_EOC)) { /* explicit EOC never has a name */ - PUSHNODE(pos); /* restore stack */ - ret = "explicit-EOC"; - if (asn1_verbose) g_message(" return '%s', ignore", ret); - out->name = ret; - out->asn1typename = "ASN1"; - return out; - } - - /* find appropriate node for this tag */ - - if (pos.node == NULL) { - if (asn1_verbose) g_message(" pos.node == NULL"); - out->name = "*no-name*"; - out->flags |= OUT_FLAG_noname; - PDUerrcount++; - return out; - } - - /* showNode(pos.node, 3, 4); */ - - switch (pos.type & TBL_TYPEmask) { - case TBL_SEQUENCE: /* avoid finishing a choice when we have to do a sequence first */ - case TBL_SET: - break; - default: - if (pos.type & TBL_CHOICE_made) { - if (asn1_verbose) g_message(" finish choice"); - donext = 1; - } - break; - } - - info = getinfo(pos.node); - - if (pos.type & TBL_REPEAT) { /* start of a repeat */ - switch(pos.type & TBL_TYPEmask) { /* type of previous node */ - case TBL_CHOICE: - if (asn1_verbose) g_message(" repeating choice"); /* ignore repeat */ - break; - default: - if (asn1_verbose) g_message(" seqof: repeat start"); - /* decide how to continue, CHILD for next instance of sequence - * or NEXT for end of repeated sequence. - * use the tag to make a descision */ - if (asn1_verbose) g_message(" seqof: first got %c%d, found %c%d", - tag_class[cls], tag, - tag_class[info->tclass], info->tag); - if ( MATCH ) { - /* This is the start of repeating */ - PUSHNODE(pos); - ret = getname(pos.node); - if (asn1_verbose) g_message(" return for repeat '%s'", ret); - out->type = (pos.type & TBL_TYPEmask); - out->asn1typename = info->asn1typename; - out->name = ret; - out->value_id = info->value_id; - out->type_id = info->type_id; - if (ISANONYMOUS) { - if (asn1_verbose) g_message(" anonymous: dontshow"); - if (asn1_debug) - out->flags |= OUT_FLAG_dontshow; - else - out->name = empty; - } - return out; - } else { - /* find out where to go .... */ - pos2 = pos; - CHILD; /* assume sequence is repeated */ - if (pos.node) { - info = getinfo(pos.node); /* needed for MATCH to look ahead */ - if (asn1_verbose) - g_message(" seqof: child: got %c%d, found %c%d", - tag_class[cls], tag, - tag_class[info->tclass], info->tag); - } - if (pos2.type & TBL_CHOICE_repeat) { - pos = POPSTATE; - if (asn1_verbose) - g_message(" repeating a choice, %s", - getname(pos.node)); - pos.type = TBL_CHOICE_immediate; - } else { - if ( pos.node && ! MATCH) { /* no, repeat ends, */ - donext = 1; /* move on */ - if (asn1_verbose) - g_message(" seqof: no repeat, force next"); - } - /* following code will take the child again */ - pos = pos2; - } - } - break; - } - } else if (pos.type & TBL_REFERENCE_pop) { /* reference finished, return to caller */ - if (asn1_verbose) g_message(" reference pop, donext"); - pos = POPSTATE; - donext = 1; - } else if (pos.type & TBL_SEQUENCE_done) { /* Children have been processed */ - if (pos.type & TBL_SEQUENCE_choice) { - pos = POPSTATE; /* expect to find a repeat here */ - } else { - donext = 1; - if (asn1_verbose) g_message(" sequence done, donext"); - } - } - - if (pos.type & TBL_REFERENCE) { - if (asn1_verbose) g_message(" reference change ref -> pop"); - pos.type ^= (TBL_REFERENCE | TBL_REFERENCE_pop); - } - - pos.offset = offset; - - if (donext) { - if (asn1_verbose) g_message(" donext"); - NEXT; - } else { - switch(pos.type & TBL_TYPEmask) { /* type of previous node */ - case TBL_SETOF: /* ?? */ - case TBL_SEQUENCEOF: - if ((pos.type & TBL_REPEAT) == 0) { /* start repeating */ - pos.type |= TBL_REPEAT; - PUSHNODE(pos); - CHILD; - pushed++; - /* remember this is the start of a repeat cycle */ - typeflags |= TBL_REPEAT; - if (asn1_verbose) - g_message(" seqof: set repeat mark [push,child]"); - } else { - if (asn1_verbose) - g_message(" seqof: end of repeat loop [next]"); - NEXT; - } - break; - case TBL_SET: /* ?? */ - case TBL_SEQUENCE: - pos.type |= TBL_SEQUENCE_done; - PUSHNODE(pos); - CHILD; - pushed++; - if (asn1_verbose) g_message(" seq [push,child]"); - break; - case TBL_CHOICE: - /* no more choice */ - pos.type = (TBL_CHOICE_done | (pos.type & ~TBL_TYPEmask)); - PUSHNODE(pos); - - pos.type = 0; /* clear all type flags */ - if (asn1_verbose) - g_message(" choice [push], %c%d, %s", - tag_class[info->tclass], info->tag, getname(pos.node)); - pos.node = makechoice(pos.node, cls, tag); - if (pos.node == NULL) { - pos = POPSTATE; - out->flags |= OUT_FLAG_noname; - PDUerrcount++; - } - info = getinfo(pos.node); - - ret = getname(pos.node); - if (asn1_verbose) - g_message(" '%s' %c%d will be used", - ret, tag_class[info->tclass], info->tag); - break; - case TBL_CHOICE_done: - NEXT; - break; - case TBL_TYPEREF: - pos = POPSTATE; - NEXT; - if (asn1_verbose) g_message(" typeref [pop,next]"); - break; - case TBL_ENUMERATED: - case TBL_BITSTRING: - /* skip named numbers now, call to PDUenum() will retrieve a name */ - NEXT; - break; - case TBL_CHOICE_immediate: - if (asn1_verbose) g_message(" immediate choice [no next]"); - /* nothing */ - break; - default: - NEXT; - break; - } - } - - if (pos.node == NULL) { - ret = "*no-name-2*"; - if (asn1_verbose) g_message(" return '%s'", ret); - out->name = ret; - out->flags |= OUT_FLAG_noname; - PDUerrcount++; - return out; - } - ret = pos.name = getname(pos.node); - pos.type = gettype(pos.node) | (pos.type & ~TBL_TYPEmask); - info = getinfo(pos.node); - - /* pos now points to the prospective current node, go check it ********************/ - if (asn1_verbose && info) g_message(" candidate %s '%s'%s%s, %c%d", TBLTYPE(pos.type), ret, - (ISOPTIONAL)?", optional":empty, - (ISIMPLICIT)?", implicit":empty, - tag_class[info->tclass], info->tag ); - - if (ISOPTIONAL) { /* must check the tag */ - while(! MATCH) { /* check optional here again...? */ - if (asn1_verbose && info) - g_message(" got %c%d, found %c%d", tag_class[cls], tag, - tag_class[info->tclass], info->tag); - NEXT; - if (pos.node == NULL) { - ret = "------"; - if (cons) { - pos = save_pos; /* reset for next time */ - pos.type |= TBL_SEQUENCE_done; - PUSHNODE(pos); - pos.type &= ~TBL_SEQUENCE_done; - cons_handled = 1; - out->flags |= OUT_FLAG_dontshow; - if (asn1_verbose) - g_message(" end of optional list, constructed, expect value next time"); - } else { - PDUerrcount++; - out->flags |= OUT_FLAG_noname; - if (asn1_verbose) - g_message(" *end of optional list..."); - info = NULL; /* this is not valid any more... */ - } - break; /* end of list */ - } - info = getinfo(pos.node); - if (asn1_verbose) g_message(" optional, %s", getname(pos.node)); - } - if (pos.node && ! cons_handled) { - ret = pos.name = getname(pos.node); - pos.type = gettype(pos.node); - } - /* pos now refers to node with name we want, optional nodes skipped */ - } - - if (pos.type == TBL_CHOICE) { /* may be an immediate choice */ - pos2 = pos; /* save current state */ - if ( ! MATCH) { - if (! pushed) { - if (asn1_verbose) - g_message(" already pushed, skip next push"); - PUSHNODE(pos); - typeflags &= ~TBL_CHOICE_made; - } - - if (asn1_verbose && info) - g_message(" immediate choice [push], %c%d, %s", - tag_class[info->tclass], info->tag, getname(pos.node)); - if (pos.node) { - pos.node = makechoice(pos.node, cls, tag); - } - if (pos.node == NULL) { - pos = POPSTATE; - PDUerrcount++; - } - info = getinfo(pos.node); - pos.type = gettype(pos.node); - out->type = (pos.type & TBL_TYPEmask); - out->flags |= OUT_FLAG_type; - - g_snprintf(namestr, sizeof(namestr), "%s!%s", ret, getname(pos.node)); - ret = namestr; - if (asn1_verbose) - g_message(" %s:%s will be used", TBLTYPE(pos.type), ret); - if (typeflags & TBL_REPEAT) { - pos2.type |= TBL_REPEAT | TBL_REPEAT_choice; - PUSHNODE(pos2); - pos.type |= TBL_SEQUENCE_choice; - PUSHNODE(pos); - if (asn1_verbose) - g_message(" return from immediate choice [%s] '%s'", - TBLTYPE(pos.type), ret); - - out->data = pos.node; /* for access to named numbers... */ - - out->type = (pos.type & TBL_TYPEmask); - out->name = ret; - if (info) { - out->asn1typename = info->asn1typename; - out->fullname = info->fullname; - out->value_id = info->value_id; - out->type_id = info->type_id; - } - - return out; - } else { - typeflags |= TBL_CHOICE_made; - } - } else { - if (asn1_verbose) g_message(" matching choice '%s'", ret); - } - if ( ! cons ) { /* ISIMPLICIT was not OK for all */ - pos = pos2; /* reset for continuation */ - } - } - if (asn1_verbose) { - if (info) - g_message(" using: %s '%s'%s%s, %c%d", TBLTYPE(pos.type), ret, - (ISOPTIONAL)?", optional":empty, - (ISIMPLICIT)?", implicit":empty, - tag_class[info->tclass], info->tag ); - else - g_message(" using: unknown '%s'", ret); - } - - /* must follow references now */ - if (pos.type == TBL_TYPEREF && info) { - out->asn1typename = info->asn1typename; - out->type_id = info->typenum; - out->flags |= OUT_FLAG_typename; - PUSHNODE(pos); /* remember where we were */ - if (asn1_verbose) g_message(" typeref [push]"); - typeflags |= TBL_REFERENCE; - if (info->reference == 0) { /* resolved ref to universal type.... */ - /* showNode(pos.node, 3, 4); */ - pos.type = gettype(pos.node); /* the resulting type */ - info = getinfo(pos.node); - tmp = "unknown tag"; - if (info && (info->tclass == BER_CLASS_UNI) && (info->tag < 31)) { - tmp = asn1_tag[info->tag]; - pos.type = asn1_uni_type[info->tag]; /* get univsrsal type */ - } - if (asn1_verbose && info) - g_message(" indirect typeref to %s:%s, %s [%c%d]", - TBLTYPE(pos.type), info->asn1typename, tmp, - tag_class[info->tclass], info->tag ); - } else { - out->fullname = info->fullname; - donext = (ISANONYMOUS); /* refereing entity has no name ? */ - pos.node = info->reference; - pos.type = gettype(pos.node); - info = getinfo(pos.node); - if (asn1_verbose) - g_message(" typeref %s %s", TBLTYPE(pos.type), getname(pos.node)); - /* keep name from before going through the reference, unless anonymous */ - if (donext) /* refering entity has no name */ - ret = getname(pos.node); /* a better name */ - - /* handle choice here ? !!mm!! */ - - out->type = (pos.type & TBL_TYPEmask); - out->flags |= OUT_FLAG_type; - /* showNode(pos.node, 3, 4); */ - /* ret = getname(pos.node);*/ - - out->data = pos.node; - out->flags |= OUT_FLAG_data; - if (asn1_verbose) - g_message(" typeref set named number list node %p", (void *)pos.node); - - if ( ! cons) { - pos = POPSTATE; - pos.type = TBL_TYPEREF_nopop; - if (asn1_verbose) g_message(" typeref pop"); - } else if ((pos.type == TBL_ENUMERATED) || (pos.type == TBL_BITSTRING)){ - /* do not enter the named-number list */ - pos = POPSTATE; - pos.type = TBL_TYPEREF_nopop; - if (asn1_verbose) g_message(" typeref [pop]"); - } else { - typeflags |= TBL_REFERENCE; - } - } - } - - if (cons && ! cons_handled) { /* This entity is constructed, expected ? */ - switch(pos.type) { - case TBL_BOOLEAN: /* these are not expected to be constructed */ - case TBL_INTEGER: - case TBL_OCTETSTRING: - case TBL_NULL: - case TBL_OID: - case TBL_REAL: - case TBL_ENUMERATED: - case TBL_TYPEREF: - typeflags |= TBL_CONSTRUCTED; - /* this entry has no extra info, next is the same */ - out->flags |= (OUT_FLAG_dontshow | OUT_FLAG_constructed); - if (asn1_verbose) g_message(" dontshow and set constructed flag"); - break; - default: /* others, such as sequences, are expected to be constructed */ - break; - } - } - } - - if (ISANONYMOUS) { - if (asn1_verbose) g_message(" anonymous: dontshow"); - if (asn1_debug) /* this entry has no extra info, next is the same */ - out->flags |= OUT_FLAG_dontshow; - else - out->name = empty; /* show it, but no name */ - } - - if (out->name != empty) - out->name = ret; - - if ( ! (out->flags & OUT_FLAG_data)) - out->data = pos.node; /* for access to named numbers... */ - - pos.type |= typeflags; - PUSHNODE(pos); - - if ( ! (out->flags & OUT_FLAG_type)) - out->type = pos.type; - - out->type &= TBL_TYPEmask; - - if (ret == noname) { - PDUerrcount++; - out->flags |= OUT_FLAG_noname; - } - - if (info && ((out->flags & OUT_FLAG_typename) == 0)) { - out->asn1typename = info->asn1typename; - out->type_id = info->typenum; - } - - if (info && (out->value_id == -1)) { - out->value_id = info->value_id; - out->type_id = info->type_id; - } - - if ((out->fullname == 0) && info) - out->fullname = info->fullname; - - if (typeflags & TBL_CONSTRUCTED) - constructed_save = *out; - - if (asn1_verbose) - g_message(" return [%s] '%s' vid=%d, tid=%d", TBLTYPE(out->type), out->name, - out->value_id, out->type_id); - - return out; -} - -static const char * -getPDUenum(PDUprops *props, guint offset, guint cls, guint tag, guint value) -{ - GNode *list; - PDUinfo *info; - const char *ret, *name; - static char unnamed[] = "*unnamed*"; - - (void) cls; (void) tag; /* make a reference */ - - if (props->flags & OUT_FLAG_noname) - return empty; - - ret = unnamed; - list = (GNode *)props->data; - - if (list == 0) { - if (asn1_verbose) g_message("--off=%d named number list not initialized", offset); - PDUerrcount++; - return "*list-still-0*"; - } - - if ((PDUinfo *)list->data) - name = ((PDUinfo *)list->data)->name; - else - name = ret; - - for(list = g_node_first_child(list); list; list = g_node_next_sibling(list)) { - info = (PDUinfo *)list->data; - if (value == info->tag) { - ret = info->name; - break; - } - } - if (ret == unnamed) - PDUerrcount++; - - if (asn1_verbose) - g_message("--off=%d namednumber %d=%s from list %s", offset, value, ret, name); - return ret; -} - -#endif /* READSYNTAX */ - -void -proto_register_asn1(void) { - - static const enum_val_t type_recursion_opts[] = { - { "0", "0", 0 }, - { "1", "1", 1 }, - { "2", "2", 2 }, - { "3", "3", 3 }, - { "4", "4", 4 }, - { "4", "5", 5 }, - { "6", "6", 6 }, - { "7", "7", 7 }, - { "8", "8", 8 }, - { "9", "9", 9 }, - { NULL, NULL, -1}, - }; - - gint *ett[1+MAX_NEST+MAXPDU]; - - module_t *asn1_module; - int i, j; - const char *orig_ptr; - - asn1_logfile = get_tempfile_path(ASN1LOGFILE); - - current_asn1 = g_strdup(""); - asn1_filename = g_strdup(current_asn1); - - current_pduname = g_strdup("ASN1"); - asn1_pduname = g_strdup(current_pduname); - - proto_asn1 = proto_register_protocol("ASN.1 decoding", - "ASN1", pabbrev); - - ett[0] = &ett_asn1; - for (i=0, j=1; i, Gilbert Ramirez and others\0" - VALUE "OriginalFilename", "@PLUGIN_NAME@.dll\0" - VALUE "ProductName", "Wireshark\0" - VALUE "ProductVersion", "@VERSION@\0" - VALUE "Comments", "Build with @MSVC_VARIANT@\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END