Documentation
¶
Index ¶
- Constants
- Variables
- func NewUpfInterfaceMap(ifaces []config.Interface) map[netip.Addr]*UpfInterface
- type AreasMap
- type PduSessionN3
- type Pfcprules
- type Sessions
- type SessionsMap
- func (s *SessionsMap) Add(ueCtrl jsonapi.ControlURI, session *PduSessionN3)
- func (s *SessionsMap) Get(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr) (*PduSessionN3, error)
- func (s *SessionsMap) GetIndirectForwardingRequired(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr) (bool, error)
- func (s *SessionsMap) GetNextDownlinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr) (*jsonapi.Fteid, error)
- func (s *SessionsMap) SetIndirectForwardingRequired(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, value bool) error
- func (s *SessionsMap) SetNextDownlinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, fteid *jsonapi.Fteid) error
- func (s *SessionsMap) SetUplinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, fteid *jsonapi.Fteid) error
- type Slice
- type SlicesMap
- type Smf
- func (smf *Smf) CreateSessionDownlink(ctx context.Context, ueCtrl jsonapi.ControlURI, ueIp netip.Addr, ...) (*PduSessionN3, error)
- func (smf *Smf) CreateSessionDownlinkFWUpfI(ctx context.Context, ueCtrl jsonapi.ControlURI, ueIp netip.Addr, ...) (*jsonapi.Fteid, error)
- func (smf *Smf) CreateSessionUplink(ctx context.Context, ueCtrl jsonapi.ControlURI, ueIpAddr netip.Addr, ...) (*PduSessionN3, error)
- func (smf *Smf) GetNextDownlinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, dnn config.SliceName) (*jsonapi.Fteid, error)
- func (smf *Smf) GetNextUeIpAddr(dnn config.SliceName) (netip.Addr, error)
- func (smf *Smf) GetSessionDownlinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, dnn config.SliceName) (*jsonapi.Fteid, error)
- func (smf *Smf) GetSessionIndirectForwardingRequired(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, dnn config.SliceName) (bool, error)
- func (smf *Smf) GetSessionUplinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, dnn config.SliceName) (*jsonapi.Fteid, error)
- func (smf *Smf) SessionFirstUpf(ueCtrl jsonapi.ControlURI, ueIp netip.Addr, dnn config.SliceName, ...) (*config.GTPInterface, error)
- func (smf *Smf) SetSessionIndirectForwardingRequired(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, dnn config.SliceName, value bool) error
- func (smf *Smf) Start(ctx context.Context) error
- func (smf *Smf) StoreNextDownlinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, dnn config.SliceName, ...) error
- func (smf *Smf) UpdateSessionDownlink(ctx context.Context, ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, ...) error
- func (smf *Smf) UpdateSessionUplink(ctx context.Context, ueCtrl jsonapi.ControlURI, ueIpAddr netip.Addr, ...) (*PduSessionN3, error)
- func (smf *Smf) WaitShutdown(ctx context.Context) error
- type TEID
- type TEIDsPool
- type UeIpPool
- type Upf
- func (upf *Upf) Associate(ctx context.Context, a pfcpapi.PFCPAssociationInterface)
- func (upf *Upf) CreateSession(ue netip.Addr) error
- func (upf *Upf) CreateUplinkAnchor(ctx context.Context, ueIp netip.Addr, dnn config.SliceName, ...) (*jsonapi.Fteid, error)
- func (upf *Upf) CreateUplinkAnchorWithFteid(ueIp netip.Addr, dnn config.SliceName, listenFteid *jsonapi.Fteid, ...)
- func (upf *Upf) CreateUplinkIntermediate(ctx context.Context, ueIp netip.Addr, dnn config.SliceName, ...) (*jsonapi.Fteid, error)
- func (upf *Upf) CreateUplinkIntermediateWithFteid(ueIp netip.Addr, dnn config.SliceName, listenFteid *jsonapi.Fteid, ...)
- func (upf *Upf) Rules(ueIp netip.Addr) *Pfcprules
- func (upf *Upf) UpdateDownlinkAnchor(ueIp netip.Addr, dnn config.SliceName, forwardFteid *jsonapi.Fteid, ...) uint32
- func (upf *Upf) UpdateDownlinkIntermediate(ctx context.Context, ueIp netip.Addr, dnn config.SliceName, ...) (*jsonapi.Fteid, uint32, error)
- func (upf *Upf) UpdateDownlinkIntermediateDirectForward(ueIp netip.Addr, dnn config.SliceName, farid uint32, fteid *jsonapi.Fteid)
- func (upf *Upf) UpdateDownlinkIntermediateWithFteid(ueIp netip.Addr, dnn config.SliceName, listenFteid *jsonapi.Fteid, ...) uint32
- func (upf *Upf) UpdateSession(ue netip.Addr) error
- type UpfInterface
- type UpfsMap
Constants ¶
View Source
const ( FteidTypeIPv4 = 0x01 UEIpAddrTypeIPv4Source = 0x02 UEIpAddrTypeIPv4Destination = 0x02 | 0x04 // S/D Flag = 1 OuterHeaderRemoveGtpuUdpIpv4 = 0x00 ApplyActionForw = 0x02 OuterHeaderCreationGtpuUdpIpv4 = 0x0100 )
PFCP Constants
Variables ¶
View Source
var ( ErrDnnNotFound = errors.New("DNN not found") ErrPDUSessionNotFound = errors.New("PDU Session not found") ErrAreaNotFound = errors.New("RAN Area not found for this gNB") ErrPathNotFound = errors.New("path not found for this RAN Area") ErrUpfNotAssociated = errors.New("UPF not associated") ErrUpfNotFound = errors.New("UPF not found") ErrInterfaceNotFound = errors.New("interface not found") ErrNoPFCPRule = errors.New("no PFCP rule to push") ErrNoIpAvailableInPool = errors.New("no IP address available in pool") ErrSmfNotStarted = errors.New("SMF not started") ErrSmfAlreadyStarted = errors.New("SMF already started") )
Functions ¶
func NewUpfInterfaceMap ¶
func NewUpfInterfaceMap(ifaces []config.Interface) map[netip.Addr]*UpfInterface
Types ¶
type AreasMap ¶ added in v0.0.5
type AreasMap struct {
// contains filtered or unexported fields
}
type PduSessionN3 ¶
type Pfcprules ¶
func NewPfcpRules ¶
func NewPfcpRules() *Pfcprules
type SessionsMap ¶
func NewSessionsMap ¶ added in v0.0.3
func NewSessionsMap() *SessionsMap
func (*SessionsMap) Add ¶ added in v0.0.3
func (s *SessionsMap) Add(ueCtrl jsonapi.ControlURI, session *PduSessionN3)
func (*SessionsMap) Get ¶ added in v0.0.3
func (s *SessionsMap) Get(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr) (*PduSessionN3, error)
func (*SessionsMap) GetIndirectForwardingRequired ¶ added in v0.0.7
func (s *SessionsMap) GetIndirectForwardingRequired(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr) (bool, error)
func (*SessionsMap) GetNextDownlinkFteid ¶ added in v0.0.7
func (s *SessionsMap) GetNextDownlinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr) (*jsonapi.Fteid, error)
func (*SessionsMap) SetIndirectForwardingRequired ¶ added in v0.0.7
func (s *SessionsMap) SetIndirectForwardingRequired(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, value bool) error
func (*SessionsMap) SetNextDownlinkFteid ¶ added in v0.0.3
func (s *SessionsMap) SetNextDownlinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, fteid *jsonapi.Fteid) error
func (*SessionsMap) SetUplinkFteid ¶ added in v0.0.7
func (s *SessionsMap) SetUplinkFteid(ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, fteid *jsonapi.Fteid) error
type Slice ¶
type Smf ¶
type Smf struct {
common.WithContext
Areas AreasMap
// contains filtered or unexported fields
}
func (*Smf) CreateSessionDownlink ¶
func (*Smf) CreateSessionDownlinkFWUpfI ¶ added in v0.1.0
func (*Smf) CreateSessionUplink ¶
func (smf *Smf) CreateSessionUplink(ctx context.Context, ueCtrl jsonapi.ControlURI, ueIpAddr netip.Addr, gnbCtrl jsonapi.ControlURI, dnn config.SliceName) (*PduSessionN3, error)
func (*Smf) GetNextDownlinkFteid ¶ added in v0.0.7
func (*Smf) GetNextUeIpAddr ¶ added in v0.0.7
func (*Smf) GetSessionDownlinkFteid ¶ added in v0.0.3
func (*Smf) GetSessionIndirectForwardingRequired ¶ added in v0.0.7
func (*Smf) GetSessionUplinkFteid ¶ added in v0.0.3
func (*Smf) SessionFirstUpf ¶ added in v0.0.7
func (smf *Smf) SessionFirstUpf(ueCtrl jsonapi.ControlURI, ueIp netip.Addr, dnn config.SliceName, gnbCtrl jsonapi.ControlURI) (*config.GTPInterface, error)
func (*Smf) SetSessionIndirectForwardingRequired ¶ added in v0.0.7
func (*Smf) StoreNextDownlinkFteid ¶ added in v0.0.3
func (*Smf) UpdateSessionDownlink ¶ added in v0.0.3
func (smf *Smf) UpdateSessionDownlink(ctx context.Context, ueCtrl jsonapi.ControlURI, ueAddr netip.Addr, dnn config.SliceName, oldGnbCtrl jsonapi.ControlURI) error
Updates Session to NextDownlinkFteid
func (*Smf) UpdateSessionUplink ¶ added in v0.1.0
func (smf *Smf) UpdateSessionUplink(ctx context.Context, ueCtrl jsonapi.ControlURI, ueIpAddr netip.Addr, gnbCtrl jsonapi.ControlURI, dnn config.SliceName) (*PduSessionN3, error)
type TEIDsPool ¶
type TEIDsPool struct {
// contains filtered or unexported fields
}
TEIDsPool allows to generate and maintain TEIDs.
func (*TEIDsPool) Next ¶
Next provides a new random, but unused, TEID from the pool. It may hang if there is no more available TEID within the pool (until a TEID is released, or the context is done). TEIDs are generated at random, so it will take more time if a lot of TEIDs are already used. Current number of TEIDs Available/In use can be checked with `TEIDsAvailable()` / `TEIDsInUse()` and the SMF should consider using another UPF if number of TEIDsAvailable is too low.
func (*TEIDsPool) Release ¶ added in v0.1.0
Release releases a TEID into the pool of available TEIDs.
func (*TEIDsPool) TEIDsAvailable ¶ added in v0.1.0
func (*TEIDsPool) TEIDsInUse ¶ added in v0.1.0
type UeIpPool ¶
type UeIpPool struct {
// contains filtered or unexported fields
}
func NewUeIpPool ¶
type Upf ¶
type Upf struct {
common.WithContext
// contains filtered or unexported fields
}
func (*Upf) Associate ¶
func (upf *Upf) Associate(ctx context.Context, a pfcpapi.PFCPAssociationInterface)
func (*Upf) CreateUplinkAnchor ¶
func (*Upf) CreateUplinkAnchorWithFteid ¶
func (*Upf) CreateUplinkIntermediate ¶
func (*Upf) CreateUplinkIntermediateWithFteid ¶
func (*Upf) UpdateDownlinkAnchor ¶
func (*Upf) UpdateDownlinkIntermediate ¶
func (*Upf) UpdateDownlinkIntermediateDirectForward ¶ added in v0.0.3
func (*Upf) UpdateDownlinkIntermediateWithFteid ¶
type UpfInterface ¶
func NewUpfInterface ¶
func NewUpfInterface(t string) *UpfInterface
func (*UpfInterface) IsN3 ¶
func (iface *UpfInterface) IsN3() bool
func (*UpfInterface) IsN9 ¶
func (iface *UpfInterface) IsN9() bool
Click to show internal directories.
Click to hide internal directories.