ngap

package module
v0.0.0-...-d937fce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2021 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CAMPER_TYPE_TEMPORARY = 0
	CAMPER_TYPE_NORMAL    = 1
)
View Source
const (
	ULInfoEUTRA = iota
	ULInfoNR
	ULInfoN3IWF
)

9.3.1.16 User Location Information

UserLocationInformation ::= CHOICE {
    userLocationInformationEUTRA    UserLocationInformationEUTRA,
    userLocationInformationNR       UserLocationInformationNR,
    userLocationInformationN3IWF    UserLocationInformationN3IWF,
    choice-Extensions       ProtocolIE-SingleContainer { {UserLocationInformation-ExtIEs} }
}

Variables

View Source
var PDUSessionTypeStr = map[int]string{
	// contains filtered or unexported fields
}
View Source
var RanUeNgapId uint32 = 0

Functions

This section is empty.

Types

type BroadcastPLMN

type BroadcastPLMN struct {
	MCC              uint16
	MNC              uint16
	SliceSupportList []SliceSupport
}

Broadcast PLMN Item is defined in 9.2.6.1 NG SETUP REQUEST

BroadcastPLMNItem ::= SEQUENCE {
    pLMNIdentity            PLMNIdentity,
    tAISliceSupportList     SliceSupportList,
    iE-Extensions           ProtocolExtensionContainer { {BroadcastPLMNItem-ExtIEs} } OPTIONAL,
    ...
}

type Camper

type Camper struct {
	GNB          *GNB // camped in this gNB
	UE           *nas.UE
	GTPu         *gtp.GTP
	AmfId        uint32
	RanId        uint32
	RRCstate     int
	PDUSessionID uint8
	QosFlowID    uint8

	SendMsg *[]byte
	RecvMsg *[]byte
	// contains filtered or unexported fields
}

type GNB

type GNB struct {
	GlobalGNBID     GlobalGNBID
	SupportedTAList []SupportedTA
	PagingDRX       string
	RANUENGAPID     uint32
	ULInfoNR        UserLocationInformationNR
	NGAPPeerAddr    string
	GTPuLocalAddr   string
	GTPuIFname      string
	GTPuTEID        uint32
	UE              nas.UE // base parameter to be used for each UE

	Recv struct {
		GTPuPeerAddr net.IP
		GTPuPeerTEID uint32
	}

	Camper []*Camper

	DecodeError error
	// contains filtered or unexported fields
}

func NewNGAP

func NewNGAP(filename string) (p *GNB)

func (*GNB) CampIn

func (gnb *GNB) CampIn(ue *nas.UE)

func (*GNB) Decode

func (gnb *GNB) Decode(pdu *[]byte)

func (*GNB) GetDebugLevel

func (gnb *GNB) GetDebugLevel() int

func (*GNB) LookupCamperByRanId

func (gnb *GNB) LookupCamperByRanId(id uint32) (c *Camper)

func (*GNB) LookupCamperByUE

func (gnb *GNB) LookupCamperByUE(ue *nas.UE) (c *Camper)

func (*GNB) MakeInitialContextSetupResponse

func (gnb *GNB) MakeInitialContextSetupResponse(ue *nas.UE) (pdu []byte)

9.2.2.2 INITIAL CONTEXT SETUP RESPONSE

InitialContextSetupResponse ::= SEQUENCE {
    protocolIEs     ProtocolIE-Container        { {InitialContextSetupResponseIEs} },
    ...
}
InitialContextSetupResponseIEs NGAP-PROTOCOL-IES ::= {
    { ID id-AMF-UE-NGAP-ID                              CRITICALITY ignore  TYPE AMF-UE-NGAP-ID                                 PRESENCE mandatory  }|
    { ID id-RAN-UE-NGAP-ID                              CRITICALITY ignore  TYPE RAN-UE-NGAP-ID                                 PRESENCE mandatory  }|
    { ID id-PDUSessionResourceSetupListCxtRes           CRITICALITY ignore  TYPE PDUSessionResourceSetupListCxtRes              PRESENCE optional       }|
    { ID id-PDUSessionResourceFailedToSetupListCxtRes   CRITICALITY ignore  TYPE PDUSessionResourceFailedToSetupListCxtRes      PRESENCE optional       }|
    { ID id-CriticalityDiagnostics                      CRITICALITY ignore  TYPE CriticalityDiagnostics                         PRESENCE optional       },
    ...
}

