From 32300ebfa67bea14f6f0623e231e2d3089f26ff8 Mon Sep 17 00:00:00 2001 From: Mara Mihali Date: Fri, 25 Jun 2021 08:19:19 +0000 Subject: pkg/rpctype: add RPC types specific to syz-verifier --- pkg/rpctype/rpctype.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'pkg') diff --git a/pkg/rpctype/rpctype.go b/pkg/rpctype/rpctype.go index 07a2e5a64..2f09e9788 100644 --- a/pkg/rpctype/rpctype.go +++ b/pkg/rpctype/rpctype.go @@ -24,6 +24,11 @@ type RPCCandidate struct { Smashed bool } +type RPCProg struct { + Prog []byte + ProgIdx int +} + type ConnectArgs struct { Name string MachineInfo []byte @@ -73,6 +78,33 @@ type PollRes struct { MaxSignal signal.Serial } +type RunnerConnectArgs struct { + Pool, VM int +} + +// NextExchangeArgs contains the data passed from client to server namely +// identification information of the VM and program execution results. +type NextExchangeArgs struct { + // Pool/VM are used to identify the instance on which the client is running. + Pool, VM int + // ProgIdx is used to uniquely identify the program for which the client is + // sending results. + ProgIdx int + // 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 +} + +// NextExchaneRes contains the data passed from server to client namely +// programs to execute on the VM. +type NextExchangeRes struct { + // RPCProg contains the serialized program that will be sent to the client. + RPCProg +} + type HubConnectArgs struct { // Client/Key are used for authentication. Client string -- cgit mrf-deployment