Versions in this module Expand all Collapse all v0 v0.1.0 Sep 6, 2019 Changes in this version + const AdjRoomNet + const DefaultVerifierLogSize + const FCtxLenMask + const FCurrentCPU + const FDontFragment + const FFastStackCMP + const FHdrFieldMask + const FIndexMask + const FIngress + const FInvalidateHash + const FMakrEnforce + const FMarkMangled0 + const FPseudoHdr + const FReuseStackID + const FSkipFieldMask + const FTunInfoIPV6 + const FUserStack + const FZeroCSUMTX + const RecomputeCSUM + var ErrNotSupported = errors.New("ebpf: not supported by kernel") + func IsUnreferencedSymbol(err error) bool + func SanitizeName(name string, replacement rune) string + type AttachType uint32 + const AttachCGroupDevice + const AttachCGroupGetsockopt + const AttachCGroupInet4Bind + const AttachCGroupInet4Connect + const AttachCGroupInet4PostBind + const AttachCGroupInet6Bind + const AttachCGroupInet6Connect + const AttachCGroupInet6PostBind + const AttachCGroupInetEgress + const AttachCGroupInetIngress + const AttachCGroupInetSockCreate + const AttachCGroupSetsockopt + const AttachCGroupSockOps + const AttachCGroupSysctl + const AttachCGroupUDP4Recvmsg + const AttachCGroupUDP4Sendmsg + const AttachCGroupUDP6Recvmsg + const AttachCGroupUDP6Sendmsg + const AttachFlowDissector + const AttachLircMode2 + const AttachNone + const AttachSkMsgVerdict + const AttachSkSKBStreamParser + const AttachSkSKBStreamVerdict + type Collection struct + Maps map[string]*Map + Programs map[string]*Program + func LoadCollection(file string) (*Collection, error) + func LoadPinnedCollection(dirName string) (*Collection, error) + func LoadPinnedCollectionExplicit(dirName string, maps map[string]*MapABI, progs map[string]*ProgramABI) (*Collection, error) + func NewCollection(spec *CollectionSpec) (*Collection, error) + func NewCollectionWithOptions(spec *CollectionSpec, opts CollectionOptions) (*Collection, error) + func (coll *Collection) Close() + func (coll *Collection) DetachMap(name string) *Map + func (coll *Collection) DetachProgram(name string) *Program + func (coll *Collection) Pin(dirName string, fileMode os.FileMode) error + type CollectionABI struct + Maps map[string]*MapABI + Programs map[string]*ProgramABI + func (abi *CollectionABI) Check(coll *Collection) error + func (abi *CollectionABI) CheckSpec(cs *CollectionSpec) error + type CollectionOptions struct + Programs ProgramOptions + type CollectionSpec struct + Maps map[string]*MapSpec + Programs map[string]*ProgramSpec + func LoadCollectionSpec(file string) (*CollectionSpec, error) + func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) + func (cs *CollectionSpec) Copy() *CollectionSpec + type Editor struct + ReferenceOffsets map[string][]int + func Edit(insns *asm.Instructions) *Editor + func (ed *Editor) Link(sections ...asm.Instructions) error + func (ed *Editor) RewriteConstant(symbol string, value uint64) error + func (ed *Editor) RewriteMap(symbol string, m *Map) error + type Map struct + func LoadPinnedMap(fileName string) (*Map, error) + func LoadPinnedMapExplicit(fileName string, abi *MapABI) (*Map, error) + func NewMap(spec *MapSpec) (*Map, error) + func (m *Map) ABI() MapABI + func (m *Map) Clone() (*Map, error) + func (m *Map) Close() error + func (m *Map) Create(key, value interface{}) error + func (m *Map) Delete(key interface{}) error + func (m *Map) DeleteStrict(key interface{}) error + func (m *Map) FD() int + func (m *Map) Get(key, valueOut interface{}) (bool, error) + func (m *Map) GetBytes(key interface{}) ([]byte, error) + func (m *Map) Iterate() *MapIterator + func (m *Map) MarshalBinary() ([]byte, error) + func (m *Map) NextKey(key, nextKeyOut interface{}) (bool, error) + func (m *Map) NextKeyBytes(key interface{}) ([]byte, error) + func (m *Map) Pin(fileName string) error + func (m *Map) Put(key, value interface{}) error + func (m *Map) Replace(key, value interface{}) error + func (m *Map) String() string + type MapABI struct + InnerMap *MapABI + KeySize uint32 + MaxEntries uint32 + Type MapType + ValueSize uint32 + func (abi *MapABI) Check(m *Map) error + type MapIterator struct + func (mi *MapIterator) Err() error + func (mi *MapIterator) Next(keyOut, valueOut interface{}) bool + type MapSpec struct + Flags uint32 + InnerMap *MapSpec + KeySize uint32 + MaxEntries uint32 + Name string + Type MapType + ValueSize uint32 + func (ms *MapSpec) Copy() *MapSpec + func (ms *MapSpec) String() string + type MapType uint32 + const Array + const ArrayOfMaps + const CGroupArray + const Hash + const HashOfMaps + const LPMTrie + const LRUCPUHash + const LRUHash + const PerCPUArray + const PerCPUHash + const PerfEventArray + const ProgramArray + const StackTrace + const UnspecifiedMap + func (i MapType) String() string + type Marshaler interface + type PerfReader struct + Error <-chan error + Samples <-chan *PerfSample + func NewPerfReader(opts PerfReaderOptions) (out *PerfReader, err error) + func (pr *PerfReader) Close() (err error) + func (pr *PerfReader) FlushAndClose() error + func (pr *PerfReader) LostSamples() uint64 + type PerfReaderOptions struct + Map *Map + PerCPUBuffer int + Watermark int + type PerfSample struct + Data []byte + type ProgType uint32 + const CGroupDevice + const CGroupSKB + const CGroupSock + const CGroupSockAddr + const CGroupSockopt + const CGroupSysctl + const FlowDissector + const Kprobe + const LWTIn + const LWTOut + const LWTSeg6Local + const LWTXmit + const LircMode2 + const PerfEvent + const RawTracepoint + const RawTracepointWritable + const SchedACT + const SchedCLS + const SkMsg + const SkReuseport + const SkSKB + const SockOps + const SocketFilter + const TracePoint + const Unrecognized + const XDP + func (i ProgType) String() string + type Program struct + VerifierLog string + func LoadPinnedProgram(fileName string) (*Program, error) + func LoadPinnedProgramExplicit(fileName string, abi *ProgramABI) (*Program, error) + func NewProgram(spec *ProgramSpec) (*Program, error) + func NewProgramWithOptions(spec *ProgramSpec, opts ProgramOptions) (*Program, error) + func (bpf *Program) ABI() ProgramABI + func (bpf *Program) Benchmark(in []byte, repeat int) (uint32, time.Duration, error) + func (bpf *Program) Clone() (*Program, error) + func (bpf *Program) Close() error + func (bpf *Program) FD() int + func (bpf *Program) MarshalBinary() ([]byte, error) + func (bpf *Program) Pin(fileName string) error + func (bpf *Program) String() string + func (bpf *Program) Test(in []byte) (uint32, []byte, error) + type ProgramABI struct + Type ProgType + func (abi *ProgramABI) Check(prog *Program) error + type ProgramOptions struct + LogLevel uint32 + LogSize int + type ProgramSpec struct + AttachType AttachType + Instructions asm.Instructions + KernelVersion uint32 + License string + Name string + Type ProgType + func (ps *ProgramSpec) Copy() *ProgramSpec