diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-06-27 17:02:47 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-06-27 17:02:47 +0000 |
commit | 86a479ba54d00a583c3d766b3d28e38d87da47e2 (patch) | |
tree | 710dab4b3d49816b2d98cc32f98d044daca8b3d8 /asn1 | |
parent | dde06304bb657876d6a1a50e4c91851030be6079 (diff) |
Try to fix the last defined but not used warnings(again).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22204 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/cmip/cmip-exp.cnf | 10 | ||||
-rw-r--r-- | asn1/cmip/cmip.cnf | 145 | ||||
-rw-r--r-- | asn1/cmip/packet-cmip-template.c | 28 |
3 files changed, 146 insertions, 37 deletions
diff --git a/asn1/cmip/cmip-exp.cnf b/asn1/cmip/cmip-exp.cnf index 324a481fea..37106d982b 100644 --- a/asn1/cmip/cmip-exp.cnf +++ b/asn1/cmip/cmip-exp.cnf @@ -20,6 +20,11 @@ ObjectInstance BER_CLASS_ANY/*choice*/ -1/*choice*/ RDNSequence BER_CLASS_UNI BER_UNI_TAG_SEQUENCE CMIPAbortInfo BER_CLASS_UNI BER_UNI_TAG_SEQUENCE CMIPUserInfo BER_CLASS_UNI BER_UNI_TAG_SEQUENCE +AdditionalInformation BER_CLASS_UNI BER_UNI_TAG_SET +AdministrativeState BER_CLASS_UNI BER_UNI_TAG_ENUMERATED +AttributeList BER_CLASS_UNI BER_UNI_TAG_SET +AvailabilityStatus BER_CLASS_UNI BER_UNI_TAG_SET +ProbableCause BER_CLASS_ANY/*choice*/ -1/*choice*/ ROS BER_CLASS_ANY/*choice*/ -1/*choice*/ #.END @@ -31,6 +36,11 @@ ObjectInstance TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(c RDNSequence TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0 CMIPAbortInfo TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0 CMIPUserInfo TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0 +AdditionalInformation TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0 +AdministrativeState TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(cmip_AdministrativeState_vals) BITMASK = 0 +AttributeList TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0 +AvailabilityStatus TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0 +ProbableCause TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(cmip_ProbableCause_vals) BITMASK = 0 ROS TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(cmip_ROS_vals) BITMASK = 0 #.END diff --git a/asn1/cmip/cmip.cnf b/asn1/cmip/cmip.cnf index 96e59b091c..d8f45aa5a5 100644 --- a/asn1/cmip/cmip.cnf +++ b/asn1/cmip/cmip.cnf @@ -42,12 +42,18 @@ ObjectInstance ObjectClass Attribute RDNSequence +# X.721 +ProbableCause +AdministrativeState +AvailabilityStatus +AttributeList +AdditionalInformation #.REGISTER BaseManagedObjectId B "2.9.2.21.7.13" "BaseManagedObjectId(13)" # X.721 -# discriminatorId(1) -# logId(2) +SimpleNameType B "2.9.3.2.7.1" "discriminatorId(1)" +SimpleNameType B "2.9.3.2.7.2" "logId(2)" LogRecordId B "2.9.3.2.7.3" "logRecordId(3)" SystemId B "2.9.3.2.7.4" "systemId(4)" SystemTitle B "2.9.3.2.7.5" "systemTitle(5)" @@ -59,60 +65,60 @@ AttributeValueChangeDefinition B "2.9.3.2.7.10" "attributeValueChangeDefinition( BackedUpStatus B "2.9.3.2.7.11" "backedUpStatus(11)" CorrelatedNotifications B "2.9.3.2.7.12" "correlatedNotifications(12)" EventTime B "2.9.3.2.7.13" "eventTime(13)" -# eventType(14) +EventTypeId B "2.9.3.2.7.14" "eventType(14)" MonitoredAttributes B "2.9.3.2.7.15" "monitoredAttributes(15)" -# notificationIdentifier(16) -- notificationIdentifier attribute type -# perceivedSeverity(17) +NotificationIdentifier B "2.9.3.2.7.16" "notificationIdentifier(16)" +PerceivedSeverity B "2.9.3.2.7.17" "perceivedSeverity(17)" ProbableCause B "2.9.3.2.7.18" "probableCause(18)" ProposedRepairActions B "2.9.3.2.7.19" "proposedRepairActions(19)" -# relationshipChangeDefinition(20) -# securityAlarmCause(21) +AttributeValueChangeDefinition B "2.9.3.2.7.20" "relationshipChangeDefinition(20)" +SecurityAlarmCause B "2.9.3.2.7.21" "securityAlarmCause(21)" SecurityAlarmDetector B "2.9.3.2.7.22" "securityAlarmDetector(22)" SecurityAlarmSeverity B "2.9.3.2.7.23" "securityAlarmSeverity(23)" ServiceProvider B "2.9.3.2.7.24" "serviceProvider(24)" -# serviceUser(25) +ServiceUser B "2.9.3.2.7.25" "serviceUser(25)" SourceIndicator B "2.9.3.2.7.26" "sourceIndicator(26)" SpecificProblems B "2.9.3.2.7.27" "specificProblems(27)" -# stateChangeDefinition(28) +AttributeValueChangeDefinition B "2.9.3.2.7.28" "stateChangeDefinition(28)" ThresholdInfo B "2.9.3.2.7.29" "thresholdInfo(29)" TrendIndication B "2.9.3.2.7.30" "trendIndication(30)" AdministrativeState B "2.9.3.2.7.31" "administrativeState(31)" AlarmStatus B "2.9.3.2.7.32" "alarmStatus(32)" -# availabilityStatus(33) +AvailabilityStatus B "2.9.3.2.7.33" "availabilityStatus(33)" ControlStatus B "2.9.3.2.7.34" "controlStatus(34)" OperationalState B "2.9.3.2.7.35" "operationalState(35)" ProceduralStatus B "2.9.3.2.7.36" "proceduralStatus(36)" StandbyStatus B "2.9.3.2.7.37" "standbyStatus(37)" UnknownStatus B "2.9.3.2.7.38" "unknownStatus(38)" UsageState B "2.9.3.2.7.39" "usageState(39)" -# backUpObject(40) -- backUpObject attribute type -# backedUpObject(41) -- backedUpObject attribute type -# member(42) -- member attribute type -# owner(43) -- owner attribute type -# peer(44) -- peer attribute type -# primary(45) -- primary attribute type -# providerObject(46) -- providerObject attribute type -# secondary(47) -- secondary attribute type -# userObject(48) -- userObject attribute type +BackUpRelationshipObject B "2.9.3.2.7.40" "backUpObject(40)" +BackUpRelationshipObject B "2.9.3.2.7.41" "backedUpObject(41)" +GroupObjects B "2.9.3.2.7.42" "member(42)" +GroupObjects B "2.9.3.2.7.43" "owner(43)" +BackUpRelationshipObject B "2.9.3.2.7.44" "peer(44)" +PrioritisedObject B "2.9.3.2.7.45" "primary(45)" +PrioritisedObject B "2.9.3.2.7.46" "providerObject(46)" +PrioritisedObject B "2.9.3.2.7.47" "secondary(47)" +PrioritisedObject B "2.9.3.2.7.48" "userObject(48)" ActiveDestination B "2.9.3.2.7.49" "activeDestination(49)" Allomorphs B "2.9.3.2.7.50" "allomorphs(50)" BackUpDestinationList B "2.9.3.2.7.51" "backUpDestinationList(51)" -# capacityAlarmTreshold(52) +CapacityAlarmThreshold B "2.9.3.2.7.52" "capacityAlarmTreshold(52)" ConfirmedMode B "2.9.3.2.7.53" "confirmedMode(53)" CurrentLogSize B "2.9.3.2.7.54" "currentLogSize(54)" Destination B "2.9.3.2.7.55" "destination(55)" DiscriminatorConstruct B "2.9.3.2.7.56" "discriminatorConstruct(56)" -# intervalsOfDay(57) +IntervalsOfDay B "2.9.3.2.7.57" "intervalsOfDay(57)" LogFullAction B "2.9.3.2.7.58" "logFullAction(58)" LoggingTime B "2.9.3.2.7.59" "loggingTime(59)" -# managedObjectClass(60) -# managedObjectInstance(61) +#ObjectClass B "2.9.3.2.7.60" "managedObjectClass(60)" +#ObjectInstance B "2.9.3.2.7.61" "managedObjectInstance(61)" MaxLogSize B "2.9.3.2.7.62" "maxLogSize(62)" NameBinding B "2.9.3.2.7.63" "nameBinding(63)" NumberOfRecords B "2.9.3.2.7.64" "numberOfRecords(64)" ObjectClass B "2.9.3.2.7.65" "objectClass(65)" Packages B "2.9.3.2.7.66" "packages(66)" -# schedulerName(67) +#ObjectInstance B "2.9.3.2.7.66" "schedulerName(67)" StartTime B "2.9.3.2.7.68" "startTime(68)" StopTime B "2.9.3.2.7.69" "stopTime(69)" SupportedFeatures B "2.9.3.2.7.70" "supportedFeatures(70)" @@ -152,27 +158,20 @@ WeekMask B "2.9.3.2.7.71" "weekMask(71)" LifecycleState B "2.9.3.2.7.115" "lifecycleState(115)" -#.NO_EMIT -# Removed as they are giving defined but not used warnings currently. -ComplexityLimitation -NoSuchAction -NoSuchEventType +#.OMIT_ASSIGNMENT +# Removed as they are giving 'defined but not used' warnings currently. ROSEapdus -BackUpRelationshipObject -CapacityAlarmThreshold CounterThreshold GaugeThreshold GaugeThresholdValue -GroupObjects LogAvailability -PrioritisedObject SchedulingAvailability -SecurityAlarmCause TideMarkInfo UnscheduledLogAvailability Priority RejectProblem + #.PDU #.TYPE_RENAME @@ -203,8 +202,14 @@ SetArgument/modificationList/_item/attributeValue attributevalue #.FN_BODY Code/local VAL_PTR = &opcode %(DEFAULT_BODY)s - if(check_col(actx->pinfo->cinfo, COL_INFO)){ - col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%%s", val_to_str(opcode, cmip_Opcode_vals, " Unknown Opcode:%%d")); + if(opcode_type== OPCODE_RETURN_ERROR){ + if(check_col(actx->pinfo->cinfo, COL_INFO)){ + col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%%s", val_to_str(opcode, cmip_Opcode_vals, " Unknown Opcode:%%d")); + } + }else{ + if(check_col(actx->pinfo->cinfo, COL_INFO)){ + col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%%s", val_to_str(opcode, cmip_error_code_vals, " Unknown Opcode:%%d")); + } } #.END @@ -328,7 +333,73 @@ SetArgument/modificationList/_item/attributeValue attributevalue /*XXX add more types here */ #.FN_BODY ReturnError/parameter -/* TODO: add code here */ + + switch(opcode){ + case 19: /* classInstanceConflict */ + dissect_cmip_BaseManagedObjectId(FALSE, tvb, offset, actx, tree, -1); + break; + case 20: /* complexityLimitation */ + dissect_cmip_ComplexityLimitation(FALSE, tvb, offset, actx, tree, -1); + break; + case 11: /* duplicateManagedObjectInstance */ + dissect_cmip_ObjectInstance(FALSE, tvb, offset, actx, tree, -1); + break; + case 7: /* getListError */ + dissect_cmip_GetListError(FALSE, tvb, offset, actx, tree, -1); + break; + case 15: /* invalidArgumentValue */ + dissect_cmip_InvalidArgumentValue(FALSE, tvb, offset, actx, tree, -1); + break; + case 6: /* invalidAttributeValue */ + dissect_cmip_Attribute(FALSE, tvb, offset, actx, tree, -1); + break; + case 4: /* invalidFilter */ + dissect_cmip_CMISFilter(FALSE, tvb, offset, actx, tree, -1); + break; + case 17: /* invalidObjectInstance */ + dissect_cmip_ObjectInstance(FALSE, tvb, offset, actx, tree, -1); + break; + case 16: /* invalidScope */ + dissect_cmip_Scope(FALSE, tvb, offset, actx, tree, -1); + break; + case 18: /* missingAttributeValue */ + /* Hmmm SET OF AttributeId */ + dissect_cmip_AttributeId(FALSE, tvb, offset, actx, tree, -1); + break; + case 9: /* noSuchAction */ + dissect_cmip_NoSuchAction(FALSE, tvb, offset, actx, tree, -1); + break; + case 14: /* noSuchArgument */ + dissect_cmip_NoSuchArgument(FALSE, tvb, offset, actx, tree, -1); + break; + case 5: /* noSuchAttribute */ + dissect_cmip_AttributeId(FALSE, tvb, offset, actx, tree, -1); + break; + case 13: /* noSuchEventType */ + dissect_cmip_NoSuchEventType(FALSE, tvb, offset, actx, tree, -1); + break; + case 22: /* noSuchInvokeId */ + dissect_cmip_InvokeIDType(FALSE, tvb, offset, actx, tree, -1); + break; + case 0: /* noSuchObjectClass */ + dissect_cmip_ObjectClass(FALSE, tvb, offset, actx, tree, -1); + break; + case 1:/* noSuchObjectInstance */ + dissect_cmip_ObjectInstance(FALSE, tvb, offset, actx, tree, -1); + break; + case 12: /* noSuchReferenceObject */ + dissect_cmip_ObjectInstance(FALSE, tvb, offset, actx, tree, -1); + break; + case 10: /* processingFailure OPTIONAL TRUE*/ + dissect_cmip_ProcessingFailure(FALSE, tvb, offset, actx, tree, -1); + break; + case 8: /* setListError */ + dissect_cmip_SetListError(FALSE, tvb, offset, actx, tree, -1); + break; + case 3:/* syncNotSupported */ + dissect_cmip_CMISSync(FALSE, tvb, offset, actx, tree, -1); + break; + } #.FN_HDR ObjectClass/globalForm objectclassform = OBJECTCLASS_GLOBAL_FORM; diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c index 754b37440d..174ba4e823 100644 --- a/asn1/cmip/packet-cmip-template.c +++ b/asn1/cmip/packet-cmip-template.c @@ -82,6 +82,34 @@ static const value_string cmip_Opcode_vals[] = { { 0, NULL } }; +static const value_string cmip_error_code_vals[] = { + { 0, "noSuchObjectClass" }, + { 1, "noSuchObjectInstance" }, + { 2, "accessDenied" }, + { 3, "syncNotSupported" }, + { 4, "invalidFilter" }, + { 5, "noSuchAttribute" }, + { 6, "invalidAttributeValue" }, + { 7, "getListError" }, + { 8, "setListError" }, + { 9, "noSuchAction" }, + { 10, "processingFailure" }, + { 11, "duplicateManagedObjectInstance" }, + { 12, "noSuchReferenceObject" }, + { 13, "noSuchEventType" }, + { 14, "noSuchArgument" }, + { 15, "invalidArgumentValue" }, + { 16, "invalidScope" }, + { 17, "invalidObjectInstance" }, + { 18, "missingAttributeValue" }, + { 19, "classInstanceConflict" }, + { 20, "complexityLimitation" }, + { 21, "mistypedOperation" }, + { 22, "noSuchInvokeId" }, + { 23, "operationCancelled" }, + { 0, NULL } +}; + static int opcode_type; #define OPCODE_INVOKE 1 #define OPCODE_RETURN_RESULT 2 |