Documentation ¶
Index ¶
- Constants
- func DelAccessAndMobilitySubscriptionDataFromMongoDB(ueId string, servingPlmnId string)
- func DelAmPolicyDataFromMongoDB(ueId string)
- func DelAuthSubscriptionToMongoDB(ueId string)
- func DelSessionManagementSubscriptionDataFromMongoDB(ueId string, servingPlmnId string)
- func DelSmPolicyDataFromMongoDB(ueId string)
- func DelSmfSelectionSubscriptionDataFromMongoDB(ueId string, servingPlmnId string)
- func EncodeNasPduWithSecurity(ue *RanUeContext, pdu []byte, securityHeaderType uint8, ...) ([]byte, error)
- func GetAccessAndMobilitySubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.AccessAndMobilitySubscriptionData)
- func GetAmPolicyDataFromMongoDB(ueId string) (amPolicyData *models.AmPolicyData)
- func GetAuthSubscriptionFromMongoDB(ueId string) (authSubs *models.AuthenticationSubscription)
- func GetHandoverNotify(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetHandoverRequestAcknowledge(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetHandoverRequired(amfUeNgapID int64, ranUeNgapID int64, targetGNBID []byte, targetCellID []byte) ([]byte, error)
- func GetInitialContextSetupResponse(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetInitialContextSetupResponseForServiceRequest(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)
- func GetInitialUEMessage(ranUeNgapID int64, nasPdu []byte, fiveGSTmsi string) ([]byte, error)
- func GetNGSetupRequest(gnbId []byte, bitlength uint64, name string) ([]byte, error)
- func GetNasPdu(msg *ngapType.DownlinkNASTransport) (m *nas.Message)
- func GetPDUSessionResourceReleaseResponse(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetPDUSessionResourceSetupResponse(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)
- func GetPDUSessionResourceSetupResponseForPaging(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)
- func GetPathSwitchRequest(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetSessionManagementDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.SessionManagementSubscriptionData)
- func GetSmPolicyDataFromMongoDB(ueId string) (smPolicyData *models.SmPolicyData)
- func GetSmfSelectionSubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (smfSelData *models.SmfSelectionSubscriptionData)
- func GetUEContextReleaseComplete(amfUeNgapID int64, ranUeNgapID int64, pduSessionIDList []int64) ([]byte, error)
- func GetUEContextReleaseRequest(amfUeNgapID int64, ranUeNgapID int64, pduSessionIDList []int64) ([]byte, error)
- func GetUplinkNASTransport(amfUeNgapID, ranUeNgapID int64, nasPdu []byte) ([]byte, error)
- func InsertAccessAndMobilitySubscriptionDataToMongoDB(ueId string, amData models.AccessAndMobilitySubscriptionData, ...)
- func InsertAmPolicyDataToMongoDB(ueId string, amPolicyData models.AmPolicyData)
- func InsertAuthSubscriptionToMongoDB(ueId string, authSubs models.AuthenticationSubscription)
- func InsertSessionManagementSubscriptionDataToMongoDB(ueId string, servingPlmnId string, ...)
- func InsertSmPolicyDataToMongoDB(ueId string, smPolicyData models.SmPolicyData)
- func InsertSmfSelectionSubscriptionDataToMongoDB(ueId string, smfSelData models.SmfSelectionSubscriptionData, ...)
- func NASDecode(ue *RanUeContext, securityHeaderType uint8, payload []byte) (msg *nas.Message, err error)
- func NASEncode(ue *RanUeContext, msg *nas.Message, securityContextAvailable bool, ...) (payload []byte, err error)
- func NewSupi() string
- func TestNon3GPPUE(t *testing.T)
- type NasUeContext
- type NgRan
- func (ngRan *NgRan) DeRegistration(supi string) (err error)
- func (ngRan *NgRan) EstablishPduSession(supi string, pduSessionId uint8, dnn string) (err error)
- func (ngRan *NgRan) ModifyPduSession(supi string, pduSessionId uint8) error
- func (ngRan *NgRan) N2Release(supi string) (err error)
- func (ngRan *NgRan) NGReset() (err error)
- func (ngRan *NgRan) NGSetup() (err error)
- func (ngRan *NgRan) Registration(supi string) (err error)
- func (ngRan *NgRan) ReleasePduSession(supi string, pduSessionId uint8) (err error)
- func (ngRan *NgRan) ServiceRequest(supi string, pduSessionId uint8) (err error)
- func (ngRan *NgRan) ShowUeContext(supi string) string
- func (ngRan *NgRan) String() string
- type PduSessionContext
- type RanUeContext
- type UeContext
Constants ¶
View Source
const ( NgRanStatusOffline = iota NgRanStatusOnline )
View Source
const ( NasUeStatusDeRegistration int = iota NasUeStatusRegistrationActivated NasUeStatusRegistrationIdle )
View Source
const ( PduSessionStatusInNoActivate int = iota PduSessionStatusInActivating PduSessionStatusInActivated PduSessionStatusInIdle )
View Source
const ( DataPduSessionId uint8 = 10 VoicePduSessionId uint8 = 11 )
Variables ¶
This section is empty.
Functions ¶
func DelAmPolicyDataFromMongoDB ¶
func DelAmPolicyDataFromMongoDB(ueId string)
func DelAuthSubscriptionToMongoDB ¶
func DelAuthSubscriptionToMongoDB(ueId string)
func DelSmPolicyDataFromMongoDB ¶
func DelSmPolicyDataFromMongoDB(ueId string)
func GetAccessAndMobilitySubscriptionDataFromMongoDB ¶
func GetAccessAndMobilitySubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.AccessAndMobilitySubscriptionData)
func GetAmPolicyDataFromMongoDB ¶
func GetAmPolicyDataFromMongoDB(ueId string) (amPolicyData *models.AmPolicyData)
func GetAuthSubscriptionFromMongoDB ¶
func GetAuthSubscriptionFromMongoDB(ueId string) (authSubs *models.AuthenticationSubscription)
func GetHandoverNotify ¶
func GetHandoverRequired ¶
func GetInitialUEMessage ¶
func GetNGSetupRequest ¶
func GetPathSwitchRequest ¶
func GetSessionManagementDataFromMongoDB ¶
func GetSessionManagementDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.SessionManagementSubscriptionData)
func GetSmPolicyDataFromMongoDB ¶
func GetSmPolicyDataFromMongoDB(ueId string) (smPolicyData *models.SmPolicyData)
func GetSmfSelectionSubscriptionDataFromMongoDB ¶
func GetSmfSelectionSubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (smfSelData *models.SmfSelectionSubscriptionData)
func GetUplinkNASTransport ¶
func InsertAccessAndMobilitySubscriptionDataToMongoDB ¶
func InsertAccessAndMobilitySubscriptionDataToMongoDB(ueId string, amData models.AccessAndMobilitySubscriptionData, servingPlmnId string)
func InsertAmPolicyDataToMongoDB ¶
func InsertAmPolicyDataToMongoDB(ueId string, amPolicyData models.AmPolicyData)
func InsertAuthSubscriptionToMongoDB ¶
func InsertAuthSubscriptionToMongoDB(ueId string, authSubs models.AuthenticationSubscription)
func InsertSessionManagementSubscriptionDataToMongoDB ¶
func InsertSessionManagementSubscriptionDataToMongoDB(ueId string, servingPlmnId string, smData models.SessionManagementSubscriptionData)
func InsertSmPolicyDataToMongoDB ¶
func InsertSmPolicyDataToMongoDB(ueId string, smPolicyData models.SmPolicyData)
func InsertSmfSelectionSubscriptionDataToMongoDB ¶
func InsertSmfSelectionSubscriptionDataToMongoDB(ueId string, smfSelData models.SmfSelectionSubscriptionData, servingPlmnId string)
func TestNon3GPPUE ¶
Types ¶
type NasUeContext ¶
type NasUeContext struct { // static data // todo // dynamic data Guti5G string `json:"guti5G"` Status int `json:"status"` Snssai *models.Snssai `json:"snssai"` }
func NewNasUeContext ¶
func NewNasUeContext(snssai *models.Snssai) *NasUeContext
type NgRan ¶
type NgRan struct { // global configure data ServingPlmn string `json:"servingPlmn"` CurrentRanUeNgapId int64 `json:"currentRanUeNgapId"` InitAmfUeNgapId int64 `json:"initAmfUeNgapId"` ServingSnssai *models.Snssai `json:"servingSnssai"` // initAmfNgapId int64 // supportedTai // supportedCells // static data N2Cfg struct { AmfIp string `json:"amfIp"` AmfPort int `json:"amfPort"` NgRanIp string `json:"ngRanIp"` NgRanPort int `json:"ngRanPort"` GNBId int `json:"gnbId"` GNBName string `json:"gnbName"` } N3Cfg struct { UpfIP string `json:"upfIp"` UpfPort int `json:"upfPort"` NgRanUpIp string `json:"ngRanUpIp"` NgRanUpPort int `json:"ngRanUpPort"` } // dynamic data Status int `json:"status"` SctpConn *sctp.SCTPConn `json:"sctpConn"` UpConn *net.UDPConn `json:"upConn"` UeContexts map[string]*UeContext `json:"ueContexts"` // key is supi }
func (*NgRan) DeRegistration ¶
func (*NgRan) EstablishPduSession ¶
func (*NgRan) ModifyPduSession ¶
func (*NgRan) Registration ¶
supi example: "imsi-2089300007487"
func (*NgRan) ReleasePduSession ¶
func (*NgRan) ServiceRequest ¶
func (*NgRan) ShowUeContext ¶
type PduSessionContext ¶
type PduSessionContext struct { PduSessionId uint8 `json:"pduSessionId"` Dnn string `json:"dnn"` Snssai *models.Snssai `json:"snssai"` // dynamic data Status int `json:"status"` NasMsg *nas.Message `json:"nasMsg"` PDUSessionResourceSetupRequestTransfer []byte `json:"pduSessionResourceSetupRequestTransfer"` PduAddr []byte `json:"pduAddr"` }
func NewPduSessionContext ¶
func NewPduSessionContext(id uint8, dnn string, snssai *models.Snssai) *PduSessionContext
type RanUeContext ¶
type RanUeContext struct { Supi string RanUeNgapId int64 AmfUeNgapId int64 ULCount security.Count DLCount security.Count CipheringAlg uint8 IntegrityAlg uint8 KnasEnc [16]uint8 KnasInt [16]uint8 Kamf []uint8 AuthenticationSubs models.AuthenticationSubscription }
func NewRanUeContext ¶
func NewRanUeContext(supi string, ranUeNgapId int64, cipheringAlg, integrityAlg uint8) *RanUeContext
func (*RanUeContext) DerivateAlgKey ¶
func (ue *RanUeContext) DerivateAlgKey()
Algorithm key Derivation function defined in TS 33.501 Annex A.9
func (*RanUeContext) DerivateKamf ¶
func (ue *RanUeContext) DerivateKamf(key []byte, snName string, SQN, AK []byte)
func (*RanUeContext) DeriveRESstarAndSetKey ¶
func (ue *RanUeContext) DeriveRESstarAndSetKey(authSubs models.AuthenticationSubscription, RAND []byte, snNmae string) []byte
type UeContext ¶
type UeContext struct { RanUeCtx *RanUeContext `json:"ranUeContext"` NasUeCtx *NasUeContext `json:"nasContext"` UePduSessions [2]*PduSessionContext `json:"nasUePduSessionContexts"` // save pduSession Info in NAS and AS }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.