Expand description
NGAP (3GPP TS 38.413) PDU structure, the IEs of the procedures NetGet speaks, and message builders — shared by the AMF (server) and the gNB (client).
§What is decoded and what is skipped
An NGAP PDU is a CHOICE of initiating / successful / unsuccessful message, each carrying a
procedure code, a criticality and an open type holding a ProtocolIE-Container: a list of
(id, criticality, open type) fields. decode_pdu walks that outer structure for every
procedure, so any NGAP message can be framed, named and have its IE ids reported. The IE
values are decoded only for the procedures listed in procedure_name’s implemented set:
NG Setup, Initial UE Message, Downlink/Uplink NAS Transport, Error Indication, NG Reset and UE
Context Release. An IE NetGet does not decode stays as its raw octets and is surfaced by id —
the open-type framing is exactly what lets a receiver do that honestly.
Every value is checked against its ASN.1 constraint on the way in and on the way out, so an action cannot put a 33-bit gNB ID or an eleven-digit MCC on the wire.
§Bounds
MAX_PDU_LEN bounds the PDU, MAX_IES the IE count per container, MAX_NAS_PDU_LEN the
NAS-PDU, and every SEQUENCE OF is bounded by its own 38.413 constraint and by
MAX_LIST_ITEMS in total per decode, so the structure handed to the model is bounded however
the peer nests its lists. No decoder here recurses.
Re-exports§
pub use aper::AperError as WireError;
Structs§
- Budget
- Counts list elements across one PDU so nested lists cannot multiply into an unbounded event.
- Cause
- An NGAP Cause: a group and an index in that group’s root (or, when
extended, its extension list). - Encode
Error - An encode refusal: what the action asked for cannot be put on the wire.
- Ie
- One
ProtocolIE-Field, its value still an encoded open type. - Initial
Ue - The UE-associated fields of an Initial UE Message.
- NasTransport
- The fields of a Downlink or Uplink NAS Transport.
- Pdu
- One NGAP PDU with its IEs framed but not interpreted.
- Plmn
- A PLMN identity, three TBCD octets (TS 38.413 section 9.3.3.5, TS 24.008 figure 10.5.13).
- Protocol
Error - A PDU NetGet refuses, with the NGAP Cause that tells the peer why. The detail is for the log only; nothing in it is put on the wire.
Enums§
Constants§
- CHOICE_
EXTENSIONS - Marker for the
choice-Extensionsindex of a CHOICE withalternativesalternatives. - IE_
AMF_ NAME - IE_
AMF_ SET_ ID - IE_
AMF_ UE_ NGAP_ ID - IE_
CAUSE - IE_
CRITICALITY_ DIAGNOSTICS - IE_
DEFAULT_ PAGING_ DRX - IE_
FIVE_ G_ S_ TMSI - IE_
GLOBAL_ RAN_ NODE_ ID - IE_
NAS_ PDU - IE_
PLMN_ SUPPORT_ LIST - IE_
RAN_ NODE_ NAME - IE_
RAN_ UE_ NGAP_ ID - IE_
RELATIVE_ AMF_ CAPACITY - IE_
RESET_ TYPE - IE_
RRC_ ESTABLISHMENT_ CAUSE - IE_
SERVED_ GUAMI_ LIST - IE_
SUPPORTED_ TA_ LIST - IE_
TIME_ TO_ WAIT - IE_
UE_ ASSOCIATED_ LOGICAL_ NG_ CONNECTION_ LIST - IE_
UE_ CONTEXT_ REQUEST - IE_
UE_ NGAP_ IDS - IE_
USER_ LOCATION_ INFORMATION - MAX_
AMF_ UE_ NGAP_ ID - MAX_IES
- IEs accepted in one
ProtocolIE-Container. The constraint allows 65535; the largest message in NetGet’s subset carries about ten. - MAX_
LIST_ ITEMS SEQUENCE OFelements decoded per PDU, summed across every list in it.- MAX_
NAS_ PDU_ LEN - Largest NAS-PDU accepted or written. A 5GMM message NetGet handles is under a hundred octets; 8 KiB leaves room for any capability container a UE might add without approaching the APER fragmentation threshold.
- MAX_
PDU_ LEN - Largest NGAP PDU accepted or written. NGAP itself has no length field; this is the bound on one SCTP message (or one lab-transport frame).
- MAX_
RAN_ UE_ NGAP_ ID - MISC_
CONTROL_ PROCESSING_ OVERLOAD - MISC_
HARDWARE_ FAILURE - MISC_
OM_ INTERVENTION - MISC_
UNKNOWN_ PLMN - MISC_
UNSPECIFIED - NAS_
NORMAL_ RELEASE - NAS_
UNSPECIFIED - PPID
- SCTP Payload Protocol Identifier for NGAP (TS 38.412 section 7).
- PROC_
AMF_ CONFIGURATION_ UPDATE - PROC_
DOWNLINK_ NAS_ TRANSPORT - PROC_
ERROR_ INDICATION - PROC_
INITIAL_ UE_ MESSAGE - PROC_
NG_ RESET - PROC_
NG_ SETUP - PROC_
RAN_ CONFIGURATION_ UPDATE - PROC_
UE_ CONTEXT_ RELEASE - PROC_
UPLINK_ NAS_ TRANSPORT - PROTOCOL_
ABSTRACT_ SYNTAX_ ERROR_ REJECT - PROTOCOL_
MESSAGE_ NOT_ COMPATIBLE_ WITH_ RECEIVER_ STATE - PROTOCOL_
SEMANTIC_ ERROR - PROTOCOL_
TRANSFER_ SYNTAX_ ERROR - PROTOCOL_
UNSPECIFIED - RADIO_
INCONSISTENT_ REMOTE_ UE_ NGAP_ ID - RADIO_
UNKNOWN_ LOCAL_ UE_ NGAP_ ID - SCTP_
PORT - SCTP port the AMF listens on (TS 38.412 section 7, IANA).
Functions§
- amf_
ue_ ngap_ id_ ie - cause_
ie - connection_
list_ ie - decode_
amf_ ue_ ngap_ id - decode_
cause - decode_
connection_ list_ ie - decode_
global_ ran_ node_ id - GlobalRANNodeID — gNB form decoded; ng-eNB and N3IWF forms named only.
- decode_
name - decode_
nas_ pdu - decode_
pdu - Decode the outer structure of one NGAP PDU.
- decode_
plmn_ support_ list - decode_
ran_ ue_ ngap_ id - decode_
relative_ amf_ capacity - decode_
reset_ type - ResetType:
Noneis reset-all,Some(items)the partial form. - decode_
served_ guami_ list - decode_
supported_ ta_ list - decode_
time_ to_ wait - decode_
ue_ ngap_ ids - UE-NGAP-IDs:
(amf_ue_ngap_id, Some(ran_ue_ngap_id))for the pair form. - decode_
user_ location - UserLocationInformation: NR decoded fully, E-UTRA decoded, N3IWF named.
- downlink_
nas_ transport - encode_
pdu - Encode one NGAP PDU.
- error_
indication - global_
gnb_ id_ ie - ie_name
- Name of an IE id NetGet decodes, for events. Others are reported by number.
- initial_
ue_ message - is_
ue_ associated - True when the PDU is UE-associated signalling — it carries an AMF or RAN UE NGAP ID — which TS 38.412 section 7 sends on a non-zero SCTP stream. Non-UE-associated signalling (NG Setup, NG Reset, a UE-less Error Indication) uses stream 0.
- json_
opt_ u64 - json_
u64 - name_ie
- nas_
pdu_ ie - ng_
reset - ng_
reset_ acknowledge - NG Reset Acknowledge; for a partial reset the list of connections reset is echoed (38.413 section 8.7.4.2.1).
- ng_
setup_ failure - ng_
setup_ request - ng_
setup_ response - NG Setup Response from the model’s fields.
- paging_
drx_ ie - parse_
cause_ message - NG Setup Failure, or any message carrying an optional Cause and Time to Wait.
- parse_
initial_ ue_ message - Initial UE Message (TS 38.413 section 9.2.5.1).
- parse_
nas_ transport - Downlink (9.2.5.2) or Uplink (9.2.5.3) NAS Transport.
- parse_
ng_ setup_ request - NG Setup Request, decoded for the model (TS 38.413 section 9.2.6.1).
- parse_
ng_ setup_ response - NG Setup Response, decoded for the gNB’s model (TS 38.413 section 9.2.6.2).
- peek
- The procedure code and kind of an encoded PDU, read without decoding the rest.
- plmn_
support_ list_ ie [{"plmn": {...}, "slices": [{"sst": 1, "sd": "010203"}]}]- procedure_
name - Name of a procedure code, for logs and events.
Nonefor a code NetGet has no name for. - ran_
ue_ ngap_ id_ ie - relative_
amf_ capacity_ ie - reset_
type_ ie - served_
guami_ list_ ie [{"plmn": {...}, "amf_region_id": 2, "amf_set_id": 1, "amf_pointer": 0}]- summarize
- Every IE id of an encoded PDU, for logs;
Nonewhen it does not decode. - supported_
ta_ list_ ie [{"tac": 1, "broadcast_plmns": [{"plmn": {...}, "slices": [{"sst": 1}]}]}]- time_
to_ wait_ ie - ue_
context_ release_ command - ue_
context_ release_ complete - ue_
ngap_ ids_ ie - uplink_
nas_ transport - user_
location_ nr_ ie - NR user location:
{"cgi": {"plmn", "cell_id"}, "tai": {"plmn", "tac"}}.
Type Aliases§
- Codec
Result - Connection
Item - One
UE-associatedLogicalNG-connectionItem: either id may be absent. - Encode
Result