bypass4netns

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROCESS pidInfoPidType = iota
	THREAD
)
View Source
const (
	SeccompAddFdFlagSetFd        = 1
	SeccompUserNotifFlagContinue = 1
	SeccompIocMagic              = '!'
)
View Source
const (
	// NotBypassableSocket  means that the fd is not socket or not bypassed
	NotBypassable socketState = iota

	// NotBypassed means that the socket is not bypassed.
	NotBypassed

	// Bypassed means that the socket is replaced by one created on the host
	Bypassed

	// Error happened after bypass. Nothing can be done to recover from this state.
	Error
)
View Source
const ETCD_MULTINODE_PREFIX = "bypass4netns/multinode/"

Variables

This section is empty.

Functions

func OpenMemWithNSEnterAgent added in v0.4.0

func OpenMemWithNSEnterAgent(pid uint32) error

Types

type C2CConnectionHandleConfig added in v0.4.0

type C2CConnectionHandleConfig struct {
	Enable       bool
	TracerEnable bool
}

type ForwardPortMapping

type ForwardPortMapping struct {
	HostPort  int
	ChildPort int
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(socketPath, comSocketPath, tracerAgentLogPath string, ignoreBind bool) *Handler

NewHandler creates new seccomp notif handler

func (*Handler) SetForwardingPort

func (h *Handler) SetForwardingPort(mapping ForwardPortMapping) error

SetForwardingPort checks and configures port forwarding

func (*Handler) SetIgnoredSubnets

func (h *Handler) SetIgnoredSubnets(subnets []net.IPNet, autoUpdate bool)

SetIgnoreSubnets configures subnets to ignore in bypass4netns.

func (*Handler) SetReadyFd

func (h *Handler) SetReadyFd(fd int) error

SetReadyFd configure ready notification file descriptor

func (*Handler) StartHandle

func (h *Handler) StartHandle(c2cConfig *C2CConnectionHandleConfig, multinodeConfig *MultinodeConfig)

StartHandle starts seccomp notif handler

type MultinodeConfig added in v0.4.0

type MultinodeConfig struct {
	Enable      bool
	EtcdAddress string
	HostAddress string
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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