Documentation
¶
Index ¶
- Variables
- func GatherMetrics(stats ebpf.UpfXdpActionStatistic)
- func GetTransportLevelMarking(far *ie.IE) (uint16, error)
- func GetURRIDs(i *ie.IE) ([]uint32, error)
- func HandlePfcpAssociationSetupRequest(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func HandlePfcpAssociationSetupResponse(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func HandlePfcpAssociationUpdateRequest(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func HandlePfcpHeartbeatRequest(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func HandlePfcpHeartbeatResponse(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func HandlePfcpSessionDeletionRequest(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func HandlePfcpSessionEstablishmentRequest(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func HandlePfcpSessionModificationRequest(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
- func InitLogger()
- func ParseCidrIp(ipStr, maskStr string) (ebpf.IpWMask, error)
- func ParsePort(str string) (uint16, error)
- func ParsePortRange(str string) (ebpf.PortRange, error)
- func ParseProtocol(protocol string) (uint8, error)
- func ParseSdfFilter(flowDescription string) (ebpf.SdfFilter, error)
- func RegisterMetrics(stats ebpf.UpfXdpActionStatistic, conn *PfcpConnection)
- func SendHeartbeatRequest(conn *PfcpConnection, sequenceID uint32, associationAddr string)
- func SetConfig(conf config.UpfConfig) error
- func SetLoggerLevel(loggingLevel string) error
- func StartMetrics(addr string) error
- type AssociationConnector
- type DefaultAssociationConnector
- type GtpPathManager
- type NodeAssociation
- type PDRCreationContext
- type PfcpConnection
- func (connection *PfcpConnection) Close()
- func (connection *PfcpConnection) DeleteAssociation(assocAddr string)
- func (connection *PfcpConnection) DeleteSession(session *Session)
- func (connection *PfcpConnection) GetAssiciationCount() int
- func (connection *PfcpConnection) GetAssociation(assocAddr string) *NodeAssociation
- func (connection *PfcpConnection) GetSessionCount() int
- func (connection *PfcpConnection) Handle(b []byte, addr *net.UDPAddr)
- func (connection *PfcpConnection) Receive(b []byte) (n int, addr *net.UDPAddr, err error)
- func (connection *PfcpConnection) RefreshAssociations()
- func (connection *PfcpConnection) ReleaseResources(seID uint64)
- func (connection *PfcpConnection) Run()
- func (connection *PfcpConnection) Send(b []byte, addr *net.UDPAddr) (int, error)
- func (connection *PfcpConnection) SendMessage(msg message.Message, addr *net.UDPAddr) error
- func (connection *PfcpConnection) SetRemoteNodes(nodes []AssociationConnector)
- type PfcpFunc
- type PfcpHandlerMap
- type SFarInfo
- type SPDRInfo
- type SQerInfo
- type SUrrInfo
- type Session
- func (s *Session) GetFar(id uint32) SFarInfo
- func (s *Session) GetPDR(id uint16) SPDRInfo
- func (s *Session) GetQer(id uint32) SQerInfo
- func (s *Session) GetUrr(id uint32) SUrrInfo
- func (s *Session) NewFar(id uint32, internalId uint32, farInfo ebpf.FarInfo)
- func (s *Session) NewQer(id uint32, internalId uint32, qerInfo ebpf.QerInfo)
- func (s *Session) NewUrr(id uint32, internalId uint32, urrInfo ebpf.UrrInfo)
- func (s *Session) PutPDR(id uint32, info SPDRInfo)
- func (s *Session) RemoveFar(id uint32) SFarInfo
- func (s *Session) RemovePDR(id uint32) SPDRInfo
- func (s *Session) RemoveQer(id uint32) SQerInfo
- func (s *Session) RemoveUrr(id uint32) SUrrInfo
- func (s *Session) UpdateFar(id uint32, farInfo ebpf.FarInfo)
- func (s *Session) UpdateQer(id uint32, qerInfo ebpf.QerInfo)
- func (s *Session) UpdateUrr(id uint32, urrInfo ebpf.UrrInfo)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PfcpMessageRx = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "upf_pfcp_rx", Help: "The total number of received PFCP messages", }, []string{"message_name"}) PfcpMessageTx = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "upf_pfcp_tx", Help: "The total number of transmitted PFCP messages", }, []string{"message_name"}) PfcpMessageRxErrors = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "upf_pfcp_rx_errors", Help: "The total number of received PFCP messages with cause code", }, []string{"message_name", "cause_code"}) UpfXdpAborted prometheus.CounterFunc UpfXdpDrop prometheus.CounterFunc UpfXdpPass prometheus.CounterFunc UpfXdpTx prometheus.CounterFunc UpfXdpRedirect prometheus.CounterFunc UpfPfcpSessions prometheus.GaugeFunc UpfPfcpAssociations prometheus.GaugeFunc UpfRx = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "upf_rx", Help: "The total number of received packets", }, []string{"packet_type"}) UpfMessageRxLatency = promauto.NewSummaryVec(prometheus.SummaryOpts{ Name: "upf_pfcp_rx_latency", Subsystem: "pfcp", Help: "Duration of the PFCP message processing", Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, []string{"message_type"}) )
Functions ¶
func GatherMetrics ¶ added in v0.7.0
func GatherMetrics(stats ebpf.UpfXdpActionStatistic)
func GetTransportLevelMarking ¶ added in v0.3.4
func HandlePfcpAssociationSetupRequest ¶
func HandlePfcpAssociationSetupRequest(conn *PfcpConnection, msg message.Message, addr string) (message.Message, error)
https://www.etsi.org/deliver/etsi_ts/129200_129299/129244/16.04.00_60/ts_129244v160400p.pdf page 95
func HandlePfcpAssociationSetupResponse ¶ added in v0.7.0
func HandlePfcpAssociationUpdateRequest ¶ added in v0.7.0
func HandlePfcpHeartbeatResponse ¶ added in v0.3.3
func InitLogger ¶ added in v0.5.0
func InitLogger()
func ParseProtocol ¶ added in v0.5.0
func ParseSdfFilter ¶ added in v0.5.0
func RegisterMetrics ¶
func RegisterMetrics(stats ebpf.UpfXdpActionStatistic, conn *PfcpConnection)
func SendHeartbeatRequest ¶ added in v0.3.3
func SendHeartbeatRequest(conn *PfcpConnection, sequenceID uint32, associationAddr string)
func SetLoggerLevel ¶ added in v0.5.0
func StartMetrics ¶
Types ¶
type AssociationConnector ¶ added in v0.7.0
type AssociationConnector interface {
// contains filtered or unexported methods
}
type DefaultAssociationConnector ¶ added in v0.7.0
type DefaultAssociationConnector struct {
// contains filtered or unexported fields
}
func NewDefaultAssociationConnector ¶ added in v0.7.0
func NewDefaultAssociationConnector(address string) *DefaultAssociationConnector
type GtpPathManager ¶ added in v0.6.0
type GtpPathManager struct {
// contains filtered or unexported fields
}
func NewGtpPathManager ¶ added in v0.6.0
func NewGtpPathManager(localAddress string, interval time.Duration) *GtpPathManager
func (*GtpPathManager) AddGtpPath ¶ added in v0.6.0
func (gtpPathManager *GtpPathManager) AddGtpPath(gtpPeerAddress string)
func (*GtpPathManager) Run ¶ added in v0.6.0
func (gtpPathManager *GtpPathManager) Run()
func (*GtpPathManager) Stop ¶ added in v0.6.0
func (gtpPathManager *GtpPathManager) Stop()
type NodeAssociation ¶
type NodeAssociation struct {
ID string
Addr string
NextSessionID uint64
NextSequenceID uint32
Sessions map[uint64]*Session
HeartbeatChannel chan uint32
HeartbeatsActive bool
sync.Mutex
}
func NewNodeAssociation ¶ added in v0.3.3
func NewNodeAssociation(remoteNodeID string, addr string) *NodeAssociation
func (*NodeAssociation) HandleHeartbeat ¶ added in v0.6.1
func (association *NodeAssociation) HandleHeartbeat(sequence uint32)
func (*NodeAssociation) NewLocalSEID ¶
func (association *NodeAssociation) NewLocalSEID() uint64
func (*NodeAssociation) NewSequenceID ¶ added in v0.3.5
func (association *NodeAssociation) NewSequenceID() uint32
func (*NodeAssociation) ScheduleHeartbeat ¶ added in v0.6.1
func (association *NodeAssociation) ScheduleHeartbeat(conn *PfcpConnection)
type PDRCreationContext ¶ added in v0.6.0
type PDRCreationContext struct {
Session *Session
ResourceManager *service.ResourceManager
TEIDCache map[uint8]uint32
}
func NewPDRCreationContext ¶ added in v0.6.0
func NewPDRCreationContext(session *Session, resourceManager *service.ResourceManager) *PDRCreationContext
type PfcpConnection ¶
type PfcpConnection struct {
NodeAssociations map[string]*NodeAssociation
RecoveryTimestamp time.Time
ResourceManager *service.ResourceManager
// contains filtered or unexported fields
}
func NewPfcpConnection ¶ added in v0.7.0
func NewPfcpConnection(addr string, nodeId string, n3Ip string, n9Ip string, mapOperations ebpf.ForwardingPlaneController, resourceManager *service.ResourceManager) (*PfcpConnection, error)
func (*PfcpConnection) Close ¶
func (connection *PfcpConnection) Close()
func (*PfcpConnection) DeleteAssociation ¶ added in v0.3.3
func (connection *PfcpConnection) DeleteAssociation(assocAddr string)
DeleteAssociation deletes an association and all sessions associated with it.
func (*PfcpConnection) DeleteSession ¶ added in v0.3.3
func (connection *PfcpConnection) DeleteSession(session *Session)
DeleteSession deletes a session and all PDRs, FARs and QERs associated with it.
func (*PfcpConnection) GetAssiciationCount ¶ added in v0.3.6
func (connection *PfcpConnection) GetAssiciationCount() int
func (*PfcpConnection) GetAssociation ¶ added in v0.3.3
func (connection *PfcpConnection) GetAssociation(assocAddr string) *NodeAssociation
func (*PfcpConnection) GetSessionCount ¶ added in v0.3.6
func (connection *PfcpConnection) GetSessionCount() int
func (*PfcpConnection) Handle ¶
func (connection *PfcpConnection) Handle(b []byte, addr *net.UDPAddr)
func (*PfcpConnection) RefreshAssociations ¶ added in v0.3.3
func (connection *PfcpConnection) RefreshAssociations()
func (*PfcpConnection) ReleaseResources ¶ added in v0.6.0
func (connection *PfcpConnection) ReleaseResources(seID uint64)
func (*PfcpConnection) Run ¶
func (connection *PfcpConnection) Run()
func (*PfcpConnection) SendMessage ¶
func (*PfcpConnection) SetRemoteNodes ¶ added in v0.7.0
func (connection *PfcpConnection) SetRemoteNodes(nodes []AssociationConnector)
type PfcpHandlerMap ¶
func (PfcpHandlerMap) Handle ¶
func (handlerMap PfcpHandlerMap) Handle(conn *PfcpConnection, buf []byte, addr *net.UDPAddr) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.