v0.0.0-...-18c4803 Latest Latest

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 40



Package rpctype contains types of message passed via net/rpc connections between various parts of the system.



View Source
const (
	NoTask int64 = math.MaxInt64


This section is empty.


func Dial

func Dial(addr string, timeScale time.Duration) (net.Conn, error)

func RPCCall

func RPCCall(addr string, timeScale time.Duration, method string, args, reply interface{}) error


type Candidate

type Candidate struct {
	Prog      []byte
	Minimized bool
	Smashed   bool

type CheckArgs

type CheckArgs struct {
	Name          string
	Error         string
	EnabledCalls  map[string][]int
	DisabledCalls map[string][]SyscallReason
	Features      *host.Features
	GlobFiles     map[string][]string

type ConnectArgs

type ConnectArgs struct {
	Name        string
	MachineInfo []byte
	Modules     []host.KernelModule

type ConnectRes

type ConnectRes struct {
	EnabledCalls      []int
	NoMutateCalls     map[int]bool
	GitRevision       string
	TargetRevision    string
	AllSandboxes      bool
	CheckResult       *CheckArgs
	MemoryLeakFrames  []string
	DataRaceFrames    []string
	CoverFilterBitmap []byte

type ExecTask

type ExecTask struct {
	Prog []byte
	ID   int64

type HubConnectArgs

type HubConnectArgs struct {
	// Client/Key are used for authentication.
	Client string
	// The key may be a secret password or the oauth token prefixed by "Bearer ".
	Key string
	// Manager name, must start with Client.
	Manager string
	// See pkg/mgrconfig.Config.HubDomain.
	Domain string
	// Manager has started with an empty corpus and requests whole hub corpus.
	Fresh bool
	// Set of system call names supported by this manager.
	// Used to filter out programs with unsupported calls.
	Calls []string
	// Current manager corpus.
	Corpus [][]byte

type HubInput

type HubInput struct {
	// Domain of the source manager.
	Domain string
	Prog   []byte

type HubSyncArgs

type HubSyncArgs struct {
	// see HubConnectArgs.
	Client     string
	Key        string
	Manager    string
	NeedRepros bool
	// Programs added to corpus since last sync or connect.
	Add [][]byte
	// Hashes of programs removed from corpus since last sync or connect.
	Del []string
	// Repros found since last sync.
	Repros [][]byte

type HubSyncRes

type HubSyncRes struct {
	// Set of inputs from other managers.
	Inputs []HubInput
	// Same as Inputs but for legacy managers that don't understand new format (remove later).
	Progs [][]byte
	// Set of repros from other managers.
	Repros [][]byte
	// Number of remaining pending programs,
	// if >0 manager should do sync again.
	More int

type Input

type Input struct {
	Call     string
	Prog     []byte
	Signal   signal.Serial
	Cover    []uint32
	CallID   int // seq number of call in the prog to which the item is related (-1 for extra)
	RawCover []uint32

type LogMessageReq

type LogMessageReq struct {
	Level   int
	Name    string
	Message string

type NewInputArgs

type NewInputArgs struct {
	Name string

type NextExchangeArgs

type NextExchangeArgs struct {
	// Pool/VM are used to identify the instance on which the client is running.
	Pool, VM int
	// ExecTaskID is used to uniquely identify the program for which the client is
	// sending results.
	ExecTaskID int64
	// Hanged is set to true if the program for which we are sending results
	// was killed due to hanging.
	Hanged bool
	// Info contains information about the execution of each system call in the
	// program.
	Info ipc.ProgInfo

NextExchangeArgs contains the data passed from client to server namely identification information of the VM and program execution results.

type NextExchangeRes

type NextExchangeRes struct {

NextExchaneRes contains the data passed from server to client namely programs to execute on the VM.

type PollArgs

type PollArgs struct {
	Name           string
	NeedCandidates bool
	MaxSignal      signal.Serial
	Stats          map[string]uint64

type PollRes

type PollRes struct {
	Candidates []Candidate
	NewInputs  []Input
	MaxSignal  signal.Serial

type RPCClient

type RPCClient struct {
	// contains filtered or unexported fields

func NewRPCClient

func NewRPCClient(addr string, timeScale time.Duration) (*RPCClient, error)

func (*RPCClient) Call

func (cli *RPCClient) Call(method string, args, reply interface{}) error

func (*RPCClient) Close

func (cli *RPCClient) Close()

type RPCServer

type RPCServer struct {
	// contains filtered or unexported fields

func NewRPCServer

func NewRPCServer(addr, name string, receiver interface{}) (*RPCServer, error)

func (*RPCServer) Addr

func (serv *RPCServer) Addr() net.Addr

func (*RPCServer) Serve

func (serv *RPCServer) Serve()

type RunTestDoneArgs

type RunTestDoneArgs struct {
	Name   string
	ID     int
	Output []byte
	Info   []*ipc.ProgInfo
	Error  string

type RunTestPollReq

type RunTestPollReq struct {
	Name string

type RunTestPollRes

type RunTestPollRes struct {
	ID     int
	Bin    []byte
	Prog   []byte
	Cfg    *ipc.Config
	Opts   *ipc.ExecOpts
	Repeat int

type RunnerConnectArgs

type RunnerConnectArgs struct {
	Pool, VM int

type RunnerConnectRes

type RunnerConnectRes struct {
	// CheckUnsupportedCalls is set to true if the Runner needs to query the kernel
	// for unsupported system calls and report them back to the server.
	CheckUnsupportedCalls bool

type SyscallReason

type SyscallReason struct {
	ID     int
	Reason string

type UpdateUnsupportedArgs

type UpdateUnsupportedArgs struct {
	// Pool is used to identify the checked kernel.
	Pool int
	// UnsupportedCalls contains the ID's of system calls not supported by the
	// client and the reason for this.
	UnsupportedCalls []SyscallReason

UpdateUnsupportedArgs contains the data passed from client to server in an UpdateSupported call, namely the system calls not supported by the client's kernel.

Jump to

Keyboard shortcuts

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