1.1.32 • Published 8 months ago

nas-parser v1.1.32

Weekly downloads
20
License
ISC
Repository
github
Last release
8 months ago

A project for parsing 5GS NAS stream payload to JSON and back

Usage

  const payload = {
    "name": "authenticationRequest",
    "spareHalfOctet": {
      "spare": 0
    },
    "nasKeySetIdentifier": {
      "tsc": "nativeSecurityContextForKsiamf",
      "nasKeySetIdentifierValue": 1
    },
    "abba": {
      "abbaContent": "0x0000"
    },
    "authenticationParameterRand": {
      "rand": "0x19f4f9238f9416bb64d0c10c3abb242d"
    },
    "authenticationParameterAutn": {
      "sqnXorAk": "0xaa29499f6286",
      "amf": "0xe282",
      "mac": "0x215f57fd4f115f0b"
    }
  };

  const retVal = nasParser.encode(js0xn.decode(payload));
  console.log(js0xn.stringify(retVal.buf));

You just need to have your NAS PDU as JSON and then encode it using parser to a byte stream which you would in turn embed in your NGAP PDU

Note: The js0xn is a library used for converting Hex strings starting with "0x" to Buffer and back

1.1.32

8 months ago

1.1.31

3 years ago

1.1.29

3 years ago

1.1.30

3 years ago

1.1.28

3 years ago

1.1.27

3 years ago

1.1.16

3 years ago

1.1.19

3 years ago

1.1.18

3 years ago

1.1.17

3 years ago

1.1.23

3 years ago

1.1.22

3 years ago

1.1.21

3 years ago

1.1.20

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.24

3 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago