api

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Copyright 2024 Louis Royer and the go-pfcp-networking contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityOptionsInterface added in v0.0.31

type EntityOptionsInterface interface {
	MessageRetransmissionN1() int
	MessageRetransmissionT1() time.Duration
}

type FARID

type FARID = uint32

type FARInterface

type FARInterface interface {
	ID() (FARID, error)
	ApplyAction() *ie.IE
	ForwardingParameters() (*ie.IE, error)
	NewCreateFAR() *ie.IE
	Update(FARUpdateInterface) error
}

type FARMapInterface

type FARMapInterface interface {
	Get(key FARID) (FARInterface, error)
	Add(far FARInterface) error
	Update(far FARUpdateInterface) error
	Remove(key FARID) error
	SimulateAdd(far FARInterface) error
	SimulateUpdate(far FARUpdateInterface) error
	SimulateRemove(key FARID) error
	Foreach(func(FARInterface) error) error
	IntoCreateFAR() []*ie.IE
}

type FARMapUpdateInterface added in v0.0.42

type FARMapUpdateInterface interface {
	Add(far FARUpdateInterface) error
	IntoUpdateFAR() []*ie.IE
	Foreach(f func(FARUpdateInterface) error) error
}

type FARUpdateInterface added in v0.0.42

type FARUpdateInterface interface {
	ID() (FARID, error)
	ApplyAction() *ie.IE
	UpdateForwardingParameters() *ie.IE
	NewUpdateFAR() *ie.IE
}

type PDRID

type PDRID = uint16

type PDRInterface

type PDRInterface interface {
	ID() (PDRID, error)

	PDI() ([]*ie.IE, error)
	Precedence() (uint32, error)

	FARID() (FARID, error)

	OuterHeaderRemoval() *ie.IE

	SourceInterface() (uint8, error)
	FTEID() (*ie.FTEIDFields, error)
	UEIPAddress() (*ie.UEIPAddressFields, error)

	NewCreatePDR() *ie.IE
	NewUpdatePDR() *ie.IE
}

type PDRMapInterface

type PDRMapInterface interface {
	Get(key PDRID) (PDRInterface, error)
	Add(pdr PDRInterface) error
	Update(pdr PDRInterface) error
	Remove(key PDRID) error
	SimulateAdd(pdr PDRInterface) error
	SimulateUpdate(pdr PDRInterface) error
	SimulateRemove(key PDRID) error
	GetSortedPDRIDs() []PDRID
	Foreach(func(PDRInterface) error) error
	IntoCreatePDR() []*ie.IE
	IntoUpdatePDR() []*ie.IE
}

type PFCPAssociationInterface

type PFCPAssociationInterface interface {
	PFCPPeerInterface
	SetupInitiatedByCP() error
	GetNextSEID() SEID
	CreateSession(remoteFseid *ie.IE, pdrs PDRMapInterface, fars FARMapInterface) (session PFCPSessionInterface, err error)
}

type PFCPEntityInterface

type PFCPEntityInterface interface {
	ListenAddr() netip.Addr
	IsUserPlane() bool
	IsControlPlane() bool
	NodeID() *ie.IE
	RecoveryTimeStamp() *ie.IE
	NewEstablishedPFCPAssociation(nodeID *ie.IE) (association PFCPAssociationInterface, err error)
	RemovePFCPAssociation(association PFCPAssociationInterface) error
	GetPFCPAssociation(nid string) (association PFCPAssociationInterface, err error)
	GetPFCPSessions() []PFCPSessionInterface
	GetPFCPSession(localIP string, seid SEID) (PFCPSessionInterface, error)
	AddEstablishedPFCPSession(session PFCPSessionInterface) error
	LogPFCPRules()
	Options() EntityOptionsInterface
	WaitReady(ctx context.Context) error
}

type PFCPPeerInterface

type PFCPPeerInterface interface {
	IsRunning() bool
	Close() error
	Send(msg message.Message) (m message.Message, err error)
	IsAlive() (res bool, err error)
	NodeID() *ie.IE
	IsUserPlane() bool
	IsControlPlane() bool
	LocalEntity() PFCPEntityInterface
	NewEstablishedPFCPAssociation() (PFCPAssociationInterface, error)
}

type PFCPSessionInterface

type PFCPSessionInterface interface {
	LocalFSEID() *ie.IE
	LocalSEID() (SEID, error)
	LocalIPAddress() (net.IP, error)
	RemoteFSEID() *ie.IE
	RemoteSEID() (SEID, error)
	RemoteIPAddress() (net.IP, error)
	GetSortedPDRIDs() []PDRID
	GetPDR(pdrid PDRID) (PDRInterface, error)
	GetFAR(farid FARID) (FARInterface, error)
	AddUpdatePDRsFARs(createpdrs PDRMapInterface, createfars FARMapInterface, updatepdr PDRMapInterface, updatefars FARMapUpdateInterface) error
	//	SetRemoteFSEID(FSEID *ie.IE)
	Setup() error
	ForeachUnsortedPDR(f func(pdr PDRInterface) error) error

	// Must be called before getting PDRIDs, PDR, and FARs in one operation
	// to ensure FARs are up-to-date with PDRs
	RLock()
	RUnlock()
}

type SEID

type SEID = uint64

type SessionsMapInterface

type SessionsMapInterface interface {
	Add(session PFCPSessionInterface) error
	GetPFCPSessions() []PFCPSessionInterface
	GetPFCPSession(localIP string, seid SEID) (PFCPSessionInterface, error)
}

Jump to

Keyboard shortcuts

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