Documentation ¶
Index ¶
- Variables
- func TDNSLookup(c *qt.C, dns string, ok bool)
- func TTCPWrite(c *qt.C, address string, ok bool)
- func WrapForAttached(f func(e *EBPF) error) error
- func WrapForDetached(f func(e *EBPF) error) error
- type EBPF
- func (e *EBPF) Attach(iface *net.Interface) error
- func (e *EBPF) Close() error
- func (e *EBPF) Detach() error
- func (e *EBPF) DropDNS(dnss ...string) error
- func (e *EBPF) DropSrc(srcs ...net.IP) error
- func (e *EBPF) ListDNS() (map[string]int, error)
- func (e *EBPF) ListSrc() (map[string]int, error)
- func (e *EBPF) Load() error
- func (e *EBPF) UndropDNS(dnss ...string) error
- func (e *EBPF) UndropSrc(srcs ...net.IP) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyAttached = fmt.Errorf("already attached to the interface") ErrNoAttach = fmt.Errorf("not attached to the interface") )
View Source
var ErrDeleteFromMap = errors.New("could not delete from map")
View Source
var ErrInsertToMap = errors.New("could not insert to map")
View Source
var (
ErrInvalidUsage = errors.New("invalid usage")
)
View Source
var (
ErrListMap = errors.New("could not list the map")
)
View Source
var FS = "/sys/fs/bpf"
Functions ¶
func TDNSLookup ¶
TDNSLookup tests if the DNS lookup works well without using DNS cache.
func WrapForAttached ¶
func WrapForDetached ¶
Types ¶
type EBPF ¶
type EBPF struct { Objects *generated.BpfObjects L link.Link }
EBPF keeps eBPF Objects(BpfPrograms, BpfMaps) and Link.
func NewEBPFWithLink ¶
NewEBPFWithLink returns a new loaded EBPF by loading the link.
Click to show internal directories.
Click to hide internal directories.