summaryrefslogtreecommitdiff
path: root/asn1
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-07-01 18:48:15 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-07-01 18:48:15 +0000
commit42f17b21117ff7f58bb9ec9f53ad960493a1df45 (patch)
treeb23c93e0b9872a65a4be85bb20f3da930a399cde /asn1
parenta286ab2d9b04d7434246d111f809b647704d5a45 (diff)
downloadwireshark-42f17b21117ff7f58bb9ec9f53ad960493a1df45.tar.gz
Try to fix defined but not used warnings and use the nice new table function to get the
list of Opcodes. svn path=/trunk/; revision=22227
Diffstat (limited to 'asn1')
-rw-r--r--asn1/cmip/Makefile.nmake2
-rw-r--r--asn1/cmip/cmip-exp.cnf2
-rw-r--r--asn1/cmip/cmip.cnf33
-rw-r--r--asn1/cmip/packet-cmip-template.c43
-rw-r--r--asn1/gnm/GNM.asn41
-rw-r--r--asn1/gnm/Makefile2
-rw-r--r--asn1/gnm/Makefile.nmake4
-rw-r--r--asn1/gnm/gnm.cnf38
-rw-r--r--asn1/gnm/packet-gnm-template.c8
9 files changed, 73 insertions, 100 deletions
diff --git a/asn1/cmip/Makefile.nmake b/asn1/cmip/Makefile.nmake
index 983944ca0f..8ea69b5432 100644
--- a/asn1/cmip/Makefile.nmake
+++ b/asn1/cmip/Makefile.nmake
@@ -17,7 +17,7 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2wrs.py $(ASN1_FILES) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
!IFDEF PYTHON
- $(PYTHON) "../../tools/asn2wrs.py" -b -X -T -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(ASN1_FILES)
+ $(PYTHON) "../../tools/asn2wrs.py" -b -X -T -e -k -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(ASN1_FILES)
!ELSE
@echo Error: You need Python to use asn2wrs.py
@exit 1
diff --git a/asn1/cmip/cmip-exp.cnf b/asn1/cmip/cmip-exp.cnf
index 37106d982b..6ea7d32e58 100644
--- a/asn1/cmip/cmip-exp.cnf
+++ b/asn1/cmip/cmip-exp.cnf
@@ -1,7 +1,7 @@
# Do not modify this file.
# It is created automatically by the ASN.1 to Wireshark dissector compiler
# .\cmip-exp.cnf
-# ../../tools/asn2wrs.py -b -X -T -e -p cmip -c cmip.cnf -s packet-cmip-template CMIP-1.asn CMIP-A-ABORT-Information.asn CMIP-A-ASSOCIATE-Information.asn ../x721/Attribute-ASN1Module.asn ../ros/Remote-Operations-Information-Objects.asn ../ros/Remote-Operations-Generic-ROS-PDUs.asn
+# ../../tools/asn2wrs.py -b -X -T -e -k -p cmip -c cmip.cnf -s packet-cmip-template CMIP-1.asn CMIP-A-ABORT-Information.asn CMIP-A-ASSOCIATE-Information.asn ../x721/Attribute-ASN1Module.asn ../ros/Remote-Operations-Information-Objects.asn ../ros/Remote-Operations-Generic-ROS-PDUs.asn
#.MODULE
CMIP-1 cmip
diff --git a/asn1/cmip/cmip.cnf b/asn1/cmip/cmip.cnf
index d8f45aa5a5..9668934b9f 100644
--- a/asn1/cmip/cmip.cnf
+++ b/asn1/cmip/cmip.cnf
@@ -42,13 +42,42 @@ ObjectInstance
ObjectClass
Attribute
RDNSequence
-# X.721
ProbableCause
AdministrativeState
AvailabilityStatus
AttributeList
AdditionalInformation
+#.TABLE_HDR
+/* CMIP OPERATIONS */
+static const value_string cmip_Opcode_vals[] = {
+#.TABLE_BODY OPERATION
+ { %(&operationCode)s, "%(_ident)s" },
+#.TABLE_FTR
+ { 0, NULL }
+};
+#.END
+
+#.TABLE_HDR
+/* CMIP ERRORS */
+static const value_string cmip_error_code_vals[] = {
+#.TABLE_BODY ERROR
+ { %(&errorCode)s, "%(_ident)s" },
+#.TABLE_FTR
+ { 0, NULL }
+};
+#.END
+
+#.TABLE2_BODY OPERATION
+%(&operationCode)3s %(_ident)-20s,
+#.END
+
+#.TABLE1_BODY ERROR
+%(&errorCode)3s %(_ident)-20s,
+#.END
+
+# X.721
+
#.REGISTER
BaseManagedObjectId B "2.9.2.21.7.13" "BaseManagedObjectId(13)"
# X.721
@@ -165,8 +194,10 @@ CounterThreshold
GaugeThreshold
GaugeThresholdValue
LogAvailability
+NotifyThreshold
SchedulingAvailability
TideMarkInfo
+TideMark
UnscheduledLogAvailability
Priority
RejectProblem
diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c
index 174ba4e823..f151595eab 100644
--- a/asn1/cmip/packet-cmip-template.c
+++ b/asn1/cmip/packet-cmip-template.c
@@ -67,48 +67,7 @@ static gint ett_cmip = -1;
static guint32 opcode;
-static const value_string cmip_Opcode_vals[] = {
- { 0, "m-EventReport" },
- { 1, "m-EventReport-Confirmed" },
- { 2, "m-Linked-Reply" },
- { 3, "m-Get" },
- { 4, "m-Set" },
- { 5, "m-Set-Confirmed" },
- { 6, "m-Action" },
- { 7, "m-Action-Confirmed" },
- { 8, "m-Create" },
- { 9, "m-Delete" },
- { 10, "m-CancelGet" },
- { 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 }
-};
+#include "packet-cmip-table.c"
static int opcode_type;
#define OPCODE_INVOKE 1
diff --git a/asn1/gnm/GNM.asn b/asn1/gnm/GNM.asn
index f4cf05a067..e00cc76364 100644
--- a/asn1/gnm/GNM.asn
+++ b/asn1/gnm/GNM.asn
@@ -15,42 +15,11 @@ IMPORTS
-- 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};
-;
+ ProbableCause, AdministrativeState, AvailabilityStatus, AttributeList,
+ AdditionalInformation
+ FROM Attribute-ASN1Module {joint-iso-itu-t ms(9) smi(3) part2(2)
+ asn1Module(2) 1};
-- Local imports
--- Module Attribute-ASN1Module (X.721:02/1992)
--- Attribute-ASN1Module {joint-iso-itu-t ms(9) smi(3) part2(2) asn1Module(2) 1}
-
-ProbableCause ::= CHOICE {globalValue OBJECT IDENTIFIER,
- localValue INTEGER
-}
-
-AdministrativeState ::= ENUMERATED {locked(0), unlocked(1), shuttingDown(2)}
-
-AvailabilityStatus ::=
- SET OF
- INTEGER {inTest(0), failed(1), powerOff(2), offLine(3), offDuty(4),
- dependency(5), degraded(6), notInstalled(7), logFull(8)}
-
--- logFull is defined in CCITT Rec X.735 | ISO/IEC 10164-6.
-
-AttributeList ::= SET OF Attribute
-
-AdditionalInformation ::= SET OF ManagementExtension
-
-ControlStatus ::=
- SET OF
- INTEGER {subjectToTest(0), partOfServicesLocked(1), reservedForTest(2),
- suspended(3)}
-
-ManagementExtension ::= SEQUENCE {
- identifier OBJECT IDENTIFIER,
- significance [1] BOOLEAN DEFAULT FALSE,
- information [2] ANY
-}
-- MappingList, SignalRate
-- FROM M3100ASN1TypeModule2 {itu-t recommendation m gnm(3100)
-- informationModel(0) asn1Modules(2) asn1Module2(1)}
@@ -59,8 +28,6 @@ MappingList ::= SEQUENCE OF PayloadLevel
PayloadLevel ::= CharacteristicInformation
-Packages ::= SET OF OBJECT IDENTIFIER
-
SignalRate ::= CHOICE {
objectClass [0] OBJECT IDENTIFIER,
characteristicInformation [1] CharacteristicInformation
diff --git a/asn1/gnm/Makefile b/asn1/gnm/Makefile
index 0785c1a41d..2aecc9bf76 100644
--- a/asn1/gnm/Makefile
+++ b/asn1/gnm/Makefile
@@ -7,7 +7,7 @@ all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2wrs.py GNM.asn packet-gnm-template.c packet-gnm-template.h gnm.cnf
- python ../../tools/asn2wrs.py -b -e -p gnm -c gnm.cnf -s packet-gnm-template GNM.asn
+ python ../../tools/asn2wrs.py -b -e -X -T -p gnm -c gnm.cnf -s packet-gnm-template GNM.asn
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
diff --git a/asn1/gnm/Makefile.nmake b/asn1/gnm/Makefile.nmake
index 9ad3964ccc..cf0a621ecb 100644
--- a/asn1/gnm/Makefile.nmake
+++ b/asn1/gnm/Makefile.nmake
@@ -8,14 +8,14 @@ UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
PROTOCOL_NAME=gnm
DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
-ASN_FILES= ../x721/Attribute-ASN1Module.asn
+ASN_FILES= GNM.asn
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2wrs.py GNM.asn packet-gnm-template.c packet-gnm-template.h gnm.cnf
!IFDEF PYTHON
- $(PYTHON) "../../tools/asn2wrs.py" -b -e -p $(PROTOCOL_NAME) -c gnm.cnf -s packet-gnm-template GNM.asn
+ $(PYTHON) "../../tools/asn2wrs.py" -b -X -T -e -p $(PROTOCOL_NAME) -c gnm.cnf -s packet-gnm-template GNM.asn
!ELSE
@echo Error: You need Python to use asn2wrs.py
@exit 1
diff --git a/asn1/gnm/gnm.cnf b/asn1/gnm/gnm.cnf
index bb232bd05f..e642536086 100644
--- a/asn1/gnm/gnm.cnf
+++ b/asn1/gnm/gnm.cnf
@@ -1,14 +1,7 @@
# gnm.cnf
-
# gnm conformation file
-
-
# $Id$
-
-#.MODULE_IMPORT
-CMIP-1 cmip
-
#.INCLUDE ../cmip/cmip-exp.cnf
#.EXPORTS
@@ -23,8 +16,35 @@ CMIP-1 cmip
#.FIELD_RENAME
-#.FN_BODY ManagementExtension/information
-/* FIX ME */
+#.OMIT_ASSIGNMENT
+AddTpsToGtpInformation
+AddTpsToGtpResult
+AddTpsToTpPoolInformation
+AddTpsToTpPoolResult
+AlarmEffectOnServiceParameter
+CircuitPackAvailabilityStatus
+ConnectInformation
+ConnectorType
+ConnectResult
+CreateError
+CTPUpstreamPointer
+CTPDownstreamPointer
+DisconnectInformation
+DisconnectResult
+GeneralError
+ListOfTPs
+LocationName
+PhysicalPortSignalRateAndMappingList
+PortNumber
+Reach
+RemoveTpsFromGtpInformation
+RemoveTpsFromGtpResult
+RemoveTpsFromTpPoolInformation
+RemoveTpsFromTpPoolResult
+SwitchOverInformation
+SwitchOverResult
+TypeText
+#.END
#.REGISTER
RelatedObjectInstance B "0.0.13.3100.0.7.1" "a-TPInstance(1)"
diff --git a/asn1/gnm/packet-gnm-template.c b/asn1/gnm/packet-gnm-template.c
index e60ddfdfd1..d38e6a540b 100644
--- a/asn1/gnm/packet-gnm-template.c
+++ b/asn1/gnm/packet-gnm-template.c
@@ -49,7 +49,6 @@
/* Initialize the protocol and registered fields */
int proto_gnm = -1;
-static int hf_gnm_AdministrativeState = -1;
#include "packet-gnm-hf.c"
/* Initialize the subtree pointers */
@@ -71,7 +70,7 @@ dissect_gnm_attribute_ObjectInstance(tvbuff_t *tvb, packet_info *pinfo, proto_tr
}
void
-dissect_gnm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+dissect_gnm(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_)
{
/* Dymmy function */
}
@@ -81,10 +80,6 @@ void proto_register_gnm(void) {
/* List of fields */
static hf_register_info hf[] = {
- { &hf_gnm_AdministrativeState,
- { "AdministrativeState", "gnm.AdministrativeState",
- FT_UINT32, BASE_DEC, VALS(gnm_AdministrativeState_vals), 0,
- "", HFILL }},
#include "packet-gnm-hfarr.c"
};
@@ -107,6 +102,7 @@ void proto_register_gnm(void) {
/*--- 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)");