seccomp

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package seccomp provides a generated filter format for seccomp filter

Index

Constants

View Source
const (
	MsgDisallow int16 = iota + 1
	MsgHandle
)

MsgDisallow, Msghandle defines the action needed when trapped by seccomp filter

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action uint32

Action is seccomp trap action

const (
	ActionAllow Action = iota + 1
	ActionErrno
	ActionTrace
	ActionKill
)

Action defines seccomp action to the syscall default value 0 is invalid

func (Action) Action

func (a Action) Action() Action

Action get the basic action

func (Action) ReturnCode

func (a Action) ReturnCode() int16

ReturnCode get the return code

func (Action) WithReturnCode

func (a Action) WithReturnCode(code int16) Action

WithReturnCode set the return code when action is trace or ban

type Filter

type Filter []byte

Filter is the BPF seccomp filter value

func (Filter) SockFprog

func (f Filter) SockFprog() *syscall.SockFprog

SockFprog converts Filter to SockFprog for seccomp syscall

Directories

Path Synopsis
Package libseccomp provides a wrapper for "github.com/seccomp/libseccomp-golang"
Package libseccomp provides a wrapper for "github.com/seccomp/libseccomp-golang"

Jump to

Keyboard shortcuts

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