Project

General

Profile

Feature #3862

Add support for asn1scc

Added by msuraev about 2 months ago. Updated about 2 months ago.

Status:
Rejected
Priority:
Low
Assignee:
-
Target version:
-
Start date:
03/26/2019
Due date:
% Done:

0%

Spec Reference:

Description

The asn1c which we use is problematic due to non-existent maintenance: multiple forks implementing missing features, very infrequent releases, lots of distro-specific patches etc. As a result we even have to maintain our own fork of it.

There's alternative FOSS ASN.1 compiler which is under active development: https://github.com/ttsiodras/asn1scc
With documentation available from https://www.thanassis.space/asn1.html

It might be worth investigating whether it has the necessary features and could be used as a replacement of asn1c. The possible downside of missing distro packages could be greatly outweigh if we could drop maintenance burden induced by asn1c.


Related issues

Related to OsmoHNBGW - Bug #2437: synchronize different asn1c APER forksNew2017-08-14

Related to OsmoHNBGW - Feature #2436: Test cases for asn1c APER encodingNew2017-08-14

Related to OsmoHNBGW - Bug #2435: Osmocom asn1c/libasn1c is based on old forkNew2017-08-14

History

#1 Updated by msuraev about 2 months ago

  • Related to Bug #2437: synchronize different asn1c APER forks added

#2 Updated by msuraev about 2 months ago

  • Related to Feature #2436: Test cases for asn1c APER encoding added

#3 Updated by msuraev about 2 months ago

  • Related to Bug #2435: Osmocom asn1c/libasn1c is based on old fork added

#4 Updated by laforge about 2 months ago

  • Status changed from New to Rejected
  • Priority changed from Normal to Low

asn1scc doesn't support APER (aligned PER encoding), which is used on those interfaces/protocols where we currently use it. However, it supports UPER, from which it is typically not very hard to add APER support.

There are numerous other restrictions, which make it unsuitable for 3GPP protocols:

Asn1scc will not generate code for ASN.1 grammars that
• contain SEQUENCE OFs and/or SET OFs with no SIZE constraint
• contain OCTET STRINGs and/or BIT STRINGs with no SIZE constraint
• IA5String, NumericString (and in general string types) with no SIZE constraint
• Contain extendable CHOICEs, extendable SEQUENCES or extendable enumerations.

and, most importantly:

The current version of asn1scc is also not supporting some advanced ASN.1 features such as
macros, parameterization and Information Class Objects.

For the time being, I think we're still best off with sticking to asn1c, possibly updatin to a more recent version like the one used by nextepc.

One other alternative we've been thinking about: Use proprietary ffasn1c (for which sysmocom has a license) while reimplementing the (currently proprietary) runtime library code as FOSS. ffasn1c could then run as a post-commit-hook on the git server, so if anyone ever pushes changes to the asn1 files, the C code is re-generated.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)