utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowedRanges = []string{}/* 3472 elements not displayed */

Functions

func GetProtocol

func GetProtocol(p uint8) string

returns the given protock name TODO: find better alternative

func IntToIP

func IntToIP(ipNum uint32) net.IP

intToIP converts IPv4 number to net.IP

func IsRoot

func IsRoot() bool

func LookupAndTrim

func LookupAndTrim(ip net.IP) ([]string, error)

lookup IP address and trim suffix (".") in the doamin name

func OneOf

func OneOf(s string, values []string) bool

OneOf returns true if the given string is one of the given values

func OneOfContains

func OneOfContains(search string, set []string) bool

OneOfContains returns true if any items of the given string list contains the given value

func OneOfInt32

func OneOfInt32(s int32, values []int32) bool

OneOfInt32 returns true if the given string is one of the given values

func ParseHosts

func ParseHosts(ips string) ([]net.IP, error)

ParseHosts function parses the given hosts (or IP addresses) runs a lookup function, validates and ignores IPv6

func ParseProgramName

func ParseProgramName(e *ebpf.Program) string

parse eBPF program name from *ebpf.Program struct

func TrimNullBytes

func TrimNullBytes(p [16]uint8) string

trim NULL bytes (in the event.Comm)

Types

This section is empty.

Jump to

Keyboard shortcuts

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