ue_actions

package
v0.0.0-...-b788d5e Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS_CASE                 = "success"
	FAILURE_CASE                 = "failure"
	SUCCESS_SERVING_NETWORK_NAME = "free5gc"
	TESTSET_SERVING_NETWORK_NAME = "WLAN"
)

Variables

View Source
var MilenageTestSet18 milenageTestSet
View Source
var MilenageTestSet19 milenageTestSet
View Source
var TestGenAuthDataTable = make(map[string]*models.AuthenticationInfoRequest)

Functions

func CalculateIpv4HeaderChecksum

func CalculateIpv4HeaderChecksum(hdr *ipv4.Header) uint32

func DeregistrationProcedure

func DeregistrationProcedure(ueContext *ue_context.UEContext)

func EncodeNasPduWithSecurity

func EncodeNasPduWithSecurity(ue *RanUeContext, 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(pduSessionId int64, 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 *RanUeContext, securityHeaderType uint8, payload []byte) (msg *nas.Message, err error)

func NASEncode

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

func NewIKESecurityAssociation

func NewIKESecurityAssociation() (uint64, error)

func SetupPDUSession

func SetupPDUSession(ueContext *ue_context.UEContext)

Types

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
	AnType             models.AccessType
	AuthenticationSubs models.AuthenticationSubscription
}

func NewRanUeContext

func NewRanUeContext(supi string, ranUeNgapId int64, cipheringAlg, integrityAlg uint8,
	AnType models.AccessType) *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, snName string) []byte

func (*RanUeContext) Get5GMMCapability

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

func (*RanUeContext) GetBearerType

func (ue *RanUeContext) GetBearerType() uint8

func (*RanUeContext) GetUESecurityCapability

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

Jump to

Keyboard shortcuts

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