Commit Graph

19 Commits

Author SHA1 Message Date
Harald Welte c371a42938 RANAP-PDU-Contents: fix syntax error regarding InitialUE-Message
With that syntax error, the RAC was not treated as a possible IE
in the InitialUE-Message, causing decoder failure.
2015-12-27 11:03:44 +01:00
Harald Welte c89c2a6e6a RANAP: Replace the last remainng TBCD-STRING with OCTET STRING
in order to work around a bug in asn1c.  When we keep the original
TBCD-STRING, the APER-encoded PLMNidentity always has an extra leading
length byte that the decoder doesn't expect.
2015-12-24 14:07:05 +01:00
Neels Hofmeyr 8aac21a5e8 Remove obsolete ffasn1c files.
The ffasn1c files from early trials are obsolete, we're using asn1c now.
2015-12-22 13:02:42 +01:00
Harald Welte b2daa0d803 ranap ASN.1: Define IMSI as OCTET STRING to work around asn1c bug
When IMSI is a TBCD-STRING type, and TBCD-STRING is defined as OCTET
STRING, we end up encoding the IMSI the wrong way.  I don't knwo why
that is, but changing it fixed the problem, as described below:

before this commit:
00 17                           PeranentNAS-UE-ID
40                              criticality ignore
0a                              (length)
00                              presence = IMSI
08                              BUG: why the additional length field?
46 23 91 34 70 77 80 f3         IMSI (643219430777083)

after this commit:
00 17                           PeranentNAS-UE-ID
40                              criticality ignore
09                              (length)
50                              presence = IMSI
46 23 91 34 70 77 80 f3         IMSI (643219430777083)
2015-12-19 13:05:19 +01:00
Harald Welte b7f67c4b14 ranap: Don't forget ProtocolIE-CointainerPair around ProtocolIE-FieldPair 2015-12-19 02:37:35 +01:00
Harald Welte 93690184b0 RANAP: Split FormatInformationParameter / SDUParameterItem
The definition of the above data types as per 3GPP specs results in a
SEQUENCE_OF() an anonymous structure, which is slightly inconvenient to
use.  So let's split the SEQUENCE OF part and the actual definition of
the item in separate types.
2015-12-18 13:35:58 +01:00
Harald Welte 49695572ba One further RANAP hacking session
This is not development, it is random trial and error hacking.  I really
hate the fact that we have no useful asn.1 code generator and need to
work with hacks like asn1tostruct.py and asn1c without information
object classes :/

This commit is a one-day-long iteration of trial+error, manually editing
and adding the .asn source of RANAP until we get something that in the
end at least compiles and links.  Do I trust the resulting code? No.
But we have no alternative :(
2015-12-16 17:26:05 +01:00
Harald Welte 1989913ba2 RANAP: Add more types/IEs to RANAP-PDU.asn and re-generate C
As asn1c cannot understand information object classes, we cannot compile
RANAP-PDU-Contents.asn but instead need to manually add the respective
infrmation elements to RANAP-PDU.asn.
2015-12-16 13:15:02 +01:00
Harald Welte 6289cc6248 remove obsolete asn1c makefiles in the asn1c/ hierarchy
we are generating the code locally in src/{ranap,rua,hnbap}
2015-09-11 00:17:07 +02:00
Harald Welte ac9c024432 ranap: Add more manual definitions to RANAP-PDUs
It seems that individual IEs contain nested containers, and
asn1c is not generating code for that unless we help it by some
hand-crafted additional definitions. *sigh*
2015-09-10 21:18:16 +02:00
Harald Welte 8d6026742f generate ASN.1 structures for each message withotu iformation object class
this is done semi-automatically using the asn1msgs.pl script.
2015-08-30 19:57:43 +02:00
Harald Welte 96ec96e3b4 asn1 syntax fixup for ffasn1c 2015-08-30 19:10:58 +02:00
Harald Welte 3bd59c9d59 Add Procedure Codes and IEI constants to CommonDataTypes
... this is what's required for asn1c to generate nice C language
enums for it.  Conversion was performed semi-automatically by use
of asn1enum.pl
2015-08-30 19:09:55 +02:00
Harald Welte f24cabee15 RANAP: Further qualify Constants. They're not just integer 2015-08-30 19:03:57 +02:00
Harald Welte 4f119e58e9 RANAP 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.
2015-08-30 17:46:03 +02:00
Harald Welte ac0435b691 fixup ffasn1 2015-08-30 12:19:54 +02:00
Harald Welte 1458c09583 give asn1c generated files more useful names 2015-08-30 11:51:06 +02:00
Harald Welte c0e8e5c567 add ffasn1c generated code for HNBAP, RANAP and RUA 2015-08-29 20:34:21 +02:00
Harald Welte 8f2fb0cca5 Import RANAP from 3GPP TS 25.413 V12.4.0 (2015-03) 2015-08-29 12:19:42 +02:00