func (*GNB) MakeInitialUEMessage

func (gnb *GNB) MakeInitialUEMessage(ue *nas.UE) (pdu []byte)

9.2.5.1 INITIAL UE MESSAGE

InitialUEMessage ::= SEQUENCE {
    protocolIEs     ProtocolIE-Container        { {InitialUEMessage-IEs} },
    ...
}
InitialUEMessage-IEs NGAP-PROTOCOL-IES ::= {
    { ID id-RAN-UE-NGAP-ID              CRITICALITY reject  TYPE RAN-UE-NGAP-ID             PRESENCE mandatory  }|
    { ID id-NAS-PDU                     CRITICALITY reject  TYPE NAS-PDU                    PRESENCE mandatory  }|
    { ID id-UserLocationInformation     CRITICALITY reject  TYPE UserLocationInformation    PRESENCE mandatory  }|
    { ID id-RRCEstablishmentCause       CRITICALITY ignore  TYPE RRCEstablishmentCause      PRESENCE mandatory  }|
    { ID id-FiveG-S-TMSI                CRITICALITY reject  TYPE FiveG-S-TMSI               PRESENCE optional   }|
    { ID id-AMFSetID                    CRITICALITY ignore  TYPE AMFSetID                   PRESENCE optional   }|
    { ID id-UEContextRequest            CRITICALITY ignore  TYPE UEContextRequest           PRESENCE optional   }|
    { ID id-AllowedNSSAI                CRITICALITY reject  TYPE AllowedNSSAI               PRESENCE optional   },
    ...
}

func (*GNB) MakeNGSetupRequest

func (gnb *GNB) MakeNGSetupRequest() (pdu []byte)

9.2.6.1 NG SETUP REQUEST

NGSetupRequest ::= SEQUENCE {
    protocolIEs     ProtocolIE-Container        { {NGSetupRequestIEs} },
    ...
}
NGSetupRequestIEs NGAP-PROTOCOL-IES ::= {
    { ID id-GlobalRANNodeID         CRITICALITY reject  TYPE GlobalRANNodeID        PRESENCE mandatory }|
    { ID id-RANNodeName             CRITICALITY ignore  TYPE RANNodeName            PRESENCE optional  }|
    { ID id-SupportedTAList         CRITICALITY reject  TYPE SupportedTAList        PRESENCE mandatory }|
    { ID id-DefaultPagingDRX        CRITICALITY ignore  TYPE PagingDRX              PRESENCE mandatory }|
    { ID id-UERetentionInformation  CRITICALITY ignore  TYPE UERetentionInformation PRESENCE optional  },
    ...
}

func (*GNB) MakePDUSessionResourceSetupResponse

func (gnb *GNB) MakePDUSessionResourceSetupResponse(ue *nas.UE) (pdu []byte)

9.2.1.2 PDU SESSION RESOURCE SETUP RESPONSE

PDUSessionResourceSetupResponse ::= SEQUENCE {
    protocolIEs     ProtocolIE-Container        { {PDUSessionResourceSetupResponseIEs} },
    ...
}
PDUSessionResourceSetupResponseIEs NGAP-PROTOCOL-IES ::= {
    { ID id-AMF-UE-NGAP-ID                              CRITICALITY ignore  TYPE AMF-UE-NGAP-ID                                         PRESENCE mandatory  }|
    { ID id-RAN-UE-NGAP-ID                              CRITICALITY ignore  TYPE RAN-UE-NGAP-ID                                         PRESENCE mandatory  }|
    { ID id-PDUSessionResourceSetupListSURes            CRITICALITY ignore  TYPE PDUSessionResourceSetupListSURes               PRESENCE optional       }|
    { ID id-PDUSessionResourceFailedToSetupListSURes    CRITICALITY ignore  TYPE PDUSessionResourceFailedToSetupListSURes       PRESENCE optional       }|
    { ID id-CriticalityDiagnostics                      CRITICALITY ignore  TYPE CriticalityDiagnostics                             PRESENCE optional       },
    ...
}

