From b20bc9d1545f4777ca2d00e1849acb2606dabd18 Mon Sep 17 00:00:00 2001 From: grahamj Date: Mon, 1 Jul 2024 16:46:10 +0000 Subject: [PATCH 01/17] Update file urn_3GPP_ns_li_3GPPX1Extensions.xsd --- 33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd index 20a5a1d1..d29cdb25 100644 --- a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd +++ b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd @@ -201,6 +201,7 @@ + @@ -211,6 +212,25 @@ + + + + + + + + + + + + + + + + + + + @@ -219,6 +239,18 @@ + + + + + + + + + + + + -- GitLab From 6ccd21a1607b5288e66577240bd7599975b63959 Mon Sep 17 00:00:00 2001 From: grahamj Date: Mon, 1 Jul 2024 17:19:52 +0000 Subject: [PATCH 02/17] Update file urn_3GPP_ns_li_3GPPX1Extensions.xsd --- 33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd index d29cdb25..747b7faf 100644 --- a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd +++ b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd @@ -212,20 +212,20 @@ - + - + - + @@ -239,7 +239,7 @@ - + -- GitLab From 7074959bcfe92aae329787cf6d259ba41debb6bd Mon Sep 17 00:00:00 2001 From: grahamj Date: Mon, 1 Jul 2024 17:22:11 +0000 Subject: [PATCH 03/17] Update file urn_3GPP_ns_li_3GPPX1Extensions.xsd --- 33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd index 747b7faf..61d653bb 100644 --- a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd +++ b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd @@ -217,7 +217,7 @@ - + @@ -230,7 +230,7 @@ - + -- GitLab From fbe3fabb08f473fed5c3b418aa6d56bc4d28302e Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 13:43:12 +0000 Subject: [PATCH 04/17] Update file urn_3GPP_ns_li_3GPPX1Extensions.xsd --- 33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd index 61d653bb..20a5a1d1 100644 --- a/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd +++ b/33128/r18/urn_3GPP_ns_li_3GPPX1Extensions.xsd @@ -201,7 +201,6 @@ - @@ -212,25 +211,6 @@ - - - - - - - - - - - - - - - - - - - @@ -239,18 +219,6 @@ - - - - - - - - - - - - -- GitLab From 48314f88ad537f64514f13594ec7c3d1fb36ad1a Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:05:48 +0000 Subject: [PATCH 05/17] Update file TS33128Payloads.asn --- 33128/r18/TS33128Payloads.asn | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/33128/r18/TS33128Payloads.asn b/33128/r18/TS33128Payloads.asn index 0f24e992..89997b6d 100644 --- a/33128/r18/TS33128Payloads.asn +++ b/33128/r18/TS33128Payloads.asn @@ -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 -- ============= @@ -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 } -- ============== @@ -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 -- GitLab From 585bb94d96b810bff2d9009f174634a189e671ed Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:12:06 +0000 Subject: [PATCH 06/17] add asn deps directory --- testing/dependencies/asn/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testing/dependencies/asn/.gitkeep diff --git a/testing/dependencies/asn/.gitkeep b/testing/dependencies/asn/.gitkeep new file mode 100644 index 00000000..e69de29b -- GitLab From 660df8b363255069da86ccc3b0325ebb4ecbc5fd Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:12:51 +0000 Subject: [PATCH 07/17] Upload IPAccessPDU --- testing/dependencies/asn/IPAccessPDU.asn | 446 +++++++++++++++++++++++ 1 file changed, 446 insertions(+) create mode 100644 testing/dependencies/asn/IPAccessPDU.asn diff --git a/testing/dependencies/asn/IPAccessPDU.asn b/testing/dependencies/asn/IPAccessPDU.asn new file mode 100644 index 00000000..b376b34c --- /dev/null +++ b/testing/dependencies/asn/IPAccessPDU.asn @@ -0,0 +1,446 @@ +IPAccessPDU +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version18(18)} + +DEFINITIONS IMPLICIT TAGS ::= +BEGIN + +IMPORTS + -- from ETSI TS 102 232-1 [2] + IPAddress, + Location + FROM LI-PS-PDU + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version38(38)}; + + +-- ============================ +-- Object Identifier Definition +-- ============================ + +iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version18(18)} +iPIRIObjId RELATIVE-OID ::= {iPAccessPDUObjId iRI(1)} +iPCCObjId RELATIVE-OID ::= {iPAccessPDUObjId cC(2)} +iPIRIOnlyObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIOnly(3)} +iPIRIPacketReportObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIPacketReport(4)} + + -- definitions are relative to + -- {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulintercept(2)} + + +-- ========================== +-- IP Communications Contents +-- ========================== + +IPCC ::= SEQUENCE +{ + iPCCObjId [0] RELATIVE-OID, + iPCCContents [1] IPCCContents +} + +IPCCContents ::= CHOICE +{ + iPPackets [0] OCTET STRING, + ..., + iPTruncatedPacket [1] IPTruncatedPacket +} + +IPTruncatedPacket ::= SEQUENCE +{ + truncatedPacket [0] OCTET STRING, + originalLength [1] INTEGER OPTIONAL, + ... +} + +-- =================================================== +-- Intercept-related information for general IP-Access +-- =================================================== + +IPIRI ::= SEQUENCE +{ + iPIRIObjId [0] RELATIVE-OID, + iPIRIContents [1] IPIRIContents, + ... +} + +IPIRIContents ::= SEQUENCE +{ + accessEventType [0] AccessEventType, + targetUsername [1] OCTET STRING, + -- in ASCII-characters + internetAccessType [2] InternetAccessType, + iPVersion [3] IPVersion, + targetIPAddress [4] LI-PS-PDU.IPAddress OPTIONAL, + -- IP address may not be available in case of failed logon attempts. + -- If it is available, it must be sent. + -- This field will carry the first IPv4 or IPv6 target IP address with or without + -- subnet. Use of this field is fully described in section 6.2.1. + targetNetworkID [5] UTF8String (SIZE (1..20)) OPTIONAL, + -- Target network ID (e.g. MAC address, PSTN number) + targetCPEID [6] UTF8String (SIZE (1..128)) OPTIONAL, + -- CPEID (e.g. Relay Agent info, computer name) + targetLocation [7] UTF8String (SIZE (1..64)) OPTIONAL, + -- When internetAccessType is Wireless LAN, this field should contain a string which + -- uniquely identifies the wireless accesspoint within the SvP domain + -- New implementations are encouraged to use the location [24] parameter where possible. + pOPPortNumber [8] INTEGER (0..4294967295) OPTIONAL, + -- The POP port number used by the target + callBackNumber [9] UTF8String (SIZE (1..20)) OPTIONAL, + -- The number used to call-back the target + startTime [10] GeneralizedTime OPTIONAL, + -- The start date-time of the session or lease + endTime [11] GeneralizedTime OPTIONAL, + -- The actual end date-time of the session or lease + endReason [12] EndReason OPTIONAL, + -- The reason for the session to end + octetsReceived [13] INTEGER (0..18446744073709551615) OPTIONAL, + -- The number of octets the target received + octetsTransmitted [14] INTEGER (0..18446744073709551615) OPTIONAL, + -- The number of octets the target transmitted + rawAAAData [15] OCTET STRING OPTIONAL, + -- Content of the raw AAA record + ..., + expectedEndTime [16] GeneralizedTime OPTIONAL, + -- The expected end date-time of the session or lease + pOPPhoneNumber [17] UTF8String (SIZE (1..20)) OPTIONAL, + -- The phone number dialed by the target for dial-up + pOPIdentifier [18] IPIRIIDType OPTIONAL, + -- The identifier or name of the POP + pOPIPAddress [19] LI-PS-PDU.IPAddress OPTIONAL, + -- The IP address of the POP + nationalIPIRIParameters [20] NationalIPIRIParameters OPTIONAL, + -- National IP IRI Parameters + additionalIPAddress [21] LI-PS-PDU.IPAddress OPTIONAL, + -- This field will carry the first IPv6 target IP address with or without prefix when the + -- iPVersion parameter is set to iPV4andV6. + -- Use of this field is fully described in section 6.2.1 + authenticationType [22] AuthenticationType OPTIONAL, + -- Field used to identify the authentication type to assist with LEMF data validation + otherTargetIdentifiers [23] SEQUENCE OF OtherTargetIdentifiers OPTIONAL, + -- This parameter will carry the second and subsequent IPv4 or IPv6 target IP addresses + -- It is used when multiple subnet/prefix ranges are assigned to a target service. + -- Use of this field is fully described in section 6.2.1 + location [24] LI-PS-PDU.Location OPTIONAL, + -- The location associated with the target + pOPPortID [25] OCTET STRING OPTIONAL, + -- This field will carry the NAS-Port-ID as defined in RFC 2869 [17]: + -- This parameter shall be populated with the RADIUS value. + framedRoutes [26] SEQUENCE OF FramedRoute OPTIONAL + -- It is used to list all the available Framed Route and Framed IPv6 Route information + + +} + +AccessEventType ::= ENUMERATED +{ + accessAttempt(0), + -- A target requests access to the IAS + accessAccept(1), + -- IAS access is granted to the target, the session begins + accessReject(2), + -- IAS access is refused to the target + accessFailed(3), + -- The accessAttempt timed-out or failed otherwise + sessionStart(4), + -- A target starts using the IAS; not in use anymore from version 4(4) + sessionEnd(5), + -- A target stops using the IAS; not in use anymore from version 4(4) + interimUpdate(6), + -- Intermediate status report on service status or usage + ..., + startOfInterceptionWithSessionActive(7), + -- LI is started on a target who already has an active session + accessEnd(8), + -- A target stops using the IAS, the session ends + endOfInterceptionWithSessionActive(9), + -- LI is ended on a target who still has an active session + unknown(10) +} + +InternetAccessType ::= ENUMERATED +{ + undefined(0), + dialUp(1), + -- IAS via DialUp access + xDSL(2), + -- IAS via DSL access + cableModem(3), + -- IAS via Cable access + lAN(4), + -- IAS via LAN access + ..., + wirelessLAN(5), + -- IAS via Wireless LAN access + fTTx(6), + -- IAS via Fiber access + wIMAX-HIPERMAN(7), + -- IAS via WIMAX/HIPERMAN (fixed access) + satellite(8), + -- IAS via Satellite access + -- (when it is not covered by any 3GPP or ETSI mobile Lawful Interception specifications) + wireless-other(9) + -- IAS via other type of Wireless access + -- (when it is not covered by any 3GPP or ETSI mobile Lawful Interception specifications) +} + +IPVersion ::= ENUMERATED +{ + iPV4(1), + -- The IPv4 protocol is used + iPV6(2), + -- The IPv6 protocol is used + iPV4andV6(3), + -- The IPv4 and IPv6 protocols are used + ... +} + +EndReason ::= ENUMERATED +{ + undefined(0), + regularLogoff(1), + -- The target logged off + connectionLoss(2), + -- The connection was lost + connectionTimeout(3), + -- The connection timed-out + leaseExpired(4), + -- The DHCP lease expired + ... +} + +IPIRIIDType ::= CHOICE +{ + printableIDType [0] UTF8String (SIZE (1..128)), + -- For printable userIDs, such as the Radius username, phonenumbers + macAddressType [1] OCTET STRING (SIZE (6)), + -- For MAC address types, raw binary format as in RFC 2132 [15] + ipAddressType [2] LI-PS-PDU.IPAddress, + -- For IP address types + ... +} + +NationalIPIRIParameters ::= SEQUENCE +{ + countryCode [1] PrintableString (SIZE (2)), + -- Country Code according to ISO 3166-1 [16], + -- the country to which the parameters inserted after the extension marker apply. + ... + -- In case a given country wants to use additional national parameters according to its law, + -- these national parameters should be defined using the ASN.1 syntax and added after the + -- extension marker (...). + -- It is recommended that "version parameter" and "vendor identification parameter" are + -- included in the national parameters definition. Vendor identifications can be + -- retrieved from the IANA web site (see Annex E Bibliography). Besides, it is recommended + -- to avoid using tags from 240 to 255 in a formal type definition. +} + +AuthenticationType ::= ENUMERATED +{ + unknown(0), + -- AAA function for the target service is unknown + static(1), + -- The target service is assigned a static IP address & no AAA expected + radiusAAA(2), + -- AAA function for the target service is provided by RADIUS + dhcpAAA(3), + -- AAA function for the target service is provided by DHCP + diameterAAA(4), + -- AAA function for the target service is provided by DIAMETER + ... +} + +OtherTargetIdentifiers ::= CHOICE +{ + -- Additional target identifiers associated with the target service + -- This list is extensible to accommodate other target identifiers which + -- may be required in future. + iPAddress [0] LI-PS-PDU.IPAddress, + -- IPAddress imported from TS 102 232 [2]. + -- This can be an IPv4 address (with or without a subnet range defined) or + -- an IPv6 address (with or without a prefix range defined). + ... +} + +FramedRoute ::= CHOICE +{ + -- Additional Framed Route prefix information associated with the target service + + framedRoute [0] OCTET STRING, + -- This could contain an IPv4 as well as IPv6 FramedRoute information + -- including additional information such Gateway address and + -- one or more metrics in texual format. + -- This parameter shall be populated with the RADIUS value. + ... +} + +-- ===================================================== +-- Intercept-related information for IRI-Only intercepts +-- ===================================================== + +-- The PDHR and PDSR mechanisms have been superseded by +-- the IPPR mechanism which is defined in clause 6.2.5. +-- New implementations should use the IPPR mechanism. + +IPIRIOnly ::= SEQUENCE +{ + iPIRIOnlyObjId [0] RELATIVE-OID, + iPInformation [1] IPInformation, + protocolInformation [2] ProtocolInformation, + iPAggregatedNbrOfPackets [3] INTEGER OPTIONAL, + iPAggregatedNbrOfBytes [4] INTEGER OPTIONAL, + ..., + pDSRInformation [5] PDSRInformation OPTIONAL +} + +IPInformation ::= CHOICE +{ + iPv4Information [0] IPv4Information, + iPv6Information [1] IPv6Information +} + +ProtocolInformation ::= CHOICE +{ + none [0] NULL, + -- No layer 4 protocol information is provided + tCPInformation [1] TCPInformation, + uDPInformation [2] UDPInformation, + ... +} + +IPv4Information ::= SEQUENCE +{ + headerLength [0] OCTET STRING OPTIONAL, + typeOfService [1] OCTET STRING OPTIONAL, + totalLength [2] OCTET STRING (SIZE (2))OPTIONAL, + identification [3] OCTET STRING (SIZE (2))OPTIONAL, + fragment [4] OCTET STRING (SIZE (2))OPTIONAL, + ttl [5] OCTET STRING OPTIONAL, + protocol [6] OCTET STRING OPTIONAL, + headerChecksum [7] OCTET STRING (SIZE (2))OPTIONAL, + source [8] OCTET STRING (SIZE (4)), + destination [9] OCTET STRING (SIZE (4)), + options [10] OCTET STRING (SIZE (0..40))OPTIONAL +} + +IPv6Information ::= SEQUENCE +{ + trafficClass [0] OCTET STRING OPTIONAL, + flowLabel [1] OCTET STRING (SIZE (20))OPTIONAL, + payloadLength [2] OCTET STRING (SIZE (4))OPTIONAL, + nextHeader [3] OCTET STRING OPTIONAL, + hopLimit [4] OCTET STRING OPTIONAL, + source [5] OCTET STRING (SIZE (16)), + destination [6] OCTET STRING (SIZE (16)) +} + +TCPInformation ::= SEQUENCE +{ + sourcePort [0] OCTET STRING (SIZE (2))OPTIONAL, + destinationPort [1] OCTET STRING (SIZE (2))OPTIONAL, + sequenceNumber [2] OCTET STRING (SIZE (4))OPTIONAL, + ackNumber [3] OCTET STRING (SIZE (4))OPTIONAL, + dataOffset [4] BIT STRING (SIZE (4))OPTIONAL, + -- First 4 bits + controlBits [5] BIT STRING (SIZE (6))OPTIONAL, + -- Last 6 bits + windowSize [6] OCTET STRING (SIZE (2))OPTIONAL, + checkSum [7] OCTET STRING (SIZE (2))OPTIONAL, + urgentPointer [8] OCTET STRING (SIZE (2))OPTIONAL, + options [9] OCTET STRING (SIZE (0..40))OPTIONAL +} + +UDPInformation ::= SEQUENCE +{ + sourcePort [0] OCTET STRING (SIZE (2))OPTIONAL, + destinationPort [1] OCTET STRING (SIZE (2))OPTIONAL, + length [2] OCTET STRING (SIZE (2))OPTIONAL, + checkSum [3] OCTET STRING (SIZE (2))OPTIONAL +} + +PDSRInformation::= SEQUENCE +{ + summaryTrigger [0] PDSRSummaryTrigger, + firstPacketTimestamp [1] GeneralizedTime, + lastPacketTimestamp [2] GeneralizedTime, + packetCount [3] INTEGER, + byteCount [4] INTEGER, + ... +} + +PDSRSummaryTrigger ::= ENUMERATED +{ + startOfFlow(0), + timerExpiry(1), + packetCount(2), + byteCount(3), + endOfFlow(4), + ... +} + +-- =================================================== +-- Intercept-related information for IP Packet Reports +-- =================================================== + +IPIRIPacketReport ::= SEQUENCE +{ + iPIRIPacketReportObjId [0] RELATIVE-OID, + report [1] PacketReport, + ... +} + +PacketReport ::= CHOICE +{ + header [1] PacketReportHeader, + summary [2] PacketReportSummary, + ... +} + +PacketReportHeader ::= SEQUENCE +{ + header [1] OCTET STRING, + ... +} + +PacketReportSummary ::= SEQUENCE +{ + header [1] OCTET STRING, + indications [2] PacketReportIndications, + trigger [3] PacketReportTrigger, + packetCount [4] INTEGER OPTIONAL, + byteCount [5] INTEGER OPTIONAL, + firstTimestamp [6] GeneralizedTime OPTIONAL, + lastTimestamp [7] GeneralizedTime OPTIONAL, + ... +} + +PacketReportTrigger ::= ENUMERATED +{ + flowStart(1), + flowEnd(2), + flowTimeout(3), + flowTimerExpiration(4), + flowPacketCount(5), + flowByteCount(6), + sessionTimerExpiration(7), + sessionPacketCount(8), + sessionByteCount(9), + reportEnd(10), + ... +} + +PacketReportIndications ::= BIT STRING +{ + zeroedIPv4TotalLength(0), + zeroedIPv4Flags(1), + zeroedIPv4TimeToLive(2), + zeroedIPv4HeaderChecksum(3), + zeroedIPv6PayloadLength(4), + removedIPv6ExtensionHeaders(5), + zeroedTCPSequenceNumber(6), + zeroedTCPAcknowledgementNumber(7), + zeroedTCPFlags(8), + zeroedTCPWindowSize(9), + zeroedTCPChecksum(10), + zeroedUDPLength(11), + zeroedUDPChecksum(12) +} + +END -- end of IPAccessPDU -- GitLab From f4f18e56682c0f9c311906ad0ab4d51c8bf248bd Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:28:59 +0000 Subject: [PATCH 08/17] Add new directory --- testing/dependencies/asn/stubs/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testing/dependencies/asn/stubs/.gitkeep diff --git a/testing/dependencies/asn/stubs/.gitkeep b/testing/dependencies/asn/stubs/.gitkeep new file mode 100644 index 00000000..e69de29b -- GitLab From 804eba3228c08cd5f94a8b1ddd518aab0a01e3d4 Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:31:33 +0000 Subject: [PATCH 09/17] Stub LI-PS-PDU --- testing/dependencies/asn/stubs/LI-PS-PDU.asn | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 testing/dependencies/asn/stubs/LI-PS-PDU.asn diff --git a/testing/dependencies/asn/stubs/LI-PS-PDU.asn b/testing/dependencies/asn/stubs/LI-PS-PDU.asn new file mode 100644 index 00000000..5840dadb --- /dev/null +++ b/testing/dependencies/asn/stubs/LI-PS-PDU.asn @@ -0,0 +1,12 @@ +LI-PS-PDU +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version38(38)} + +DEFINITIONS IMPLICIT TAGS ::= + +BEGIN + + IPAddress::=NULL + Location::=NULL + + +END -- GitLab From 64105aec3d8596615332cdbcc894ea527a2023dc Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:35:55 +0000 Subject: [PATCH 10/17] Update file asn_compile_targets.json --- testing/asn_compile_targets.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/asn_compile_targets.json b/testing/asn_compile_targets.json index 989c81de..eca4254a 100644 --- a/testing/asn_compile_targets.json +++ b/testing/asn_compile_targets.json @@ -1,5 +1,9 @@ [ - ["./33128/r15/TS33128Payloads.asn"], + [ + "./33128/r15/TS33128Payloads.asn", + "./testing/dependencies/asn/IPAccessPDU.asn", + "./testing/dependencies/asn/stubs/LI-PS-PDU.asn" + ], ["./33128/r16/TS33128Payloads.asn"], ["./33128/r16/TS33128IdentityAssociation.asn"], ["./33128/r17/TS33128Payloads.asn"], -- GitLab From 6d5767f2518a2e5b37bdacbf92d7ec1bb3025729 Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:42:02 +0000 Subject: [PATCH 11/17] Update file asn_process.py --- testing/asn_process.py | 49 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/testing/asn_process.py b/testing/asn_process.py index 08079144..db3ce651 100755 --- a/testing/asn_process.py +++ b/testing/asn_process.py @@ -10,6 +10,24 @@ 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 = [ + '102232-1/LI-PS-PDU.asn', + '102232-3/IPAccessPDU.asn', + '102232-4/L2AccessPDU.asn' +] + +asn1c_path = "" +change_path_to_unix = False + +def fix_path(path): + if change_path_to_unix: + return "./" + path.replace("\\","/") + else: + return path def syntaxCheckASN(fileList): """ @@ -24,20 +42,37 @@ 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_path, '-E', fix_path(newFile)], capture_output=True) + Path(newFile).unlink() + else: + p = run([asn1c_path, '-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 -- GitLab From fd13613e7a0fc740bede592f419b10fdcfda89f6 Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:44:46 +0000 Subject: [PATCH 12/17] Update 2 files - /testing/asn_process.py - /testing/asn_compile_targets.json --- testing/asn_compile_targets.json | 12 ++++++------ testing/asn_process.py | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/testing/asn_compile_targets.json b/testing/asn_compile_targets.json index eca4254a..4de6e01f 100644 --- a/testing/asn_compile_targets.json +++ b/testing/asn_compile_targets.json @@ -1,13 +1,13 @@ [ - [ - "./33128/r15/TS33128Payloads.asn", - "./testing/dependencies/asn/IPAccessPDU.asn", - "./testing/dependencies/asn/stubs/LI-PS-PDU.asn" - ], + ["./33128/r15/TS33128Payloads.asn"], ["./33128/r16/TS33128Payloads.asn"], ["./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"] ] diff --git a/testing/asn_process.py b/testing/asn_process.py index db3ce651..2edd79cd 100755 --- a/testing/asn_process.py +++ b/testing/asn_process.py @@ -71,8 +71,6 @@ def syntaxCheckASN(fileList): } return results - - def compileAllTargets(compileTargets): """ Attempts to compile a set of compile targets using the pycrate ASN1 tools -- GitLab From be831a3cb9f92eefece75af4a869320da9ea2bb0 Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:49:59 +0000 Subject: [PATCH 13/17] Update file asn_process.py --- testing/asn_process.py | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/asn_process.py b/testing/asn_process.py index 2edd79cd..cdd3a777 100755 --- a/testing/asn_process.py +++ b/testing/asn_process.py @@ -5,6 +5,7 @@ import os import json from pathlib import Path from subprocess import run +from shutil import which from pycrate_asn1c.asnproc import * -- GitLab From 1b9ab96d932404928a1459934c6cd92cdaa3618e Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:55:45 +0000 Subject: [PATCH 14/17] Update file asn_process.py --- testing/asn_process.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/testing/asn_process.py b/testing/asn_process.py index cdd3a777..c2c9f6b9 100755 --- a/testing/asn_process.py +++ b/testing/asn_process.py @@ -16,12 +16,10 @@ def reconstrainInteger (filename): return 'temp.asn' filesWithBigInts = [ - '102232-1/LI-PS-PDU.asn', - '102232-3/IPAccessPDU.asn', - '102232-4/L2AccessPDU.asn' + 'testing/dependencies/asn/stubs/LI-PS-PDU.asn', + 'testing/dependencies/asn/IPAccessPDU.asn' ] -asn1c_path = "" change_path_to_unix = False def fix_path(path): @@ -45,10 +43,10 @@ def syntaxCheckASN(fileList): try: if file.as_posix() in filesWithBigInts: newFile = reconstrainInteger(str(file)) - p = run([asn1c_path, '-E', fix_path(newFile)], capture_output=True) + p = run([asn1c, '-E', fix_path(newFile)], capture_output=True) Path(newFile).unlink() else: - p = run([asn1c_path, '-E', fix_path(str(file))], capture_output=True) + 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'): -- GitLab From c7d00f6498262c63f31a0b08ca2995d26995ae86 Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:57:46 +0000 Subject: [PATCH 15/17] Update file asn_process.py --- testing/asn_process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/asn_process.py b/testing/asn_process.py index c2c9f6b9..2116eb3c 100755 --- a/testing/asn_process.py +++ b/testing/asn_process.py @@ -43,10 +43,10 @@ def syntaxCheckASN(fileList): try: if file.as_posix() in filesWithBigInts: newFile = reconstrainInteger(str(file)) - p = run([asn1c, '-E', fix_path(newFile)], capture_output=True) + 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) + 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'): -- GitLab From 12bbf94e99712762f475be6467624ab72470729a Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 14:59:35 +0000 Subject: [PATCH 16/17] Update file TS33128Payloads.asn --- 33128/r18/TS33128Payloads.asn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/33128/r18/TS33128Payloads.asn b/33128/r18/TS33128Payloads.asn index 89997b6d..baf3bce4 100644 --- a/33128/r18/TS33128Payloads.asn +++ b/33128/r18/TS33128Payloads.asn @@ -10,7 +10,7 @@ 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)} + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version17(17)}; -- end of IMPORTS -- GitLab From 11d6751ab8f59ecded1dffc7aac39902e50992fe Mon Sep 17 00:00:00 2001 From: grahamj Date: Thu, 11 Jul 2024 15:02:29 +0000 Subject: [PATCH 17/17] Update file asn_lint_exceptions.json --- testing/asn_lint_exceptions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/asn_lint_exceptions.json b/testing/asn_lint_exceptions.json index b2d9c288..9065fc6f 100644 --- a/testing/asn_lint_exceptions.json +++ b/testing/asn_lint_exceptions.json @@ -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" ] } -- GitLab