Documentation
¶
Overview ¶
ProtocolConfigurationOptions
Index ¶
- Constants
- Variables
- func AllocateLocalSEID() uint64
- func AllocateUPFID()
- func BuildGSMPDUSessionEstablishmentAccept(smContext *SMContext) ([]byte, error)
- func BuildGSMPDUSessionEstablishmentReject(smContext *SMContext, cause uint8) ([]byte, error)
- func BuildGSMPDUSessionModificationCommand(smContext *SMContext) ([]byte, error)
- func BuildGSMPDUSessionReleaseCommand(smContext *SMContext) ([]byte, error)
- func BuildGSMPDUSessionReleaseReject(smContext *SMContext) ([]byte, error)
- func BuildHandoverCommandTransfer(ctx *SMContext) (buf []byte, err error)
- func BuildPDUSessionResourceReleaseCommandTransfer(ctx *SMContext) (buf []byte, err error)
- func BuildPDUSessionResourceSetupRequestTransfer(ctx *SMContext) ([]byte, error)
- func BuildPathSwitchRequestAcknowledgeTransfer(ctx *SMContext) ([]byte, error)
- func BuildPathSwitchRequestUnsuccessfulTransfer(causePresent int, causeValue aper.Enumerated) (buf []byte, err error)
- func CheckUEHasPreConfig(SUPI string) (exist bool)
- func GetSMContextCount() uint64
- func HandleHandoverRequestAcknowledgeTransfer(b []byte, ctx *SMContext) (err error)
- func HandleHandoverRequiredTransfer(b []byte, ctx *SMContext) (err error)
- func HandlePDUSessionResourceSetupResponseTransfer(b []byte, ctx *SMContext) (err error)
- func HandlePathSwitchRequestSetupFailedTransfer(b []byte, ctx *SMContext) (err error)
- func HandlePathSwitchRequestTransfer(b []byte, ctx *SMContext) error
- func IPAddrOffset(in, base net.IP) int
- func IPAddrWithOffset(ip net.IP, offset int) net.IP
- func InitSMFUERouting(routingConfig *factory.RoutingConfig)
- func InitSmfContext(config *factory.Config)
- func RemoveSMContext(ref string)
- func RemoveUPFNodeByNodeID(nodeID pfcpType.NodeID) bool
- func ResolveRef(identifier string, pduSessID int32) (ref string, err error)
- func SNssaiSmfInfo() *[]models.SnssaiSmfInfoItem
- func SetSessionRuleActivateState(rule *SessionRule, state bool)
- func SetupNFProfile(config *factory.Config)
- func SetupSMFContext(config *factory.Config) error
- type AddingPSAState
- type BAR
- type BPManager
- type BPStatus
- type DNS
- type DataPath
- type DataPathNode
- func (node *DataPathNode) ActivateDownLinkTunnel(smContext *SMContext) error
- func (node *DataPathNode) ActivateUpLinkTunnel(smContext *SMContext) error
- func (node *DataPathNode) AddNext(next *DataPathNode)
- func (node *DataPathNode) AddPrev(prev *DataPathNode)
- func (node *DataPathNode) DeactivateDownLinkTunnel(smContext *SMContext)
- func (node *DataPathNode) DeactivateUpLinkTunnel(smContext *SMContext)
- func (node *DataPathNode) GetNodeIP() (ip string)
- func (node *DataPathNode) GetUPFID() (id string, err error)
- func (node *DataPathNode) GetUpLinkFAR() (far *FAR)
- func (node *DataPathNode) GetUpLinkPDR() (pdr *PDR)
- func (node *DataPathNode) IsANUPF() bool
- func (node *DataPathNode) IsAnchorUPF() bool
- func (node *DataPathNode) Next() *DataPathNode
- func (node *DataPathNode) Prev() *DataPathNode
- type DataPathPool
- type Destination
- type DnnUPFInfoItem
- type FAR
- type ForwardingParameters
- type GTPTunnel
- type IPAllocator
- type PCCRule
- type PDI
- type PDR
- type PFCPSessionContext
- type PFCPSessionResponseStatus
- type PacketFilter
- type PendingUPF
- type ProtocolConfigurationOptions
- type QER
- type QoSRule
- type QoSRules
- type RuleState
- type SMContext
- func (smContext *SMContext) AllocateLocalSEIDForDataPath(dataPath *DataPath)
- func (smContext *SMContext) AllocateLocalSEIDForUPPath(path UPPath)
- func (smContext *SMContext) BuildCreatedData() (createdData *models.SmContextCreatedData)
- func (smContext *SMContext) GetNodeIDByLocalSEID(seid uint64) (nodeID pfcpType.NodeID)
- func (smContext *SMContext) HandlePDUSessionEstablishmentRequest(req *nasMessage.PDUSessionEstablishmentRequest)
- func (smContext *SMContext) HandlePDUSessionReleaseRequest(req *nasMessage.PDUSessionReleaseRequest)
- func (smContext *SMContext) PCFSelection() error
- func (smContext *SMContext) PDUAddressToNAS() (addr [12]byte, addrLen uint8)
- func (smContext *SMContext) PutPDRtoPFCPSession(nodeID pfcpType.NodeID, pdr *PDR) error
- func (smContext *SMContext) RemovePDRfromPFCPSession(nodeID pfcpType.NodeID, pdr *PDR)
- func (smContext *SMContext) SelectedSessionRule() *SessionRule
- func (smContext *SMContext) SetCreateData(createData *models.SmContextCreateData)
- type SMContextState
- type SMFContext
- type SNssai
- type SessionRule
- type SnssaiSmfDnnInfo
- type SnssaiSmfInfo
- type SnssaiUPFInfo
- type TrafficControlData
- type UEPreConfigPaths
- type UPF
- func (upf *UPF) AddBAR() (*BAR, error)
- func (upf *UPF) AddFAR() (*FAR, error)
- func (upf *UPF) AddPDR() (*PDR, error)
- func (upf *UPF) AddQER() (*QER, error)
- func (upf *UPF) GenerateTEID() (uint32, error)
- func (upf *UPF) GetInterface(interfaceType models.UpInterfaceType, dnn string) *UPFInterfaceInfo
- func (upf *UPF) GetUPFID() string
- func (upf *UPF) GetUPFIP() string
- func (upf *UPF) PFCPAddr() *net.UDPAddr
- func (upf *UPF) RemoveBAR(bar *BAR) (err error)
- func (upf *UPF) RemoveFAR(far *FAR) (err error)
- func (upf *UPF) RemovePDR(pdr *PDR) (err error)
- func (upf *UPF) RemoveQER(qer *QER) (err error)
- func (upf *UPF) UUID() string
- type UPFInterfaceInfo
- type UPFSelectionParams
- type UPFStatus
- type UPNode
- type UPNodeType
- type UPPath
- type UPTunnel
- type URR
- type UserPlaneInformation
- func (upi *UserPlaneInformation) ExistDefaultPath(dnn string) bool
- func (upi *UserPlaneInformation) GenerateDefaultPath(selection *UPFSelectionParams) bool
- func (upi *UserPlaneInformation) GetDefaultUserPlanePathByDNN(selection *UPFSelectionParams) (path UPPath)
- func (upi *UserPlaneInformation) GetUPFIDByIP(ip string) string
- func (upi *UserPlaneInformation) GetUPFNameByIp(ip string) string
- func (upi *UserPlaneInformation) GetUPFNodeByIP(ip string) *UPNode
- func (upi *UserPlaneInformation) GetUPFNodeIDByName(name string) pfcpType.NodeID
Constants ¶
const ( OperationCodeCreateNewQoSRule uint8 = 1 OperationCodeDeleteExistingQoSRule uint8 = 2 OperationCodeModifyExistingQoSRuleAndAddPacketFilters uint8 = 3 OperationCodeModifyExistingQoSRuleAndReplaceAllPacketFilters uint8 = 4 OperationCodeModifyExistingQoSRuleAndDeletePacketFilters uint8 = 5 OperationCodeModifyExistingQoSRuleWithoutModifyingPacketFilters uint8 = 6 )
const ( PacketFilterDirectionDownlink uint8 = 1 PacketFilterDirectionUplink uint8 = 2 PacketFilterDirectionBidirectional uint8 = 3 )
const ( PacketFilterComponentTypeMatchAll uint8 = 0x01 PacketFilterComponentTypeIPv4RemoteAddress uint8 = 0x10 PacketFilterComponentTypeIPv4LocalAddress uint8 = 0x11 PacketFilterComponentTypeIPv6RemoteAddress uint8 = 0x21 PacketFilterComponentTypeIPv6LocalAddress uint8 = 0x23 PacketFilterComponentTypeProtocolIdentifierOrNextHeader uint8 = 0x30 PacketFilterComponentTypeSingleLocalPort uint8 = 0x40 PacketFilterComponentTypeLocalPortRange uint8 = 0x41 PacketFilterComponentTypeSingleRemotePort uint8 = 0x50 PacketFilterComponentTypeRemotePortRange uint8 = 0x51 PacketFilterComponentTypeSecurityParameterIndex uint8 = 0x60 PacketFilterComponentTypeTypeOfServiceOrTrafficClass uint8 = 0x70 PacketFilterComponentTypeFlowLabel uint8 = 0x80 PacketFilterComponentTypeDestinationMACAddress uint8 = 0x81 PacketFilterComponentTypeSourceMACAddress uint8 = 0x82 PacketFilterComponentType8021Q_CTAG_VID uint8 = 0x83 PacketFilterComponentType8021Q_STAG_VID uint8 = 0x84 PacketFilterComponentType8021Q_CTAG_PCPOrDEI uint8 = 0x85 PacketFilterComponentType8021Q_STAG_PCPOrDEI uint8 = 0x86 PacketFilterComponentTypeEthertype uint8 = 0x87 )
TS 24.501 Table 9.11.4.13.1
const DefaultNonGBR5QI = 9
Variables ¶
var NFServices *[]models.NfService
var NfServiceVersion *[]models.NfServiceVersion
var SmfInfo *models.SmfInfo
Functions ¶
func AllocateLocalSEID ¶
func AllocateLocalSEID() uint64
func AllocateUPFID ¶
func AllocateUPFID()
func BuildPathSwitchRequestAcknowledgeTransfer ¶
TS 38.413 9.3.4.9
func BuildPathSwitchRequestUnsuccessfulTransfer ¶
func BuildPathSwitchRequestUnsuccessfulTransfer(causePresent int, causeValue aper.Enumerated) (buf []byte, err error)
func CheckUEHasPreConfig ¶
func GetSMContextCount ¶
func GetSMContextCount() uint64
func IPAddrOffset ¶
IPAddrOffset calculate the input ip with base ip offset
func IPAddrWithOffset ¶
IPAddrWithOffset add offset on base ip
func InitSMFUERouting ¶
func InitSMFUERouting(routingConfig *factory.RoutingConfig)
func InitSmfContext ¶
func RemoveUPFNodeByNodeID ¶
*** add unit test ***//
func SNssaiSmfInfo ¶
func SNssaiSmfInfo() *[]models.SnssaiSmfInfoItem
func SetSessionRuleActivateState ¶
func SetSessionRuleActivateState(rule *SessionRule, state bool)
SetSessionRuleActivateState
func SetupNFProfile ¶
func SetupSMFContext ¶
Types ¶
type AddingPSAState ¶
type AddingPSAState int
const ( ActivatingDataPath AddingPSAState = iota EstablishingNewPSA EstablishingULCL UpdatingPSA2DownLink UpdatingRANAndIUPFUpLink Finished )
type BAR ¶
type BAR struct {
BARID uint8
DownlinkDataNotificationDelay pfcpType.DownlinkDataNotificationDelay
SuggestedBufferingPacketsCount pfcpType.SuggestedBufferingPacketsCount
State RuleState
}
Buffering Action Rule 7.5.2.6-1
type BPManager ¶
type BPManager struct {
BPStatus BPStatus
AddingPSAState AddingPSAState
PendingUPF PendingUPF
ActivatedPaths []*DataPath
ActivatingPath *DataPath
UpdatedBranchingPoint map[*UPF]int
ULCL *UPF
}
func NewBPManager ¶
func (*BPManager) SelectPSA2 ¶
type DataPath ¶
type DataPath struct {
// meta data
Activated bool
IsDefaultPath bool
Destination Destination
HasBranchingPoint bool
// Data Path Double Link List
FirstDPNode *DataPathNode
}
func GenerateDataPath ¶
func NewDataPath ¶
func NewDataPath() *DataPath
func (*DataPath) ActivateTunnelAndPDR ¶
func (*DataPath) DeactivateTunnelAndPDR ¶
type DataPathNode ¶
type DataPathNode struct {
UPF *UPF
UpLinkTunnel *GTPTunnel
DownLinkTunnel *GTPTunnel
// InUse bool
IsBranchingPoint bool
}
func NewDataPathNode ¶
func NewDataPathNode() *DataPathNode
func NewUEDataPathNode ¶
func NewUEDataPathNode(name string) (node *DataPathNode, err error)
func (*DataPathNode) ActivateDownLinkTunnel ¶
func (node *DataPathNode) ActivateDownLinkTunnel(smContext *SMContext) error
func (*DataPathNode) ActivateUpLinkTunnel ¶
func (node *DataPathNode) ActivateUpLinkTunnel(smContext *SMContext) error
func (*DataPathNode) AddNext ¶
func (node *DataPathNode) AddNext(next *DataPathNode)
func (*DataPathNode) AddPrev ¶
func (node *DataPathNode) AddPrev(prev *DataPathNode)
func (*DataPathNode) DeactivateDownLinkTunnel ¶
func (node *DataPathNode) DeactivateDownLinkTunnel(smContext *SMContext)
func (*DataPathNode) DeactivateUpLinkTunnel ¶
func (node *DataPathNode) DeactivateUpLinkTunnel(smContext *SMContext)
func (*DataPathNode) GetNodeIP ¶
func (node *DataPathNode) GetNodeIP() (ip string)
func (*DataPathNode) GetUPFID ¶
func (node *DataPathNode) GetUPFID() (id string, err error)
func (*DataPathNode) GetUpLinkFAR ¶
func (node *DataPathNode) GetUpLinkFAR() (far *FAR)
func (*DataPathNode) GetUpLinkPDR ¶
func (node *DataPathNode) GetUpLinkPDR() (pdr *PDR)
func (*DataPathNode) IsANUPF ¶
func (node *DataPathNode) IsANUPF() bool
func (*DataPathNode) IsAnchorUPF ¶
func (node *DataPathNode) IsAnchorUPF() bool
func (*DataPathNode) Next ¶
func (node *DataPathNode) Next() *DataPathNode
func (*DataPathNode) Prev ¶
func (node *DataPathNode) Prev() *DataPathNode
type DataPathPool ¶
func NewDataPathPool ¶
func NewDataPathPool() DataPathPool
func (DataPathPool) GetDefaultPath ¶
func (dataPathPool DataPathPool) GetDefaultPath() (dataPath *DataPath)
type Destination ¶
type DnnUPFInfoItem ¶
type DnnUPFInfoItem struct {
Dnn string
DnaiList []string
PduSessionTypes []models.PduSessionType
}
DnnUpfInfoItem presents UPF dnn information
func (*DnnUPFInfoItem) ContainsDNAI ¶
func (d *DnnUPFInfoItem) ContainsDNAI(targetDnai string) bool
ContainsDNAI return true if the this dnn Info contains the specify DNAI
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
ForwardingPolicyID string
}
Forwarding Parameters. 7.5.2.3-2
type GTPTunnel ¶
type GTPTunnel struct {
SrcEndPoint *DataPathNode
DestEndPoint *DataPathNode
TEID uint32
PDR *PDR
}
GTPTunnel represents the GTP tunnel information
type IPAllocator ¶
type IPAllocator struct {
// contains filtered or unexported fields
}
func NewIPAllocator ¶
func NewIPAllocator(cidr string) (*IPAllocator, error)
func (*IPAllocator) Allocate ¶
func (a *IPAllocator) Allocate() (net.IP, error)
Allocate will allocate the IP address and returns it
func (*IPAllocator) Release ¶
func (a *IPAllocator) Release(ip net.IP)
type PCCRule ¶
type PCCRule struct {
// shall include attribute
PCCRuleID string
Precedence int32
// maybe include attribute
AppID string
FlowInfos []models.FlowInformation
// related Data
Datapath *DataPath
// contains filtered or unexported fields
}
PCCRule - Policy and Charging Rule
func NewPCCRuleFromModel ¶
NewPCCRuleFromModel - create PCC rule from OpenAPI models
func (*PCCRule) RefTrafficControlData ¶
RefTrafficControlData - returns reference traffic control data ID
func (*PCCRule) SetRefTrafficControlData ¶
SetRefTrafficControlData - setting reference traffic control data
type PDI ¶
type PDI struct {
SourceInterface pfcpType.SourceInterface
LocalFTeid *pfcpType.FTEID
NetworkInstance util_3gpp.Dnn
UEIPAddress *pfcpType.UEIPAddress
SDFFilter *pfcpType.SDFFilter
ApplicationID string
}
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 PFCPSessionContext ¶
type PFCPSessionContext struct {
PDRs map[uint16]*PDR
NodeID pfcpType.NodeID
LocalSEID uint64
RemoteSEID uint64
}
func (*PFCPSessionContext) String ¶
func (pfcpSessionContext *PFCPSessionContext) String() string
type PFCPSessionResponseStatus ¶
type PFCPSessionResponseStatus int
const ( SessionUpdateSuccess PFCPSessionResponseStatus = iota SessionUpdateFailed SessionReleaseSuccess SessionReleaseFailed )
func (PFCPSessionResponseStatus) String ¶
func (pfcpSessionResponseStatus PFCPSessionResponseStatus) String() string
type PacketFilter ¶
func (*PacketFilter) MarshalBinary ¶
func (pf *PacketFilter) MarshalBinary() (data []byte, err error)
type PendingUPF ¶
func (PendingUPF) IsEmpty ¶
func (pendingUPF PendingUPF) IsEmpty() bool
type QER ¶
type QER struct {
QERID uint32
QFI pfcpType.QFI
GateStatus *pfcpType.GateStatus
MBR *pfcpType.MBR
GBR *pfcpType.GBR
State RuleState
}
QoS Enhancement Rule
type QoSRule ¶
type QoSRule struct {
Identifier uint8
OperationCode uint8
DQR uint8
Segregation uint8
PacketFilterList []PacketFilter
Precedence uint8
QFI uint8
}
func (*QoSRule) MarshalBinary ¶
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
SelectedPDUSessionType uint8
DnnConfiguration models.DnnConfiguration
// Client
SMPolicyClient *Npcf_SMPolicyControl.APIClient
CommunicationClient *Namf_Communication.APIClient
AMFProfile models.NfProfile
SelectedPCFProfile models.NfProfile
SmStatusNotifyUri string
SMContextState SMContextState
Tunnel *UPTunnel
BPManager *BPManager
// NodeID(string form) to PFCP Session Context
PFCPContext map[string]*PFCPSessionContext
SBIPFCPCommunicationChan chan PFCPSessionResponseStatus
PendingUPF PendingUPF
PDUSessionRelease_DUE_TO_DUP_PDU_ID bool
DNNInfo *SnssaiSmfDnnInfo
// SM Policy related
PCCRules map[string]*PCCRule
SessionRules map[string]*SessionRule
TrafficControlPool map[string]*TrafficControlData
// NAS
Pti uint8
// PCO Related
ProtocolConfigurationOptions *ProtocolConfigurationOptions
// lock
SMLock sync.Mutex
}
func GetSMContextBySEID ¶
*** add unit test ***//
func NewSMContext ¶
func (*SMContext) AllocateLocalSEIDForDataPath ¶
func (*SMContext) AllocateLocalSEIDForUPPath ¶
func (*SMContext) BuildCreatedData ¶
func (smContext *SMContext) BuildCreatedData() (createdData *models.SmContextCreatedData)
func (*SMContext) GetNodeIDByLocalSEID ¶
func (*SMContext) HandlePDUSessionEstablishmentRequest ¶
func (smContext *SMContext) HandlePDUSessionEstablishmentRequest(req *nasMessage.PDUSessionEstablishmentRequest)
func (*SMContext) HandlePDUSessionReleaseRequest ¶
func (smContext *SMContext) HandlePDUSessionReleaseRequest(req *nasMessage.PDUSessionReleaseRequest)
func (*SMContext) PCFSelection ¶
PCFSelection will select PCF for this SM Context
func (*SMContext) PDUAddressToNAS ¶
func (*SMContext) PutPDRtoPFCPSession ¶
func (*SMContext) RemovePDRfromPFCPSession ¶
func (*SMContext) SelectedSessionRule ¶
func (smContext *SMContext) SelectedSessionRule() *SessionRule
SelectedSessionRule - return the SMF selected session rule for this SM Context
func (*SMContext) SetCreateData ¶
func (smContext *SMContext) SetCreateData(createData *models.SmContextCreateData)
*** add unit test ***//
type SMContextState ¶
type SMContextState int
const ( InActive SMContextState = iota ActivePending Active InActivePending ModificationPending PFCPModification )
func (SMContextState) String ¶
func (smContextState SMContextState) String() string
type SMFContext ¶
type SMFContext struct {
Name string
NfInstanceID string
URIScheme models.UriScheme
BindingIPv4 string
RegisterIPv4 string
SBIPort int
CPNodeID pfcpType.NodeID
UDMProfile models.NfProfile
UPNodeIDs []pfcpType.NodeID
Key string
PEM string
KeyLog string
SnssaiInfos []SnssaiSmfInfo
NrfUri string
NFManagementClient *Nnrf_NFManagement.APIClient
NFDiscoveryClient *Nnrf_NFDiscovery.APIClient
SubscriberDataManagementClient *Nudm_SubscriberDataManagement.APIClient
UserPlaneInformation *UserPlaneInformation
OnlySupportIPv4 bool
OnlySupportIPv6 bool
//*** For ULCL ** //
ULCLSupport bool
UEPreConfigPathPool map[string]*UEPreConfigPaths
LocalSEIDCount uint64
}
func SMF_Self ¶
func SMF_Self() *SMFContext
type SessionRule ¶
type SessionRule struct {
// shall include
SessionRuleID string
// maybe include
AuthSessAmbr *models.Ambr
AuthDefQos *models.AuthorizedDefaultQos
// contains filtered or unexported fields
}
SessionRule - A session rule consists of policy information elements associated with PDU session.
func NewSessionRuleFromModel ¶
func NewSessionRuleFromModel(model *models.SessionRule) *SessionRule
NewSessionRuleFromModel - create session rule from OpenAPI models
type SnssaiSmfDnnInfo ¶
type SnssaiSmfDnnInfo struct {
DNS DNS
UeIPAllocator *IPAllocator
}
SnssaiSmfDnnInfo records the SMF per S-NSSAI DNN information
func RetrieveDnnInformation ¶
func RetrieveDnnInformation(Snssai models.Snssai, dnn string) *SnssaiSmfDnnInfo
RetrieveDnnInformation gets the corresponding dnn info from S-NSSAI and DNN
type SnssaiSmfInfo ¶
type SnssaiSmfInfo struct {
Snssai SNssai
DnnInfos map[string]*SnssaiSmfDnnInfo
}
SnssaiSmfInfo records the SMF S-NSSAI related information
type SnssaiUPFInfo ¶
type SnssaiUPFInfo struct {
SNssai SNssai
DnnList []DnnUPFInfoItem
}
type TrafficControlData ¶
type TrafficControlData struct {
// shall include attribute
TrafficControlID string
// maybe include attribute
FlowStatus models.FlowStatus
RouteToLocs []models.RouteToLocation
UpPathChgEvent *models.UpPathChgEvent
// contains filtered or unexported fields
}
TrafficControlData - Traffic control data defines how traffic data flows associated with a rule are treated (e.g. blocked, redirected).
func NewTrafficControlDataFromModel ¶
func NewTrafficControlDataFromModel(model *models.TrafficControlData) *TrafficControlData
NewTrafficControlDataFromModel - create the traffic control data from OpenAPI model
func (*TrafficControlData) AddRefedPCCRules ¶
func (tc *TrafficControlData) AddRefedPCCRules(PCCref string)
func (*TrafficControlData) DeleteRefedPCCRules ¶
func (tc *TrafficControlData) DeleteRefedPCCRules(PCCref string)
func (*TrafficControlData) RefedPCCRules ¶
func (tc *TrafficControlData) RefedPCCRules() map[string]string
RefedPCCRules - returns the PCCRules that reference this tcData
type UEPreConfigPaths ¶
type UEPreConfigPaths struct {
DataPathPool DataPathPool
PathIDGenerator *idgenerator.IDGenerator
}
func GetUEPreConfigPaths ¶
func GetUEPreConfigPaths(SUPI string) *UEPreConfigPaths
func NewUEPreConfigPaths ¶
func NewUEPreConfigPaths(SUPI string, paths []factory.Path) (*UEPreConfigPaths, error)
type UPF ¶
type UPF struct {
NodeID pfcpType.NodeID
UPIPInfo pfcpType.UserPlaneIPResourceInformation
UPFStatus UPFStatus
SNssaiInfos []SnssaiUPFInfo
N3Interfaces []UPFInterfaceInfo
N9Interfaces []UPFInterfaceInfo
// contains filtered or unexported fields
}
func NewUPF ¶
func NewUPF(nodeID *pfcpType.NodeID, ifaces []factory.InterfaceUpfInfoItem) (upf *UPF)
*** add unit test ***// NewUPF returns a new UPF context in SMF
func RetrieveUPFNodeByNodeID ¶
*** add unit test ***//
func SelectUPFByDnn ¶
func (*UPF) GenerateTEID ¶
func (*UPF) GetInterface ¶
func (upf *UPF) GetInterface(interfaceType models.UpInterfaceType, dnn string) *UPFInterfaceInfo
*** add unit test ***// GetInterface return the UPFInterfaceInfo that match input cond
type UPFInterfaceInfo ¶
type UPFInterfaceInfo struct {
NetworkInstance string
IPv4EndPointAddresses []net.IP
IPv6EndPointAddresses []net.IP
EndpointFQDN string
}
UPFInterfaceInfo store the UPF interface information
func NewUPFInterfaceInfo ¶
func NewUPFInterfaceInfo(i *factory.InterfaceUpfInfoItem) *UPFInterfaceInfo
NewUPFInterfaceInfo parse the InterfaceUpfInfoItem to generate UPFInterfaceInfo
type UPFSelectionParams ¶
UPFSelectionParams ... parameters for upf selection
func (*UPFSelectionParams) String ¶
func (upfSelectionParams *UPFSelectionParams) String() string
type UPNode ¶
type UPNode struct {
Type UPNodeType
NodeID pfcpType.NodeID
ANIP net.IP
Dnn string
Links []*UPNode
UPF *UPF
}
UPNode represent the user plane node topology
type UPNodeType ¶
type UPNodeType string
const ( UPNODE_UPF UPNodeType = "UPF" UPNODE_AN UPNodeType = "AN" )
type UPTunnel ¶
type UPTunnel struct {
PathIDGenerator *idgenerator.IDGenerator
DataPathPool DataPathPool
ANInformation struct {
IPAddress net.IP
TEID uint32
}
}
func NewUPTunnel ¶
func NewUPTunnel() (tunnel *UPTunnel)
func (*UPTunnel) AddDataPath ¶
*** add unit test ***//
type UserPlaneInformation ¶
type UserPlaneInformation struct {
UPNodes map[string]*UPNode
UPFs map[string]*UPNode
AccessNetwork map[string]*UPNode
UPFIPToName map[string]string
UPFsID map[string]string // name to id
UPFsIPtoID map[string]string // ip->id table, for speed optimization
DefaultUserPlanePath map[string][]*UPNode // DNN to Default Path
}
UserPlaneInformation store userplane topology
func GetUserPlaneInformation ¶
func GetUserPlaneInformation() *UserPlaneInformation
func NewUserPlaneInformation ¶
func NewUserPlaneInformation(upTopology *factory.UserPlaneInformation) *UserPlaneInformation
NewUserPlaneInformation process the configuration then returns a new instance of UserPlaneInformation
func (*UserPlaneInformation) ExistDefaultPath ¶
func (upi *UserPlaneInformation) ExistDefaultPath(dnn string) bool
func (*UserPlaneInformation) GenerateDefaultPath ¶
func (upi *UserPlaneInformation) GenerateDefaultPath(selection *UPFSelectionParams) bool
func (*UserPlaneInformation) GetDefaultUserPlanePathByDNN ¶
func (upi *UserPlaneInformation) GetDefaultUserPlanePathByDNN(selection *UPFSelectionParams) (path UPPath)
func (*UserPlaneInformation) GetUPFIDByIP ¶
func (upi *UserPlaneInformation) GetUPFIDByIP(ip string) string
func (*UserPlaneInformation) GetUPFNameByIp ¶
func (upi *UserPlaneInformation) GetUPFNameByIp(ip string) string
func (*UserPlaneInformation) GetUPFNodeByIP ¶
func (upi *UserPlaneInformation) GetUPFNodeByIP(ip string) *UPNode
func (*UserPlaneInformation) GetUPFNodeIDByName ¶
func (upi *UserPlaneInformation) GetUPFNodeIDByName(name string) pfcpType.NodeID
Source Files
¶
- bp_manager.go
- config.go
- context.go
- datapath.go
- gsm_build.go
- gsm_handler.go
- ip_allocator.go
- nf_profile.go
- ngap_build.go
- ngap_handler.go
- pcc_rule.go
- pco.go
- pfcp_rules.go
- pfcp_session_context.go
- qos_rule.go
- session_rules.go
- sm_context.go
- snssai.go
- snssai_dnn_smf_info.go
- traffic_control_data.go
- ue_datapath.go
- upf.go
- user_plane_information.go