Documentation ¶
Index ¶
- Constants
- func CgroupFlags(cfg config.Config, cgroup string, bpffs string) ([]string, error)
- func CleanPathsRelativeToBPFFS(paths ...string) func(cfg config.Config) error
- func Cleanup(cfg config.Config) (string, error)
- func GetFileInode(path string) (uint64, error)
- func GetNonLoopbackRunningInterface() (string, error)
- func InterfaceIsUp(ifName string) bool
- func LoadAndAttachEbpfPrograms(programs []*Program, cfg config.Config) error
- func Setup(cfg config.Config) (string, error)
- func UnloadEbpfPrograms(programs []*Program, cfg config.Config) (string, error)
- type Cidr
- type FlagGenerator
- type PodConfig
- type Program
Constants ¶
View Source
const ( // MaxItemLen is the maximal amount of items like ports or IP ranges to include // or/and exclude. It's currently hardcoded to 10 as merbridge during creation // of this map is assigning hardcoded 244 bytes for map values: // // Cidr: 8 bytes // Cidr.Net: 4 bytes // Cidr.Mask: 1 byte // pad: 3 bytes // // PodConfig: 244 bytes // PodConfig.StatusPort: 2 bytes // pad: 2 bytes // PodConfig.ExcludeOutRanges (10x Cidr): 80 bytes // PodConfig.IncludeOutRanges (10x Cidr): 80 bytes // PodConfig.IncludeInPorts (10x 2 bytes): 20 bytes // PodConfig.IncludeOutPorts (10x 2 bytes): 20 bytes // PodConfig.ExcludeInPorts (10x 2 bytes): 20 bytes // PodConfig.ExcludeOutPorts (10x 2 bytes): 20 bytes // // todo (bartsmykla): merbridge flagged this constant to be changed, so if // it will be changed, we have to update it MaxItemLen = 10 // MapRelativePathLocalPodIPs is a path where the local_pod_ips map // is pinned, it's hardcoded as "{BPFFS_path}/tc/globals/local_pod_ips" because // merbridge is hard-coding it as well, and we don't want to allot to change it // by mistake MapRelativePathLocalPodIPs = "/local_pod_ips" MapRelativePathNetNSPodIPs = "/netns_pod_ips" MapRelativePathCookieOrigDst = "/cookie_orig_dst" MapRelativePathProcessIP = "/process_ip" MapRelativePathPairOrigDst = "/pair_orig_dst" MapRelativePathSockPairMap = "/sock_pair_map" )
View Source
const ( FSTypeCgroup2 = "cgroup2" FSTypeBPF = "bpf" )
Variables ¶
This section is empty.
Functions ¶
func CgroupFlags ¶ added in v0.8.3
func CleanPathsRelativeToBPFFS ¶ added in v0.8.3
func GetFileInode ¶ added in v0.7.0
func GetNonLoopbackRunningInterface ¶ added in v0.8.3
func InterfaceIsUp ¶ added in v0.8.3
Types ¶
type FlagGenerator ¶ added in v0.7.1
func Flags ¶ added in v0.8.3
func Flags(flags map[string]string) FlagGenerator
type PodConfig ¶
type PodConfig struct { StatusPort uint16 ExcludeOutRanges [MaxItemLen]Cidr IncludeOutRanges [MaxItemLen]Cidr IncludeInPorts [MaxItemLen]uint16 IncludeOutPorts [MaxItemLen]uint16 ExcludeInPorts [MaxItemLen]uint16 ExcludeOutPorts [MaxItemLen]uint16 // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.