1.1.31 • Published 2 years ago

nas-parser v1.1.31

Weekly downloads
20
License
ISC
Repository
github
Last release
2 years 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.31

2 years ago

1.1.29

2 years ago

1.1.30

2 years ago

1.1.28

2 years ago

1.1.27

2 years ago

1.1.16

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.1.24

2 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.13

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago