Documentation
¶
Overview ¶
Copyright 2024 Ella Networks
Index ¶
- Constants
- func AttachSourceUeTargetUe(sourceUe, targetUe *RanUe)
- func CompareUserLocation(loc1 models.UserLocation, loc2 models.UserLocation) bool
- func DetachSourceUeTargetUe(ranUe *RanUe)
- func GetServedGuamiList() []models.Guami
- func GetSupportTaiList() []models.Tai
- func InTaiList(servedTai models.Tai, taiList []models.Tai) bool
- func TacInAreas(targetTac string, areas []models.Area) bool
- type AMFContext
- func (context *AMFContext) AddAmfUeToUePool(ue *AmfUe, supi string)
- func (context *AMFContext) AllocateAmfUeNgapID() (int64, error)
- func (context *AMFContext) AllocateGutiToUe(ue *AmfUe)
- func (context *AMFContext) AllocateRegistrationArea(ue *AmfUe, anType models.AccessType)
- func (context *AMFContext) AmfRanFindByConn(conn net.Conn) (*AmfRan, bool)
- func (context *AMFContext) AmfRanFindByGnbId(gnbId string) (*AmfRan, bool)
- func (context *AMFContext) AmfRanFindByRanID(ranNodeID models.GlobalRanNodeId) (*AmfRan, bool)
- func (context *AMFContext) AmfUeDeleteBySuci(suci string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindByGuti(guti string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindByGutiLocal(guti string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindByPolicyAssociationID(polAssoId string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindBySuci(suci string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindBySupi(supi string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindBySupiLocal(supi string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindByUeContextID(ueContextID string) (*AmfUe, bool)
- func (context *AMFContext) DeleteAmfRan(conn net.Conn)
- func (context *AMFContext) Get5gsNwFeatSuppEmc() uint8
- func (context *AMFContext) Get5gsNwFeatSuppEmcN3() uint8
- func (context *AMFContext) Get5gsNwFeatSuppEmf() uint8
- func (context *AMFContext) Get5gsNwFeatSuppEnable() bool
- func (context *AMFContext) Get5gsNwFeatSuppImsVoPS() uint8
- func (context *AMFContext) Get5gsNwFeatSuppIwkN26() uint8
- func (context *AMFContext) Get5gsNwFeatSuppMcsi() uint8
- func (context *AMFContext) Get5gsNwFeatSuppMpsi() uint8
- func (context *AMFContext) GetIPv4Uri() string
- func (context *AMFContext) InPlmnSupportList(snssai models.Snssai) bool
- func (context *AMFContext) InSupportDnnList(targetDnn string) bool
- func (context *AMFContext) ListAmfRan() []AmfRan
- func (context *AMFContext) NewAmfRan(conn net.Conn) *AmfRan
- func (context *AMFContext) NewAmfUe(supi string) *AmfUe
- func (context *AMFContext) RanUeFindByAmfUeNgapID(amfUeNgapID int64) *RanUe
- func (context *AMFContext) RanUeFindByAmfUeNgapIDLocal(amfUeNgapID int64) *RanUe
- func (context *AMFContext) ReAllocateGutiToUe(ue *AmfUe)
- func (context *AMFContext) TmsiAllocate() int32
- type AmfRan
- func (ran *AmfRan) ConvertGnbIdToRanId(gnbId string) (ranNodeId *models.GlobalRanNodeId)
- func (ran *AmfRan) NewRanUe(ranUeNgapID int64) (*RanUe, error)
- func (ran *AmfRan) RanID() string
- func (ran *AmfRan) RanUeFindByRanUeNgapID(ranUeNgapID int64) *RanUe
- func (ran *AmfRan) RanUeFindByRanUeNgapIDLocal(ranUeNgapID int64) *RanUe
- func (ran *AmfRan) Remove()
- func (ran *AmfRan) RemoveAllUeInRan()
- func (ran *AmfRan) SetRanId(ranNodeId *ngapType.GlobalRANNodeID)
- type AmfUe
- func (ue *AmfUe) AttachRanUe(ranUe *RanUe)
- func (ue *AmfUe) ClearRegistrationData()
- func (ue *AmfUe) ClearRegistrationRequestData(accessType models.AccessType)
- func (ue *AmfUe) CmConnect(anType models.AccessType) bool
- func (ue *AmfUe) CmIdle(anType models.AccessType) bool
- func (ue *AmfUe) CopyDataFromUeContextModel(ueContext models.UeContext)
- func (ue *AmfUe) DerivateAlgKey()
- func (ue *AmfUe) DerivateAnKey(anType models.AccessType)
- func (ue *AmfUe) DerivateKamf()
- func (ue *AmfUe) DerivateNH(syncInput []byte)
- func (ue *AmfUe) DetachRanUe(anType models.AccessType)
- func (ue *AmfUe) GetAnType() models.AccessType
- func (ue *AmfUe) GetCmInfo() (cmInfos []models.CmInfo)
- func (ue *AmfUe) GetNsiInformationFromSnssai(anType models.AccessType, snssai models.Snssai) *models.NsiInformation
- func (ue *AmfUe) GetOnGoing(anType models.AccessType) OnGoingProcedureWithPrio
- func (ue *AmfUe) HasWildCardSubscribedDNN() bool
- func (ue *AmfUe) InAllowedNssai(targetSNssai models.Snssai, anType models.AccessType) bool
- func (ue *AmfUe) InSubscribedNssai(targetSNssai models.Snssai) bool
- func (ue *AmfUe) NewEventChannel() (tx *EventChannel)
- func (ue *AmfUe) Remove()
- func (ue *AmfUe) RemoveAmPolicyAssociation()
- func (ue *AmfUe) SecurityContextIsValid() bool
- func (ue *AmfUe) SelectSecurityAlg(intOrder, encOrder []uint8)
- func (ue *AmfUe) SetEventChannel(handler func(*AmfUe, NgapMsg))
- func (ue *AmfUe) SetOnGoing(anType models.AccessType, onGoing *OnGoingProcedureWithPrio)
- func (ue *AmfUe) SmContextFindByPDUSessionID(pduSessionID int32) (*SmContext, bool)
- func (ue *AmfUe) StoreSmContext(pduSessionID int32, smContext *SmContext)
- func (ue *AmfUe) TaiListInRegistrationArea(taiList []models.Tai, accessType models.AccessType) bool
- func (ue *AmfUe) UpdateNH()
- func (ue *AmfUe) UpdateSecurityContext(anType models.AccessType)
- type AmfUeEventSubscription
- type CauseAll
- type EventChannel
- type InfoOnRecommendedCellsAndRanNodesForPaging
- type InterfaceMsg
- type InterfaceType
- type LADN
- type N1N2Message
- type NGRANCGI
- type NasMsg
- type NetworkFeatureSupport5GS
- type NetworkName
- type NgapMsg
- type OnGoingProcedure
- type OnGoingProcedureWithPrio
- type PlmnSupportItem
- type RanUe
- type RecommendRanNode
- type RecommendedCell
- type RelAction
- type SbiMsg
- type SbiResponseMsg
- type Security
- type SecurityAlgorithm
- type SmContext
- func (c *SmContext) AccessType() models.AccessType
- func (c *SmContext) DeleteULNASTransport()
- func (c *SmContext) Dnn() string
- func (c *SmContext) HSmfID() string
- func (c *SmContext) IsPduSessionActive() bool
- func (c *SmContext) NsInstance() string
- func (c *SmContext) PduSessionID() int32
- func (c *SmContext) PduSessionIDDuplicated() bool
- func (c *SmContext) PlmnID() models.PlmnId
- func (c *SmContext) SetAccessType(accessType models.AccessType)
- func (c *SmContext) SetDnn(dnn string)
- func (c *SmContext) SetDuplicatedPduSessionID(duplicated bool)
- func (c *SmContext) SetHSmfID(hsmfID string)
- func (c *SmContext) SetNsInstance(nsInstanceID string)
- func (c *SmContext) SetPduSessionID(id int32)
- func (c *SmContext) SetPduSessionInActive(s bool)
- func (c *SmContext) SetPlmnID(plmnID models.PlmnId)
- func (c *SmContext) SetSmContextRef(ref string)
- func (c *SmContext) SetSnssai(snssai models.Snssai)
- func (c *SmContext) SetUserLocation(userLocation models.UserLocation)
- func (c *SmContext) SetVSmfID(vsmfID string)
- func (c *SmContext) SmContextRef() string
- func (c *SmContext) Snssai() models.Snssai
- func (c *SmContext) StoreULNASTransport(msg *nasMessage.ULNASTransport)
- func (c *SmContext) ULNASTransport() *nasMessage.ULNASTransport
- func (c *SmContext) UserLocation() models.UserLocation
- func (c *SmContext) VSmfID() string
- type SupportedTAI
- type Timer
- type TimerValue
- type UERadioCapabilityForPaging
Constants ¶
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 )
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
const ( RanPresentGNbId = 1 RanPresentNgeNbId = 2 RanPresentN3IwfId = 3 RanConnected = "Connected" RanDisconnected = "Disconnected" )
const ( NgRanCgiPresentNRCGI int32 = 0 NgRanCgiPresentEUTRACGI int32 = 1 )
const ( RecommendRanNodePresentRanNode int32 = 0 RecommendRanNodePresentTAI int32 = 1 )
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
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 GetServedGuamiList ¶
func GetSupportTaiList ¶
Types ¶
type AMFContext ¶
type AMFContext struct { DbInstance *db.Database UePool sync.Map // map[supi]*AmfUe RanUePool sync.Map // map[AmfUeNgapID]*RanUe AmfRanPool sync.Map // map[net.Conn]*AmfRan LadnPool map[string]*LADN // dnn as key RelativeCapacity int64 NfId string Name string UriScheme models.UriScheme NgapPort int NetworkFeatureSupport5GS *NetworkFeatureSupport5GS SupportedDnns []string SecurityAlgorithm SecurityAlgorithm NetworkName NetworkName NgapIpList []string // NGAP Server IP T3502Value int // unit is second T3512Value int // unit is second Non3gppDeregistrationTimerValue int // unit is second // read-only fields T3513Cfg TimerValue T3522Cfg TimerValue T3550Cfg TimerValue T3560Cfg TimerValue T3565Cfg TimerValue }
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) AmfRanFindByGnbId ¶
func (context *AMFContext) AmfRanFindByGnbId(gnbId string) (*AmfRan, bool)
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) AmfUeDeleteBySuci ¶
func (context *AMFContext) AmfUeDeleteBySuci(suci string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindByGuti ¶
func (context *AMFContext) AmfUeFindByGuti(guti string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindByGutiLocal ¶
func (context *AMFContext) AmfUeFindByGutiLocal(guti string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindByPolicyAssociationID ¶
func (context *AMFContext) AmfUeFindByPolicyAssociationID(polAssoId string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindBySuci ¶
func (context *AMFContext) AmfUeFindBySuci(suci string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindBySupi ¶
func (context *AMFContext) AmfUeFindBySupi(supi string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindBySupiLocal ¶
func (context *AMFContext) AmfUeFindBySupiLocal(supi string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindByUeContextID ¶
func (context *AMFContext) AmfUeFindByUeContextID(ueContextID string) (*AmfUe, bool)
func (*AMFContext) DeleteAmfRan ¶
func (context *AMFContext) DeleteAmfRan(conn net.Conn)
func (*AMFContext) Get5gsNwFeatSuppEmc ¶
func (context *AMFContext) Get5gsNwFeatSuppEmc() uint8
func (*AMFContext) Get5gsNwFeatSuppEmcN3 ¶
func (context *AMFContext) Get5gsNwFeatSuppEmcN3() uint8
func (*AMFContext) Get5gsNwFeatSuppEmf ¶
func (context *AMFContext) Get5gsNwFeatSuppEmf() uint8
func (*AMFContext) Get5gsNwFeatSuppEnable ¶
func (context *AMFContext) Get5gsNwFeatSuppEnable() bool
func (*AMFContext) Get5gsNwFeatSuppImsVoPS ¶
func (context *AMFContext) Get5gsNwFeatSuppImsVoPS() uint8
func (*AMFContext) Get5gsNwFeatSuppIwkN26 ¶
func (context *AMFContext) Get5gsNwFeatSuppIwkN26() uint8
func (*AMFContext) Get5gsNwFeatSuppMcsi ¶
func (context *AMFContext) Get5gsNwFeatSuppMcsi() uint8
func (*AMFContext) Get5gsNwFeatSuppMpsi ¶
func (context *AMFContext) Get5gsNwFeatSuppMpsi() uint8
func (*AMFContext) GetIPv4Uri ¶
func (context *AMFContext) GetIPv4Uri() string
func (*AMFContext) InPlmnSupportList ¶
func (context *AMFContext) InPlmnSupportList(snssai models.Snssai) bool
func (*AMFContext) InSupportDnnList ¶
func (context *AMFContext) InSupportDnnList(targetDnn string) bool
func (*AMFContext) ListAmfRan ¶ added in v0.0.5
func (context *AMFContext) ListAmfRan() []AmfRan
func (*AMFContext) NewAmfUe ¶
func (context *AMFContext) NewAmfUe(supi string) *AmfUe
func (*AMFContext) RanUeFindByAmfUeNgapID ¶
func (context *AMFContext) RanUeFindByAmfUeNgapID(amfUeNgapID int64) *RanUe
func (*AMFContext) RanUeFindByAmfUeNgapIDLocal ¶
func (context *AMFContext) RanUeFindByAmfUeNgapIDLocal(amfUeNgapID int64) *RanUe
func (*AMFContext) ReAllocateGutiToUe ¶
func (context *AMFContext) ReAllocateGutiToUe(ue *AmfUe)
func (*AMFContext) TmsiAllocate ¶
func (context *AMFContext) TmsiAllocate() int32
type AmfRan ¶
type AmfRan struct { RanPresent int RanId *models.GlobalRanNodeId Name string AnType models.AccessType GnbIp string `json:"-"` GnbId string // RanId in string format, i.e.,mcc:mnc:gnbid /* socket Connect*/ Conn net.Conn `json:"-"` /* Supported TA List */ SupportedTAList []SupportedTAI /* RAN UE List */ RanUeList []*RanUe `json:"-"` // RanUeNgapId as key /* logger */ Log *zap.SugaredLogger `json:"-"` }
func ListAmfRan ¶ added in v0.0.5
func ListAmfRan() []AmfRan
func (*AmfRan) ConvertGnbIdToRanId ¶
func (ran *AmfRan) ConvertGnbIdToRanId(gnbId string) (ranNodeId *models.GlobalRanNodeId)
func (*AmfRan) RanUeFindByRanUeNgapID ¶
func (*AmfRan) RanUeFindByRanUeNgapIDLocal ¶
func (*AmfRan) RemoveAllUeInRan ¶
func (ran *AmfRan) RemoveAllUeInRan()
func (*AmfRan) SetRanId ¶
func (ran *AmfRan) SetRanId(ranNodeId *ngapType.GlobalRANNodeID)
type AmfUe ¶
type AmfUe struct { // Mutex sync.Mutex `json:"mutex,omitempty" yaml:"mutex" bson:"mutex,omitempty"` Mutex sync.Mutex `json:"-"` /* the AMF which serving this AmfUe now */ ServingAMF *AMFContext `json:"servingAMF,omitempty"` // never nil /* Gmm State */ State map[models.AccessType]*fsm.State `json:"-"` /* Registration procedure related context */ RegistrationType5GS uint8 `json:"registrationType5GS,omitempty"` IdentityTypeUsedForRegistration uint8 `json:"identityTypeUsedForRegistration,omitempty"` RegistrationRequest *nasMessage.RegistrationRequest `json:"registrationRequest,omitempty"` ServingAmfChanged bool `json:"servingAmfChanged,omitempty"` DeregistrationTargetAccessType uint8 `json:"deregistrationTargetAccessType,omitempty"` // only used when deregistration procedure is initialized by the network RegistrationAcceptForNon3GPPAccess []byte `json:"registrationAcceptForNon3GPPAccess,omitempty"` RetransmissionOfInitialNASMsg bool `json:"retransmissionOfInitialNASMsg,omitempty"` /* Used for AMF relocation */ TargetAmfUri string `json:"targetAmfUri,omitempty"` /* Ue Identity*/ PlmnId models.PlmnId `json:"plmnId,omitempty"` Suci string `json:"suci,omitempty"` Supi string `json:"supi,omitempty"` UnauthenticatedSupi bool `json:"unauthenticatedSupi,omitempty"` Gpsi string `json:"gpsi,omitempty"` Pei string `json:"pei,omitempty"` Tmsi int32 `json:"tmsi,omitempty"` // 5G-Tmsi Guti string `json:"guti,omitempty"` GroupID string `json:"groupID,omitempty"` EBI int32 `json:"ebi,omitempty"` /* Ue Identity*/ EventSubscriptionsInfo map[string]*AmfUeEventSubscription `json:"eventSubscriptionInfo,omitempty"` /* User Location*/ RatType models.RatType `json:"ratType,omitempty"` Location models.UserLocation `json:"location,omitempty"` Tai models.Tai `json:"tai,omitempty"` LocationChanged bool `json:"locationChanged,omitempty"` LastVisitedRegisteredTai models.Tai `json:"lastVisitedRegisteredTai,omitempty"` TimeZone string `json:"timezone,omitempty"` /* context about udm */ // UdmId string `json:"udmId,omitempty"` SubscriptionDataValid bool `json:"subscriptionDataValid,omitempty"` Reachability models.UeReachability `json:"reachability,omitempty"` SubscribedData models.SubscribedData `json:"subscribedData,omitempty"` SmfSelectionData *models.SmfSelectionSubscriptionData `json:"smfSelectionData,omitempty"` UeContextInSmfData *models.UeContextInSmfData `json:"ueContextInSmfData,omitempty"` TraceData *models.TraceData `json:"traceData,omitempty"` UdmGroupId string `json:"udmGroupId,omitempty"` SubscribedNssai []models.SubscribedSnssai `json:"subscribeNssai,omitempty"` AccessAndMobilitySubscriptionData *models.AccessAndMobilitySubscriptionData `json:"accessAndMobilitySubscriptionData,omitempty"` /* contex abut ausf */ AusfGroupId string `json:"ausfGroupId,omitempty"` AusfId string `json:"ausfId,omitempty"` RoutingIndicator string `json:"routingIndicator,omitempty"` AuthenticationCtx *models.UeAuthenticationCtx `json:"authenticationCtx,omitempty"` AuthFailureCauseSynchFailureTimes int `json:"authFailureCauseSynchFailureTimes,omitempty"` ABBA []uint8 `json:"abba,omitempty"` Kseaf string `json:"kseaf,omitempty"` Kamf string `json:"kamf,omitempty"` /* context about PCF */ PolicyAssociationId string `json:"policyAssociationId,omitempty"` AmPolicyUri string `json:"amPolicyUri,omitempty"` AmPolicyAssociation *models.PolicyAssociation `json:"amPolicyAssociation,omitempty"` RequestTriggerLocationChange bool `json:"requestTriggerLocationChange,omitempty"` // true if AmPolicyAssociation.Trigger contains RequestTrigger_LOC_CH ConfigurationUpdateMessage []byte `json:"configurationUpdateMessage,omitempty"` /* UeContextForHandover*/ HandoverNotifyUri string `json:"handoverNotifyUri,omitempty"` /* N1N2Message */ N1N2MessageIDGenerator *idgenerator.IDGenerator `json:"n1n2MessageIDGenerator,omitempty"` N1N2Message *N1N2Message `json:"-"` N1N2MessageSubscribeIDGenerator *idgenerator.IDGenerator `json:"n1n2MessageSubscribeIDGenerator,omitempty"` // map[int64]models.UeN1N2InfoSubscriptionCreateData; use n1n2MessageSubscriptionID as key N1N2MessageSubscription sync.Map `json:"n1n2MessageSubscription,omitempty"` /* Pdu Sesseion context */ SmContextList sync.Map `json:"-"` // map[int32]*SmContext, pdu session id as key /* Related Context*/ //RanUe map[models.AccessType]*RanUe `json:"ranUe,omitempty" yaml:"ranUe" bson:"ranUe,omitempty"` RanUe map[models.AccessType]*RanUe `json:"ranUe,omitempty"` /* other */ OnGoing map[models.AccessType]*OnGoingProcedureWithPrio `json:"onGoing,omitempty"` UeRadioCapability string `json:"ueRadioCapability,omitempty"` // OCTET string Capability5GMM nasType.Capability5GMM `json:"capability5GMM,omitempty"` ConfigurationUpdateIndication nasType.ConfigurationUpdateIndication `json:"configurationUpdateIndication,omitempty"` /* context related to Paging */ UeRadioCapabilityForPaging *UERadioCapabilityForPaging `json:"ueRadioCapabilityForPaging,omitempty"` InfoOnRecommendedCellsAndRanNodesForPaging *InfoOnRecommendedCellsAndRanNodesForPaging `json:"infoOnRecommendedCellsAndRanNodesForPaging,omitempty"` UESpecificDRX uint8 `json:"ueSpecificDRX,omitempty"` /* Security Context */ SecurityContextAvailable bool `json:"securityContextAvailable,omitempty"` UESecurityCapability nasType.UESecurityCapability `json:"ueSecurityCapability,omitempty"` // for security command NgKsi models.NgKsi `json:"ngKsi,omitempty"` MacFailed bool `json:"macFailed,omitempty"` // set to true if the integrity check of current NAS message is failed KnasInt [16]uint8 `json:"knasInt,omitempty"` // 16 byte KnasEnc [16]uint8 `json:"knasEnc,omitempty"` // 16 byte Kgnb []uint8 `json:"kgnb,omitempty"` // 32 byte Kn3iwf []uint8 `json:"kn3iwf,omitempty"` // 32 byte NH []uint8 `json:"nh,omitempty"` // 32 byte NCC uint8 `json:"ncc,omitempty"` // 0..7 // ULCount security.Count `json:"ulCount,omitempty" yaml:"ulCount" bson:"ulCount,omitempty"` // DLCount security.Count `json:"dlCount,omitempty" yaml:"dlCount" bson:"dlCount,omitempty"` ULCount security.Count `json:"-"` DLCount security.Count `json:"-"` CipheringAlg uint8 `json:"cipheringAlg,omitempty"` IntegrityAlg uint8 `json:"integrityAlg,omitempty"` /* Registration Area */ RegistrationArea map[models.AccessType][]models.Tai `json:"registrationArea,omitempty"` LadnInfo []LADN `json:"ladnInfo,omitempty"` /* Network Slicing related context and Nssf */ NetworkSliceInfo *models.AuthorizedNetworkSliceInfo `json:"networkSliceInfo,omitempty"` AllowedNssai map[models.AccessType][]models.AllowedSnssai `json:"allowedNssai,omitempty"` ConfiguredNssai []models.ConfiguredSnssai `json:"configuredNssai,omitempty"` NetworkSlicingSubscriptionChanged bool `json:"networkSlicingSubscriptionChanged,omitempty"` /* T3513(Paging) */ T3513 *Timer `json:"t3513Value,omitempty"` // for paging /* T3565(Notification) */ T3565 *Timer `json:"t3565Value,omitempty"` // for NAS Notification /* T3560 (for authentication request/security mode command retransmission) */ T3560 *Timer `json:"t3560Value,omitempty"` /* T3550 (for registration accept retransmission) */ T3550 *Timer `json:"t3550Value,omitempty"` /* T3522 (for deregistration request) */ T3522 *Timer `json:"t3522Value,omitempty"` /* Ue Context Release Cause */ ReleaseCause map[models.AccessType]*CauseAll `json:"releaseCause,omitempty"` /* T3502 (Assigned by AMF, and used by UE to initialize registration procedure) */ T3502Value int `json:"t3502Value,omitempty"` // Second T3512Value int `json:"t3512Value,omitempty"` // default 54 min Non3gppDeregistrationTimerValue int `json:"non3gppDeregistrationTimerValue,omitempty"` // default 54 min // AmfInstanceName and Ip AmfInstanceName string `json:"amfInstanceName,omitempty"` AmfInstanceIp string `json:"amfInstanceIp,omitempty"` EventChannel *EventChannel `json:"-"` NASLog *zap.SugaredLogger `json:"-"` GmmLog *zap.SugaredLogger `json:"-"` TxLog *zap.SugaredLogger `json:"-"` ProducerLog *zap.SugaredLogger `json:"-"` }
func (*AmfUe) AttachRanUe ¶
func (*AmfUe) ClearRegistrationData ¶
func (ue *AmfUe) ClearRegistrationData()
this method called when we are reusing the same uecontext during the registration procedure
func (*AmfUe) ClearRegistrationRequestData ¶
func (ue *AmfUe) ClearRegistrationRequestData(accessType models.AccessType)
this is clearing the transient data of registration request, this is called entrypoint of Deregistration and Registration state
func (*AmfUe) CopyDataFromUeContextModel ¶
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 ¶
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) GetNsiInformationFromSnssai ¶
func (ue *AmfUe) GetNsiInformationFromSnssai(anType models.AccessType, snssai models.Snssai) *models.NsiInformation
func (*AmfUe) GetOnGoing ¶
func (ue *AmfUe) GetOnGoing(anType models.AccessType) OnGoingProcedureWithPrio
func (*AmfUe) HasWildCardSubscribedDNN ¶
func (*AmfUe) InAllowedNssai ¶
func (*AmfUe) InSubscribedNssai ¶
func (*AmfUe) NewEventChannel ¶
func (ue *AmfUe) NewEventChannel() (tx *EventChannel)
func (*AmfUe) RemoveAmPolicyAssociation ¶
func (ue *AmfUe) RemoveAmPolicyAssociation()
func (*AmfUe) SecurityContextIsValid ¶
func (*AmfUe) SelectSecurityAlg ¶
func (*AmfUe) SetEventChannel ¶
func (*AmfUe) SetOnGoing ¶
func (ue *AmfUe) SetOnGoing(anType models.AccessType, onGoing *OnGoingProcedureWithPrio)
func (*AmfUe) SmContextFindByPDUSessionID ¶
func (*AmfUe) StoreSmContext ¶
func (*AmfUe) TaiListInRegistrationArea ¶
func (*AmfUe) UpdateSecurityContext ¶
func (ue *AmfUe) UpdateSecurityContext(anType models.AccessType)
type AmfUeEventSubscription ¶
type EventChannel ¶
type EventChannel struct { Message chan interface{} Event chan string AmfUe *AmfUe NasHandler func(*AmfUe, NasMsg) NgapHandler func(*AmfUe, NgapMsg) SbiHandler func(s1, s2 string, msg interface{}) (interface{}, string, interface{}, interface{}) }
func (*EventChannel) Start ¶
func (tx *EventChannel) Start()
func (*EventChannel) SubmitMessage ¶
func (tx *EventChannel) SubmitMessage(msg interface{})
func (*EventChannel) UpdateNasHandler ¶
func (tx *EventChannel) UpdateNasHandler(handler func(*AmfUe, NasMsg))
func (*EventChannel) UpdateNgapHandler ¶
func (tx *EventChannel) UpdateNgapHandler(handler func(*AmfUe, NgapMsg))
func (*EventChannel) UpdateSbiHandler ¶
func (tx *EventChannel) UpdateSbiHandler(handler func(s1, s2 string, msg interface{}) (interface{}, string, interface{}, interface{}))
type InfoOnRecommendedCellsAndRanNodesForPaging ¶
type InfoOnRecommendedCellsAndRanNodesForPaging struct { RecommendedCells []RecommendedCell // RecommendedCellsForPaging RecommendedRanNodes []RecommendRanNode // RecommendedRanNodesForPaging }
TS 38.413 9.3.1.100
type InterfaceMsg ¶
type InterfaceMsg interface{}
type InterfaceType ¶
type InterfaceType uint8
const ( NgapMessage InterfaceType = iota SbiMessage NasMessage )
type N1N2Message ¶
type N1N2Message struct { Request models.N1N2MessageTransferRequest Status models.N1N2MessageTransferCause ResourceUri string }
type NetworkName ¶
type OnGoingProcedure ¶
type OnGoingProcedure string
const ( OnGoingProcedureNothing OnGoingProcedure = "Nothing" OnGoingProcedurePaging OnGoingProcedure = "Paging" OnGoingProcedureN2Handover OnGoingProcedure = "N2Handover" OnGoingProcedureRegistration OnGoingProcedure = "Registration" OnGoingProcedureAbort OnGoingProcedure = "Abort" )
type OnGoingProcedureWithPrio ¶
type OnGoingProcedureWithPrio struct { Procedure OnGoingProcedure Ppi int32 // Paging priority }
type PlmnSupportItem ¶
func GetPlmnSupportList ¶
func GetPlmnSupportList() []PlmnSupportItem
type RanUe ¶
type RanUe struct { /* UE identity*/ RanUeNgapId int64 `json:"ranUeNgapId,omitempty"` AmfUeNgapId int64 `json:"amfUeNgapId,omitempty"` /* HandOver Info*/ HandOverType ngapType.HandoverType SuccessPduSessionId []int32 `json:"successPduSessionId,omitempty"` SourceUe *RanUe `json:"-"` TargetUe *RanUe `json:"-"` /* UserLocation*/ Tai models.Tai Location models.UserLocation /* context about udm */ SupportVoPSn3gpp bool `json:"-"` SupportVoPS bool `json:"-"` SupportedFeatures string `json:"-"` LastActTime *time.Time `json:"-"` /* Related Context*/ AmfUe *AmfUe `json:"-"` Ran *AmfRan /* 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 /* send initial context setup request or not*/ SentInitialContextSetupRequest bool /*Received Initial context setup response or not */ RecvdInitialContextSetupResponse bool /* logger */ Log *zap.SugaredLogger `json:"-"` }
func (*RanUe) DetachAmfUe ¶
func (ranUe *RanUe) DetachAmfUe()
func (*RanUe) SwitchToRan ¶
func (*RanUe) UpdateLocation ¶
func (ranUe *RanUe) UpdateLocation(userLocationInformation *ngapType.UserLocationInformation)
type RecommendRanNode ¶
type RecommendRanNode struct { Present int32 GlobalRanNodeId *models.GlobalRanNodeId Tai *models.Tai }
TS 38.413 9.3.1.101
type RecommendedCell ¶
TS 38.413 9.3.1.71
type SbiMsg ¶
type SbiMsg struct { Msg interface{} UeContextId string ReqUri string Result chan SbiResponseMsg }
type SbiResponseMsg ¶
type SbiResponseMsg struct { RespData interface{} LocationHeader string ProblemDetails interface{} TransferErr interface{} }
type SecurityAlgorithm ¶
type SmContext ¶
type SmContext struct { Mu *sync.RWMutex // protect the following fields // pdu session information PduSessionIDVal int32 SmContextRefVal string SnssaiVal models.Snssai DnnVal string AccessTypeVal models.AccessType NsInstanceVal string UserLocationVal models.UserLocation PlmnIDVal models.PlmnId // SMF information SmfIDVal string // SmfUriVal string HSmfIDVal string VSmfIDVal string // status of pdusession PduSessionInactiveVal bool // for duplicate pdu session id handling UlNASTransportVal *nasMessage.ULNASTransport DuplicatedVal bool SmfProfiles []models.NfProfile }
func NewSmContext ¶
func (*SmContext) AccessType ¶
func (c *SmContext) AccessType() models.AccessType
func (*SmContext) DeleteULNASTransport ¶
func (c *SmContext) DeleteULNASTransport()
func (*SmContext) IsPduSessionActive ¶
func (*SmContext) NsInstance ¶
func (*SmContext) PduSessionID ¶
func (*SmContext) PduSessionIDDuplicated ¶
func (*SmContext) SetAccessType ¶
func (c *SmContext) SetAccessType(accessType models.AccessType)
func (*SmContext) SetDuplicatedPduSessionID ¶
func (*SmContext) SetNsInstance ¶
func (*SmContext) SetPduSessionID ¶
func (*SmContext) SetPduSessionInActive ¶
func (*SmContext) SetSmContextRef ¶
func (*SmContext) SetUserLocation ¶
func (c *SmContext) SetUserLocation(userLocation models.UserLocation)
func (*SmContext) SmContextRef ¶
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
type SupportedTAI ¶
func NewSupportedTAI ¶
func NewSupportedTAI() (tai SupportedTAI)
func NewSupportedTAIList ¶
func NewSupportedTAIList() []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 int32, 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 ¶
ExpireTimes return the current expire times of the timer
func (*Timer) MaxRetryTimes ¶
MaxRetryTimes return the max retry times of the timer