Documentation ¶
Index ¶
- func ClearBit(n *uint64, offset uint)
- func ClearBits(n *uint64, mask uint64)
- func CopyRegularFileByPath(src, dst string) error
- func CopyRegularFileByRelativePath(srcName string, dstDir *os.File, dstName string) error
- func CreateAt(dir *os.File, relativePath string) (*os.File, error)
- func Dup(file *os.File) (*os.File, error)
- func GenerateRandomDuration(min, max int) time.Duration
- func HasBit(n uint64, offset uint) bool
- func HashTaskID(arg1 uint32, arg2 uint64) uint32
- func HashU32AndU64(arg1 uint32, arg2 uint64) uint32
- func IsDirEmpty(pathname string) (bool, error)
- func Max(x, y uint64) uint64
- func Min(x, y uint64) uint64
- func MkdirAt(dir *os.File, relativePath string, perm fs.FileMode) error
- func MkdirAtExist(dir *os.File, relativePath string, perm fs.FileMode) error
- func Murmur32(key []byte) uint32
- func OpenAt(dir *os.File, relativePath string, flags int, perm fs.FileMode) (*os.File, error)
- func OpenExistingDir(p string) (*os.File, error)
- func ParseSymbol(address uint64, table *environment.KernelSymbolTable) environment.KernelSymbol
- func RemoveAt(dir *os.File, relativePath string, flags int) error
- func RenameAt(olddir *os.File, oldpath string, newdir *os.File, newpath string) error
- func RoundToClosestN(val int, n int) int
- func SetBit(n *uint64, offset uint)
- func SymbolToOffset(path, symbol string) (uint32, error)
- type Cloner
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyRegularFileByPath ¶
CopyRegularFileByPath copies a file from src to dst
func CopyRegularFileByRelativePath ¶
CopyRegularFileByRelativePath copies a file from src to dst, where destination is relative to a given directory. This function needs needed capabilities to be set before it is called.
func CreateAt ¶
CreateAt implements the same logic as os.Create using directory FD and relative path.
func GenerateRandomDuration ¶
GenerateRandomDuration returns a random duration between min and max, inclusive
func HashTaskID ¶
func HashU32AndU64 ¶
HashU32AndU64 is a wrapper around Murmur32 making sure network byte order is used.
func IsDirEmpty ¶
IsDirEmpty returns true if directory contains no files
func MkdirAtExist ¶
MkdirAtExist is a wrapper function to the `mkdirat` syscall using golang types, ignoring EEXIST error.
func OpenExistingDir ¶
OpenExistingDir open a directory with given path, and return the os.File of it.
func ParseSymbol ¶
func ParseSymbol(address uint64, table *environment.KernelSymbolTable) environment.KernelSymbol
func RoundToClosestN ¶
RoundToClosestN rounds a number to the closest multiple of n.
func SymbolToOffset ¶
SymbolToOffset attempts to resolve a 'symbol' name in the binary found at 'path' to an offset. The offset can be used for attaching a u(ret)probe