func (*GNB) MakeUplinkNASTransport

func (gnb *GNB) MakeUplinkNASTransport(ue *nas.UE) (pdu []byte)

9.2.5.3 UPLINK NAS TRANSPORT

UplinkNASTransport ::= SEQUENCE {
    protocolIEs     ProtocolIE-Container    { {UplinkNASTransport-IEs} },
    ...
}
UplinkNASTransport-IEs NGAP-PROTOCOL-IES ::= {
    { ID id-AMF-UE-NGAP-ID              CRITICALITY reject  TYPE AMF-UE-NGAP-ID                 PRESENCE mandatory  }|
    { ID id-RAN-UE-NGAP-ID              CRITICALITY reject  TYPE RAN-UE-NGAP-ID                 PRESENCE mandatory  }|
    { ID id-NAS-PDU                     CRITICALITY reject  TYPE NAS-PDU                        PRESENCE mandatory  }|
    { ID id-UserLocationInformation     CRITICALITY ignore  TYPE UserLocationInformation        PRESENCE mandatory  },
    ...
}

func (*GNB) RecvfromUE

func (gnb *GNB) RecvfromUE(ue *nas.UE, pdu *[]byte)

func (*GNB) SendtoUE

func (gnb *GNB) SendtoUE(c *Camper, pdu *[]byte)

func (*GNB) SetDebugLevel

func (gnb *GNB) SetDebugLevel(level int)

type GlobalGNBID

type GlobalGNBID struct {
	MCC   uint16
	MNC   uint16
	GNBID uint32
}

9.3.1.6 Global gNB ID

GlobalGNB-ID ::= SEQUENCE {
    pLMNIdentity        PLMNIdentity,
    gNB-ID              GNB-ID,
    iE-Extensions       ProtocolExtensionContainer { {GlobalGNB-ID-ExtIEs} } OPTIONAL,
    ...
}

type NRCGI

type NRCGI struct {
	PLMN     PLMN
	NRCellID uint64
}

9.3.1.7 NR CGI

NR-CGI ::= SEQUENCE {
    pLMNIdentity        PLMNIdentity,
    nRCellIdentity      NRCellIdentity,
    iE-Extensions       ProtocolExtensionContainer { {NR-CGI-ExtIEs} } OPTIONAL,
    ...
}

NRCellIdentity ::= BIT STRING (SIZE(36))

type PLMN

type PLMN struct {
	MCC uint16
	MNC uint16
}

9.3.3.5 PLMN Identity

PLMNIdentity ::= OCTET STRING (SIZE(3))

type SliceSupport

type SliceSupport struct {
	SST uint8
	SD  string
}
SliceSupportItem ::= SEQUENCE {
    s-NSSAI             S-NSSAI,
    iE-Extensions       ProtocolExtensionContainer { {SliceSupportItem-ExtIEs} }    OPTIONAL,
    ...
}

type SupportedTA

type SupportedTA struct {
	TAC               string
	BroadcastPLMNList []BroadcastPLMN
}

Supported TA Item is defined in 9.2.6.1 NG SETUP REQUEST

SupportedTAItem ::= SEQUENCE {
    tAC                     TAC,
    broadcastPLMNList       BroadcastPLMNList,
    iE-Extensions           ProtocolExtensionContainer { {SupportedTAItem-ExtIEs} } OPTIONAL,
    ...
}

type TAI

type TAI struct {
	PLMN PLMN
	TAC  string
}

9.3.3.11 TAI

TAI ::= SEQUENCE {
    pLMNIdentity        PLMNIdentity,
    tAC                 TAC,
    iE-Extensions       ProtocolExtensionContainer { {TAI-ExtIEs} } OPTIONAL,
    ...
}

type UserLocationInformationNR

type UserLocationInformationNR struct {
	NRCGI NRCGI
	TAI   TAI
}
UserLocationInformationNR ::= SEQUENCE {
    nR-CGI              NR-CGI,
    tAI                 TAI,
    timeStamp           TimeStamp                                                           OPTIONAL,
    iE-Extensions       ProtocolExtensionContainer { {UserLocationInformationNR-ExtIEs} }   OPTIONAL,
    ...
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL