Documentation
¶
Index ¶
- func CloseAllObjects(closers ...io.Closer) error
- func Copy16Ip[T ~[]byte](arr T) [16]byte
- func IncreaseResourceLimits() error
- func LoadAllObjects(opts *ebpf.CollectionOptions, loaders ...Loader) error
- func ResizeEbpfMap(eMap **ebpf.Map, eProg *ebpf.Program, newSize uint32) error
- type BpfMapProgArrayMember
- type BpfObjects
- func (bpfObjects *BpfObjects) Close() error
- func (bpfObjects *BpfObjects) DeleteDownlinkPdrIp6(ipv6 net.IP) error
- func (bpfObjects *BpfObjects) DeleteFar(intenalId uint32) error
- func (bpfObjects *BpfObjects) DeletePdrDownlink(ipv4 net.IP) error
- func (bpfObjects *BpfObjects) DeletePdrUplink(teid uint32) error
- func (bpfObjects *BpfObjects) DeleteQer(internalId uint32) error
- func (bpfObjects *BpfObjects) DeleteUrr(internalId uint32) (error, UrrInfo)
- func (bpfObjects *BpfObjects) GetNextFAR() (uint32, error)
- func (bpfObjects *BpfObjects) GetNextQER() (uint32, error)
- func (bpfObjects *BpfObjects) GetNextURR() (uint32, error)
- func (bpfObjects *BpfObjects) Load() error
- func (bpfObjects *BpfObjects) NewFar(farInfo FarInfo) (uint32, error)
- func (bpfObjects *BpfObjects) NewQer(qerInfo QerInfo) (uint32, error)
- func (bpfObjects *BpfObjects) NewUrr(urrInfo UrrInfo) (uint32, error)
- func (bpfObjects *BpfObjects) PutDownlinkPdrIp6(ipv6 net.IP, pdrInfo PdrInfo) error
- func (bpfObjects *BpfObjects) PutPdrDownlink(ipv4 net.IP, pdrInfo PdrInfo) error
- func (bpfObjects *BpfObjects) PutPdrUplink(teid uint32, pdrInfo PdrInfo) error
- func (bpfObjects *BpfObjects) ReleaseFAR(farId uint32)
- func (bpfObjects *BpfObjects) ReleaseQER(qerId uint32)
- func (bpfObjects *BpfObjects) ReleaseURR(urrId uint32)
- func (bpfObjects *BpfObjects) ResizeAllMaps(qerMapSize uint32, farMapSize uint32, pdrMapSize uint32) error
- func (bpfObjects *BpfObjects) UpdateDownlinkPdrIp6(ipv6 net.IP, pdrInfo PdrInfo) error
- func (bpfObjects *BpfObjects) UpdateFar(internalId uint32, farInfo FarInfo) error
- func (bpfObjects *BpfObjects) UpdatePdrDownlink(ipv4 net.IP, pdrInfo PdrInfo) error
- func (bpfObjects *BpfObjects) UpdatePdrUplink(teid uint32, pdrInfo PdrInfo) error
- func (bpfObjects *BpfObjects) UpdateQer(internalId uint32, qerInfo QerInfo) error
- func (bpfObjects *BpfObjects) UpdateUrr(internalId uint32, urrInfo UrrInfo) error
- type FarInfo
- type ForwardingPlaneController
- type IdTracker
- type IpWMask
- type Loader
- type LoaderFunc
- type PdrInfo
- type PortRange
- type QerInfo
- type QerMapElement
- type SdfFilter
- type UpfCounters
- type UpfStatistic
- type UpfXdpActionStatistic
- func (stat *UpfXdpActionStatistic) GetAborted() uint64
- func (stat *UpfXdpActionStatistic) GetDrop() uint64
- func (stat *UpfXdpActionStatistic) GetPass() uint64
- func (stat *UpfXdpActionStatistic) GetRedirect() uint64
- func (stat *UpfXdpActionStatistic) GetTx() uint64
- func (stat *UpfXdpActionStatistic) GetUpfExtStat() UpfCounters
- func (stat *UpfXdpActionStatistic) GetUpfExtStatDelta() UpfCounters
- type UrrInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseAllObjects ¶
func IncreaseResourceLimits ¶
func IncreaseResourceLimits() error
IncreaseResourceLimits https://prototype-kernel.readthedocs.io/en/latest/bpf/troubleshooting.html#memory-ulimits
func LoadAllObjects ¶
func LoadAllObjects(opts *ebpf.CollectionOptions, loaders ...Loader) error
Types ¶
type BpfMapProgArrayMember ¶
type BpfMapProgArrayMember struct {
ProgramId uint32 `json:"id"`
ProgramRef uint32 `json:"fd"`
ProgramName string `json:"name"`
ProgramRunCount uint32 `json:"run_count"`
ProgramRunCountEnabled bool `json:"run_count_enabled"`
ProgramDuration uint32 `json:"duration"`
ProgramDurationEnabled bool `json:"duration_enabled"`
}
https://man7.org/linux/man-pages/man2/bpf.2.html A program array map is a special kind of array map whose map values contain only file descriptors referring to other eBPF programs. Thus, both the key_size and value_size must be exactly four bytes.
func ListMapProgArrayContents ¶
func ListMapProgArrayContents(m *ebpf.Map) ([]BpfMapProgArrayMember, error)
type BpfObjects ¶
type BpfObjects struct {
IpEntrypointObjects
// contains filtered or unexported fields
}
func NewBpfObjects ¶
func NewBpfObjects() *BpfObjects
func (*BpfObjects) Close ¶
func (bpfObjects *BpfObjects) Close() error
func (*BpfObjects) DeleteDownlinkPdrIp6 ¶
func (bpfObjects *BpfObjects) DeleteDownlinkPdrIp6(ipv6 net.IP) error
func (*BpfObjects) DeleteFar ¶
func (bpfObjects *BpfObjects) DeleteFar(intenalId uint32) error
func (*BpfObjects) DeletePdrDownlink ¶ added in v0.6.0
func (bpfObjects *BpfObjects) DeletePdrDownlink(ipv4 net.IP) error
func (*BpfObjects) DeletePdrUplink ¶ added in v0.6.0
func (bpfObjects *BpfObjects) DeletePdrUplink(teid uint32) error
func (*BpfObjects) DeleteQer ¶
func (bpfObjects *BpfObjects) DeleteQer(internalId uint32) error
func (*BpfObjects) DeleteUrr ¶ added in v0.7.0
func (bpfObjects *BpfObjects) DeleteUrr(internalId uint32) (error, UrrInfo)
func (*BpfObjects) GetNextFAR ¶ added in v0.7.1
func (bpfObjects *BpfObjects) GetNextFAR() (uint32, error)
func (*BpfObjects) GetNextQER ¶ added in v0.7.1
func (bpfObjects *BpfObjects) GetNextQER() (uint32, error)
func (*BpfObjects) GetNextURR ¶ added in v0.7.1
func (bpfObjects *BpfObjects) GetNextURR() (uint32, error)
func (*BpfObjects) Load ¶
func (bpfObjects *BpfObjects) Load() error
func (*BpfObjects) NewUrr ¶ added in v0.7.0
func (bpfObjects *BpfObjects) NewUrr(urrInfo UrrInfo) (uint32, error)
func (*BpfObjects) PutDownlinkPdrIp6 ¶
func (bpfObjects *BpfObjects) PutDownlinkPdrIp6(ipv6 net.IP, pdrInfo PdrInfo) error
func (*BpfObjects) PutPdrDownlink ¶ added in v0.6.0
func (bpfObjects *BpfObjects) PutPdrDownlink(ipv4 net.IP, pdrInfo PdrInfo) error
func (*BpfObjects) PutPdrUplink ¶ added in v0.6.0
func (bpfObjects *BpfObjects) PutPdrUplink(teid uint32, pdrInfo PdrInfo) error
func (*BpfObjects) ReleaseFAR ¶ added in v0.7.1
func (bpfObjects *BpfObjects) ReleaseFAR(farId uint32)
func (*BpfObjects) ReleaseQER ¶ added in v0.7.1
func (bpfObjects *BpfObjects) ReleaseQER(qerId uint32)
func (*BpfObjects) ReleaseURR ¶ added in v0.7.1
func (bpfObjects *BpfObjects) ReleaseURR(urrId uint32)
func (*BpfObjects) ResizeAllMaps ¶
func (bpfObjects *BpfObjects) ResizeAllMaps(qerMapSize uint32, farMapSize uint32, pdrMapSize uint32) error
func (*BpfObjects) UpdateDownlinkPdrIp6 ¶
func (bpfObjects *BpfObjects) UpdateDownlinkPdrIp6(ipv6 net.IP, pdrInfo PdrInfo) error
func (*BpfObjects) UpdateFar ¶
func (bpfObjects *BpfObjects) UpdateFar(internalId uint32, farInfo FarInfo) error
func (*BpfObjects) UpdatePdrDownlink ¶ added in v0.6.0
func (bpfObjects *BpfObjects) UpdatePdrDownlink(ipv4 net.IP, pdrInfo PdrInfo) error
func (*BpfObjects) UpdatePdrUplink ¶ added in v0.6.0
func (bpfObjects *BpfObjects) UpdatePdrUplink(teid uint32, pdrInfo PdrInfo) error
type FarInfo ¶
type FarInfo struct {
Action uint8
OuterHeaderCreation uint8
Teid uint32
RemoteIP uint32
LocalIP uint32
TransportLevelMarking uint16
}
func (FarInfo) MarshalJSON ¶
type ForwardingPlaneController ¶
type ForwardingPlaneController interface {
PutPdrUplink(teid uint32, pdrInfo PdrInfo) error
PutPdrDownlink(ipv4 net.IP, pdrInfo PdrInfo) error
UpdatePdrUplink(teid uint32, pdrInfo PdrInfo) error
UpdatePdrDownlink(ipv4 net.IP, pdrInfo PdrInfo) error
DeletePdrUplink(teid uint32) error
DeletePdrDownlink(ipv4 net.IP) error
PutDownlinkPdrIp6(ipv6 net.IP, pdrInfo PdrInfo) error
UpdateDownlinkPdrIp6(ipv6 net.IP, pdrInfo PdrInfo) error
DeleteDownlinkPdrIp6(ipv6 net.IP) error
NewFar(farInfo FarInfo) (uint32, error)
UpdateFar(internalId uint32, farInfo FarInfo) error
DeleteFar(internalId uint32) error
NewQer(qerInfo QerInfo) (uint32, error)
UpdateQer(internalId uint32, qerInfo QerInfo) error
DeleteQer(internalId uint32) error
NewUrr(urrInfo UrrInfo) (uint32, error)
UpdateUrr(internalId uint32, urrInfo UrrInfo) error
DeleteUrr(internalId uint32) (error, UrrInfo)
}
type IdTracker ¶
type IdTracker struct {
// contains filtered or unexported fields
}
func NewIdTracker ¶
type Loader ¶
type Loader struct {
LoaderFunc
// contains filtered or unexported fields
}
type LoaderFunc ¶
type LoaderFunc func(obj interface{}, opts *ebpf.CollectionOptions) error
type QerMapElement ¶
type QerMapElement struct {
Id uint32 `json:"id"`
GateStatusUL uint8 `json:"gate_status_ul"`
GateStatusDL uint8 `json:"gate_status_dl"`
Qfi uint8 `json:"qfi"`
MaxBitrateUL uint32 `json:"max_bitrate_ul"`
MaxBitrateDL uint32 `json:"max_bitrate_dl"`
}
func ListQerMapContents ¶
func ListQerMapContents(m *ebpf.Map) ([]QerMapElement, error)
type SdfFilter ¶ added in v0.5.0
type UpfCounters ¶
type UpfCounters struct {
RxArp uint64
RxIcmp uint64
RxIcmp6 uint64
RxIp4 uint64
RxIp6 uint64
RxTcp uint64
RxUdp uint64
RxOther uint64
RxGtpEcho uint64
RxGtpPdu uint64
RxGtpOther uint64
RxGtpUnexp uint64
}
func (*UpfCounters) Add ¶
func (current *UpfCounters) Add(new UpfCounters)
func (*UpfCounters) Delta ¶ added in v0.7.0
func (current *UpfCounters) Delta(new UpfCounters) UpfCounters
type UpfStatistic ¶
type UpfStatistic struct {
Counters UpfCounters
XdpStats [5]uint64
}
type UpfXdpActionStatistic ¶
type UpfXdpActionStatistic struct {
BpfObjects *BpfObjects
// contains filtered or unexported fields
}
func (*UpfXdpActionStatistic) GetAborted ¶
func (stat *UpfXdpActionStatistic) GetAborted() uint64
func (*UpfXdpActionStatistic) GetDrop ¶
func (stat *UpfXdpActionStatistic) GetDrop() uint64
func (*UpfXdpActionStatistic) GetPass ¶
func (stat *UpfXdpActionStatistic) GetPass() uint64
func (*UpfXdpActionStatistic) GetRedirect ¶
func (stat *UpfXdpActionStatistic) GetRedirect() uint64
func (*UpfXdpActionStatistic) GetTx ¶
func (stat *UpfXdpActionStatistic) GetTx() uint64
func (*UpfXdpActionStatistic) GetUpfExtStat ¶ added in v0.7.0
func (stat *UpfXdpActionStatistic) GetUpfExtStat() UpfCounters
Getters for the upf_ext_stat (upf_counters)
func (*UpfXdpActionStatistic) GetUpfExtStatDelta ¶ added in v0.7.0
func (stat *UpfXdpActionStatistic) GetUpfExtStatDelta() UpfCounters
Getters for the upf_ext_stat (upf_counters)
Click to show internal directories.
Click to hide internal directories.