aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-08-30 17:46:36 +0200
committerHarald Welte <laforge@gnumonks.org>2015-08-30 17:46:36 +0200
commitba404f9e482ea857f236f09e0debdbeb963a8973 (patch)
treed0650e9d290872eb231f4e89f9c3ca2787262459 /asn1
parent4f119e58e989249191d2b0b91916cb3dcbc419bf (diff)
RUA ASN.1 Rewrite to avoid information object classes
If we avoid using Information Object Classes in the IE definitions (which are only used for Extension Containers), then we can compile the ASN.1 source using Lev Walkin's asn1c.
Diffstat (limited to 'asn1')
-rw-r--r--asn1/rua/RUA-IEs.asn20
-rw-r--r--asn1/rua/RUA-PDU.asn51
-rw-r--r--asn1/rua/asn1c/Makefile6
3 files changed, 63 insertions, 14 deletions
diff --git a/asn1/rua/RUA-IEs.asn b/asn1/rua/RUA-IEs.asn
index ca594b8..1e43580 100644
--- a/asn1/rua/RUA-IEs.asn
+++ b/asn1/rua/RUA-IEs.asn
@@ -16,16 +16,17 @@ IMPORTS
maxNrOfErrors
FROM RUA-Constants
+ maxProtocolExtensions,
Criticality,
ProcedureCode,
ProtocolIE-ID,
TriggeringMessage
FROM RUA-CommonDataTypes
- ProtocolExtensionContainer{},
- RUA-PROTOCOL-EXTENSION
-FROM RUA-Containers;
+ IE
+FROM RUA-PDU;
+IE-Extensions ::= SEQUENCE (SIZE (1..maxProtocolExtensions)) OF IE
CN-DomainIndicator ::= ENUMERATED {
cs-domain,
@@ -160,7 +161,7 @@ CriticalityDiagnostics ::= SEQUENCE {
triggeringMessage TriggeringMessage OPTIONAL,
procedureCriticality Criticality OPTIONAL,
iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL,
- iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-ExtIEs} } OPTIONAL,
+ iE-Extensions IE-Extensions OPTIONAL,
...
}
@@ -169,19 +170,10 @@ CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..maxNrOfErrors)) OF
iECriticality Criticality,
iE-ID ProtocolIE-ID,
typeOfError TypeOfError,
- iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-IE-List-ExtIEs} } OPTIONAL,
+ iE-Extensions IE-Extensions OPTIONAL,
...
}
-CriticalityDiagnostics-IE-List-ExtIEs RUA-PROTOCOL-EXTENSION ::= {
- ...
-}
-
-CriticalityDiagnostics-ExtIEs RUA-PROTOCOL-EXTENSION ::= {
- ...
-}
-
-
TypeOfError ::= ENUMERATED {
not-understood,
missing,
diff --git a/asn1/rua/RUA-PDU.asn b/asn1/rua/RUA-PDU.asn
new file mode 100644
index 0000000..5f88c0d
--- /dev/null
+++ b/asn1/rua/RUA-PDU.asn
@@ -0,0 +1,51 @@
+RUA-PDU {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
+umts-Access (20) modules (3) rua(5) version1 (1) rUA-PDU (255) }
+
+DEFINITIONS AUTOMATIC TAGS ::=
+
+BEGIN
+
+IMPORTS
+ Criticality,
+ ProcedureCode,
+ ProtocolIE-ID
+
+FROM RUA-CommonDataTypes
+
+ maxProtocolIEs
+
+FROM RUAP-Constants;
+
+RUA-PDU ::= CHOICE {
+ initiatingMessage InitiatingMessage,
+ successfulOutcome SuccessfulOutcome,
+ unsuccessfulOutcome UnsuccessfulOutcome,
+ ...
+}
+
+InitiatingMessage ::= SEQUENCE {
+ procedureCode ProcedureCode,
+ criticality Criticality,
+ value ANY
+}
+
+SuccessfulOutcome ::= SEQUENCE {
+ procedureCode ProcedureCode,
+ criticality Criticality,
+ value ANY
+}
+
+UnsuccessfulOutcome ::= SEQUENCE {
+ procedureCode ProcedureCode,
+ criticality Criticality,
+ value ANY
+}
+
+IE ::= SEQUENCE {
+ id ProtocolIE-ID,
+ criticality Criticality,
+ value ANY
+}
+
+END
diff --git a/asn1/rua/asn1c/Makefile b/asn1/rua/asn1c/Makefile
new file mode 100644
index 0000000..3a7689b
--- /dev/null
+++ b/asn1/rua/asn1c/Makefile
@@ -0,0 +1,6 @@
+MOD=RUA
+
+ASNS=../$(MOD)-CommonDataTypes.asn ../$(MOD)-Constants.asn ../$(MOD)-IEs.asn ../$(MOD)-PDU.asn
+
+all: $(ASNS)
+ asn1c -gen-PER -fnative-types -fskeletons-copy $^