ue_procedures

package
v0.0.2-0...-24b9605 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateIpv4HeaderChecksum

func CalculateIpv4HeaderChecksum(hdr *ipv4.Header) uint32

func DeregistrationProcedure

func DeregistrationProcedure(ueContext *ue_context.UEContext)

func EncodeNasPduWithSecurity

func EncodeNasPduWithSecurity(ue *UeRanContext, pdu []byte, securityHeaderType uint8,
	securityContextAvailable, newSecurityContext bool) ([]byte, error)

func GetAccessAndMobilitySubscriptionData

func GetAccessAndMobilitySubscriptionData() (amData models.AccessAndMobilitySubscriptionData)

func GetAmPolicyData

func GetAmPolicyData() (amPolicyData models.AmPolicyData)

func GetAuthSubscription

func GetAuthSubscription(k, opc, op string) models.AuthenticationSubscription

func GetHandoverNotify

func GetHandoverNotify(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)

func GetHandoverRequestAcknowledge

func GetHandoverRequestAcknowledge(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)

func GetHandoverRequired

func GetHandoverRequired(
	amfUeNgapID int64, ranUeNgapID int64, targetGNBID []byte, targetCellID []byte) ([]byte, error)

func GetInitialContextSetupResponse

func GetInitialContextSetupResponse(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)

func GetInitialContextSetupResponseForServiceRequest

func GetInitialContextSetupResponseForServiceRequest(
	amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)

func GetInitialUEMessage

func GetInitialUEMessage(ranUeNgapID int64, nasPdu []byte, fiveGSTmsi string) ([]byte, error)

func GetNGSetupRequest

func GetNGSetupRequest(gnbId []byte, bitlength uint64, name string) ([]byte, error)

func GetPDUSessionResourceReleaseResponse

func GetPDUSessionResourceReleaseResponse(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)

func GetPDUSessionResourceSetupResponse

func GetPDUSessionResourceSetupResponse(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)

func GetPDUSessionResourceSetupResponseForPaging

func GetPDUSessionResourceSetupResponseForPaging(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)

func GetPathSwitchRequest

func GetPathSwitchRequest(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)

func GetSessionManagementSubscriptionData

func GetSessionManagementSubscriptionData() (smfSelData models.SessionManagementSubscriptionData)

func GetSmPolicyData

func GetSmPolicyData() (smPolicyData models.SmPolicyData)

func GetSmfSelectionSubscriptionData

func GetSmfSelectionSubscriptionData() (smfSelData models.SmfSelectionSubscriptionData)

func GetUEContextReleaseComplete

func GetUEContextReleaseComplete(amfUeNgapID int64, ranUeNgapID int64, pduSessionIDList []int64) ([]byte, error)

func GetUEContextReleaseRequest

func GetUEContextReleaseRequest(amfUeNgapID int64, ranUeNgapID int64, pduSessionIDList []int64) ([]byte, error)

func GetUplinkNASTransport

func GetUplinkNASTransport(amfUeNgapID, ranUeNgapID int64, nasPdu []byte) ([]byte, error)

func HandleDeregistrationProcedure

func HandleDeregistrationProcedure(ueContext *ue_context.UEContext)

func HandleRegistrationProcedure

func HandleRegistrationProcedure(ueContext *ue_context.UEContext)

func InitialRegistrationProcedure

func InitialRegistrationProcedure(ueContext *ue_context.UEContext)

func NASDecode

func NASDecode(ue *UeRanContext, securityHeaderType uint8, payload []byte) (msg *nas.Message, err error)

func NASEncode

func NASEncode(ue *UeRanContext, msg *nas.Message, securityContextAvailable bool, newSecurityContext bool) (
	payload []byte, err error)

func SetupPDUSession

func SetupPDUSession(ueContext *ue_context.UEContext)

Types

type UeRanContext

type UeRanContext 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 NewUeRanContext

func NewUeRanContext(supi string, ranUeNgapId int64, cipheringAlg, integrityAlg uint8) *UeRanContext

func (*UeRanContext) DerivateAlgKey

func (ue *UeRanContext) DerivateAlgKey()

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

func (*UeRanContext) DerivateKamf

func (ue *UeRanContext) DerivateKamf(key []byte, snName string, SQN, AK []byte)

func (*UeRanContext) DeriveRESstarAndSetKey

func (ue *UeRanContext) DeriveRESstarAndSetKey(
	authSubs models.AuthenticationSubscription, rand []byte, snName string) []byte

func (*UeRanContext) Get5GMMCapability

func (ue *UeRanContext) Get5GMMCapability() (capability5GMM *nasType.Capability5GMM)

func (*UeRanContext) GetUESecurityCapability

func (ue *UeRanContext) GetUESecurityCapability() (UESecurityCapability *nasType.UESecurityCapability)

Jump to

Keyboard shortcuts

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