smf_context

package
v0.0.0-...-cad1217 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NFServices *[]models.NfService
View Source
var NfServiceVersion *[]models.NfServiceVersion
View Source
var SmfInfo *models.SmfInfo

Functions

func AllocUEIP

func AllocUEIP() net.IP

func BuildGSMPDUSessionEstablishmentAccept

func BuildGSMPDUSessionEstablishmentAccept(smContext *SMContext) ([]byte, error)

func BuildGSMPDUSessionModificationCommand

func BuildGSMPDUSessionModificationCommand(smContext *SMContext) ([]byte, error)

func BuildGSMPDUSessionReleaseCommand

func BuildGSMPDUSessionReleaseCommand(smContext *SMContext) ([]byte, error)

func BuildHandoverCommandTransfer

func BuildHandoverCommandTransfer(ctx *SMContext) (buf []byte, err error)

func BuildPDUSessionResourceReleaseCommandTransfer

func BuildPDUSessionResourceReleaseCommandTransfer(ctx *SMContext) (buf []byte, err error)

func BuildPDUSessionResourceSetupRequestTransfer

func BuildPDUSessionResourceSetupRequestTransfer(ctx *SMContext) (buf []byte, err error)

func BuildPathSwitchRequestAcknowledgeTransfer

func BuildPathSwitchRequestAcknowledgeTransfer(ctx *SMContext) (buf []byte, err error)

TS 38.413 9.3.4.9

func BuildPathSwitchRequestUnsuccessfulTransfer

func BuildPathSwitchRequestUnsuccessfulTransfer(causePresent int, causeValue aper.Enumerated) (buf []byte, err error)

func GetSMContextCount

func GetSMContextCount() uint64

func HandleHandoverRequestAcknowledgeTransfer

func HandleHandoverRequestAcknowledgeTransfer(b []byte, ctx *SMContext) (err error)

func HandleHandoverRequiredTransfer

func HandleHandoverRequiredTransfer(b []byte, ctx *SMContext) (err error)

func HandlePDUSessionResourceSetupResponseTransfer

func HandlePDUSessionResourceSetupResponseTransfer(b []byte, ctx *SMContext) (err error)

func HandlePathSwitchRequestSetupFailedTransfer

func HandlePathSwitchRequestSetupFailedTransfer(b []byte, ctx *SMContext) (err error)

func HandlePathSwitchRequestTransfer

func HandlePathSwitchRequestTransfer(b []byte, ctx *SMContext) (err error)

func InitSmfContext

func InitSmfContext(config *factory.Config)

func RemoveSMContext

func RemoveSMContext(ref string)

func RemoveUPFNodeByNodeId

func RemoveUPFNodeByNodeId(nodeId pfcpType.NodeID)

func ResolveRef

func ResolveRef(identifier string, pduSessID int32) (ref string, err error)

func SetupNFProfile

func SetupNFProfile()

func SetupSMFContext

func SetupSMFContext(config *factory.Config) error

Types

type BAR

type BAR struct {
	BARID uint8

	DownlinkDataNotificationDelay  pfcpType.DownlinkDataNotificationDelay
	SuggestedBufferingPacketsCount pfcpType.SuggestedBufferingPacketsCount

	State RuleState
}

Buffering Action Rule 7.5.2.6-1

type FAR

type FAR struct {
	FARID uint32

	ApplyAction          pfcpType.ApplyAction
	ForwardingParameters *ForwardingParameters

	BAR   *BAR
	State RuleState
}

Forwarding Action Rule. 7.5.2.3-1

type ForwardingParameters

type ForwardingParameters struct {
	DestinationInterface pfcpType.DestinationInterface
	NetworkInstance      util_3gpp.Dnn
	OuterHeaderCreation  *pfcpType.OuterHeaderCreation
}

Forwarding Parameters. 7.5.2.3-2

type PDI

type PDI struct {
	SourceInterface pfcpType.SourceInterface
	LocalFTeid      pfcpType.FTEID
	NetworkInstance util_3gpp.Dnn
	UEIPAddress     *pfcpType.UEIPAddress
}

Packet Detection. 7.5.2.2-2

type PDR

type PDR struct {
	PDRID uint16

	Precedence         uint32
	PDI                PDI
	OuterHeaderRemoval *pfcpType.OuterHeaderRemoval

	FAR *FAR
	URR *URR
	QER *QER

	State RuleState
}

