Documentation ¶
Index ¶
- Constants
- type AMFOverloadContent
- type AMFTNLAssociationItem
- type ChildSecurityAssociation
- type CreatePDUSessionEvt
- type EvtError
- type GTPConnectionInfo
- type GetNGAPContextEvt
- type GetNGAPContextRepEvt
- type IKEContextUpdateEvt
- type IKEDeleteRequestEvt
- type IKESecurityAssociation
- type IkeEventType
- type IkeEvt
- type IkeMsgTemporaryData
- type N3IWFAMF
- func (amf *N3IWFAMF) AddAMFTNLAssociationItem(info ngapType.CPTransportLayerInformation) *AMFTNLAssociationItem
- func (amf *N3IWFAMF) DeleteAMFTNLAssociationItem(info ngapType.CPTransportLayerInformation)
- func (amf *N3IWFAMF) FindAMFTNLAssociationItem(info ngapType.CPTransportLayerInformation) *AMFTNLAssociationItem
- func (amf *N3IWFAMF) FindAvalibleAMFByCompareGUAMI(ueSpecifiedGUAMI *ngapType.GUAMI) bool
- func (amf *N3IWFAMF) FindAvalibleAMFByCompareSelectedPLMNId(ueSpecifiedSelectedPLMNId *ngapType.PLMNIdentity) bool
- func (amf *N3IWFAMF) FindUeByAmfUeNgapID(id int64) *N3IWFRanUe
- func (amf *N3IWFAMF) RemoveAllRelatedUe() error
- func (amf *N3IWFAMF) StartOverload(resp *ngapType.OverloadResponse, ...) *AMFOverloadContent
- func (amf *N3IWFAMF) StopOverload()
- type N3IWFContext
- func (c *N3IWFContext) AMFPoolLoad(sctpAddr string) (*N3IWFAMF, bool)
- func (c *N3IWFContext) AMFReInitAvailableListLoad(sctpAddr string) (bool, bool)
- func (c *N3IWFContext) AMFReInitAvailableListStore(sctpAddr string, flag bool)
- func (c *N3IWFContext) AMFSelection(ueSpecifiedGUAMI *ngapType.GUAMI, ueSpecifiedPLMNId *ngapType.PLMNIdentity) *N3IWFAMF
- func (c *N3IWFContext) AllocatedUEIPAddressLoad(ipAddr string) (*N3IWFIkeUe, bool)
- func (c *N3IWFContext) AllocatedUETEIDLoad(teid uint32) (*N3IWFRanUe, bool)
- func (c *N3IWFContext) DeleteAMFReInitAvailableFlag(sctpAddr string)
- func (c *N3IWFContext) DeleteGTPConnection(upfAddr string)
- func (c *N3IWFContext) DeleteIKESecurityAssociation(spi uint64)
- func (c *N3IWFContext) DeleteIKEUe(spi uint64)
- func (c *N3IWFContext) DeleteIkeSPIFromNgapId(ranUeNgapId int64)
- func (c *N3IWFContext) DeleteInternalUEIPAddr(ipAddr string)
- func (c *N3IWFContext) DeleteN3iwfAmf(sctpAddr string)
- func (c *N3IWFContext) DeleteNgapIdFromIkeSPI(spi uint64)
- func (c *N3IWFContext) DeleteRanUe(ranUeNgapId int64)
- func (c *N3IWFContext) DeleteTEID(teid uint32)
- func (c *N3IWFContext) GTPConnectionWithUPFLoad(upfAddr string) (*gtpv1.UPlaneConn, bool)
- func (c *N3IWFContext) GTPConnectionWithUPFStore(upfAddr string, conn *gtpv1.UPlaneConn)
- func (c *N3IWFContext) IKESALoad(spi uint64) (*IKESecurityAssociation, bool)
- func (c *N3IWFContext) IkeSpiLoad(ranUeNgapId int64) (uint64, bool)
- func (c *N3IWFContext) IkeSpiNgapIdMapping(spi uint64, ranUeNgapId int64)
- func (c *N3IWFContext) IkeUeLoadFromNgapId(ranUeNgapId int64) (*N3IWFIkeUe, error)
- func (c *N3IWFContext) IkeUePoolLoad(spi uint64) (*N3IWFIkeUe, bool)
- func (c *N3IWFContext) NewIKESecurityAssociation() *IKESecurityAssociation
- func (c *N3IWFContext) NewInternalUEIPAddr(ikeUe *N3IWFIkeUe) net.IP
- func (c *N3IWFContext) NewN3iwfAmf(sctpAddr string, conn *sctp.SCTPConn) *N3IWFAMF
- func (c *N3IWFContext) NewN3iwfIkeUe(spi uint64) *N3IWFIkeUe
- func (c *N3IWFContext) NewN3iwfRanUe() *N3IWFRanUe
- func (c *N3IWFContext) NewTEID(ranUe *N3IWFRanUe) uint32
- func (c *N3IWFContext) NgapIdLoad(spi uint64) (int64, bool)
- func (c *N3IWFContext) RanUeLoadFromIkeSPI(spi uint64) (*N3IWFRanUe, error)
- func (c *N3IWFContext) RanUePoolLoad(ranUeNgapId int64) (*N3IWFRanUe, bool)
- type N3IWFIkeUe
- func (ikeUe *N3IWFIkeUe) CompleteChildSA(msgID uint32, outboundSPI uint32, ...) (*ChildSecurityAssociation, error)
- func (ikeUe *N3IWFIkeUe) CreateHalfChildSA(msgID, inboundSPI uint32, pduSessionID int64)
- func (ikeUe *N3IWFIkeUe) DeleteChildSA(childSA *ChildSecurityAssociation) error
- func (ikeUe *N3IWFIkeUe) Remove() error
- type N3IWFRanUe
- func (ranUe *N3IWFRanUe) AttachAMF(sctpAddr string) bool
- func (ranUe *N3IWFRanUe) CreatePDUSession(pduSessionID int64, snssai ngapType.SNSSAI) (*PDUSession, error)
- func (ranUe *N3IWFRanUe) DetachAMF()
- func (ranUe *N3IWFRanUe) FindPDUSession(pduSessionID int64) *PDUSession
- func (ranUe *N3IWFRanUe) Remove() error
- type NASTCPConnEstablishedCompleteEvt
- type NgapEventType
- type NgapEvt
- type PDUSession
- type PDUSessionSetupTemporaryData
- type QosFlow
- type SendChildSADeleteRequestEvt
- type SendEAP5GFailureMsgEvt
- type SendEAPNASMsgEvt
- type SendEAPSuccessMsgEvt
- type SendInitialUEMessageEvt
- type SendNASMsgEvt
- type SendPDUSessionResourceReleaseResEvt
- type SendPDUSessionResourceSetupResEvt
- type SendUEContextReleaseCompleteEvt
- type SendUEContextReleaseRequestEvt
- type SliceOverloadItem
- type StartTCPSignalNASMsgEvt
- type Timer
- type UDPSocketInfo
- type UnmarshalEAP5GDataEvt
- type UnmarshalEAP5GDataResponseEvt
Constants ¶
View Source
const ( MaxValueOfRanUeNgapID int64 = 4294967295 MaxNumOfPDUSessions int = 256 )
View Source
const ( ErrNil = EvtError("Nil") ErrRadioConnWithUeLost = EvtError("RadioConnectionWithUeLost") ErrAMFSelection = EvtError("No avalible AMF for this UE") )
NGAP IKE event error string
View Source
const (
AmfUeNgapIdUnspecified int64 = 0xffffffffff
)
View Source
const (
ArgsUEUDPConn string = "UE UDP Socket Info"
)
Temporary State Data Args
View Source
const (
CxtTempPDUSessionSetupData int64 = iota
)
Ngap context
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMFOverloadContent ¶
type AMFOverloadContent struct { Action *ngapType.OverloadAction TrafficInd *int64 NSSAIList []SliceOverloadItem }
type AMFTNLAssociationItem ¶
type AMFTNLAssociationItem struct { Ipv4 string Ipv6 string TNLAssociationUsage *ngapType.TNLAssociationUsage TNLAddressWeightFactor *int64 }
type ChildSecurityAssociation ¶
type ChildSecurityAssociation struct { // SPI InboundSPI uint32 // N3IWF Specify OutboundSPI uint32 // Non-3GPP UE Specify // Associated XFRM interface XfrmIface netlink.Link XfrmStateList []netlink.XfrmState XfrmPolicyList []netlink.XfrmPolicy // IP address PeerPublicIPAddr net.IP LocalPublicIPAddr net.IP // Traffic selector SelectedIPProtocol uint8 TrafficSelectorLocal net.IPNet TrafficSelectorRemote net.IPNet // Security EncryptionAlgorithm uint16 InitiatorToResponderEncryptionKey []byte ResponderToInitiatorEncryptionKey []byte IntegrityAlgorithm uint16 InitiatorToResponderIntegrityKey []byte ResponderToInitiatorIntegrityKey []byte ESN bool // Encapsulate EnableEncapsulate bool N3IWFPort int NATPort int // PDU Session IDs associated with this child SA PDUSessionIds []int64 // IKE UE context IkeUE *N3IWFIkeUe }
type CreatePDUSessionEvt ¶ added in v1.2.1
type CreatePDUSessionEvt struct { LocalSPI uint64 PduSessionListLen int TempPDUSessionSetupData *PDUSessionSetupTemporaryData }
func NewCreatePDUSessionEvt ¶ added in v1.2.1
func NewCreatePDUSessionEvt(localSPI uint64, pduSessionListLen int, tempPDUSessionSetupData *PDUSessionSetupTemporaryData, ) *CreatePDUSessionEvt
func (*CreatePDUSessionEvt) Type ¶ added in v1.2.1
func (createPDUSessionEvt *CreatePDUSessionEvt) Type() IkeEventType
type GTPConnectionInfo ¶
type GetNGAPContextEvt ¶ added in v1.2.1
func NewGetNGAPContextEvt ¶ added in v1.2.1
func NewGetNGAPContextEvt(ranUeNgapId int64, ngapCxtReqNumlist []int64) *GetNGAPContextEvt
func (*GetNGAPContextEvt) Type ¶ added in v1.2.1
func (getNGAPContextEvt *GetNGAPContextEvt) Type() NgapEventType
type GetNGAPContextRepEvt ¶ added in v1.2.1
type GetNGAPContextRepEvt struct { LocalSPI uint64 NgapCxtReqNumlist []int64 NgapCxt []interface{} }
func NewGetNGAPContextRepEvt ¶ added in v1.2.1
func NewGetNGAPContextRepEvt(localSPI uint64, ngapCxtReqNumlist []int64, ngapCxt []interface{}, ) *GetNGAPContextRepEvt
func (*GetNGAPContextRepEvt) Type ¶ added in v1.2.1
func (getNGAPContextRepEvt *GetNGAPContextRepEvt) Type() IkeEventType
type IKEContextUpdateEvt ¶ added in v1.2.1
func NewIKEContextUpdateEvt ¶ added in v1.2.1
func NewIKEContextUpdateEvt(localSPI uint64, kn3iwf []byte, ) *IKEContextUpdateEvt
func (*IKEContextUpdateEvt) Type ¶ added in v1.2.1
func (ikeContextUpdateEvt *IKEContextUpdateEvt) Type() IkeEventType
type IKEDeleteRequestEvt ¶ added in v1.2.1
type IKEDeleteRequestEvt struct {
LocalSPI uint64
}
func NewIKEDeleteRequestEvt ¶ added in v1.2.1
func NewIKEDeleteRequestEvt(localSPI uint64, ) *IKEDeleteRequestEvt
func (*IKEDeleteRequestEvt) Type ¶ added in v1.2.1
func (ikeDeleteRequestEvt *IKEDeleteRequestEvt) Type() IkeEventType
type IKESecurityAssociation ¶
type IKESecurityAssociation struct { // SPI RemoteSPI uint64 LocalSPI uint64 // Message ID InitiatorMessageID uint32 ResponderMessageID uint32 // Transforms for IKE SA EncryptionAlgorithm *ike_message.Transform PseudorandomFunction *ike_message.Transform IntegrityAlgorithm *ike_message.Transform DiffieHellmanGroup *ike_message.Transform ExpandedSequenceNumber *ike_message.Transform // Used for key generating ConcatenatedNonce []byte // Keys SK_d []byte // used for child SA key deriving SK_ai []byte // used by initiator for integrity checking SK_ar []byte // used by responder for integrity checking SK_ei []byte // used by initiator for encrypting SK_er []byte // used by responder for encrypting SK_pi []byte // used by initiator for IKE authentication SK_pr []byte // used by responder for IKE authentication // State for IKE_AUTH State uint8 // Temporary data stored for the use in later exchange InitiatorID *ike_message.IdentificationInitiator InitiatorCertificate *ike_message.Certificate IKEAuthResponseSA *ike_message.SecurityAssociation TrafficSelectorInitiator *ike_message.TrafficSelectorInitiator TrafficSelectorResponder *ike_message.TrafficSelectorResponder LastEAPIdentifier uint8 // UDP Connection IKEConnection *UDPSocketInfo // Authentication data ResponderSignedOctets []byte InitiatorSignedOctets []byte // NAT detection // If UEIsBehindNAT == true, N3IWF should enable NAT traversal and // TODO: should support dynamic updating network address (MOBIKE) UEIsBehindNAT bool // If N3IWFIsBehindNAT == true, N3IWF should send UDP keepalive periodically N3IWFIsBehindNAT bool // IKE UE context IkeUE *N3IWFIkeUe // Temporary store the receive ike message TemporaryIkeMsg *IkeMsgTemporaryData DPDReqRetransTimer *Timer // The time from sending the DPD request to receiving the response CurrentRetryTimes int32 // Accumulate the number of times the DPD response wasn't received IKESAClosedCh chan struct{} IsUseDPD bool }
type IkeEventType ¶ added in v1.2.1
type IkeEventType int64
const ( UnmarshalEAP5GDataResponse IkeEventType = iota SendEAP5GFailureMsg SendEAPNASMsg SendEAPSuccessMsg CreatePDUSession IKEDeleteRequest SendChildSADeleteRequest IKEContextUpdate GetNGAPContextResponse )
IKE Event type
type IkeEvt ¶ added in v1.2.1
type IkeEvt interface {
Type() IkeEventType
}
type IkeMsgTemporaryData ¶ added in v1.2.1
type IkeMsgTemporaryData struct { SecurityAssociation *ike_message.SecurityAssociation TrafficSelectorInitiator *ike_message.TrafficSelectorInitiator TrafficSelectorResponder *ike_message.TrafficSelectorResponder }
type N3IWFAMF ¶
type N3IWFAMF struct { SCTPAddr string SCTPConn *sctp.SCTPConn AMFName *ngapType.AMFName ServedGUAMIList *ngapType.ServedGUAMIList RelativeAMFCapacity *ngapType.RelativeAMFCapacity PLMNSupportList *ngapType.PLMNSupportList AMFTNLAssociationList map[string]*AMFTNLAssociationItem // v4+v6 as key // Overload related AMFOverloadContent *AMFOverloadContent // Relative Context N3iwfRanUeList map[int64]*N3IWFRanUe // ranUeNgapId as key }
func (*N3IWFAMF) AddAMFTNLAssociationItem ¶
func (amf *N3IWFAMF) AddAMFTNLAssociationItem(info ngapType.CPTransportLayerInformation) *AMFTNLAssociationItem
func (*N3IWFAMF) DeleteAMFTNLAssociationItem ¶
func (amf *N3IWFAMF) DeleteAMFTNLAssociationItem(info ngapType.CPTransportLayerInformation)
func (*N3IWFAMF) FindAMFTNLAssociationItem ¶
func (amf *N3IWFAMF) FindAMFTNLAssociationItem(info ngapType.CPTransportLayerInformation) *AMFTNLAssociationItem
func (*N3IWFAMF) FindAvalibleAMFByCompareGUAMI ¶
FindAvalibleAMFByCompareGUAMI compares the incoming GUAMI with AMF served GUAMI and return if this AMF is avalible for UE
func (*N3IWFAMF) FindAvalibleAMFByCompareSelectedPLMNId ¶
func (amf *N3IWFAMF) FindAvalibleAMFByCompareSelectedPLMNId(ueSpecifiedSelectedPLMNId *ngapType.PLMNIdentity) bool
func (*N3IWFAMF) FindUeByAmfUeNgapID ¶
func (amf *N3IWFAMF) FindUeByAmfUeNgapID(id int64) *N3IWFRanUe
func (*N3IWFAMF) RemoveAllRelatedUe ¶
func (*N3IWFAMF) StartOverload ¶
func (amf *N3IWFAMF) StartOverload( resp *ngapType.OverloadResponse, trafloadInd *ngapType.TrafficLoadReductionIndication, nssai *ngapType.OverloadStartNSSAIList, ) *AMFOverloadContent
func (*N3IWFAMF) StopOverload ¶
func (amf *N3IWFAMF) StopOverload()
type N3IWFContext ¶
type N3IWFContext struct { // ID generator RANUENGAPIDGenerator *idgenerator.IDGenerator TEIDGenerator *idgenerator.IDGenerator // Pools AMFPool sync.Map // map[string]*N3IWFAMF, SCTPAddr as key AMFReInitAvailableList sync.Map // map[string]bool, SCTPAddr as key IKESA sync.Map // map[uint64]*IKESecurityAssociation, SPI as key ChildSA sync.Map // map[uint32]*ChildSecurityAssociation, inboundSPI as key GTPConnectionWithUPF sync.Map // map[string]*gtpv1.UPlaneConn, UPF address as key AllocatedUEIPAddress sync.Map // map[string]*N3IWFIkeUe, IPAddr as key AllocatedUETEID sync.Map // map[uint32]*N3IWFRanUe, TEID as key IKEUePool sync.Map // map[uint64]*N3IWFIkeUe, SPI as key RANUePool sync.Map // map[int64]*N3IWFRanUe, RanUeNgapID as key IKESPIToNGAPId sync.Map // map[uint64]RanUeNgapID, SPI as key NGAPIdToIKESPI sync.Map // map[uint64]SPI, RanUeNgapID as key // Security data CertificateAuthority []byte N3IWFCertificate []byte N3IWFPrivateKey *rsa.PrivateKey UeIPRange *net.IPNet // XFRM interface XfrmIfaces sync.Map // map[uint32]*netlink.Link, XfrmIfaceId as key XfrmParentIfaceName string // Every UE's first UP IPsec will use default XFRM interface, additoinal UP IPsec will offset its XFRM id XfrmIfaceIdOffsetForUP uint32 // contains filtered or unexported fields }
func NewContext ¶ added in v1.2.4
func NewContext(n3iwf n3iwf) (*N3IWFContext, error)
func NewTestContext ¶ added in v1.2.4
func NewTestContext(n3iwf n3iwf) (*N3IWFContext, error)
func (*N3IWFContext) AMFPoolLoad ¶
func (c *N3IWFContext) AMFPoolLoad(sctpAddr string) (*N3IWFAMF, bool)
func (*N3IWFContext) AMFReInitAvailableListLoad ¶
func (c *N3IWFContext) AMFReInitAvailableListLoad(sctpAddr string) (bool, bool)
func (*N3IWFContext) AMFReInitAvailableListStore ¶
func (c *N3IWFContext) AMFReInitAvailableListStore(sctpAddr string, flag bool)
func (*N3IWFContext) AMFSelection ¶
func (c *N3IWFContext) AMFSelection( ueSpecifiedGUAMI *ngapType.GUAMI, ueSpecifiedPLMNId *ngapType.PLMNIdentity, ) *N3IWFAMF
func (*N3IWFContext) AllocatedUEIPAddressLoad ¶
func (c *N3IWFContext) AllocatedUEIPAddressLoad(ipAddr string) (*N3IWFIkeUe, bool)
func (*N3IWFContext) AllocatedUETEIDLoad ¶
func (c *N3IWFContext) AllocatedUETEIDLoad(teid uint32) (*N3IWFRanUe, bool)
func (*N3IWFContext) DeleteAMFReInitAvailableFlag ¶
func (c *N3IWFContext) DeleteAMFReInitAvailableFlag(sctpAddr string)
func (*N3IWFContext) DeleteGTPConnection ¶
func (c *N3IWFContext) DeleteGTPConnection(upfAddr string)
func (*N3IWFContext) DeleteIKESecurityAssociation ¶
func (c *N3IWFContext) DeleteIKESecurityAssociation(spi uint64)
func (*N3IWFContext) DeleteIKEUe ¶ added in v1.2.1
func (c *N3IWFContext) DeleteIKEUe(spi uint64)
func (*N3IWFContext) DeleteIkeSPIFromNgapId ¶ added in v1.2.1
func (c *N3IWFContext) DeleteIkeSPIFromNgapId(ranUeNgapId int64)
func (*N3IWFContext) DeleteInternalUEIPAddr ¶
func (c *N3IWFContext) DeleteInternalUEIPAddr(ipAddr string)
func (*N3IWFContext) DeleteN3iwfAmf ¶
func (c *N3IWFContext) DeleteN3iwfAmf(sctpAddr string)
func (*N3IWFContext) DeleteNgapIdFromIkeSPI ¶ added in v1.2.1
func (c *N3IWFContext) DeleteNgapIdFromIkeSPI(spi uint64)
func (*N3IWFContext) DeleteRanUe ¶ added in v1.2.1
func (c *N3IWFContext) DeleteRanUe(ranUeNgapId int64)
func (*N3IWFContext) DeleteTEID ¶
func (c *N3IWFContext) DeleteTEID(teid uint32)
func (*N3IWFContext) GTPConnectionWithUPFLoad ¶
func (c *N3IWFContext) GTPConnectionWithUPFLoad(upfAddr string) (*gtpv1.UPlaneConn, bool)
func (*N3IWFContext) GTPConnectionWithUPFStore ¶
func (c *N3IWFContext) GTPConnectionWithUPFStore(upfAddr string, conn *gtpv1.UPlaneConn)
func (*N3IWFContext) IKESALoad ¶
func (c *N3IWFContext) IKESALoad(spi uint64) (*IKESecurityAssociation, bool)
func (*N3IWFContext) IkeSpiLoad ¶ added in v1.2.1
func (c *N3IWFContext) IkeSpiLoad(ranUeNgapId int64) (uint64, bool)
func (*N3IWFContext) IkeSpiNgapIdMapping ¶ added in v1.2.1
func (c *N3IWFContext) IkeSpiNgapIdMapping(spi uint64, ranUeNgapId int64)
func (*N3IWFContext) IkeUeLoadFromNgapId ¶ added in v1.2.1
func (c *N3IWFContext) IkeUeLoadFromNgapId(ranUeNgapId int64) (*N3IWFIkeUe, error)
func (*N3IWFContext) IkeUePoolLoad ¶ added in v1.2.1
func (c *N3IWFContext) IkeUePoolLoad(spi uint64) (*N3IWFIkeUe, bool)
func (*N3IWFContext) NewIKESecurityAssociation ¶
func (c *N3IWFContext) NewIKESecurityAssociation() *IKESecurityAssociation
func (*N3IWFContext) NewInternalUEIPAddr ¶
func (c *N3IWFContext) NewInternalUEIPAddr(ikeUe *N3IWFIkeUe) net.IP
func (*N3IWFContext) NewN3iwfAmf ¶
func (c *N3IWFContext) NewN3iwfAmf(sctpAddr string, conn *sctp.SCTPConn) *N3IWFAMF
func (*N3IWFContext) NewN3iwfIkeUe ¶ added in v1.2.1
func (c *N3IWFContext) NewN3iwfIkeUe(spi uint64) *N3IWFIkeUe
func (*N3IWFContext) NewN3iwfRanUe ¶ added in v1.2.1
func (c *N3IWFContext) NewN3iwfRanUe() *N3IWFRanUe
func (*N3IWFContext) NewTEID ¶
func (c *N3IWFContext) NewTEID(ranUe *N3IWFRanUe) uint32
func (*N3IWFContext) NgapIdLoad ¶ added in v1.2.1
func (c *N3IWFContext) NgapIdLoad(spi uint64) (int64, bool)
func (*N3IWFContext) RanUeLoadFromIkeSPI ¶ added in v1.2.1
func (c *N3IWFContext) RanUeLoadFromIkeSPI(spi uint64) (*N3IWFRanUe, error)
func (*N3IWFContext) RanUePoolLoad ¶ added in v1.2.1
func (c *N3IWFContext) RanUePoolLoad(ranUeNgapId int64) (*N3IWFRanUe, bool)
type N3IWFIkeUe ¶ added in v1.2.1
type N3IWFIkeUe struct { N3iwfCtx *N3IWFContext /* UE identity */ IPSecInnerIP net.IP IPSecInnerIPAddr *net.IPAddr // Used to send UP packets to UE /* IKE Security Association */ N3IWFIKESecurityAssociation *IKESecurityAssociation N3IWFChildSecurityAssociation map[uint32]*ChildSecurityAssociation // inbound SPI as key /* Temporary Mapping of two SPIs */ // Exchange Message ID(including a SPI) and ChildSA(including a SPI) // Mapping of Message ID of exchange in IKE and Child SA when creating new child SA TemporaryExchangeMsgIDChildSAMapping map[uint32]*ChildSecurityAssociation // Message ID as a key /* Security */ Kn3iwf []uint8 // 32 bytes (256 bits), value is from NGAP IE "Security Key" /* NAS IKE Connection */ IKEConnection *UDPSocketInfo // Length of PDU Session List PduSessionListLen int }
func (*N3IWFIkeUe) CompleteChildSA ¶ added in v1.2.1
func (ikeUe *N3IWFIkeUe) CompleteChildSA(msgID uint32, outboundSPI uint32, chosenSecurityAssociation *ike_message.SecurityAssociation, ) (*ChildSecurityAssociation, error)
func (*N3IWFIkeUe) CreateHalfChildSA ¶ added in v1.2.1
func (ikeUe *N3IWFIkeUe) CreateHalfChildSA(msgID, inboundSPI uint32, pduSessionID int64)
When N3IWF send CREATE_CHILD_SA request to N3UE, the inbound SPI of childSA will be only stored first until receive response and call CompleteChildSAWithProposal to fill the all data of childSA
func (*N3IWFIkeUe) DeleteChildSA ¶ added in v1.2.1
func (ikeUe *N3IWFIkeUe) DeleteChildSA(childSA *ChildSecurityAssociation) error
func (*N3IWFIkeUe) Remove ¶ added in v1.2.1
func (ikeUe *N3IWFIkeUe) Remove() error
type N3IWFRanUe ¶ added in v1.2.1
type N3IWFRanUe struct { /* UE identity */ RanUeNgapId int64 AmfUeNgapId int64 IPAddrv4 string IPAddrv6 string PortNumber int32 MaskedIMEISV *ngapType.MaskedIMEISV // TS 38.413 9.3.1.54 Guti string /* Relative Context */ N3iwfCtx *N3IWFContext AMF *N3IWFAMF /* Security */ SecurityCapabilities *ngapType.UESecurityCapabilities // TS 38.413 9.3.1.86 /* PDU Session */ PduSessionList map[int64]*PDUSession // pduSessionId as key /* PDU Session Setup Temporary Data */ TemporaryPDUSessionSetupData *PDUSessionSetupTemporaryData /* Temporary cached NAS message */ // Used when NAS registration accept arrived before // UE setup NAS TCP connection with N3IWF, and // Forward pduSessionEstablishmentAccept to UE after // UE send CREATE_CHILD_SA response TemporaryCachedNASMessage []byte /* NAS TCP Connection Established */ IsNASTCPConnEstablished bool IsNASTCPConnEstablishedComplete bool /* NAS TCP Connection */ TCPConnection net.Conn /* Others */ Guami *ngapType.GUAMI IndexToRfsp int64 Ambr *ngapType.UEAggregateMaximumBitRate AllowedNssai *ngapType.AllowedNSSAI RadioCapability *ngapType.UERadioCapability // TODO: This is for RRC, can be deleted CoreNetworkAssistanceInformation *ngapType.CoreNetworkAssistanceInformation // TS 38.413 9.3.1.15 IMSVoiceSupported int32 RRCEstablishmentCause int16 PduSessionReleaseList ngapType.PDUSessionResourceReleasedListRelRes }
func (*N3IWFRanUe) AttachAMF ¶ added in v1.2.1
func (ranUe *N3IWFRanUe) AttachAMF(sctpAddr string) bool
func (*N3IWFRanUe) CreatePDUSession ¶ added in v1.2.1
func (ranUe *N3IWFRanUe) CreatePDUSession(pduSessionID int64, snssai ngapType.SNSSAI) (*PDUSession, error)
func (*N3IWFRanUe) DetachAMF ¶ added in v1.2.1
func (ranUe *N3IWFRanUe) DetachAMF()
func (*N3IWFRanUe) FindPDUSession ¶ added in v1.2.1
func (ranUe *N3IWFRanUe) FindPDUSession(pduSessionID int64) *PDUSession
func (*N3IWFRanUe) Remove ¶ added in v1.2.1
func (ranUe *N3IWFRanUe) Remove() error
type NASTCPConnEstablishedCompleteEvt ¶ added in v1.2.1
type NASTCPConnEstablishedCompleteEvt struct {
RanUeNgapId int64
}
func NewNASTCPConnEstablishedCompleteEvt ¶ added in v1.2.1
func NewNASTCPConnEstablishedCompleteEvt(ranUeNgapId int64) *NASTCPConnEstablishedCompleteEvt
func (*NASTCPConnEstablishedCompleteEvt) Type ¶ added in v1.2.1
func (nasTCPConnEstablishedCompleteEvt *NASTCPConnEstablishedCompleteEvt) Type() NgapEventType
type NgapEventType ¶ added in v1.2.1
type NgapEventType int64
const ( UnmarshalEAP5GData NgapEventType = iota SendInitialUEMessage SendPDUSessionResourceSetupResponse SendNASMsg StartTCPSignalNASMsg NASTCPConnEstablishedComplete SendUEContextReleaseRequest SendUEContextReleaseComplete SendPDUSessionResourceReleaseResponse GetNGAPContext )
NGAP event type
type NgapEvt ¶ added in v1.2.1
type NgapEvt interface {
Type() NgapEventType
}
type PDUSession ¶
type PDUSession struct { Id int64 // PDU Session ID Type *ngapType.PDUSessionType Ambr *ngapType.PDUSessionAggregateMaximumBitRate Snssai ngapType.SNSSAI NetworkInstance *ngapType.NetworkInstance SecurityCipher bool SecurityIntegrity bool MaximumIntegrityDataRateUplink *ngapType.MaximumIntegrityProtectedDataRate MaximumIntegrityDataRateDownlink *ngapType.MaximumIntegrityProtectedDataRate GTPConnection *GTPConnectionInfo QFIList []uint8 QosFlows map[int64]*QosFlow // QosFlowIdentifier as key }
type PDUSessionSetupTemporaryData ¶
type PDUSessionSetupTemporaryData struct { // Slice of unactivated PDU session UnactivatedPDUSession []*PDUSession // PDUSession as content // NGAPProcedureCode is used to identify which type of // response shall be used NGAPProcedureCode ngapType.ProcedureCode // PDU session setup list response SetupListCxtRes *ngapType.PDUSessionResourceSetupListCxtRes FailedListCxtRes *ngapType.PDUSessionResourceFailedToSetupListCxtRes SetupListSURes *ngapType.PDUSessionResourceSetupListSURes FailedListSURes *ngapType.PDUSessionResourceFailedToSetupListSURes // List of Error for failed setup PDUSessionID FailedErrStr []EvtError // Error string as content // Current Index of UnactivatedPDUSession Index int }
type QosFlow ¶
type QosFlow struct { Identifier int64 Parameters ngapType.QosFlowLevelQosParameters }
type SendChildSADeleteRequestEvt ¶ added in v1.2.1
func NewSendChildSADeleteRequestEvt ¶ added in v1.2.1
func NewSendChildSADeleteRequestEvt(localSPI uint64, releaseIdList []int64, ) *SendChildSADeleteRequestEvt
func (*SendChildSADeleteRequestEvt) Type ¶ added in v1.2.1
func (sendChildSADeleteRequestEvt *SendChildSADeleteRequestEvt) Type() IkeEventType
type SendEAP5GFailureMsgEvt ¶ added in v1.2.1
func NewSendEAP5GFailureMsgEvt ¶ added in v1.2.1
func NewSendEAP5GFailureMsgEvt(localSPI uint64, errMsg EvtError, ) *SendEAP5GFailureMsgEvt
func (*SendEAP5GFailureMsgEvt) Type ¶ added in v1.2.1
func (sendEAP5GFailureMsgEvt *SendEAP5GFailureMsgEvt) Type() IkeEventType
type SendEAPNASMsgEvt ¶ added in v1.2.1
func NewSendEAPNASMsgEvt ¶ added in v1.2.1
func NewSendEAPNASMsgEvt(localSPI uint64, nasPDU []byte, ) *SendEAPNASMsgEvt
func (*SendEAPNASMsgEvt) Type ¶ added in v1.2.1
func (sendEAPNASMsgEvt *SendEAPNASMsgEvt) Type() IkeEventType
type SendEAPSuccessMsgEvt ¶ added in v1.2.1
func NewSendEAPSuccessMsgEvt ¶ added in v1.2.1
func NewSendEAPSuccessMsgEvt(localSPI uint64, kn3iwf []byte, pduSessionListLen int, ) *SendEAPSuccessMsgEvt
func (*SendEAPSuccessMsgEvt) Type ¶ added in v1.2.1
func (SendEAPSuccessMsgEvt *SendEAPSuccessMsgEvt) Type() IkeEventType
type SendInitialUEMessageEvt ¶ added in v1.2.1
type SendInitialUEMessageEvt struct { RanUeNgapId int64 IPv4Addr string IPv4Port int NasPDU []byte }
func NewSendInitialUEMessageEvt ¶ added in v1.2.1
func NewSendInitialUEMessageEvt(ranUeNgapId int64, ipv4Addr string, ipv4Port int, nasPDU []byte, ) *SendInitialUEMessageEvt
func (*SendInitialUEMessageEvt) Type ¶ added in v1.2.1
func (sendInitialUEMessageEvt *SendInitialUEMessageEvt) Type() NgapEventType
type SendNASMsgEvt ¶ added in v1.2.1
type SendNASMsgEvt struct {
RanUeNgapId int64
}
func NewSendNASMsgEvt ¶ added in v1.2.1
func NewSendNASMsgEvt(ranUeNgapId int64) *SendNASMsgEvt
func (*SendNASMsgEvt) Type ¶ added in v1.2.1
func (sendNASMsgEvt *SendNASMsgEvt) Type() NgapEventType
type SendPDUSessionResourceReleaseResEvt ¶ added in v1.2.1
type SendPDUSessionResourceReleaseResEvt struct {
RanUeNgapId int64
}
func NewSendPDUSessionResourceReleaseResEvt ¶ added in v1.2.1
func NewSendPDUSessionResourceReleaseResEvt(ranUeNgapId int64) *SendPDUSessionResourceReleaseResEvt
func (*SendPDUSessionResourceReleaseResEvt) Type ¶ added in v1.2.1
func (sendPDUSessionResourceReleaseResEvt *SendPDUSessionResourceReleaseResEvt) Type() NgapEventType
type SendPDUSessionResourceSetupResEvt ¶ added in v1.2.1
type SendPDUSessionResourceSetupResEvt struct {
RanUeNgapId int64
}
func NewSendPDUSessionResourceSetupResEvt ¶ added in v1.2.1
func NewSendPDUSessionResourceSetupResEvt(ranUeNgapId int64) *SendPDUSessionResourceSetupResEvt
func (*SendPDUSessionResourceSetupResEvt) Type ¶ added in v1.2.1
func (sendPDUSessionResourceSetupResEvt *SendPDUSessionResourceSetupResEvt) Type() NgapEventType
type SendUEContextReleaseCompleteEvt ¶ added in v1.2.1
type SendUEContextReleaseCompleteEvt struct {
RanUeNgapId int64
}
func NewSendUEContextReleaseCompleteEvt ¶ added in v1.2.1
func NewSendUEContextReleaseCompleteEvt(ranUeNgapId int64) *SendUEContextReleaseCompleteEvt
func (*SendUEContextReleaseCompleteEvt) Type ¶ added in v1.2.1
func (sendUEContextReleaseCompleteEvt *SendUEContextReleaseCompleteEvt) Type() NgapEventType
type SendUEContextReleaseRequestEvt ¶ added in v1.2.1
func NewSendUEContextReleaseRequestEvt ¶ added in v1.2.1
func NewSendUEContextReleaseRequestEvt(ranUeNgapId int64, errMsg EvtError, ) *SendUEContextReleaseRequestEvt
func (*SendUEContextReleaseRequestEvt) Type ¶ added in v1.2.1
func (sendUEContextReleaseRequestEvt *SendUEContextReleaseRequestEvt) Type() NgapEventType
type SliceOverloadItem ¶
type SliceOverloadItem struct { SNssaiList []ngapType.SNSSAI Action *ngapType.OverloadAction TrafficInd *int64 }
type StartTCPSignalNASMsgEvt ¶ added in v1.2.1
type StartTCPSignalNASMsgEvt struct {
RanUeNgapId int64
}
func NewStartTCPSignalNASMsgEvt ¶ added in v1.2.1
func NewStartTCPSignalNASMsgEvt(ranUeNgapId int64) *StartTCPSignalNASMsgEvt
func (*StartTCPSignalNASMsgEvt) Type ¶ added in v1.2.1
func (startTCPSignalNASMsgEvt *StartTCPSignalNASMsgEvt) Type() NgapEventType
type Timer ¶ added in v1.2.1
type Timer struct {
// contains filtered or unexported fields
}
func NewDPDPeriodicTimer ¶ added in v1.2.1
func NewDPDPeriodicTimer(d time.Duration, maxRetryTimes int32, ikeSA *IKESecurityAssociation, cancelFunc func(), ) *Timer
type UDPSocketInfo ¶
type UnmarshalEAP5GDataEvt ¶ added in v1.2.1
type UnmarshalEAP5GDataEvt struct { LocalSPI uint64 EAPVendorData []byte IsInitialUE bool RanUeNgapId int64 }
func NewUnmarshalEAP5GDataEvt ¶ added in v1.2.1
func NewUnmarshalEAP5GDataEvt(localSPI uint64, eapVendorData []byte, isInitialUE bool, ranUeNgapId int64, ) *UnmarshalEAP5GDataEvt
func (*UnmarshalEAP5GDataEvt) Type ¶ added in v1.2.1
func (unmarshalEAP5GDataEvt *UnmarshalEAP5GDataEvt) Type() NgapEventType
type UnmarshalEAP5GDataResponseEvt ¶ added in v1.2.1
func NewUnmarshalEAP5GDataResponseEvt ¶ added in v1.2.1
func NewUnmarshalEAP5GDataResponseEvt(localSPI uint64, ranUeNgapId int64, nasPDU []byte, ) *UnmarshalEAP5GDataResponseEvt
func (*UnmarshalEAP5GDataResponseEvt) Type ¶ added in v1.2.1
func (unmarshalEAP5GDataResponseEvt *UnmarshalEAP5GDataResponseEvt) Type() IkeEventType
Click to show internal directories.
Click to hide internal directories.