Versions in this module Expand all Collapse all v0 v0.1.8 May 18, 2020 Changes in this version + const LicenseSectionName + const MapSectionName + const SO_ATTACH_BPF + const SO_ATTACH_REUSEPORT_EBPF + const SO_DETACH_FILTER + const SocketAttachTypeFilter + const SocketAttachTypeReusePort + const SocketFilterAllow + const SocketFilterDeny + func CreateLPMtrieKey(s string) *net.IPNet + func GetNumOfPossibleCpus() (int, error) + func KeyValueToBytes(ival interface{}, size int) ([]byte, error) + func NewMmapRingBuffer(ptr unsafe.Pointer) *mmapRingBuffer + func NullTerminatedStringToString(val []byte) string + func ParseFlexibleIntegerLittleEndian(rawVal []byte) uint64 + type BaseProgram struct + func (prog *BaseProgram) Close() error + func (prog *BaseProgram) GetFd() int + func (prog *BaseProgram) GetLicense() string + func (prog *BaseProgram) GetName() string + func (prog *BaseProgram) GetSize() int + func (prog *BaseProgram) GetType() ProgramType + func (prog *BaseProgram) Load() error + func (prog *BaseProgram) Pin(path string) error + type EbpfMap struct + Flags int + InnerMapFd int + InnerMapName string + KeySize int + MaxEntries int + Name string + PersistentPath string + Type MapType + ValueSize int + func NewMapFromExistingMapByFd(fd int) (*EbpfMap, error) + func NewMapFromExistingMapById(id int) (*EbpfMap, error) + func (m *EbpfMap) CloneTemplate() Map + func (m *EbpfMap) Close() error + func (m *EbpfMap) Create() error + func (m *EbpfMap) Delete(ikey interface{}) error + func (m *EbpfMap) GetFd() int + func (m *EbpfMap) GetName() string + func (m *EbpfMap) GetType() MapType + func (m *EbpfMap) Insert(ikey interface{}, ivalue interface{}) error + func (m *EbpfMap) Lookup(ikey interface{}) ([]byte, error) + func (m *EbpfMap) LookupInt(ikey interface{}) (int, error) + func (m *EbpfMap) LookupString(ikey interface{}) (string, error) + func (m *EbpfMap) LookupUint64(ikey interface{}) (uint64, error) + func (m *EbpfMap) Update(ikey interface{}, ivalue interface{}) error + func (m *EbpfMap) Upsert(ikey interface{}, ivalue interface{}) error + type Map interface + CloneTemplate func() Map + Close func() error + Create func() error + Delete func(interface{}) error + GetFd func() int + GetName func() string + GetType func() MapType + Insert func(interface{}, interface{}) error + Lookup func(interface{}) ([]byte, error) + LookupInt func(interface{}) (int, error) + LookupString func(interface{}) (string, error) + LookupUint64 func(interface{}) (uint64, error) + Update func(interface{}, interface{}) error + Upsert func(interface{}, interface{}) error + type MapType int + const MapTypeArray + const MapTypeArrayOfMaps + const MapTypeCGroupStorage + const MapTypeCPUMap + const MapTypeCgroupArray + const MapTypeDevMap + const MapTypeHash + const MapTypeHashOfMaps + const MapTypeLPMTrie + const MapTypeLRUHash + const MapTypeLRUPerCPUHash + const MapTypePerCPUArray + const MapTypePerCPUHash + const MapTypePerCpuCGroupStorage + const MapTypePerfEventArray + const MapTypeProgArray + const MapTypeQueue + const MapTypeReusePortSockArray + const MapTypeSKStorage + const MapTypeSockHash + const MapTypeSockMap + const MapTypeStack + const MapTypeStackTrace + const MapTypeXSKMap + func (t MapType) String() string + type PerfEvents struct + EventsLost int + EventsReceived int + EventsUnknowType int + PollTimeoutMs int + func NewPerfEvents(m Map) (*PerfEvents, error) + func (pe *PerfEvents) StartForAllProcessesAndCPUs(bufferSize int) (<-chan []byte, error) + func (pe *PerfEvents) Stop() + type Program interface + Attach func(data interface{}) error + Close func() error + Detach func() error + GetFd func() int + GetLicense func() string + GetName func() string + GetSize func() int + GetType func() ProgramType + Load func() error + Pin func(path string) error + type ProgramInfo struct + CreatedByUid int + Fd int + Id int + JitedProgramLen int + LoadTime time.Time + Maps map[string]Map + Name string + Tag string + Type ProgramType + XlatedProgramLen int + func GetProgramInfoByFd(fd int) (*ProgramInfo, error) + func GetProgramInfoById(id int) (*ProgramInfo, error) + type ProgramType int + const ProgramTypeCgroupSkb + const ProgramTypeCgroupSock + const ProgramTypeKprobe + const ProgramTypeLwtIn + const ProgramTypeLwtOut + const ProgramTypeLwtXmit + const ProgramTypePerfEvent + const ProgramTypeSchedAct + const ProgramTypeSchedCls + const ProgramTypeSockOps + const ProgramTypeSocketFilter + const ProgramTypeTracepoint + const ProgramTypeUnspec + const ProgramTypeXdp + func (t ProgramType) String() string + type SocketFilterAttachParams struct + AttachType SocketFilterAttachType + SocketFd int + type SocketFilterAttachType int + func (t SocketFilterAttachType) String() string + type SocketFilterResult int + func (t SocketFilterResult) String() string + type System interface + GetMapByName func(name string) Map + GetMaps func() map[string]Map + GetProgramByName func(name string) Program + GetPrograms func() map[string]Program + LoadElf func(fn string) error + func NewDefaultEbpfSystem() System + type XdpAttachMode int + const XdpAttachModeDrv + const XdpAttachModeHw + const XdpAttachModeNone + const XdpAttachModeSkb + type XdpAttachParams struct + Interface string + Mode XdpAttachMode + type XdpResult int + const XdpAborted + const XdpDrop + const XdpPass + const XdpRedirect + const XdpTx + func (t XdpResult) String() string