Packet Detection Rule. Table 7.5.2.2-1

type QER

type QER struct {
}

QoS Enhancement Rule

type RuleState

type RuleState uint8
const (
	RULE_INITIAL RuleState = 0
	RULE_CREATE  RuleState = 1
	RULE_UPDATE  RuleState = 2
	RULE_REMOVE  RuleState = 3
)

type SMContext

type SMContext struct {
	Ref string

	LocalSEID  uint64
	RemoteSEID uint64

	UnauthenticatedSupi bool
	// SUPI or PEI
	Supi           string
	Pei            string
	Identifier     string
	Gpsi           string
	PDUSessionID   int32
	Dnn            string
	Snssai         *models.Snssai
	HplmnSnssai    *models.Snssai
	ServingNetwork *models.PlmnId
	ServingNfId    string

	UpCnxState models.UpCnxState

	AnType          models.AccessType
	RatType         models.RatType
	PresenceInLadn  models.PresenceState
	UeLocation      *models.UserLocation
	UeTimeZone      string
	AddUeLocation   *models.UserLocation
	OldPduSessionId int32
	HoState         models.HoState

	PDUAddress net.IP

	// Client
	SMPolicyClient      *Npcf_SMPolicyControl.APIClient
	CommunicationClient *Namf_Communication.APIClient

	AMFProfile models.NfProfile

	SMState SMState

	Tunnel *UPTunnel
}

func GetSMContext

func GetSMContext(ref string) (smContext *SMContext)

func GetSMContextBySEID

func GetSMContextBySEID(SEID uint64) *SMContext

func NewSMContext

func NewSMContext(identifier string, pduSessID int32) (smContext *SMContext)

func (*SMContext) BuildCreatedData

func (smContext *SMContext) BuildCreatedData() (createdData *models.SmContextCreatedData)

func (*SMContext) HandlePDUSessionReleaseRequest

func (smContext *SMContext) HandlePDUSessionReleaseRequest(req *nasMessage.PDUSessionReleaseRequest)

func (*SMContext) SetCreateData

func (smContext *SMContext) SetCreateData(createData *models.SmContextCreateData)

type SMFContext

type SMFContext struct {
	Name         string
	NfInstanceID string

	URIScheme   models.UriScheme
	HTTPAddress string
	HTTPPort    int

	CPNodeID pfcpType.NodeID

	UDMProfiles []models.NfProfile
	PCFProfiles []models.NfProfile

	UPNodeIDs []pfcpType.NodeID
	Key       string
	PEM       string
	KeyLog    string

	UESubNet      *net.IPNet
	UEAddressTemp net.IP

	NrfUri             string
	NFManagementClient *Nnrf_NFManagement.APIClient
	NFDiscoveryClient  *Nnrf_NFDiscovery.APIClient
}

func SMF_Self

func SMF_Self() *SMFContext

type SMState

type SMState int
const (
	PDUSessionInactive SMState = 0
	PDUSessionActive   SMState = 1
)

type UPF

type UPF struct {
	NodeID   pfcpType.NodeID
	UPIPInfo pfcpType.UserPlaneIPResourceInformation

	TEIDCount uint32
	// contains filtered or unexported fields
}

func AddUPF

func AddUPF(nodeId *pfcpType.NodeID) (upf *UPF)

func RetrieveUPFNodeByNodeId

func RetrieveUPFNodeByNodeId(nodeId pfcpType.NodeID) (upf *UPF)

func SelectUPFByDnn

func SelectUPFByDnn(Dnn string) *UPF

func (*UPF) AddBAR

func (upf *UPF) AddBAR() (bar *BAR)

func (*UPF) AddFAR

func (upf *UPF) AddFAR() (far *FAR)

func (*UPF) AddPDR

func (upf *UPF) AddPDR() (pdr *PDR)

func (*UPF) GenerateTEID

func (upf *UPF) GenerateTEID() uint32

type UPTunnel

type UPTunnel struct {
	Node  *UPF
	ULPDR *PDR
	DLPDR *PDR

	ULTEID uint32
	DLTEID uint32
}

type URR

type URR struct {
}

Usage Report Rule

Jump to

Keyboard shortcuts

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