pkg

package
v0.0.0-...-6e39d2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIP

func AddIP(ip, name string, isIngress bool) error

Add an ip to the ingress/egress firewall (map)

func AddIPPort

func AddIPPort(ip, name string, port uint16, isIngress bool) error

Add an ip:port entry to the ingress/egress l4 firewall (map)

func CreateLinkIfNotExit

func CreateLinkIfNotExit(name string) error

Load ebpf bytecode to kernel (if not loaded yet), pin links and maps to bpffs

func DelIP

func DelIP(ip, name string, isIngress bool) error

Delete an ip from the ingress/egress firewall (map)

func DelIPPort

func DelIPPort(ip, name string, port uint16, isIngress bool) error

Delete an ip:port entry from the ingress/egress L4 firewall (map)

func GetContainerID

func GetContainerID(name string) string

Return container's fullid and cgroup path

eg. /sys/fs/cgroup/system.slice/docker-5b81537a967793cf5c8b562bd5b9cb6b55045ed339ed328390f70d466aa84134.scope

func LoadPinnedMap

func LoadPinnedMap(loadedMap **ebpf.Map, name string, isIngress, isL3 bool) error

Find pinned map associated to container and load

func PrintDataflow

func PrintDataflow(name string) error

Follow packet flows associated to container

func PrintFirewall

func PrintFirewall(name string)

Show all rules related to container

func RemovePinnedResource

func RemovePinnedResource(name string) error

Clean up the resources related to the container

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL