context

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxNumOfTAI                       int   = 16
	MaxNumOfBroadcastPLMNs            int   = 12
	MaxNumOfPLMNs                     int   = 12
	MaxNumOfSlice                     int   = 1024
	MaxNumOfAllowedSnssais            int   = 8
	MaxValueOfAmfUeNgapId             int64 = 1099511627775
	MaxNumOfServedGuamiList           int   = 256
	MaxNumOfPDUSessions               int   = 256
	MaxNumOfDRBs                      int   = 32
	MaxNumOfAOI                       int   = 64
	MaxT3513RetryTimes                int   = 4
	MaxT3522RetryTimes                int   = 4
	MaxT3550RetryTimes                int   = 4
	MaxT3560RetryTimes                int   = 4
	MaxT3565RetryTimes                int   = 4
	MAxNumOfAlgorithm                 int   = 8
	DefaultT3502                      int   = 720  // 12 min
	DefaultT3512                      int   = 3240 // 54 min
	DefaultNon3gppDeregistrationTimer int   = 3240 // 54 min
)
View Source
const (
	TimeT3513 time.Duration = 6 * time.Second
	TimeT3522 time.Duration = 6 * time.Second
	TimeT3550 time.Duration = 6 * time.Second
	TimeT3560 time.Duration = 6 * time.Second
	TimeT3565 time.Duration = 6 * time.Second
)

timers at AMF side, defined in TS 24.501 table 10.2.2

View Source
const (
	RanPresentGNbId   = 1
	RanPresentNgeNbId = 2
	RanPresentN3IwfId = 3
	RanPresentTngfId  = 4
	RanPresentTwifId  = 5
	RanPresentWagfId  = 6
)
View Source
const (
	NgRanCgiPresentNRCGI    int32 = 0
	NgRanCgiPresentEUTRACGI int32 = 1
)
View Source
const (
	RecommendRanNodePresentRanNode int32 = 0
	RecommendRanNodePresentTAI     int32 = 1
)
View Source
const (
	Deregistered            fsm.StateType = "Deregistered"
	DeregistrationInitiated fsm.StateType = "DeregistrationInitiated"
	Authentication          fsm.StateType = "Authentication"
	SecurityMode            fsm.StateType = "SecurityMode"
	ContextSetup            fsm.StateType = "ContextSetup"
	Registered              fsm.StateType = "Registered"
)

GMM state for UE

View Source
const (
	RanUeNgapIdUnspecified int64 = 0xffffffff
)

Variables

This section is empty.

Functions

func AttachSourceUeTargetUe

func AttachSourceUeTargetUe(sourceUe, targetUe *RanUe)

func CompareUserLocation

func CompareUserLocation(loc1 models.UserLocation, loc2 models.UserLocation) bool

func DetachSourceUeTargetUe

func DetachSourceUeTargetUe(ranUe *RanUe)

func InTaiList

func InTaiList(servedTai models.Tai, taiList []models.Tai) bool

func InitAmfContext added in v1.2.1

func InitAmfContext(context *AMFContext)

func NewPlmnSupportItem

func NewPlmnSupportItem() (item factory.PlmnSupportItem)

func TacInAreas

func TacInAreas(targetTac string, areas []models.Area) bool

Types

type AMFContext

type AMFContext struct {
	EventSubscriptionIDGenerator *idgenerator.IDGenerator
	EventSubscriptions           sync.Map
	UePool                       sync.Map                // map[supi]*AmfUe
	RanUePool                    sync.Map                // map[AmfUeNgapID]*RanUe
	AmfRanPool                   sync.Map                // map[net.Conn]*AmfRan
	LadnPool                     map[string]factory.Ladn // dnn as key
	SupportTaiLists              []models.Tai
	ServedGuamiList              []models.Guami
	PlmnSupportList              []factory.PlmnSupportItem
	RelativeCapacity             int64
	NfId                         string
	Name                         string
	NfService                    map[models.ServiceName]models.NrfNfManagementNfService // nfservice that amf support
	UriScheme                    models.UriScheme
	BindingIPv4                  string
	SBIPort                      int
	RegisterIPv4                 string
	HttpIPv6Address              string
	TNLWeightFactor              int64
	SupportDnnLists              []string
	AMFStatusSubscriptions       sync.Map // map[subscriptionID]models.SubscriptionData
	NrfUri                       string
	NrfCertPem                   string
	SecurityAlgorithm            SecurityAlgorithm
	NetworkName                  factory.NetworkName
	NgapIpList                   []string // NGAP Server IP
	NgapPort                     int
	T3502Value                   int    // unit is second
	T3512Value                   int    // unit is second
	Non3gppDeregTimerValue       int    // unit is second
	TimeZone                     string // "[+-]HH:MM[+][1-2]", Refer to TS 29.571 - 5.2.2 Simple Data Types
	// read-only fields
	T3513Cfg factory.TimerValue
	T3522Cfg factory.TimerValue
	T3550Cfg factory.TimerValue
	T3560Cfg factory.TimerValue
	T3565Cfg factory.TimerValue
	T3570Cfg factory.TimerValue
	T3555Cfg factory.TimerValue
	Locality string

	OAuth2Required bool
}

func GetSelf added in v1.2.1

func GetSelf() *AMFContext

Create new AMF context

func (*AMFContext) AddAmfUeToUePool

func (context *AMFContext) AddAmfUeToUePool(ue *AmfUe, supi string)

func (*AMFContext) AllocateAmfUeNgapID

func (context *AMFContext) AllocateAmfUeNgapID() (int64, error)

func (*AMFContext) AllocateGutiToUe

func (context *AMFContext) AllocateGutiToUe(ue *AmfUe)

func (*AMFContext) AllocateRegistrationArea

func (context *AMFContext) AllocateRegistrationArea(ue *AmfUe, anType models.AccessType)

func (*AMFContext) AmfRanFindByConn

func (context *AMFContext) AmfRanFindByConn(conn net.Conn) (*AmfRan, bool)

use net.Conn to find RAN context, return *AmfRan and ok bit

func (*AMFContext) AmfRanFindByRanID

func (context *AMFContext) AmfRanFindByRanID(ranNodeID models.GlobalRanNodeId) (*AmfRan, bool)

use ranNodeID to find RAN context, return *AmfRan and ok bit

func (*AMFContext) AmfUeFindByGuti

func (context *AMFContext) AmfUeFindByGuti(guti string) (*AmfUe, bool)

func (*AMFContext) AmfUeFindByPei

func (context *AMFContext) AmfUeFindByPei(pei string) (*AmfUe, bool)

func (*AMFContext) AmfUeFindByPolicyAssociationID

func (context *AMFContext) AmfUeFindByPolicyAssociationID(polAssoId string) (*AmfUe, bool)

func (*AMFContext) AmfUeFindBySuci added in v1.2.1

func (context *AMFContext) AmfUeFindBySuci(suci string) (ue *AmfUe, ok bool)

func (*AMFContext) AmfUeFindBySupi

func (context *AMFContext) AmfUeFindBySupi(supi string) (*AmfUe, bool)

func (*AMFContext) AmfUeFindByUeContextID

func (context *AMFContext) AmfUeFindByUeContextID(ueContextID string) (*AmfUe, bool)

func (*AMFContext) AuthorizationCheck added in v1.2.1

func (c *AMFContext) AuthorizationCheck(token string, serviceName models.ServiceName) error

func (*AMFContext) DeleteAMFStatusSubscription

func (context *AMFContext) DeleteAMFStatusSubscription(subscriptionID string)

func (*AMFContext) DeleteAmfRan

func (context *AMFContext) DeleteAmfRan(conn net.Conn)

func (*AMFContext) DeleteEventSubscription

func (context *AMFContext) DeleteEventSubscription(subscriptionID string)

func (*AMFContext) FindAMFStatusSubscription

func (context *AMFContext) FindAMFStatusSubscription(subscriptionID string) (
	*models.AmfCommunicationSubscriptionData, bool,
)

Return Value: (subscriptionData *models.SubScriptionData, ok bool)

func (*AMFContext) FindEventSubscription

func (context *AMFContext) FindEventSubscription(subscriptionID string) (*AMFContextEventSubscription, bool)

func (*AMFContext) FreeTmsi

func (context *AMFContext) FreeTmsi(tmsi int64)

func (*AMFContext) GetIPv4Uri

func (context *AMFContext) GetIPv4Uri() string

func (*AMFContext) GetTokenCtx added in v1.2.1

func (c *AMFContext) GetTokenCtx(serviceName models.ServiceName, targetNF models.NrfNfManagementNfType) (
	context.Context, *models.ProblemDetails, error,
)

func (*AMFContext) InPlmnSupportList

func (context *AMFContext) InPlmnSupportList(snssai models.Snssai) bool

func (*AMFContext) InSupportDnnList

func (context *AMFContext) InSupportDnnList(targetDnn string) bool

func (*AMFContext) InitNFService

func (context *AMFContext) InitNFService(serivceName []string, version string)

func (*AMFContext) NewAMFStatusSubscription

func (context *AMFContext) NewAMFStatusSubscription(subscriptionData models.AmfCommunicationSubscriptionData) (
	subscriptionID string,
)

func (*AMFContext) NewAmfRan

func (context *AMFContext) NewAmfRan(conn net.Conn) *AmfRan

func (*AMFContext) NewAmfUe

func (context *AMFContext) NewAmfUe(supi string) *AmfUe

func (*AMFContext) NewEventSubscription

func (context *AMFContext) NewEventSubscription(subscriptionID string, subscription *AMFContextEventSubscription)

func (*AMFContext) RanUeFindByAmfUeNgapID

func (context *AMFContext) RanUeFindByAmfUeNgapID(amfUeNgapID int64) *RanUe

func (*AMFContext) Reset

func (context *AMFContext) Reset()

Reset AMF Context

func (*AMFContext) TmsiAllocate

func (context *AMFContext) TmsiAllocate() int32

type AMFContextEventSubscription

type AMFContextEventSubscription struct {
	IsAnyUe           bool
	IsGroupUe         bool
	UeSupiList        []string
	Expiry            *time.Time
	EventSubscription models.AmfEventSubscription
}

type AmfRan

type AmfRan struct {
	RanPresent int
	RanId      *models.GlobalRanNodeId
	Name       string
	AnType     models.AccessType
	/* socket Connect*/
	Conn net.Conn
	/* Supported TA List */
	SupportedTAList []SupportedTAI

	/* RAN UE List */
	RanUeList sync.Map // RanUeNgapId as key

	/* logger */
	Log *logrus.Entry
}

func (*AmfRan) FindRanUeByAmfUeNgapID added in v1.2.1

func (ran *AmfRan) FindRanUeByAmfUeNgapID(amfUeNgapID int64) *RanUe

func (*AmfRan) NewRanUe

func (ran *AmfRan) NewRanUe(ranUeNgapID int64) (*RanUe, error)

func (*AmfRan) RanID

func (ran *AmfRan) RanID() string

func (*AmfRan) RanUeFindByRanUeNgapID

func (ran *AmfRan) RanUeFindByRanUeNgapID(ranUeNgapID int64) *RanUe

func (*AmfRan) Remove

func (ran *AmfRan) Remove()

func (*AmfRan) RemoveAllRanUe added in v1.2.1

func (ran *AmfRan) RemoveAllRanUe(removeAmfUe bool)

func (*AmfRan) SetRanId

func (ran *AmfRan) SetRanId(ranNodeId *ngapType.GlobalRANNodeID)

func (*AmfRan) UeRatType added in v1.2.6

func (ran *AmfRan) UeRatType() models.RatType

type AmfUe

type AmfUe struct {

	/* Gmm State */
	State map[models.AccessType]*fsm.State
	/* Registration procedure related context */
	RegistrationType5GS                uint8
	IdentityTypeUsedForRegistration    uint8
	RegistrationRequest                *nasMessage.RegistrationRequest
	ServingAmfChanged                  bool
	DeregistrationTargetAccessType     uint8 // only used when deregistration procedure is initialized by the network
	RegistrationAcceptForNon3GPPAccess []byte
	NasPduValue                        []byte
	RetransmissionOfInitialNASMsg      bool
	RequestIdentityType                uint8
	/* Used for AMF relocation */
	TargetAmfProfile *models.NrfNfDiscoveryNfProfile
	TargetAmfUri     string
	/* Ue Identity */
	PlmnId                 models.PlmnId
	Suci                   string
	Supi                   string
	UnauthenticatedSupi    bool
	Gpsi                   string
	Pei                    string
	Tmsi                   int32 // 5G-Tmsi
	Guti                   string
	GroupID                string
	EBI                    int32
	EventSubscriptionsInfo map[string]*AmfUeEventSubscription
	/* User Location */
	RatType                  models.RatType
	Location                 models.UserLocation
	Tai                      models.Tai
	LocationChanged          bool
	LastVisitedRegisteredTai models.Tai
	TimeZone                 string // "[+-]HH:MM[+][1-2]", Refer to TS 29.571 - 5.2.2 Simple Data Types
	/* context about udm */
	UdmId                             string
	NudmUECMUri                       string
	NudmSDMUri                        string
	ContextValid                      bool
	Reachability                      models.UeReachability
	SmfSelectionData                  *models.SmfSelectionSubscriptionData
	UeContextInSmfData                *models.UeContextInSmfData
	TraceData                         *models.TraceData
	UdmGroupId                        string
	SubscribedNssai                   []models.SubscribedSnssai
	AccessAndMobilitySubscriptionData *models.AccessAndMobilitySubscriptionData
	BackupAmfInfo                     []models.BackupAmfInfo
	/* contex abut ausf */
	AusfGroupId                       string
	AusfId                            string
	AusfUri                           string
	RoutingIndicator                  string
	AuthenticationCtx                 *models.UeAuthenticationCtx
	AuthFailureCauseSynchFailureTimes int
	IdentityRequestSendTimes          int
	ABBA                              []uint8
	Kseaf                             string
	Kamf                              string
	/* context about PCF */
	PcfId                        string
	PcfUri                       string
	PolicyAssociationId          string
	AmPolicyUri                  string
	AmPolicyAssociation          *models.PcfAmPolicyControlPolicyAssociation
	RequestTriggerLocationChange bool // true if AmPolicyAssociation.Trigger contains RequestTrigger_LOC_CH
	/* UeContextForHandover */
	HandoverNotifyUri string
	/* N1N2Message */
	N1N2MessageIDGenerator          *idgenerator.IDGenerator
	N1N2Message                     *N1N2Message
	N1N2MessageSubscribeIDGenerator *idgenerator.IDGenerator
	// map[int64]models.UeN1N2InfoSubscriptionCreateData; use n1n2MessageSubscriptionID as key
	N1N2MessageSubscription sync.Map
	/* Pdu Sesseion context */
	SmContextList sync.Map // map[int32]*SmContext, pdu session id as key
	/* Related Context */
	RanUe map[models.AccessType]*RanUe

	UeRadioCapability               string // OCTET string
	Capability5GMM                  nasType.Capability5GMM
	ConfigurationUpdateIndication   nasType.ConfigurationUpdateIndication
	ConfigurationUpdateCommandFlags *ConfigurationUpdateCommandFlags
	/* context related to Paging */
	UeRadioCapabilityForPaging                 *UERadioCapabilityForPaging
	InfoOnRecommendedCellsAndRanNodesForPaging *InfoOnRecommendedCellsAndRanNodesForPaging
	UESpecificDRX                              uint8
	/* Security Context */
	SecurityContextAvailable bool
	UESecurityCapability     nasType.UESecurityCapability // for security command
	NgKsi                    models.NgKsi
	MacFailed                bool      // set to true if the integrity check of current NAS message is failed
	KnasInt                  [16]uint8 // 16 byte
	KnasEnc                  [16]uint8 // 16 byte
	Kgnb                     []uint8   // 32 byte
	Kn3iwf                   []uint8   // 32 byte
	NH                       []uint8   // 32 byte
	NCC                      uint8     // 0..7
	ULCount                  security.Count
	DLCount                  security.Count
	CipheringAlg             uint8
	IntegrityAlg             uint8
	/* Registration Area */
	RegistrationArea map[models.AccessType][]models.Tai
	LadnInfo         []factory.Ladn
	/* Network Slicing related context and Nssf */
	NssfId                            string
	NssfUri                           string
	NetworkSliceInfo                  *models.AuthorizedNetworkSliceInfo
	AllowedNssai                      map[models.AccessType][]models.AllowedSnssai
	ConfiguredNssai                   []models.ConfiguredSnssai
	NetworkSlicingSubscriptionChanged bool
	SdmSubscriptionId                 string
	UeCmRegistered                    map[models.AccessType]bool
	/* T3513(Paging) */
	T3513 *Timer // for paging
	/* T3565(Notification) */
	T3565 *Timer // for NAS Notification
	/* T3560 (for authentication request/security mode command retransmission) */
	T3560 *Timer
	/* T3550 (for registration accept retransmission) */
	T3550 *Timer
	/* T3522 (for deregistration request) */
	T3522 *Timer
	/* T3570 (for identity request) */
	T3570 *Timer
	/* T3555 (for configuration update command) */
	T3555 *Timer
	/* Ue Context Release Cause */
	ReleaseCause map[models.AccessType]*CauseAll
	/* T3502 (Assigned by AMF, and used by UE to initialize registration procedure) */
	T3502Value             int        // Second
	T3512Value             int        // default 54 min
	Non3gppDeregTimerValue int        // default 54 min
	Lock                   sync.Mutex // Update context to prevent race condition

	// logger
	NASLog      *logrus.Entry
	GmmLog      *logrus.Entry
	ProducerLog *logrus.Entry
	// contains filtered or unexported fields
}

func (*AmfUe) AttachRanUe

func (ue *AmfUe) AttachRanUe(ranUe *RanUe)

Don't call this function directly. Use gmm_common.AttachRanUeToAmfUeAndReleaseOldIfAny().

func (*AmfUe) ClearRegistrationRequestData

func (ue *AmfUe) ClearRegistrationRequestData(accessType models.AccessType)

func (*AmfUe) CmConnect

func (ue *AmfUe) CmConnect(anType models.AccessType) bool

func (*AmfUe) CmIdle

func (ue *AmfUe) CmIdle(anType models.AccessType) bool

func (*AmfUe) CopyDataFromUeContextModel

func (ue *AmfUe) CopyDataFromUeContextModel(ueContext *models.UeContext)

func (*AmfUe) DerivateAlgKey

func (ue *AmfUe) DerivateAlgKey()

Algorithm key Derivation function defined in TS 33.501 Annex A.9

func (*AmfUe) DerivateAnKey

func (ue *AmfUe) DerivateAnKey(anType models.AccessType)

Access Network key Derivation function defined in TS 33.501 Annex A.9

func (*AmfUe) DerivateKamf

func (ue *AmfUe) DerivateKamf()

Kamf Derivation function defined in TS 33.501 Annex A.7

func (*AmfUe) DerivateNH

func (ue *AmfUe) DerivateNH(syncInput []byte)

NH Derivation function defined in TS 33.501 Annex A.10

func (*AmfUe) DetachRanUe

func (ue *AmfUe) DetachRanUe(anType models.AccessType)

func (*AmfUe) GetAnType

func (ue *AmfUe) GetAnType() models.AccessType

func (*AmfUe) GetCmInfo

func (ue *AmfUe) GetCmInfo() (cmInfos []models.CmInfo)

func (*AmfUe) GetNsiInformationFromSnssai

func (ue *AmfUe) GetNsiInformationFromSnssai(anType models.AccessType, snssai models.Snssai) *models.NsiInformation

func (*AmfUe) HasWildCardSubscribedDNN

func (ue *AmfUe) HasWildCardSubscribedDNN() bool

func (*AmfUe) InAllowedNssai

func (ue *AmfUe) InAllowedNssai(targetSNssai models.Snssai, anType models.AccessType) bool

func (*AmfUe) InSubscribedNssai

func (ue *AmfUe) InSubscribedNssai(targetSNssai models.Snssai) bool

func (*AmfUe) OnGoing

func (ue *AmfUe) OnGoing(anType models.AccessType) OnGoing

func (*AmfUe) Remove

func (ue *AmfUe) Remove()

func (*AmfUe) RemoveAmPolicyAssociation

func (ue *AmfUe) RemoveAmPolicyAssociation()

func (*AmfUe) SecurityContextIsValid

func (ue *AmfUe) SecurityContextIsValid() bool

func (*AmfUe) SelectSecurityAlg

func (ue *AmfUe) SelectSecurityAlg(intOrder, encOrder []uint8) error

func (*AmfUe) ServingAMF

func (ue *AmfUe) ServingAMF() *AMFContext

func (*AmfUe) SetOnGoing

func (ue *AmfUe) SetOnGoing(anType models.AccessType, onGoing *OnGoing)

func (*AmfUe) SmContextFindByPDUSessionID

func (ue *AmfUe) SmContextFindByPDUSessionID(pduSessionID int32) (*SmContext, bool)

func (*AmfUe) StopT3513 added in v1.2.1

func (ue *AmfUe) StopT3513()

func (*AmfUe) StopT3522 added in v1.2.1

func (ue *AmfUe) StopT3522()

func (*AmfUe) StopT3550 added in v1.2.1

func (ue *AmfUe) StopT3550()

func (*AmfUe) StopT3555 added in v1.2.1

func (ue *AmfUe) StopT3555()

func (*AmfUe) StopT3560 added in v1.2.1

func (ue *AmfUe) StopT3560()

func (*AmfUe) StopT3565 added in v1.2.1

func (ue *AmfUe) StopT3565()

func (*AmfUe) StopT3570 added in v1.2.1

func (ue *AmfUe) StopT3570()

func (*AmfUe) StoreSmContext

func (ue *AmfUe) StoreSmContext(pduSessionID int32, smContext *SmContext)

SM Context realted function

func (*AmfUe) TaiListInRegistrationArea

func (ue *AmfUe) TaiListInRegistrationArea(taiList []models.Tai, accessType models.AccessType) bool

func (*AmfUe) UpdateBackupAmfInfo added in v1.2.1

func (ue *AmfUe) UpdateBackupAmfInfo(backupAmfInfo models.BackupAmfInfo)

func (*AmfUe) UpdateLogFields

func (ue *AmfUe) UpdateLogFields(accessType models.AccessType)

func (*AmfUe) UpdateNH

func (ue *AmfUe) UpdateNH()

func (*AmfUe) UpdateSecurityContext

func (ue *AmfUe) UpdateSecurityContext(anType models.AccessType)

type AmfUeEventSubscription

type AmfUeEventSubscription struct {
	Timestamp         time.Time
	AnyUe             bool
	RemainReports     *int32
	EventSubscription *models.ExtAmfEventSubscription
}

type CauseAll

type CauseAll struct {
	Cause        *models.SmfPduSessionCause
	NgapCause    *models.NgApCause
	Var5GmmCause *int32
}

type ConfigurationUpdateCommandFlags added in v1.2.1

type ConfigurationUpdateCommandFlags struct {
	NeedGUTI                                     bool
	NeedNITZ                                     bool
	NeedTaiList                                  bool
	NeedRejectNSSAI                              bool
	NeedAllowedNSSAI                             bool
	NeedSmsIndication                            bool
	NeedMicoIndication                           bool
	NeedLadnInformation                          bool
	NeedServiceAreaList                          bool
	NeedConfiguredNSSAI                          bool
	NeedNetworkSlicingIndication                 bool
	NeedOperatordefinedAccessCategoryDefinitions bool
}

TS 24.501 8.2.19

type InfoOnRecommendedCellsAndRanNodesForPaging

type InfoOnRecommendedCellsAndRanNodesForPaging struct {
	RecommendedCells    []RecommendedCell  // RecommendedCellsForPaging
	RecommendedRanNodes []RecommendRanNode // RecommendedRanNodesForPaging
}

