rest

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterSessionsByIP

func FilterSessionsByIP(nodeMap *map[string]*core.NodeAssociation, filterByIP net.IP) *core.Session

func FilterSessionsByTeid

func FilterSessionsByTeid(nodeMap *map[string]*core.NodeAssociation, filterByTeid uint32) *core.Session

func GetAllSessions

func GetAllSessions(nodeMap *map[string]*core.NodeAssociation) (sessions []core.Session)

Types

type ApiHandler

type ApiHandler struct {
	BpfObjects *ebpf.BpfObjects

	ForwardPlaneStats *ebpf.UpfXdpActionStatistic
	Cfg               *config.UpfConfig
	Links             *[]link.Link
	GtpPathManager    *core.GtpPathManager
	// contains filtered or unexported fields
}

func NewApiHandler

func NewApiHandler(
	bpfObjects *ebpf.BpfObjects,
	pfcpSrv map[string]*core.PfcpConnection,
	forwardPlaneStats *ebpf.UpfXdpActionStatistic,
	cfg *config.UpfConfig,
	links *[]link.Link,
	gtpPathManager *core.GtpPathManager,
	releaseChan chan struct{},
) *ApiHandler

func (*ApiHandler) GetPFCPSrv

func (h *ApiHandler) GetPFCPSrv() map[string]*core.PfcpConnection

func (*ApiHandler) InitMetricsRoute

func (h *ApiHandler) InitMetricsRoute() *gin.Engine

func (*ApiHandler) InitRoutes

func (h *ApiHandler) InitRoutes() *gin.Engine

type DataPlaneAddressesConfig

type DataPlaneAddressesConfig struct {
	N3Address string `json:"n3_address" binding:"required,ipv4"`
	N9Address string `json:"n9_address" binding:"required,ipv4"`
}

type DataPlaneEbpfConfig

type DataPlaneEbpfConfig struct {
	InterfaceName []string `json:"interface_name" binding:"required"`
	XDPAttachMode string   `json:"xdp_attach_mode" binding:"required,oneof=generic native offload"`
}

type FarMapElement added in v0.6.1

type FarMapElement struct {
	Id                    uint32 `json:"id"`
	Action                uint8  `json:"action"`
	OuterHeaderCreation   uint8  `json:"outer_header_creation"`
	Teid                  uint32 `json:"teid"`
	RemoteIP              uint32 `json:"remote_ip"`
	TransportLevelMarking uint16 `json:"transport_level_marking"`
}

type GTPPathConfig

type GTPPathConfig struct {
	GtpPeer         []string `json:"gtp_peer" binding:"required"`
	GtpEchoInterval uint32   `json:"gtp_echo_interval" binding:"required,gte=1"`
}

type LoggingCallerConfig

type LoggingCallerConfig struct {
	LoggingCaller bool `json:"logging_caller"`
}

type LoggingLevelConfig

type LoggingLevelConfig struct {
	LoggingLevel string `json:"logging_level" binding:"required"`
}

type NodeAssociationDescription

type NodeAssociationDescription struct {
	ID   string
	Addr string
}

type PFCPN4Config

type PFCPN4Config struct {
	PFCPAddress    string   `json:"pfcp_address" binding:"required"`
	PFCPNodeID     string   `json:"pfcp_node_id" binding:"required"`
	PFCPRemoteNode []string `json:"pfcp_remote_node" binding:"required"`
}

type PFCPSxaConfig

type PFCPSxaConfig struct {
	SXAAddress    string   `json:"sxa_address" binding:"required"`
	SXANodeID     string   `json:"sxa_node_id" binding:"required"`
	SXARemoteNode []string `json:"sxa_remote_node" binding:"required"`
}

type PFCPSxbConfig

type PFCPSxbConfig struct {
	SXBAddress    string   `json:"sxb_address" binding:"required"`
	SXBNodeID     string   `json:"sxb_node_id" binding:"required"`
	SXBRemoteNode []string `json:"sxb_remote_node" binding:"required"`
}

type PFCPTimersConfig

type PFCPTimersConfig struct {
	AssociationSetupTimeout uint32 `json:"association_setup_timeout" binding:"required,gte=0"`
	HeartbeatTimeout        uint32 `json:"heartbeat_timeout" binding:"required,gte=0"`
}

type PacketStats added in v0.6.1

type PacketStats struct {
	RxArp      uint64 `json:"rx_arp"`
	RxIcmp     uint64 `json:"rx_icmp"`
	RxIcmp6    uint64 `json:"rx_icmp6"`
	RxIp4      uint64 `json:"rx_ip4"`
	RxIp6      uint64 `json:"rx_ip6"`
	RxTcp      uint64 `json:"rx_tcp"`
	RxUdp      uint64 `json:"rx_udp"`
	RxOther    uint64 `json:"rx_other"`
	RxGtpEcho  uint64 `json:"rx_gtp_echo"`
	RxGtpPdu   uint64 `json:"rx_gtp_pdu"`
	RxGtpOther uint64 `json:"rx_gtp_other"`
	RxGtpUnexp uint64 `json:"rx_gtp_unexp"`
}

type PdrDownlinkElement

type PdrDownlinkElement struct {
	Id                 string `json:"ip"`
	FarId              uint32 `json:"far_id"`
	QerId              uint32 `json:"qer_id"`
	OuterHeaderRemoval uint8  `json:"outer_header_removal"`
	Trace              bool   `json:"trace"`
}

type PdrUplinkElement

type PdrUplinkElement struct {
	Id                 uint32 `json:"teid"`
	FarId              uint32 `json:"far_id"`
	QerId              uint32 `json:"qer_id"`
	OuterHeaderRemoval uint8  `json:"outer_header_removal"`
	Trace              bool   `json:"trace"`
}

type RouteStats added in v0.7.2

type RouteStats struct {
	FibLookupIp4Cache     uint64 `json:"fib_lookup_ip4_cache"`
	FibLookupIp4Ok        uint64 `json:"fib_lookup_ip4_ok"`
	FibLookupIp4ErrorDrop uint64 `json:"fib_lookup_ip4_error_drop"`
	FibLookupIp4ErrorPass uint64 `json:"fib_lookup_ip4_error_pass"`

	FibLookupIp6Cache     uint64 `json:"fib_lookup_ip6_cache"`
	FibLookupIp6Ok        uint64 `json:"fib_lookup_ip6_ok"`
	FibLookupIp6ErrorDrop uint64 `json:"fib_lookup_ip6_error_drop"`
	FibLookupIp6ErrorPass uint64 `json:"fib_lookup_ip6_error_pass"`
}

type XdpStats added in v0.6.1

type XdpStats struct {
	Aborted  uint64 `json:"aborted"`
	Drop     uint64 `json:"drop"`
	Pass     uint64 `json:"pass"`
	Tx       uint64 `json:"tx"`
	Redirect uint64 `json:"redirect"`
}

Jump to

Keyboard shortcuts

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