Documentation ¶
Index ¶
- Variables
- func FeaturesToFlags(features flatrpc.Feature, manual csource.Features) flatrpc.ExecEnv
- func FlagsToSandbox(flags flatrpc.ExecEnv) string
- func SandboxToFlags(sandbox string) (flatrpc.ExecEnv, error)
- type Config
- type Env
- func (env *Env) Close() error
- func (env *Env) Exec(opts *flatrpc.ExecOpts, p *prog.Prog) (output []byte, info *flatrpc.ProgInfo, hanged bool, err0 error)
- func (env *Env) ExecProg(opts *flatrpc.ExecOpts, progData []byte) (output []byte, info *flatrpc.ProgInfo, hanged bool, err0 error)
- func (env *Env) ForceRestart()
- func (env *Env) RestartIfNeeded(opts *flatrpc.ExecOpts) error
- type Gate
Constants ¶
This section is empty.
Variables ¶
View Source
var FlatRPCFeaturesToCSource = map[flatrpc.Feature]string{ flatrpc.FeatureNetInjection: "tun", flatrpc.FeatureNetDevices: "net_dev", flatrpc.FeatureDevlinkPCI: "devlink_pci", flatrpc.FeatureNicVF: "nic_vf", flatrpc.FeatureVhciInjection: "vhci", flatrpc.FeatureWifiEmulation: "wifi", flatrpc.FeatureUSBEmulation: "usb", flatrpc.FeatureBinFmtMisc: "binfmt_misc", flatrpc.FeatureLRWPANEmulation: "ieee802154", flatrpc.FeatureSwap: "swap", }
Functions ¶
func FeaturesToFlags ¶
func FlagsToSandbox ¶
Types ¶
type Config ¶
type Config struct { // Path to executor binary. Executor string UseShmem bool // use shared memory instead of pipes for communication UseForkServer bool // use extended protocol with handshake RateLimit bool // rate limit start of new processes for host fuzzer mode Timeouts targets.Timeouts }
Config is the configuration for Env.
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
func (*Env) ExecProg ¶
func (env *Env) ExecProg(opts *flatrpc.ExecOpts, progData []byte) ( output []byte, info *flatrpc.ProgInfo, hanged bool, err0 error)
Exec starts executor binary to execute program stored in progData in exec encoding and returns information about the execution: output: process output info: per-call info hanged: program hanged and was killed err0: failed to start the process or bug in executor itself.
func (*Env) ForceRestart ¶
func (env *Env) ForceRestart()
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
Gate limits concurrency level and window to the given value. Limitation of concurrency window means that if a very old activity is still running it will not let new activities to start even if concurrency level is low.
Click to show internal directories.
Click to hide internal directories.