TS 38.413 9.3.1.100

type N1N2Message

type N1N2Message struct {
	Request     models.N1N2MessageTransferRequest
	Status      models.N1N2MessageTransferCause
	ResourceUri string
}

type NFContext added in v1.2.1

type NFContext interface {
	AuthorizationCheck(token string, serviceName models.ServiceName) error
}

type NGRANCGI

type NGRANCGI struct {
	Present  int32
	NRCGI    *models.Ncgi
	EUTRACGI *models.Ecgi
}

type OnGoing

type OnGoing struct {
	Procedure OnGoingProcedure
	Ppi       int32 // Paging priority
}

type OnGoingProcedure

type OnGoingProcedure string
const (
	OnGoingProcedureNothing      OnGoingProcedure = "Nothing"
	OnGoingProcedurePaging       OnGoingProcedure = "Paging"
	OnGoingProcedureN2Handover   OnGoingProcedure = "N2Handover"
	OnGoingProcedureRegistration OnGoingProcedure = "Registration"
)

type RanUe

type RanUe struct {
	/* UE identity*/
	RanUeNgapId int64
	AmfUeNgapId int64

	/* HandOver Info*/
	HandOverType        ngapType.HandoverType
	SuccessPduSessionId []int32
	SourceUe            *RanUe
	TargetUe            *RanUe

	/* UserLocation*/
	Tai      models.Tai
	Location models.UserLocation
	/* context about udm */
	SupportVoPSn3gpp  bool
	SupportVoPS       bool
	SupportedFeatures string
	LastActTime       *time.Time

	/* Related Context*/
	AmfUe        *AmfUe
	Ran          *AmfRan
	HoldingAmfUe *AmfUe // The AmfUe that is already exist (CM-Idle, Re-Registration)

	/* Routing ID */
	RoutingID string
	/* Trace Recording Session Reference */
	Trsr string
	/* Ue Context Release Action */
	ReleaseAction RelAction
	/* context used for AMF Re-allocation procedure */
	OldAmfName            string
	InitialUEMessage      []byte
	RRCEstablishmentCause string // Received from initial ue message; pattern: ^[0-9a-fA-F]+$
	UeContextRequest      bool   // Receive UEContextRequest IE from RAN

	/* send initial context setup request or not*/
	InitialContextSetup bool

	/* logger */
	Log *logrus.Entry
}

func (*RanUe) DetachAmfUe

func (ranUe *RanUe) DetachAmfUe()

func (*RanUe) Remove

func (ranUe *RanUe) Remove() error

func (*RanUe) SwitchToRan

func (ranUe *RanUe) SwitchToRan(newRan *AmfRan, ranUeNgapId int64) error

func (*RanUe) UpdateLocation

func (ranUe *RanUe) UpdateLocation(userLocationInformation *ngapType.UserLocationInformation)

func (*RanUe) UpdateLogFields

func (ranUe *RanUe) UpdateLogFields()

type RecommendRanNode

type RecommendRanNode struct {
	Present         int32
	GlobalRanNodeId *models.GlobalRanNodeId
	Tai             *models.Tai
}

TS 38.413 9.3.1.101

type RecommendedCell

type RecommendedCell struct {
	NgRanCGI         NGRANCGI
	TimeStayedInCell *int64
}

TS 38.413 9.3.1.71

type RelAction

type RelAction int
const (
	UeContextN2NormalRelease RelAction = iota
	UeContextReleaseHandover
	UeContextReleaseUeContext
)

type SecurityAlgorithm

type SecurityAlgorithm struct {
	IntegrityOrder []uint8 // slice of security.AlgIntegrityXXX
	CipheringOrder []uint8 // slice of security.AlgCipheringXXX
}

type SmContext

type SmContext struct {
	// contains filtered or unexported fields
}

func NewSmContext

func NewSmContext(pduSessionID int32) *SmContext

func (*SmContext) AccessType

func (c *SmContext) AccessType() models.AccessType

func (*SmContext) DeleteULNASTransport

func (c *SmContext) DeleteULNASTransport()

func (*SmContext) Dnn

