├── mts-asn1-per
├── src
│ ├── test
│ │ ├── resources
│ │ │ ├── data
│ │ │ │ ├── sample
│ │ │ │ │ ├── sample.hex
│ │ │ │ │ ├── sample.bin
│ │ │ │ │ ├── sample.json
│ │ │ │ │ └── sample.xml
│ │ │ │ └── S1AP
│ │ │ │ │ ├── eNodeB_Setup
│ │ │ │ │ ├── S1SetupResponse
│ │ │ │ │ │ ├── S1SetupResponse.hex
│ │ │ │ │ │ ├── S1SetupResponse.bin
│ │ │ │ │ │ ├── S1SetupResponse.json
│ │ │ │ │ │ └── S1SetupResponse.xml
│ │ │ │ │ └── S1SetupRequest
│ │ │ │ │ │ ├── S1SetupRequest.hex
│ │ │ │ │ │ ├── S1SetupRequest.bin
│ │ │ │ │ │ ├── S1SetupRequest.json
│ │ │ │ │ │ └── S1SetupRequest.xml
│ │ │ │ │ ├── id-E-RABModify
│ │ │ │ │ ├── E-RABModifyResponse
│ │ │ │ │ │ ├── E-RABModifyResponse.hex
│ │ │ │ │ │ ├── E-RABModifyResponse.bin
│ │ │ │ │ │ ├── E-RABModifyResponse.json
│ │ │ │ │ │ └── E-RABModifyResponse.xml
│ │ │ │ │ └── E-RABModifyRequest
│ │ │ │ │ │ ├── E-RABModifyRequest.bin
│ │ │ │ │ │ ├── E-RABModifyRequest.hex
│ │ │ │ │ │ └── E-RABModifyRequest.json
│ │ │ │ │ ├── weird_imsi_structure
│ │ │ │ │ ├── UEContextReleaseCommand
│ │ │ │ │ │ ├── UEContextReleaseCommand.hex
│ │ │ │ │ │ ├── UEContextReleaseCommand.bin
│ │ │ │ │ │ ├── UEContextReleaseCommand.json
│ │ │ │ │ │ └── UEContextReleaseCommand.xml
│ │ │ │ │ ├── UEContextReleaseCommand2
│ │ │ │ │ │ ├── UEContextReleaseCommand2.hex
│ │ │ │ │ │ ├── UEContextReleaseCommand2.bin
│ │ │ │ │ │ ├── UEContextReleaseCommand2.json
│ │ │ │ │ │ └── UEContextReleaseCommand2.xml
│ │ │ │ │ ├── UEContextReleaseCommand3
│ │ │ │ │ │ ├── UEContextReleaseCommand3.hex
│ │ │ │ │ │ ├── UEContextReleaseCommand3.bin
│ │ │ │ │ │ ├── UEContextReleaseCommand3.json
│ │ │ │ │ │ └── UEContextReleaseCommand3.xml
│ │ │ │ │ ├── UEContextReleaseComplete
│ │ │ │ │ │ ├── UEContextReleaseComplete.hex
│ │ │ │ │ │ ├── UEContextReleaseComplete.bin
│ │ │ │ │ │ ├── UEContextReleaseComplete.json
│ │ │ │ │ │ └── UEContextReleaseComplete.xml
│ │ │ │ │ ├── UEContextReleaseComplete2
│ │ │ │ │ │ ├── UEContextReleaseComplete2.hex
│ │ │ │ │ │ ├── UEContextReleaseComplete2.bin
│ │ │ │ │ │ ├── UEContextReleaseComplete2.json
│ │ │ │ │ │ └── UEContextReleaseComplete2.xml
│ │ │ │ │ ├── UEContextReleaseComplete3
│ │ │ │ │ │ ├── UEContextReleaseComplete3.hex
│ │ │ │ │ │ ├── UEContextReleaseComplete3.bin
│ │ │ │ │ │ ├── UEContextReleaseComplete3.json
│ │ │ │ │ │ └── UEContextReleaseComplete3.xml
│ │ │ │ │ ├── DownlinkNASTransport
│ │ │ │ │ │ ├── DownlinkNASTransport.hex
│ │ │ │ │ │ ├── DownlinkNASTransport.bin
│ │ │ │ │ │ ├── DownlinkNASTransport.json
│ │ │ │ │ │ └── DownlinkNASTransport.xml
│ │ │ │ │ ├── DownlinkNASTransport2
│ │ │ │ │ │ ├── DownlinkNASTransport2.hex
│ │ │ │ │ │ ├── DownlinkNASTransport2.bin
│ │ │ │ │ │ ├── DownlinkNASTransport2.json
│ │ │ │ │ │ └── DownlinkNASTransport2.xml
│ │ │ │ │ ├── DownlinkNASTransport3
│ │ │ │ │ │ ├── DownlinkNASTransport3.hex
│ │ │ │ │ │ ├── DownlinkNASTransport3.bin
│ │ │ │ │ │ ├── DownlinkNASTransport3.json
│ │ │ │ │ │ └── DownlinkNASTransport3.xml
│ │ │ │ │ ├── InitialUEMessage
│ │ │ │ │ │ ├── InitialUEMessage.bin
│ │ │ │ │ │ ├── InitialUEMessage.hex
│ │ │ │ │ │ ├── InitialUEMessage.json
│ │ │ │ │ │ └── InitialUEMessage.xml
│ │ │ │ │ ├── InitialUEMessage2
│ │ │ │ │ │ ├── InitialUEMessage2.bin
│ │ │ │ │ │ ├── InitialUEMessage2.hex
│ │ │ │ │ │ ├── InitialUEMessage2.json
│ │ │ │ │ │ └── InitialUEMessage2.xml
│ │ │ │ │ └── InitialUEMessage3
│ │ │ │ │ │ ├── InitialUEMessage3.bin
│ │ │ │ │ │ ├── InitialUEMessage3.hex
│ │ │ │ │ │ ├── InitialUEMessage3.json
│ │ │ │ │ │ └── InitialUEMessage3.xml
│ │ │ │ │ ├── InitialContextSetup
│ │ │ │ │ ├── InitialContextSetupResponse
│ │ │ │ │ │ ├── S1AP-2.hex
│ │ │ │ │ │ ├── S1AP-2.bin
│ │ │ │ │ │ ├── S1AP-2.json
│ │ │ │ │ │ └── S1AP-2.xml
│ │ │ │ │ └── InitialContextSetupRequest
│ │ │ │ │ │ ├── S1AP-1.bin
│ │ │ │ │ │ ├── S1AP-1.hex
│ │ │ │ │ │ └── S1AP-1.json
│ │ │ │ │ └── auth_w_sync_failure
│ │ │ │ │ ├── UplinkNASTransport2
│ │ │ │ │ ├── UplinkNASTransport2.hex
│ │ │ │ │ ├── UplinkNASTransport2.bin
│ │ │ │ │ ├── UplinkNASTransport2.json
│ │ │ │ │ └── UplinkNASTransport2.xml
│ │ │ │ │ ├── DownlinkNASTransport
│ │ │ │ │ ├── DownlinkNASTransport.hex
│ │ │ │ │ ├── DownlinkNASTransport.bin
│ │ │ │ │ ├── DownlinkNASTransport.json
│ │ │ │ │ └── DownlinkNASTransport.xml
│ │ │ │ │ ├── DownlinkNASTransport2
│ │ │ │ │ ├── DownlinkNASTransport2.hex
│ │ │ │ │ ├── DownlinkNASTransport2.bin
│ │ │ │ │ ├── DownlinkNASTransport2.json
│ │ │ │ │ └── DownlinkNASTransport2.xml
│ │ │ │ │ ├── UplinkNASTransport
│ │ │ │ │ ├── UplinkNASTransport.hex
│ │ │ │ │ ├── UplinkNASTransport.bin
│ │ │ │ │ ├── UplinkNASTransport.json
│ │ │ │ │ └── UplinkNASTransport.xml
│ │ │ │ │ └── InitialUEMessage
│ │ │ │ │ ├── InitialUEMessage.bin
│ │ │ │ │ ├── InitialUEMessage.hex
│ │ │ │ │ ├── InitialUEMessage.json
│ │ │ │ │ └── InitialUEMessage.xml
│ │ │ ├── wireshark
│ │ │ │ └── s1ap
│ │ │ │ │ ├── eNodeB_Setup.pcap
│ │ │ │ │ ├── id-E-RABModify.pcap
│ │ │ │ │ ├── auth_w_sync_failure.pcap
│ │ │ │ │ ├── initialContextSetup.pcap
│ │ │ │ │ └── weird_imsi_structure.cap
│ │ │ ├── grammar
│ │ │ │ ├── NGAP
│ │ │ │ │ └── NGAP-Common-Definitions.asn
│ │ │ │ └── sample
│ │ │ │ │ └── examplev2.asn
│ │ │ └── simplelogger.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── ericsson
│ │ │ └── mts
│ │ │ └── asn1
│ │ │ ├── SampleTests.java
│ │ │ ├── S1APENodeBSetup.java
│ │ │ ├── S1APTests.java
│ │ │ └── S1APAuthWSyncFailure.java
│ └── main
│ │ └── java
│ │ └── com
│ │ └── ericsson
│ │ └── mts
│ │ └── asn1
│ │ ├── translator
│ │ ├── PERObjectIdentifierTranslator.java
│ │ ├── PERRealTranslator.java
│ │ ├── PERBooleanTranslator.java
│ │ └── PEREnumeratedTranslator.java
│ │ ├── CoderUtils.java
│ │ └── PERTranslatorFactory.java
└── pom.xml
├── .gitignore
├── .m2
└── settings.xml
├── mts-asn1-xml
└── pom.xml
├── mts-asn1-json
└── pom.xml
├── LICENSE.txt
├── README.md
├── mts-asn1-core
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── ericsson
│ └── mts
│ └── asn1
│ ├── constant
│ ├── IntegerConstant.java
│ └── AbstractConstant.java
│ ├── exception
│ ├── InvalidParameterException.java
│ ├── UnknownIdentifierException.java
│ ├── EncodingException.java
│ ├── ANTLRVisitorException.java
│ └── NotHandledCaseException.java
│ ├── constraint
│ ├── TypeConstraint.java
│ ├── AbstractConstraint.java
│ ├── ContentsConstraint.java
│ ├── ClassFieldConstraint.java
│ ├── SizeConstraint.java
│ ├── ValueRangeConstraint.java
│ ├── SingleValueConstraint.java
│ └── AbstractRangeConstraint.java
│ ├── TranslatorContext.java
│ ├── registry
│ └── ParsedRegistry.java
│ ├── factory
│ ├── FormatReader.java
│ ├── FormatWriter.java
│ └── AbstractTranslatorFactory.java
│ ├── visitor
│ └── TopLevelVisitor.java
│ ├── translator
│ ├── AbstractObjectIdentifierTranslator.java
│ ├── NullTranslator.java
│ ├── AbstractRealTranslator.java
│ ├── AbstractBooleanTranslator.java
│ ├── AbstractBitStringTranslator.java
│ ├── AbstractOctetStringTranslator.java
│ └── AbstractRestrictedCharacterStringTranslator.java
│ ├── BitArray.java
│ └── ASN1Translator.java
├── .github
└── workflows
│ ├── maven-publish-snapshot.yml
│ └── maven-publish-release.yml
├── mts-asn1-antlr
└── pom.xml
└── mts-asn1-maven-plugin
├── src
└── main
│ └── java
│ └── com
│ └── ericsson
│ └── mts
│ └── asn1
│ └── plugin
│ ├── MtsAsn1Mojo.java
│ ├── ConstantsGenerator.java
│ └── IdentifierVisitor.java
└── pom.xml
/mts-asn1-per/src/test/resources/data/sample/sample.hex:
--------------------------------------------------------------------------------
1 | 16 ec
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### IntelliJ ###
2 | .idea/
3 | *.iml
4 |
5 | type/
6 | target
7 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupResponse/S1SetupResponse.hex:
--------------------------------------------------------------------------------
1 | 20110022000003003d400702006d6d6538310069000b000000f1100000032b005100574001ff
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/id-E-RABModify/E-RABModifyResponse/E-RABModifyResponse.hex:
--------------------------------------------------------------------------------
1 | 2006001e00000300004005c005c83fd0000840048009dece001f400600002540010a
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand/UEContextReleaseCommand.hex:
--------------------------------------------------------------------------------
1 | 00170015000002006300090cdc1be30a801f720f0002400126
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand2/UEContextReleaseCommand2.hex:
--------------------------------------------------------------------------------
1 | 00170015000002006300090cdc1be2cd801f72100002400126
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand3/UEContextReleaseCommand3.hex:
--------------------------------------------------------------------------------
1 | 00170015000002006300090cdc1bedd9801f72110002400126
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete/UEContextReleaseComplete.hex:
--------------------------------------------------------------------------------
1 | 2017001400000200004005c0dc1be30a00084004801f720f
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete2/UEContextReleaseComplete2.hex:
--------------------------------------------------------------------------------
1 | 2017001400000200004005c0dc1be2cd00084004801f7210
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete3/UEContextReleaseComplete3.hex:
--------------------------------------------------------------------------------
1 | 2017001400000200004005c0dc1bedd900084004801f7211
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/sample/sample.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/sample/sample.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport/DownlinkNASTransport.hex:
--------------------------------------------------------------------------------
1 | 000b401c00000300000005c0dc1be30a00080004801f720f001a000403076060
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport2/DownlinkNASTransport2.hex:
--------------------------------------------------------------------------------
1 | 000b401c00000300000005c0dc1be2cd00080004801f7210001a000403076060
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport3/DownlinkNASTransport3.hex:
--------------------------------------------------------------------------------
1 | 000b401c00000300000005c0dc1bedd900080004801f7211001a000403076060
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/sample/sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "foo": {
3 | "a": true,
4 | "b": 55,
5 | "c": 3,
6 | "d": false,
7 | "e": "on"
8 | }
9 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/wireshark/s1ap/eNodeB_Setup.pcap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/wireshark/s1ap/eNodeB_Setup.pcap
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/wireshark/s1ap/id-E-RABModify.pcap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/wireshark/s1ap/id-E-RABModify.pcap
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/wireshark/s1ap/auth_w_sync_failure.pcap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/wireshark/s1ap/auth_w_sync_failure.pcap
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/wireshark/s1ap/initialContextSetup.pcap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/wireshark/s1ap/initialContextSetup.pcap
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/wireshark/s1ap/weird_imsi_structure.cap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/wireshark/s1ap/weird_imsi_structure.cap
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/InitialContextSetup/InitialContextSetupResponse/S1AP-2.hex:
--------------------------------------------------------------------------------
1 | 200900300000030000400200250008400200240033401d010032400a0a1f0afbfc084b0000000032400a0c1f0afbfc084c000000
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport2/UplinkNASTransport2.hex:
--------------------------------------------------------------------------------
1 | 000d4035000005000000020000000800020001001a000c0b075308deba34fd848a4448006440080055f53100001010004340060055f531b26e
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupRequest/S1SetupRequest.hex:
--------------------------------------------------------------------------------
1 | 0011003f000004003b00080000f11000070800003c400a0380617269632d654e42004000190300030000f1100002c000f11000028000f11000024000f1100089000100
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport/DownlinkNASTransport.hex:
--------------------------------------------------------------------------------
1 | 000b4038000003000000020000000800020001001a0025240752004711471147114711471147114711471110389046869a1cb9b94d4fc785b83d07dd
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport2/DownlinkNASTransport2.hex:
--------------------------------------------------------------------------------
1 | 000b4038000003000000020000000800020001001a002524075201b8eeb8eeb8eeb8eeb8eeb8eeb8eeb8ee10b14d41f46e52b9b9e10fa67cbfda8011
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport/UplinkNASTransport.hex:
--------------------------------------------------------------------------------
1 | 000d403d000005000000020000000800020001001a001413075c15300e76096683482650040a6fae3f2ce2006440080055f53100001010004340060055f531b26e
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupRequest/S1SetupRequest.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupRequest/S1SetupRequest.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupResponse/S1SetupResponse.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupResponse/S1SetupResponse.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/sample/sample.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | 55
5 | 3
6 | false
7 | on
8 |
9 |
10 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/id-E-RABModify/E-RABModifyRequest/E-RABModifyRequest.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/id-E-RABModify/E-RABModifyRequest/E-RABModifyRequest.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/InitialContextSetup/InitialContextSetupRequest/S1AP-1.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/InitialContextSetup/InitialContextSetupRequest/S1AP-1.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/InitialContextSetup/InitialContextSetupResponse/S1AP-2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/InitialContextSetup/InitialContextSetupResponse/S1AP-2.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/InitialUEMessage/InitialUEMessage.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/InitialUEMessage/InitialUEMessage.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/id-E-RABModify/E-RABModifyResponse/E-RABModifyResponse.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/id-E-RABModify/E-RABModifyResponse/E-RABModifyResponse.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage/InitialUEMessage.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage/InitialUEMessage.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport/UplinkNASTransport.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport/UplinkNASTransport.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage2/InitialUEMessage2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage2/InitialUEMessage2.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage3/InitialUEMessage3.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage3/InitialUEMessage3.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport2/UplinkNASTransport2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport2/UplinkNASTransport2.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport/DownlinkNASTransport.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport/DownlinkNASTransport.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport/DownlinkNASTransport.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport/DownlinkNASTransport.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport2/DownlinkNASTransport2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport2/DownlinkNASTransport2.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport2/DownlinkNASTransport2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport2/DownlinkNASTransport2.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport3/DownlinkNASTransport3.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport3/DownlinkNASTransport3.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/id-E-RABModify/E-RABModifyRequest/E-RABModifyRequest.hex:
--------------------------------------------------------------------------------
1 | 0006005700000400000005c005c83fd0000800048009dece0042000a180c350000600c350000001e0031000024002c0a00060527279523c609029f4d7d259da8541d64e92dad3223700fcb756cb03c2b9d5db0a94c7ebcadd22655
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage/InitialUEMessage.hex:
--------------------------------------------------------------------------------
1 | 000c405700000500080004801f720f001a002d2c0748720b29071855102132713a85895805f0f0c040105c1004570200003103e5e0349011035758825d0100c1004300060013210230390064400800132102011004300086400130
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage2/InitialUEMessage2.hex:
--------------------------------------------------------------------------------
1 | 000c405700000500080004801f7210001a002d2c0748720b29071855102132713a85895805f0f0c040105c1004570200003103e5e0349011035758825d0100c1004300060013210230390064400800132102011004300086400130
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage3/InitialUEMessage3.hex:
--------------------------------------------------------------------------------
1 | 000c405700000500080004801f7211001a002d2c0748720b29071855102132713a85895805f0f0c040105c1004570200003103e5e0349011035758825d0100c1004300060013210230390064400800132102011004300086400130
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand/UEContextReleaseCommand.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand/UEContextReleaseCommand.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand2/UEContextReleaseCommand2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand2/UEContextReleaseCommand2.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand3/UEContextReleaseCommand3.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand3/UEContextReleaseCommand3.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete/UEContextReleaseComplete.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete/UEContextReleaseComplete.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete2/UEContextReleaseComplete2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete2/UEContextReleaseComplete2.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete3/UEContextReleaseComplete3.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ericsson-mts/mts-asn1/HEAD/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete3/UEContextReleaseComplete3.bin
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/InitialUEMessage/InitialUEMessage.hex:
--------------------------------------------------------------------------------
1 | 000c406b000005000800020001001a0043420741720bf655f531870148e000000102e0e000210201d011d1271a8080211001000010810600000000830600000000000d00000a005255f531b26e9011034f18a6e0004300060055f531b26e006440080055f531000010100086400130
--------------------------------------------------------------------------------
/.m2/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ossrh
5 | ${env.OSSRH_USERNAME}
6 | ${env.OSSRH_TOKEN}
7 |
8 |
9 | gpg.passphrase
10 | ${env.GPG_PASSPHRASE}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand/UEContextReleaseCommand.json:
--------------------------------------------------------------------------------
1 | {"initiatingMessage":{"procedureCode":23,"criticality":"reject","value":{"UEContextReleaseCommand":{"protocolIEs":[{"id":99,"criticality":"reject","value":{"UE-S1AP-IDs":{"uE-S1AP-ID-pair":{"mME-UE-S1AP-ID":3692815114,"eNB-UE-S1AP-ID":2060815}}}},{"id":2,"criticality":"ignore","value":{"Cause":{"nas":"unspecified"}}}]}}}}
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand2/UEContextReleaseCommand2.json:
--------------------------------------------------------------------------------
1 | {"initiatingMessage":{"procedureCode":23,"criticality":"reject","value":{"UEContextReleaseCommand":{"protocolIEs":[{"id":99,"criticality":"reject","value":{"UE-S1AP-IDs":{"uE-S1AP-ID-pair":{"mME-UE-S1AP-ID":3692815053,"eNB-UE-S1AP-ID":2060816}}}},{"id":2,"criticality":"ignore","value":{"Cause":{"nas":"unspecified"}}}]}}}}
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand3/UEContextReleaseCommand3.json:
--------------------------------------------------------------------------------
1 | {"initiatingMessage":{"procedureCode":23,"criticality":"reject","value":{"UEContextReleaseCommand":{"protocolIEs":[{"id":99,"criticality":"reject","value":{"UE-S1AP-IDs":{"uE-S1AP-ID-pair":{"mME-UE-S1AP-ID":3692817881,"eNB-UE-S1AP-ID":2060817}}}},{"id":2,"criticality":"ignore","value":{"Cause":{"nas":"unspecified"}}}]}}}}
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete/UEContextReleaseComplete.json:
--------------------------------------------------------------------------------
1 | {
2 | "successfulOutcome": {
3 | "procedureCode": 23,
4 | "criticality": "reject",
5 | "value": {
6 | "UEContextReleaseComplete": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "ignore",
11 | "value": {
12 | "MME-UE-S1AP-ID": 3692815114
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "ignore",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 2060815
20 | }
21 | }
22 | ]
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete2/UEContextReleaseComplete2.json:
--------------------------------------------------------------------------------
1 | {
2 | "successfulOutcome": {
3 | "procedureCode": 23,
4 | "criticality": "reject",
5 | "value": {
6 | "UEContextReleaseComplete": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "ignore",
11 | "value": {
12 | "MME-UE-S1AP-ID": 3692815053
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "ignore",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 2060816
20 | }
21 | }
22 | ]
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete3/UEContextReleaseComplete3.json:
--------------------------------------------------------------------------------
1 | {
2 | "successfulOutcome": {
3 | "procedureCode": 23,
4 | "criticality": "reject",
5 | "value": {
6 | "UEContextReleaseComplete": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "ignore",
11 | "value": {
12 | "MME-UE-S1AP-ID": 3692817881
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "ignore",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 2060817
20 | }
21 | }
22 | ]
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/mts-asn1-xml/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | mts-asn1
7 | io.github.ericsson-mts
8 | master-SNAPSHOT
9 |
10 | 4.0.0
11 |
12 | mts-asn1-xml
13 |
14 |
15 |
16 | io.github.ericsson-mts
17 | mts-asn1-core
18 | master-SNAPSHOT
19 |
20 |
21 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport/DownlinkNASTransport.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 11,
4 | "criticality": "ignore",
5 | "value": {
6 | "DownlinkNASTransport": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "reject",
11 | "value": {
12 | "MME-UE-S1AP-ID": 3692815114
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "reject",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 2060815
20 | }
21 | },
22 | {
23 | "id": 26,
24 | "criticality": "reject",
25 | "value": {
26 | "NAS-PDU": "076060"
27 | }
28 | }
29 | ]
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport2/DownlinkNASTransport2.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 11,
4 | "criticality": "ignore",
5 | "value": {
6 | "DownlinkNASTransport": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "reject",
11 | "value": {
12 | "MME-UE-S1AP-ID": 3692815053
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "reject",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 2060816
20 | }
21 | },
22 | {
23 | "id": 26,
24 | "criticality": "reject",
25 | "value": {
26 | "NAS-PDU": "076060"
27 | }
28 | }
29 | ]
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport3/DownlinkNASTransport3.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 11,
4 | "criticality": "ignore",
5 | "value": {
6 | "DownlinkNASTransport": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "reject",
11 | "value": {
12 | "MME-UE-S1AP-ID": 3692817881
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "reject",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 2060817
20 | }
21 | },
22 | {
23 | "id": 26,
24 | "criticality": "reject",
25 | "value": {
26 | "NAS-PDU": "076060"
27 | }
28 | }
29 | ]
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport/DownlinkNASTransport.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 11,
4 | "criticality": "ignore",
5 | "value": {
6 | "DownlinkNASTransport": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "reject",
11 | "value": {
12 | "MME-UE-S1AP-ID": 0
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "reject",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 1
20 | }
21 | },
22 | {
23 | "id": 26,
24 | "criticality": "reject",
25 | "value": {
26 | "NAS-PDU": "0752004711471147114711471147114711471110389046869A1CB9B94D4FC785B83D07DD"
27 | }
28 | }
29 | ]
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport2/DownlinkNASTransport2.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 11,
4 | "criticality": "ignore",
5 | "value": {
6 | "DownlinkNASTransport": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "reject",
11 | "value": {
12 | "MME-UE-S1AP-ID": 0
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "reject",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 1
20 | }
21 | },
22 | {
23 | "id": 26,
24 | "criticality": "reject",
25 | "value": {
26 | "NAS-PDU": "075201B8EEB8EEB8EEB8EEB8EEB8EEB8EEB8EE10B14D41F46E52B9B9E10FA67CBFDA8011"
27 | }
28 | }
29 | ]
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/mts-asn1-json/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | mts-asn1
7 | io.github.ericsson-mts
8 | master-SNAPSHOT
9 |
10 | 4.0.0
11 |
12 | mts-asn1-json
13 |
14 |
15 |
16 | io.github.ericsson-mts
17 | mts-asn1-core
18 | master-SNAPSHOT
19 |
20 |
21 | com.fasterxml.jackson.core
22 | jackson-databind
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/grammar/NGAP/NGAP-Common-Definitions.asn:
--------------------------------------------------------------------------------
1 | -- ASN1START
2 | -- **************************************************************
3 | --
4 | -- Common definitions
5 | --
6 | -- **************************************************************
7 |
8 | NGAP-CommonDataTypes {
9 | itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
10 | ngran-Access (22) modules (3) ngap (1) version1 (1) ngap-CommonDataTypes (3) }
11 |
12 | DEFINITIONS AUTOMATIC TAGS ::=
13 |
14 | BEGIN
15 |
16 | Criticality ::= ENUMERATED { reject, ignore, notify }
17 |
18 | Presence ::= ENUMERATED { optional, conditional, mandatory }
19 |
20 | PrivateIE-ID ::= CHOICE {
21 | local INTEGER (0..65535),
22 | global OBJECT IDENTIFIER
23 | }
24 |
25 | ProcedureCode ::= INTEGER (0..255)
26 |
27 | ProtocolExtensionID ::= INTEGER (0..65535)
28 |
29 | ProtocolIE-ID ::= INTEGER (0..65535)
30 |
31 | TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
32 |
33 | END
34 | -- ASN1STOP
35 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/grammar/sample/examplev2.asn:
--------------------------------------------------------------------------------
1 | --- Second version of the Foo protocol.
2 |
3 | Foo DEFINITIONS AUTOMATIC TAGS ::=
4 |
5 | BEGIN
6 |
7 | State ::= ENUMERATED {
8 | on (0),
9 | off (1)
10 | }
11 | Foo ::= SEQUENCE {
12 | a BOOLEAN,
13 | b INTEGER (0..127), -- Fixed range, encoded in 7 bits.
14 | c INTEGER (0..7), -- Fixed range, encoded in 3 bits.
15 | d BOOLEAN,
16 | e State,
17 | -- Extension in this version, version 2.
18 | v2 SEQUENCE {
19 | a INTEGER (-128..127), -- Fixed range, encoded in 8 bits.
20 | b BOOLEAN,
21 | -- Future extension, more compact encoding than '...'.
22 | extension NULL OPTIONAL
23 | } OPTIONAL
24 | }
25 |
26 | Bar ::= INTEGER (0..31)
27 |
28 | -- Selection encoded in two bits.
29 | Message ::= CHOICE {
30 | foo Foo,
31 | -- Added in version 2.
32 | bar Bar,
33 | -- Future extensions, more compact encoding than '...'.
34 | extension2 NULL,
35 | extension3 NULL
36 | }
37 |
38 | END
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete/UEContextReleaseComplete.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 23
4 | reject
5 |
6 |
7 |
8 |
9 | 0
10 | ignore
11 |
12 | 3692815114
13 |
14 |
15 |
16 | 8
17 | ignore
18 |
19 | 2060815
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete2/UEContextReleaseComplete2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 23
4 | reject
5 |
6 |
7 |
8 |
9 | 0
10 | ignore
11 |
12 | 3692815053
13 |
14 |
15 |
16 | 8
17 | ignore
18 |
19 | 2060816
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseComplete3/UEContextReleaseComplete3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 23
4 | reject
5 |
6 |
7 |
8 |
9 | 0
10 | ignore
11 |
12 | 3692817881
13 |
14 |
15 |
16 | 8
17 | ignore
18 |
19 | 2060817
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 ericsson-mts
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # **mts-asn1**
2 | [](https://github.com/ericsson-mts/mts-asn1)
3 | [](https://github.com/ericsson-mts/mts-asn1/blob/master/LICENSE.txt)
4 |
5 | ## Description
6 |
7 | **mts-asn1** project is designed to encode/decode data to/from binary of ASN.1 protocols. Data can be described in various
8 | dataformat (XML, JSON ...). It use [ANTLR](https://www.antlr.org/) to parse ASN.1 grammar.
9 |
10 | ## Installation
11 |
12 | Clone this repository and use it as a maven project
13 |
14 | (Coming on Maven Central soon)
15 |
16 | ## Usage
17 |
18 | See [here](https://github.com/ericsson-mts/mts-asn1/wiki/User-guide)
19 |
20 | ## DISCLAIMER
21 |
22 | While we do our best to support protocols described in ASN.1 and (U)PER encoding, we cannot guarantee that our project
23 | is error free. mts-asn1 evolve depending of the needs, please consider to [report](https://github.com/ericsson-mts/mts-asn1/wiki/Report) or contributing if you want a new feature or revise an existing one.
24 |
--------------------------------------------------------------------------------
/mts-asn1-core/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | mts-asn1-core
7 |
8 | io.github.ericsson-mts
9 | mts-asn1
10 | master-SNAPSHOT
11 |
12 | jar
13 |
14 |
15 |
16 |
17 | org.javatuples
18 | javatuples
19 |
20 |
21 | io.github.ericsson-mts
22 | mts-asn1-antlr
23 | master-SNAPSHOT
24 |
25 |
26 | org.slf4j
27 | slf4j-api
28 |
29 |
30 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/InitialContextSetup/InitialContextSetupRequest/S1AP-1.hex:
--------------------------------------------------------------------------------
1 | 00 09 00 81 4f 00 00 06 00 00 00 02 00 25 00 08
2 | 00 02 00 24 00 42 00 0a 18 06 10 00 00 60 06 10
3 | 00 00 00 18 00 81 00 01 00 34 00 80 90 45 00 07
4 | 08 0f 80 0a fc f6 17 4b 00 00 00 80 80 27 2e b7
5 | 53 b3 02 07 42 01 25 06 20 00 f1 10 00 26 00 60
6 | 52 01 c1 01 07 1d 08 69 6e 74 65 72 6e 65 74 06
7 | 6d 6e 63 30 30 31 03 6d 63 63 03 30 30 31 04 67
8 | 70 72 73 05 01 0a ff f6 9a 5d 01 00 30 10 0a 11
9 | 1f 73 96 ff ff 46 29 ff ff 10 00 00 00 00 32 03
10 | 81 34 01 00 5e 04 fe fe 9f 9f 27 14 80 80 21 10
11 | 03 00 00 10 81 06 ac 11 00 01 83 06 00 00 00 00
12 | 50 0b f6 00 f1 10 03 35 52 c0 00 00 24 00 34 00
13 | 66 46 00 07 10 0f 80 0a fc f6 17 4c 00 00 00 57
14 | 27 e8 6e cb dd 03 62 00 c5 05 01 07 19 22 20 80
15 | 09 10 0a 98 9a 81 ff ff ff ff 11 81 09 10 0a 98
16 | 9a 81 ff ff ff ff 5d 01 90 30 10 0a 11 1f 73 96
17 | ff ff 46 29 ff ff 10 00 00 00 00 32 03 81 34 01
18 | 00 27 14 80 80 21 10 03 00 00 10 81 06 ac 11 00
19 | 01 83 06 00 00 00 00 00 6b 00 05 18 00 0c 00 00
20 | 00 49 00 20 1d 8f 4b c0 d0 87 e8 a1 74 f8 b6 df
21 | 29 7f 76 9c 32 0b e2 d2 3a a6 f4 c0 da 24 06 09
22 | 7e 96 ae ba
23 |
--------------------------------------------------------------------------------
/.github/workflows/maven-publish-snapshot.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2 | # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3 |
4 | name: Maven Publish Snapshot
5 |
6 | on:
7 | push:
8 | branches:
9 | - master
10 |
11 | jobs:
12 | build:
13 | runs-on: ubuntu-latest
14 | permissions:
15 | contents: read
16 | packages: write
17 | steps:
18 | - uses: actions/checkout@v3
19 |
20 | - name: Set up Apache Maven Central
21 | uses: actions/setup-java@v3
22 | with: # running setup-java again overwrites the settings.xml
23 | java-version: '8'
24 | distribution: 'temurin'
25 | gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
26 |
27 | - name: Publish to Apache Maven Central
28 | run: mvn -B --settings .m2/settings.xml clean deploy
29 | env:
30 | OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
31 | OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
32 | GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupResponse/S1SetupResponse.json:
--------------------------------------------------------------------------------
1 | {
2 | "successfulOutcome": {
3 | "procedureCode": 17,
4 | "criticality": "reject",
5 | "value": {
6 | "S1SetupResponse": {
7 | "protocolIEs": [
8 | {
9 | "id": 61,
10 | "criticality": "ignore",
11 | "value": {
12 | "MMEname": "mme81"
13 | }
14 | },
15 | {
16 | "id": 105,
17 | "criticality": "reject",
18 | "value": {
19 | "ServedGUMMEIs": [
20 | {
21 | "servedPLMNs": [
22 | "00F110"
23 | ],
24 | "servedGroupIDs": [
25 | "032B"
26 | ],
27 | "servedMMECs": [
28 | "51"
29 | ]
30 | }
31 | ]
32 | }
33 | },
34 | {
35 | "id": 87,
36 | "criticality": "ignore",
37 | "value": {
38 | "RelativeMMECapacity": 255
39 | }
40 | }
41 | ]
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/id-E-RABModify/E-RABModifyResponse/E-RABModifyResponse.json:
--------------------------------------------------------------------------------
1 | {
2 | "successfulOutcome": {
3 | "procedureCode": 6,
4 | "criticality": "reject",
5 | "value": {
6 | "E-RABModifyResponse": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "ignore",
11 | "value": {
12 | "MME-UE-S1AP-ID": 97009616
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "ignore",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 646862
20 | }
21 | },
22 | {
23 | "id": 31,
24 | "criticality": "ignore",
25 | "value": {
26 | "E-RABModifyListBearerModRes": [
27 | {
28 | "id": 37,
29 | "criticality": "ignore",
30 | "value": {
31 | "E-RABModifyItemBearerModRes": {
32 | "e-RAB-ID": 5
33 | }
34 | }
35 | }
36 | ]
37 | }
38 | }
39 | ]
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/constant/IntegerConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.constant;
12 |
13 |
14 | public class IntegerConstant extends AbstractConstant {
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/.github/workflows/maven-publish-release.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2 | # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3 |
4 | name: Maven Publish Release
5 |
6 | on:
7 | push:
8 | tags:
9 | - '*'
10 |
11 | jobs:
12 | build:
13 | runs-on: ubuntu-latest
14 | permissions:
15 | contents: read
16 | packages: write
17 | steps:
18 | - uses: actions/checkout@v3
19 |
20 | - name: Set up Apache Maven Central
21 | uses: actions/setup-java@v3
22 | with: # running setup-java again overwrites the settings.xml
23 | java-version: '8'
24 | distribution: 'temurin'
25 | gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
26 |
27 | - name: Set version from tag
28 | run: |
29 | echo $GITHUB_REF_NAME
30 | mvn versions:set -DnewVersion=$GITHUB_REF_NAME
31 |
32 | - name: Publish to Apache Maven Central
33 | run: mvn -B --settings .m2/settings.xml clean deploy
34 | env:
35 | OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
36 | OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
37 | GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport/DownlinkNASTransport.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 11
4 | ignore
5 |
6 |
7 |
8 |
9 | 0
10 | reject
11 |
12 | 3692815114
13 |
14 |
15 |
16 | 8
17 | reject
18 |
19 | 2060815
20 |
21 |
22 |
23 | 26
24 | reject
25 |
26 | 076060
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/exception/InvalidParameterException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.exception;
12 |
13 | public class InvalidParameterException extends RuntimeException {
14 | public InvalidParameterException(String message) {
15 | super(message);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/exception/UnknownIdentifierException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.exception;
12 |
13 | public class UnknownIdentifierException extends RuntimeException {
14 | public UnknownIdentifierException(String message) {
15 | super(message);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport2/DownlinkNASTransport2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 11
4 | ignore
5 |
6 |
7 |
8 |
9 | 0
10 | reject
11 |
12 | 3692815053
13 |
14 |
15 |
16 | 8
17 | reject
18 |
19 | 2060816
20 |
21 |
22 |
23 | 26
24 | reject
25 |
26 | 076060
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/DownlinkNASTransport3/DownlinkNASTransport3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 11
4 | ignore
5 |
6 |
7 |
8 |
9 | 0
10 | reject
11 |
12 | 3692817881
13 |
14 |
15 |
16 | 8
17 | reject
18 |
19 | 2060817
20 |
21 |
22 |
23 | 26
24 | reject
25 |
26 | 076060
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/constraint/TypeConstraint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.constraint;
12 |
13 | public enum TypeConstraint {
14 | CONTENT_CONSTRAINT,
15 | SIZE_CONSTRAINT,
16 | CLASS_FIELD_CONSTRAINT,
17 | VALUE_RANGE_CONSTRAINT,
18 | SINGLE_VALUE_CONSTRAINT
19 | }
20 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/exception/EncodingException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.exception;
12 |
13 | public class EncodingException extends RuntimeException {
14 | public EncodingException() {
15 | }
16 |
17 | public EncodingException(String message) {
18 | super(message);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport/DownlinkNASTransport.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 11
4 | ignore
5 |
6 |
7 |
8 |
9 | 0
10 | reject
11 |
12 | 0
13 |
14 |
15 |
16 | 8
17 | reject
18 |
19 | 1
20 |
21 |
22 |
23 | 26
24 | reject
25 |
26 | 0752004711471147114711471147114711471110389046869A1CB9B94D4FC785B83D07DD
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/DownlinkNASTransport2/DownlinkNASTransport2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 11
4 | ignore
5 |
6 |
7 |
8 |
9 | 0
10 | reject
11 |
12 | 0
13 |
14 |
15 |
16 | 8
17 | reject
18 |
19 | 1
20 |
21 |
22 |
23 | 26
24 | reject
25 |
26 | 075201B8EEB8EEB8EEB8EEB8EEB8EEB8EEB8EE10B14D41F46E52B9B9E10FA67CBFDA8011
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport2/UplinkNASTransport2.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 13,
4 | "criticality": "ignore",
5 | "value": {
6 | "UplinkNASTransport": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "reject",
11 | "value": {
12 | "MME-UE-S1AP-ID": 0
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "reject",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 1
20 | }
21 | },
22 | {
23 | "id": 26,
24 | "criticality": "reject",
25 | "value": {
26 | "NAS-PDU": "075308DEBA34FD848A4448"
27 | }
28 | },
29 | {
30 | "id": 100,
31 | "criticality": "ignore",
32 | "value": {
33 | "EUTRAN-CGI": {
34 | "pLMNidentity": "55F531",
35 | "cell-ID": "0000000000000000000100000001"
36 | }
37 | }
38 | },
39 | {
40 | "id": 67,
41 | "criticality": "ignore",
42 | "value": {
43 | "TAI": {
44 | "pLMNidentity": "55F531",
45 | "tAC": "B26E"
46 | }
47 | }
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand/UEContextReleaseCommand.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 23
4 | reject
5 |
6 |
7 |
8 |
9 | 99
10 | reject
11 |
12 |
13 |
14 | 3692815114
15 | 2060815
16 |
17 |
18 |
19 |
20 |
21 | 2
22 | ignore
23 |
24 |
25 | unspecified
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand2/UEContextReleaseCommand2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 23
4 | reject
5 |
6 |
7 |
8 |
9 | 99
10 | reject
11 |
12 |
13 |
14 | 3692815053
15 | 2060816
16 |
17 |
18 |
19 |
20 |
21 | 2
22 | ignore
23 |
24 |
25 | unspecified
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/UEContextReleaseCommand3/UEContextReleaseCommand3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 23
4 | reject
5 |
6 |
7 |
8 |
9 | 99
10 | reject
11 |
12 |
13 |
14 | 3692817881
15 | 2060817
16 |
17 |
18 |
19 |
20 |
21 | 2
22 | ignore
23 |
24 |
25 | unspecified
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/UplinkNASTransport/UplinkNASTransport.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 13,
4 | "criticality": "ignore",
5 | "value": {
6 | "UplinkNASTransport": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "reject",
11 | "value": {
12 | "MME-UE-S1AP-ID": 0
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "reject",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 1
20 | }
21 | },
22 | {
23 | "id": 26,
24 | "criticality": "reject",
25 | "value": {
26 | "NAS-PDU": "075C15300E76096683482650040A6FAE3F2CE2"
27 | }
28 | },
29 | {
30 | "id": 100,
31 | "criticality": "ignore",
32 | "value": {
33 | "EUTRAN-CGI": {
34 | "pLMNidentity": "55F531",
35 | "cell-ID": "0000000000000000000100000001"
36 | }
37 | }
38 | },
39 | {
40 | "id": 67,
41 | "criticality": "ignore",
42 | "value": {
43 | "TAI": {
44 | "pLMNidentity": "55F531",
45 | "tAC": "B26E"
46 | }
47 | }
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/exception/ANTLRVisitorException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.exception;
12 |
13 | public class ANTLRVisitorException extends RuntimeException {
14 | public ANTLRVisitorException() {
15 | super();
16 | }
17 |
18 | public ANTLRVisitorException(String erroMessage) {
19 | super(erroMessage);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/main/java/com/ericsson/mts/asn1/translator/PERObjectIdentifierTranslator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.translator;
12 |
13 | import com.ericsson.mts.asn1.PERTranscoder;
14 |
15 | public class PERObjectIdentifierTranslator extends AbstractObjectIdentifierTranslator {
16 |
17 | public PERObjectIdentifierTranslator(PERTranscoder perTranscoder) {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/exception/NotHandledCaseException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.exception;
12 |
13 | public class NotHandledCaseException extends RuntimeException {
14 |
15 | public NotHandledCaseException() {
16 | super();
17 | }
18 |
19 | public NotHandledCaseException(String string) {
20 | super(string);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/constant/AbstractConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.constant;
12 |
13 | public abstract class AbstractConstant {
14 | protected String value;
15 |
16 | public AbstractConstant init(String value) {
17 | this.value = value;
18 | return this;
19 | }
20 |
21 | public String getValue() {
22 | return value;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/constraint/AbstractConstraint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.constraint;
12 |
13 | public abstract class AbstractConstraint {
14 | private boolean isExtensible = false;
15 |
16 | public boolean isExtensible() {
17 | return isExtensible;
18 | }
19 |
20 | public void setExtensible(boolean extensible) {
21 | isExtensible = extensible;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage/InitialUEMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 12,
4 | "criticality": "ignore",
5 | "value": {
6 | "InitialUEMessage": {
7 | "protocolIEs": [
8 | {
9 | "id": 8,
10 | "criticality": "reject",
11 | "value": {
12 | "ENB-UE-S1AP-ID": 2060815
13 | }
14 | },
15 | {
16 | "id": 26,
17 | "criticality": "reject",
18 | "value": {
19 | "NAS-PDU": "0748720B29071855102132713A85895805F0F0C040105C1004570200003103E5E0349011035758825D0100C1"
20 | }
21 | },
22 | {
23 | "id": 67,
24 | "criticality": "reject",
25 | "value": {
26 | "TAI": {
27 | "pLMNidentity": "132102",
28 | "tAC": "3039"
29 | }
30 | }
31 | },
32 | {
33 | "id": 100,
34 | "criticality": "ignore",
35 | "value": {
36 | "EUTRAN-CGI": {
37 | "pLMNidentity": "132102",
38 | "cell-ID": "0000000100010000000001000011"
39 | }
40 | }
41 | },
42 | {
43 | "id": 134,
44 | "criticality": "ignore",
45 | "value": {
46 | "RRC-Establishment-Cause": "mo-Signalling"
47 | }
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage2/InitialUEMessage2.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 12,
4 | "criticality": "ignore",
5 | "value": {
6 | "InitialUEMessage": {
7 | "protocolIEs": [
8 | {
9 | "id": 8,
10 | "criticality": "reject",
11 | "value": {
12 | "ENB-UE-S1AP-ID": 2060816
13 | }
14 | },
15 | {
16 | "id": 26,
17 | "criticality": "reject",
18 | "value": {
19 | "NAS-PDU": "0748720B29071855102132713A85895805F0F0C040105C1004570200003103E5E0349011035758825D0100C1"
20 | }
21 | },
22 | {
23 | "id": 67,
24 | "criticality": "reject",
25 | "value": {
26 | "TAI": {
27 | "pLMNidentity": "132102",
28 | "tAC": "3039"
29 | }
30 | }
31 | },
32 | {
33 | "id": 100,
34 | "criticality": "ignore",
35 | "value": {
36 | "EUTRAN-CGI": {
37 | "pLMNidentity": "132102",
38 | "cell-ID": "0000000100010000000001000011"
39 | }
40 | }
41 | },
42 | {
43 | "id": 134,
44 | "criticality": "ignore",
45 | "value": {
46 | "RRC-Establishment-Cause": "mo-Signalling"
47 | }
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/weird_imsi_structure/InitialUEMessage3/InitialUEMessage3.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 12,
4 | "criticality": "ignore",
5 | "value": {
6 | "InitialUEMessage": {
7 | "protocolIEs": [
8 | {
9 | "id": 8,
10 | "criticality": "reject",
11 | "value": {
12 | "ENB-UE-S1AP-ID": 2060817
13 | }
14 | },
15 | {
16 | "id": 26,
17 | "criticality": "reject",
18 | "value": {
19 | "NAS-PDU": "0748720B29071855102132713A85895805F0F0C040105C1004570200003103E5E0349011035758825D0100C1"
20 | }
21 | },
22 | {
23 | "id": 67,
24 | "criticality": "reject",
25 | "value": {
26 | "TAI": {
27 | "pLMNidentity": "132102",
28 | "tAC": "3039"
29 | }
30 | }
31 | },
32 | {
33 | "id": 100,
34 | "criticality": "ignore",
35 | "value": {
36 | "EUTRAN-CGI": {
37 | "pLMNidentity": "132102",
38 | "cell-ID": "0000000100010000000001000011"
39 | }
40 | }
41 | },
42 | {
43 | "id": 134,
44 | "criticality": "ignore",
45 | "value": {
46 | "RRC-Establishment-Cause": "mo-Signalling"
47 | }
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/TranslatorContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1;
12 |
13 | import java.util.HashMap;
14 |
15 | public class TranslatorContext {
16 | private HashMap fields = new HashMap<>();
17 |
18 | public void put(String key, String value) {
19 | fields.put(key, value);
20 | }
21 |
22 | public String get(String key) {
23 | return fields.get(key);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/auth_w_sync_failure/InitialUEMessage/InitialUEMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 12,
4 | "criticality": "ignore",
5 | "value": {
6 | "InitialUEMessage": {
7 | "protocolIEs": [
8 | {
9 | "id": 8,
10 | "criticality": "reject",
11 | "value": {
12 | "ENB-UE-S1AP-ID": 1
13 | }
14 | },
15 | {
16 | "id": 26,
17 | "criticality": "reject",
18 | "value": {
19 | "NAS-PDU": "0741720BF655F531870148E000000102E0E000210201D011D1271A8080211001000010810600000000830600000000000D00000A005255F531B26E9011034F18A6E0"
20 | }
21 | },
22 | {
23 | "id": 67,
24 | "criticality": "reject",
25 | "value": {
26 | "TAI": {
27 | "pLMNidentity": "55F531",
28 | "tAC": "B26E"
29 | }
30 | }
31 | },
32 | {
33 | "id": 100,
34 | "criticality": "ignore",
35 | "value": {
36 | "EUTRAN-CGI": {
37 | "pLMNidentity": "55F531",
38 | "cell-ID": "0000000000000000000100000001"
39 | }
40 | }
41 | },
42 | {
43 | "id": 134,
44 | "criticality": "ignore",
45 | "value": {
46 | "RRC-Establishment-Cause": "mo-Signalling"
47 | }
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/mts-asn1-antlr/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | mts-asn1
7 | io.github.ericsson-mts
8 | master-SNAPSHOT
9 |
10 | 4.0.0
11 |
12 | mts-asn1-antlr
13 |
14 |
15 | true
16 | false
17 |
18 |
19 |
20 |
21 |
22 | org.antlr
23 | antlr4-runtime
24 |
25 |
26 | org.antlr
27 | antlr4
28 |
29 |
30 |
31 |
32 |
33 |
34 | org.antlr
35 | antlr4-maven-plugin
36 | ${antlr4.version}
37 |
38 |
39 | antlr
40 |
41 | antlr4
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/registry/ParsedRegistry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.registry;
12 |
13 |
14 | import java.util.HashMap;
15 |
16 | public class ParsedRegistry {
17 | private HashMap registry = new HashMap<>();
18 |
19 | public HashMap getRegistry() {
20 | return registry;
21 | }
22 |
23 | public synchronized void add(String identifier, T abstractTranslator) {
24 | registry.put(identifier, abstractTranslator);
25 | }
26 |
27 | public synchronized T get(String identifier) {
28 | return registry.get(identifier);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/constraint/ContentsConstraint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.constraint;
12 |
13 | import com.ericsson.mts.asn1.translator.AbstractTranslator;
14 |
15 | /**
16 | * Use when CONTAINING keyword appears
17 | */
18 | public class ContentsConstraint extends AbstractConstraint {
19 | private final AbstractTranslator contentTranslator;
20 |
21 | public ContentsConstraint(AbstractTranslator contentTranslator) {
22 | this.contentTranslator = contentTranslator;
23 | }
24 |
25 | public AbstractTranslator getContentTranslator() {
26 | return contentTranslator;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | # SLF4J's SimpleLogger configuration file
2 | # Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
3 |
4 | # Default logging detail level for all instances of SimpleLogger.
5 | # Must be one of ("trace", "debug", "info", "warn", or "error").
6 | # If not specified, defaults to "info".
7 | org.slf4j.simpleLogger.defaultLogLevel=trace
8 |
9 | # Logging detail level for a SimpleLogger instance named "xxxxx".
10 | # Must be one of ("trace", "debug", "info", "warn", or "error").
11 | # If not specified, the default logging detail level is used.
12 | #org.slf4j.simpleLogger.log.xxxxx=
13 |
14 | # Set to true if you want the current date and time to be included in output messages.
15 | # Default is false, and will output the number of milliseconds elapsed since startup.
16 | #org.slf4j.simpleLogger.showDateTime=false
17 |
18 | # The date and time format to be used in the output messages.
19 | # The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
20 | # If the format is not specified or is invalid, the default format is used.
21 | # The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
22 | #org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
23 |
24 | # Set to true if you want to output the current thread name.
25 | # Defaults to true.
26 | #org.slf4j.simpleLogger.showThreadName=true
27 |
28 | # Set to true if you want the Logger instance name to be included in output messages.
29 | # Defaults to true.
30 | #org.slf4j.simpleLogger.showLogName=true
31 |
32 | # Set to true if you want the last component of the name to be included in output messages.
33 | # Defaults to false.
34 | #org.slf4j.simpleLogger.showShortLogName=false
--------------------------------------------------------------------------------
/mts-asn1-per/src/main/java/com/ericsson/mts/asn1/translator/PERRealTranslator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.translator;
12 |
13 | import com.ericsson.mts.asn1.BitInputStream;
14 | import com.ericsson.mts.asn1.PERTranscoder;
15 | import com.ericsson.mts.asn1.exception.NotHandledCaseException;
16 |
17 | import java.math.BigDecimal;
18 |
19 | public class PERRealTranslator extends AbstractRealTranslator {
20 |
21 | public PERRealTranslator(PERTranscoder perTranscoder) {
22 | }
23 |
24 | @Override
25 | public BigDecimal doDecode(BitInputStream s) {
26 | throw new NotHandledCaseException("Real decoding is not implemented yet");
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/InitialContextSetup/InitialContextSetupResponse/S1AP-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "successfulOutcome": {
3 | "procedureCode": 9,
4 | "criticality": "reject",
5 | "value": {
6 | "InitialContextSetupResponse": {
7 | "protocolIEs": [
8 | {
9 | "id": 0,
10 | "criticality": "ignore",
11 | "value": {
12 | "MME-UE-S1AP-ID": 37
13 | }
14 | },
15 | {
16 | "id": 8,
17 | "criticality": "ignore",
18 | "value": {
19 | "ENB-UE-S1AP-ID": 36
20 | }
21 | },
22 | {
23 | "id": 51,
24 | "criticality": "ignore",
25 | "value": {
26 | "E-RABSetupListCtxtSURes": [
27 | {
28 | "id": 50,
29 | "criticality": "ignore",
30 | "value": {
31 | "E-RABSetupItemCtxtSURes": {
32 | "e-RAB-ID": 5,
33 | "transportLayerAddress": "00001010111110111111110000001000",
34 | "gTP-TEID": "4B000000"
35 | }
36 | }
37 | },
38 | {
39 | "id": 50,
40 | "criticality": "ignore",
41 | "value": {
42 | "E-RABSetupItemCtxtSURes": {
43 | "e-RAB-ID": 6,
44 | "transportLayerAddress": "00001010111110111111110000001000",
45 | "gTP-TEID": "4C000000"
46 | }
47 | }
48 | }
49 | ]
50 | }
51 | }
52 | ]
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/factory/FormatReader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.factory;
12 |
13 | import java.math.BigInteger;
14 | import java.util.List;
15 |
16 | public interface FormatReader {
17 |
18 | void enterObject(String name);
19 |
20 | void leaveObject(String name);
21 |
22 | int enterArray(String name);
23 |
24 | void leaveArray(String name);
25 |
26 | boolean booleanValue(String name);
27 |
28 | String bitsValue(String name);
29 |
30 | String bytesValue(String name);
31 |
32 | BigInteger intValue(String name);
33 |
34 | List fieldsValue();
35 |
36 | String stringValue(String name);
37 |
38 | String printCurrentnode();
39 | }
40 |
--------------------------------------------------------------------------------
/mts-asn1-per/src/test/resources/data/S1AP/eNodeB_Setup/S1SetupRequest/S1SetupRequest.json:
--------------------------------------------------------------------------------
1 | {
2 | "initiatingMessage": {
3 | "procedureCode": 17,
4 | "criticality": "reject",
5 | "value": {
6 | "S1SetupRequest": {
7 | "protocolIEs": [
8 | {
9 | "id": 59,
10 | "criticality": "reject",
11 | "value": {
12 | "Global-ENB-ID": {
13 | "pLMNidentity": "00F110",
14 | "eNB-ID": {
15 | "macroENB-ID": "00000111000010000000"
16 | }
17 | }
18 | }
19 | },
20 | {
21 | "id": 60,
22 | "criticality": "ignore",
23 | "value": {
24 | "ENBname": "aric-eNB"
25 | }
26 | },
27 | {
28 | "id": 64,
29 | "criticality": "reject",
30 | "value": {
31 | "SupportedTAs": [
32 | {
33 | "tAC": "000C",
34 | "broadcastPLMNs": [
35 | "00F110"
36 | ]
37 | },
38 | {
39 | "tAC": "000B",
40 | "broadcastPLMNs": [
41 | "00F110"
42 | ]
43 | },
44 | {
45 | "tAC": "000A",
46 | "broadcastPLMNs": [
47 | "00F110"
48 | ]
49 | },
50 | {
51 | "tAC": "0009",
52 | "broadcastPLMNs": [
53 | "00F110"
54 | ]
55 | }
56 | ]
57 | }
58 | },
59 | {
60 | "id": 137,
61 | "criticality": "reject",
62 | "value": {
63 | "PagingDRX": "v32"
64 | }
65 | }
66 | ]
67 | }
68 | }
69 | }
70 | }
--------------------------------------------------------------------------------
/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/visitor/TopLevelVisitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Ericsson, https://www.ericsson.com/en
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 | *
6 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 | */
10 |
11 | package com.ericsson.mts.asn1.visitor;
12 |
13 | import com.ericsson.mts.asn1.ASN1Parser;
14 | import com.ericsson.mts.asn1.ASN1ParserBaseVisitor;
15 | import com.ericsson.mts.asn1.registry.MainRegistry;
16 | import org.slf4j.Logger;
17 | import org.slf4j.LoggerFactory;
18 |
19 |
20 | public class TopLevelVisitor extends ASN1ParserBaseVisitor