Loading 33128/r18/TS33128Payloads.asn +15 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,15 @@ DEFINITIONS IMPLICIT TAGS EXTENSIBILITY IMPLIED ::= BEGIN IMPORTS -- from ETSI TS 102 232-3 [6] IPIRIPacketReport FROM IPAccessPDU {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version17(17)}; -- end of IMPORTS -- ============= -- Relative OIDs -- ============= Loading Loading @@ -266,7 +275,10 @@ XIRIEvent ::= CHOICE -- UDM events, see clause 7.2.2.3, continued from tag 124 uDMProSeTargetIdentifierDeconcealment [159] UDMProSeTargetIdentifierDeconcealment, uDMProSeTargetAuthentication [160] UDMProSeTargetAuthentication uDMProSeTargetAuthentication [160] UDMProSeTargetAuthentication, -- IP Packet Report, see clause 6.2.3.9.5 iPIRIPacketReport [161] IPAccessPDU.IPIRIPacketReport } -- ============== Loading Loading @@ -527,6 +539,8 @@ IRIEvent ::= CHOICE -- UDM events, see clause 7.2.2.3, continued from tag 124 uDMProSeTargetIdentifierDeconcealment [159] UDMProSeTargetIdentifierDeconcealment, uDMProSeTargetAuthentication [160] UDMProSeTargetAuthentication -- Tag 161 is reserved because there is no equivalent IP Packet Report in IRIEvent. } IRITargetIdentifier ::= SEQUENCE Loading testing/asn_compile_targets.json +5 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ ["./33128/r16/TS33128IdentityAssociation.asn"], ["./33128/r17/TS33128Payloads.asn"], ["./33128/r17/TS33128IdentityAssociation.asn"], ["./33128/r18/TS33128Payloads.asn"], [ "./33128/r18/TS33128Payloads.asn", "./testing/dependencies/asn/IPAccessPDU.asn", "./testing/dependencies/asn/stubs/LI-PS-PDU.asn" ], ["./33128/r18/TS33128IdentityAssociation.asn"] ] testing/asn_lint_exceptions.json +2 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ "Tag 2 missing in LALSReport", "Tag 6 missing in LALSReport", "Tag 8 missing in MMEStartOfInterceptionWithEPSAttachedUE", "Tag 11 missing in MMEStartOfInterceptionWithEPSAttachedUE" "Tag 11 missing in MMEStartOfInterceptionWithEPSAttachedUE", "Tag 161 XIRIEvent field 'iPIRIPacketReport' is not present in IRIEvent" ] } testing/asn_process.py +40 −8 Original line number Diff line number Diff line Loading @@ -5,11 +5,28 @@ import os import json from pathlib import Path from subprocess import run from shutil import which from pycrate_asn1c.asnproc import * import lint_asn1 def reconstrainInteger (filename): Path('temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) return 'temp.asn' filesWithBigInts = [ 'testing/dependencies/asn/stubs/LI-PS-PDU.asn', 'testing/dependencies/asn/IPAccessPDU.asn' ] change_path_to_unix = False def fix_path(path): if change_path_to_unix: return "./" + path.replace("\\","/") else: return path def syntaxCheckASN(fileList): """ Loading @@ -24,20 +41,35 @@ def syntaxCheckASN(fileList): results = {} for file in fileList: try: p = run(["asn1c", "-E", str(file)], capture_output=True) if p.returncode != 0: if file.as_posix() in filesWithBigInts: newFile = reconstrainInteger(str(file)) p = run(["asn1c", '-E', fix_path(newFile)], capture_output=True) Path(newFile).unlink() else: p = run(["asn1c", '-E', fix_path(str(file))], capture_output=True) if (p.returncode != 0): errorMessage = p.stderr.decode().splitlines()[0] if errorMessage.startswith(' Value "18446744073709551615" at line'): results[str(file)] = { 'ok' : True} continue results[str(file)] = { "ok": False, "code": p.returncode, "message": p.stderr.decode().splitlines()[0], 'ok' : False, 'code' : p.returncode, 'message' : p.stderr.decode().splitlines()[0] } else: results[str(file)] = {"ok": True} results[str(file)] = { 'ok' : True } except Exception as ex: results[str(file)] = {"ok": False, "code": -1, "message": f"{ex.__class__.__qualname__}: {ex}"} raise ex results[str(file)] = { 'ok' : False, 'code' : -1, 'message' : f"{ex!r}" } return results def compileAllTargets(compileTargets): """ Attempts to compile a set of compile targets using the pycrate ASN1 tools Loading testing/dependencies/asn/.gitkeep 0 → 100644 +0 −0 Empty file added. Loading
33128/r18/TS33128Payloads.asn +15 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,15 @@ DEFINITIONS IMPLICIT TAGS EXTENSIBILITY IMPLIED ::= BEGIN IMPORTS -- from ETSI TS 102 232-3 [6] IPIRIPacketReport FROM IPAccessPDU {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version17(17)}; -- end of IMPORTS -- ============= -- Relative OIDs -- ============= Loading Loading @@ -266,7 +275,10 @@ XIRIEvent ::= CHOICE -- UDM events, see clause 7.2.2.3, continued from tag 124 uDMProSeTargetIdentifierDeconcealment [159] UDMProSeTargetIdentifierDeconcealment, uDMProSeTargetAuthentication [160] UDMProSeTargetAuthentication uDMProSeTargetAuthentication [160] UDMProSeTargetAuthentication, -- IP Packet Report, see clause 6.2.3.9.5 iPIRIPacketReport [161] IPAccessPDU.IPIRIPacketReport } -- ============== Loading Loading @@ -527,6 +539,8 @@ IRIEvent ::= CHOICE -- UDM events, see clause 7.2.2.3, continued from tag 124 uDMProSeTargetIdentifierDeconcealment [159] UDMProSeTargetIdentifierDeconcealment, uDMProSeTargetAuthentication [160] UDMProSeTargetAuthentication -- Tag 161 is reserved because there is no equivalent IP Packet Report in IRIEvent. } IRITargetIdentifier ::= SEQUENCE Loading
testing/asn_compile_targets.json +5 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ ["./33128/r16/TS33128IdentityAssociation.asn"], ["./33128/r17/TS33128Payloads.asn"], ["./33128/r17/TS33128IdentityAssociation.asn"], ["./33128/r18/TS33128Payloads.asn"], [ "./33128/r18/TS33128Payloads.asn", "./testing/dependencies/asn/IPAccessPDU.asn", "./testing/dependencies/asn/stubs/LI-PS-PDU.asn" ], ["./33128/r18/TS33128IdentityAssociation.asn"] ]
testing/asn_lint_exceptions.json +2 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ "Tag 2 missing in LALSReport", "Tag 6 missing in LALSReport", "Tag 8 missing in MMEStartOfInterceptionWithEPSAttachedUE", "Tag 11 missing in MMEStartOfInterceptionWithEPSAttachedUE" "Tag 11 missing in MMEStartOfInterceptionWithEPSAttachedUE", "Tag 161 XIRIEvent field 'iPIRIPacketReport' is not present in IRIEvent" ] }
testing/asn_process.py +40 −8 Original line number Diff line number Diff line Loading @@ -5,11 +5,28 @@ import os import json from pathlib import Path from subprocess import run from shutil import which from pycrate_asn1c.asnproc import * import lint_asn1 def reconstrainInteger (filename): Path('temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) return 'temp.asn' filesWithBigInts = [ 'testing/dependencies/asn/stubs/LI-PS-PDU.asn', 'testing/dependencies/asn/IPAccessPDU.asn' ] change_path_to_unix = False def fix_path(path): if change_path_to_unix: return "./" + path.replace("\\","/") else: return path def syntaxCheckASN(fileList): """ Loading @@ -24,20 +41,35 @@ def syntaxCheckASN(fileList): results = {} for file in fileList: try: p = run(["asn1c", "-E", str(file)], capture_output=True) if p.returncode != 0: if file.as_posix() in filesWithBigInts: newFile = reconstrainInteger(str(file)) p = run(["asn1c", '-E', fix_path(newFile)], capture_output=True) Path(newFile).unlink() else: p = run(["asn1c", '-E', fix_path(str(file))], capture_output=True) if (p.returncode != 0): errorMessage = p.stderr.decode().splitlines()[0] if errorMessage.startswith(' Value "18446744073709551615" at line'): results[str(file)] = { 'ok' : True} continue results[str(file)] = { "ok": False, "code": p.returncode, "message": p.stderr.decode().splitlines()[0], 'ok' : False, 'code' : p.returncode, 'message' : p.stderr.decode().splitlines()[0] } else: results[str(file)] = {"ok": True} results[str(file)] = { 'ok' : True } except Exception as ex: results[str(file)] = {"ok": False, "code": -1, "message": f"{ex.__class__.__qualname__}: {ex}"} raise ex results[str(file)] = { 'ok' : False, 'code' : -1, 'message' : f"{ex!r}" } return results def compileAllTargets(compileTargets): """ Attempts to compile a set of compile targets using the pycrate ASN1 tools Loading