func (c *SmContext) Dnn() string

func (*SmContext) HSmfID

func (c *SmContext) HSmfID() string

func (*SmContext) NsInstance

func (c *SmContext) NsInstance() string

func (*SmContext) PduSessionID

func (c *SmContext) PduSessionID() int32

func (*SmContext) PduSessionIDDuplicated

func (c *SmContext) PduSessionIDDuplicated() bool

func (*SmContext) PlmnID

func (c *SmContext) PlmnID() models.PlmnId

func (*SmContext) SetAccessType

func (c *SmContext) SetAccessType(accessType models.AccessType)

func (*SmContext) SetDnn

func (c *SmContext) SetDnn(dnn string)

func (*SmContext) SetDuplicatedPduSessionID

func (c *SmContext) SetDuplicatedPduSessionID(duplicated bool)

func (*SmContext) SetHSmfID

func (c *SmContext) SetHSmfID(hsmfID string)

func (*SmContext) SetNsInstance

func (c *SmContext) SetNsInstance(nsInstanceID string)

func (*SmContext) SetPduSessionID

func (c *SmContext) SetPduSessionID(id int32)

func (*SmContext) SetPlmnID

func (c *SmContext) SetPlmnID(plmnID models.PlmnId)

func (*SmContext) SetSmContextRef

func (c *SmContext) SetSmContextRef(ref string)

func (*SmContext) SetSmfID

func (c *SmContext) SetSmfID(smfID string)

func (*SmContext) SetSmfUri

func (c *SmContext) SetSmfUri(smfUri string)

func (*SmContext) SetSnssai

func (c *SmContext) SetSnssai(snssai models.Snssai)

func (*SmContext) SetUserLocation

func (c *SmContext) SetUserLocation(userLocation models.UserLocation)

func (*SmContext) SetVSmfID

func (c *SmContext) SetVSmfID(vsmfID string)

func (*SmContext) SmContextRef

func (c *SmContext) SmContextRef() string

func (*SmContext) SmfID

func (c *SmContext) SmfID() string

func (*SmContext) SmfUri

func (c *SmContext) SmfUri() string

func (*SmContext) Snssai

func (c *SmContext) Snssai() models.Snssai

func (*SmContext) StoreULNASTransport

func (c *SmContext) StoreULNASTransport(msg *nasMessage.ULNASTransport)

func (*SmContext) ULNASTransport

func (c *SmContext) ULNASTransport() *nasMessage.ULNASTransport

func (*SmContext) UserLocation

func (c *SmContext) UserLocation() models.UserLocation

func (*SmContext) VSmfID

func (c *SmContext) VSmfID() string

type SupportedTAI

type SupportedTAI struct {
	Tai        models.Tai
	SNssaiList []models.Snssai
}

func NewSupportedTAI

func NewSupportedTAI() (tai SupportedTAI)

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

Timer can be used for retransmission, it will manage retry times automatically

func NewTimer

func NewTimer(d time.Duration, maxRetryTimes int,
	expiredFunc func(expireTimes int32),
	cancelFunc func(),
) *Timer

NewTimer will return a Timer struct and create a goroutine. Then it calls expiredFunc every time interval d until the user call Stop(). the number of expire event is be recorded when the timer is active. When the number of expire event is > maxRetryTimes, then the timer will call cancelFunc and turns off itself. Whether expiredFunc pass a parameter expireTimes to tell the user that the current expireTimes.

func (*Timer) ExpireTimes

func (t *Timer) ExpireTimes() int32

ExpireTimes return the current expire times of the timer

func (*Timer) MaxRetryTimes

func (t *Timer) MaxRetryTimes() int32

MaxRetryTimes return the max retry times of the timer

func (*Timer) Stop

func (t *Timer) Stop()

Stop turns off the timer, after Stop, no more timeout event will be triggered. User should call Stop() only once otherwise it may hang on writing to done channel

type UERadioCapabilityForPaging

type UERadioCapabilityForPaging struct {
	NR    string // OCTET string
	EUTRA string // OCTET string
}

Jump to

Keyboard shortcuts

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