Documentation ¶
Index ¶
- Constants
- type AMFOverloadContent
- type AMFTNLAssociationItem
- type BroadcastPLMNItem
- type ChildSecurityAssociation
- type GTPConnectionInfo
- type GlobalN3IWFID
- type IKESecurityAssociation
- 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) FindUeByAmfUeNgapID(id int64) *N3IWFUe
- func (amf *N3IWFAMF) RemoveAllRelatedUe()
- func (amf *N3IWFAMF) StartOverload(resp *ngapType.OverloadResponse, ...) *AMFOverloadContent
- func (amf *N3IWFAMF) StopOverload()
- type N3IWFContext
- func (context *N3IWFContext) AMFSelection(ueSpecifiedGUAMI *ngapType.GUAMI) *N3IWFAMF
- func (context *N3IWFContext) CheckAMFReInit(sctpAddr string) bool
- func (context *N3IWFContext) FindAMFBySCTPAddr(sctpAddr string) (*N3IWFAMF, error)
- func (context *N3IWFContext) FindIKESecurityAssociationBySPI(spi uint64) *IKESecurityAssociation
- func (context *N3IWFContext) FindUeByRanUeNgapID(ranUeNgapID int64) *N3IWFUe
- func (context *N3IWFContext) NewIKESecurityAssociation() *IKESecurityAssociation
- func (context *N3IWFContext) NewN3iwfAmf(sctpAddr string) *N3IWFAMF
- func (context *N3IWFContext) NewN3iwfUe() *N3IWFUe
- func (context *N3IWFContext) NewTEID(ue *N3IWFUe) uint32
- type N3IWFNFInfo
- type N3IWFUe
- func (ue *N3IWFUe) AttachAMF(sctpAddr string) error
- func (ue *N3IWFUe) CreateIKEChildSecurityAssociation(chosenSecurityAssociation *ike_message.SecurityAssociation) (*ChildSecurityAssociation, error)
- func (ue *N3IWFUe) CreatePDUSession(pduSessionID int64, snssai ngapType.SNSSAI) (*PDUSession, error)
- func (ue *N3IWFUe) DetachAMF()
- func (ue *N3IWFUe) FindPDUSession(pduSessionID int64) *PDUSession
- func (ue *N3IWFUe) Remove()
- type PDUSession
- type PDUSessionSetupTemporaryData
- type PLMNID
- type QosFlow
- type SNSSAIItem
- type SliceOverloadItem
- type SliceSupportItem
- type SupportedTAItem
Constants ¶
View Source
const ( MaxValueOfRanUeNgapID int64 = 4294967295 MaxNumOfPDUSessions int = 256 )
View Source
const (
AmfUeNgapIdUnspecified int64 = 0xffffffffff
)
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 BroadcastPLMNItem ¶
type BroadcastPLMNItem struct { PLMNID PLMNID `yaml:"PLMNID"` TAISliceSupportList []SliceSupportItem `yaml:"TAISliceSupportList"` }
type ChildSecurityAssociation ¶
type ChildSecurityAssociation struct { // SPI SPI uint32 // 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 // UE context ThisUE *N3IWFUe }
type GTPConnectionInfo ¶
type GlobalN3IWFID ¶
type IKESecurityAssociation ¶
type IKESecurityAssociation struct { // SPI RemoteSPI uint64 LocalSPI uint64 // Message ID MessageID 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 // Authentication data LocalUnsignedAuthentication []byte RemoteUnsignedAuthentication []byte // UE context ThisUE *N3IWFUe }
type N3IWFAMF ¶
type N3IWFAMF struct { SCTPAddr string 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 N3iwfUeList map[int64]*N3IWFUe // 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) FindUeByAmfUeNgapID ¶
func (*N3IWFAMF) RemoveAllRelatedUe ¶
func (amf *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 { NFInfo N3IWFNFInfo UePool map[int64]*N3IWFUe // RanUeNgapID as key AMFPool map[string]*N3IWFAMF // SCTPAddr as key AMFReInitAvailableList map[string]bool // SCTPAddr as key IKESA map[uint64]*IKESecurityAssociation // SPI as key ChildSA map[uint32]*ChildSecurityAssociation // SPI as key GTPConnectionWithUPF map[string]*gtpv1.UPlaneConn // UPF address as key AllocatedUEIPAddress map[string]*N3IWFUe // IPAddr as key AllocatedUETEID map[uint32]*N3IWFUe // TEID as key // N3IWF FQDN FQDN string // security data CertificateAuthority []byte N3IWFCertificate []byte N3IWFPrivateKey *rsa.PrivateKey // UEIPAddressRange Subnet *net.IPNet // Network interface mark for xfrm Mark uint32 // N3IWF local address IKEBindAddress string IPSecGatewayAddress string GTPBindAddress string TCPPort uint16 // N3IWF N1 interface raw socket N1RawSocket *ipv4.RawConn }
func (*N3IWFContext) AMFSelection ¶
func (context *N3IWFContext) AMFSelection(ueSpecifiedGUAMI *ngapType.GUAMI) *N3IWFAMF
func (*N3IWFContext) CheckAMFReInit ¶
func (context *N3IWFContext) CheckAMFReInit(sctpAddr string) bool
returns true means reinitialization is available, and false is unavailable.
func (*N3IWFContext) FindAMFBySCTPAddr ¶
func (context *N3IWFContext) FindAMFBySCTPAddr(sctpAddr string) (*N3IWFAMF, error)
func (*N3IWFContext) FindIKESecurityAssociationBySPI ¶
func (context *N3IWFContext) FindIKESecurityAssociationBySPI(spi uint64) *IKESecurityAssociation
func (*N3IWFContext) FindUeByRanUeNgapID ¶
func (context *N3IWFContext) FindUeByRanUeNgapID(ranUeNgapID int64) *N3IWFUe
func (*N3IWFContext) NewIKESecurityAssociation ¶
func (context *N3IWFContext) NewIKESecurityAssociation() *IKESecurityAssociation
func (*N3IWFContext) NewN3iwfAmf ¶
func (context *N3IWFContext) NewN3iwfAmf(sctpAddr string) *N3IWFAMF
func (*N3IWFContext) NewN3iwfUe ¶
func (context *N3IWFContext) NewN3iwfUe() *N3IWFUe
func (*N3IWFContext) NewTEID ¶
func (context *N3IWFContext) NewTEID(ue *N3IWFUe) uint32
type N3IWFNFInfo ¶
type N3IWFNFInfo struct { GlobalN3IWFID GlobalN3IWFID `yaml:"GlobalN3IWFID"` RanNodeName string `yaml:"Name,omitempty"` SupportedTAList []SupportedTAItem `yaml:"SupportedTAList"` }
type N3IWFUe ¶
type N3IWFUe 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 RRCEstablishmentCause int16 IPSecInnerIP string /* Relative Context */ AMF *N3IWFAMF /* PDU Session */ PduSessionList map[int64]*PDUSession // pduSessionId as key /* PDU Session Setup Temporary Data */ TemporaryPDUSessionSetupData *PDUSessionSetupTemporaryData /* Security */ Kn3iwf []uint8 // 32 bytes (256 bits), value is from NGAP IE "Security Key" SecurityCapabilities *ngapType.UESecurityCapabilities // TS 38.413 9.3.1.86 /* IKE Security Association */ N3IWFIKESecurityAssociation *IKESecurityAssociation N3IWFChildSecurityAssociation *ChildSecurityAssociation /* NAS IKE Connection */ UDPSendInfoGroup *n3iwf_message.UDPSendInfoGroup /* 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 }
func (*N3IWFUe) CreateIKEChildSecurityAssociation ¶
func (ue *N3IWFUe) CreateIKEChildSecurityAssociation(chosenSecurityAssociation *ike_message.SecurityAssociation) (*ChildSecurityAssociation, error)
func (*N3IWFUe) CreatePDUSession ¶
func (*N3IWFUe) FindPDUSession ¶
func (ue *N3IWFUe) FindPDUSession(pduSessionID int64) *PDUSession
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 []int64 // PDUSessionID 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 }
type QosFlow ¶
type QosFlow struct { Identifier int64 Parameters ngapType.QosFlowLevelQosParameters }
type SNSSAIItem ¶
type SliceOverloadItem ¶
type SliceOverloadItem struct { SNssaiList []ngapType.SNSSAI Action *ngapType.OverloadAction TrafficInd *int64 }
type SliceSupportItem ¶
type SliceSupportItem struct {
SNSSAI SNSSAIItem `yaml:"SNSSAI"`
}
type SupportedTAItem ¶
type SupportedTAItem struct { TAC string `yaml:"TAC"` BroadcastPLMNList []BroadcastPLMNItem `yaml:"BroadcastPLMNList"` }
Click to show internal directories.
Click to hide internal directories.