Versions in this module Expand all Collapse all v0 v0.9.2 Jun 10, 2023 v0.9.1 Dec 18, 2022 Changes in this version + var ErrNoExtendedInfo = errors.New("no extended info") + var ErrNotFound = errors.New("not found") + var ErrNotSupported = internal.ErrNotSupported + var FuncInfoSize = uint32(binary.Size(bpfFuncInfo{})) + var LineInfoSize = uint32(binary.Size(bpfLineInfo{})) + func LoadSpecAndExtInfosFromReader(rd io.ReaderAt) (*Spec, *ExtInfos, error) + func MarshalExtInfos(insns asm.Instructions, typeID func(Type) (TypeID, error)) (funcInfos, lineInfos []byte, _ error) + func Sizeof(typ Type) (int, error) + type Array struct + Index Type + Nelems uint32 + Type Type + func (arr *Array) Format(fs fmt.State, verb rune) + func (arr *Array) TypeName() string + type Bits uint32 + func (b Bits) Bytes() uint32 + type COREFixup struct + func CORERelocate(local, target *Spec, relos []*CORERelocation) ([]COREFixup, error) + func (f *COREFixup) Apply(ins *asm.Instruction) error + func (f *COREFixup) String() string + type CORERelocation struct + func CORERelocationMetadata(ins *asm.Instruction) *CORERelocation + type Const struct + Type Type + func (c *Const) Format(fs fmt.State, verb rune) + func (c *Const) TypeName() string + type Datasec struct + Name string + Size uint32 + Vars []VarSecinfo + func (ds *Datasec) Format(fs fmt.State, verb rune) + func (ds *Datasec) TypeName() string + type Enum struct + Name string + Size uint32 + Values []EnumValue + func (e *Enum) Format(fs fmt.State, verb rune) + func (e *Enum) TypeName() string + type EnumValue struct + Name string + Value int32 + type ExtInfos struct + func (ei *ExtInfos) Assign(insns asm.Instructions, section string) + type Float struct + Name string + Size uint32 + func (f *Float) Format(fs fmt.State, verb rune) + func (f *Float) TypeName() string + type Func struct + Linkage FuncLinkage + Name string + Type Type + func FuncMetadata(ins *asm.Instruction) *Func + func (f *Func) Format(fs fmt.State, verb rune) + func (f *Func) TypeName() string + type FuncLinkage int + const ExternFunc + const GlobalFunc + const StaticFunc + func (i FuncLinkage) String() string + type FuncParam struct + Name string + Type Type + type FuncProto struct + Params []FuncParam + Return Type + func (fp *FuncProto) Format(fs fmt.State, verb rune) + func (fp *FuncProto) TypeName() string + type Fwd struct + Kind FwdKind + Name string + func (f *Fwd) Format(fs fmt.State, verb rune) + func (f *Fwd) TypeName() string + type FwdKind int + const FwdStruct + const FwdUnion + func (fk FwdKind) String() string + type GoFormatter struct + EnumIdentifier func(name, element string) string + Identifier func(string) string + Names map[Type]string + func (gf *GoFormatter) TypeDeclaration(name string, typ Type) (string, error) + type Handle struct + func NewHandle(spec *Spec) (*Handle, error) + func NewHandleFromID(id ID) (*Handle, error) + func (h *Handle) Close() error + func (h *Handle) FD() int + func (h *Handle) Info() (*HandleInfo, error) + func (h *Handle) Spec(base *Spec) (*Spec, error) + type HandleInfo struct + ID ID + IsKernel bool + Name string + func (i *HandleInfo) IsModule() bool + func (i *HandleInfo) IsVmlinux() bool + type HandleIterator struct + ID ID + func (it *HandleIterator) Err() error + func (it *HandleIterator) Next(handle **Handle) bool + type ID = sys.BTFID + type Int struct + Encoding IntEncoding + Name string + Size uint32 + func (i *Int) Format(fs fmt.State, verb rune) + func (i *Int) TypeName() string + type IntEncoding byte + const Bool + const Char + const Signed + func (ie IntEncoding) IsBool() bool + func (ie IntEncoding) IsChar() bool + func (ie IntEncoding) IsSigned() bool + func (ie IntEncoding) String() string + type Line struct + func (li *Line) FileName() string + func (li *Line) Line() string + func (li *Line) LineColumn() uint32 + func (li *Line) LineNumber() uint32 + func (li *Line) String() string + type Member struct + BitfieldSize Bits + Name string + Offset Bits + Type Type + type Pointer struct + Target Type + func (p *Pointer) Format(fs fmt.State, verb rune) + func (p *Pointer) TypeName() string + type Restrict struct + Type Type + func (r *Restrict) Format(fs fmt.State, verb rune) + func (r *Restrict) TypeName() string + type Spec struct + func LoadKernelSpec() (*Spec, error) + func LoadSpec(file string) (*Spec, error) + func LoadSpecFromReader(rd io.ReaderAt) (*Spec, error) + func LoadSplitSpecFromReader(r io.ReaderAt, base *Spec) (*Spec, error) + func (s *Spec) AnyTypeByName(name string) (Type, error) + func (s *Spec) AnyTypesByName(name string) ([]Type, error) + func (s *Spec) Copy() *Spec + func (s *Spec) Iterate() *TypesIterator + func (s *Spec) TypeByID(id TypeID) (Type, error) + func (s *Spec) TypeByName(name string, typ interface{}) error + func (s *Spec) TypeID(typ Type) (TypeID, error) + type Struct struct + Members []Member + Name string + Size uint32 + func (s *Struct) Format(fs fmt.State, verb rune) + func (s *Struct) TypeName() string + type Transformer func(Type) Type + type Type interface + TypeName func() string + func Copy(typ Type, transform Transformer) Type + func UnderlyingType(typ Type) Type + type TypeID uint32 + type Typedef struct + Name string + Type Type + func (td *Typedef) Format(fs fmt.State, verb rune) + func (td *Typedef) TypeName() string + type TypesIterator struct + Type Type + func (iter *TypesIterator) Next() bool + type Union struct + Members []Member + Name string + Size uint32 + func (u *Union) Format(fs fmt.State, verb rune) + func (u *Union) TypeName() string + type Var struct + Linkage VarLinkage + Name string + Type Type + func (v *Var) Format(fs fmt.State, verb rune) + func (v *Var) TypeName() string + type VarLinkage int + const ExternVar + const GlobalVar + const StaticVar + func (i VarLinkage) String() string + type VarSecinfo struct + Offset uint32 + Size uint32 + Type Type + type Void struct + func (v *Void) Format(fs fmt.State, verb rune) + func (v *Void) TypeName() string + type Volatile struct + Type Type + func (v *Volatile) Format(fs fmt.State, verb rune) + func (v *Volatile) TypeName() string