From c5b6fcddca80153daba328334bc48caa3a546ab5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 29 Jun 2017 16:01:03 +0200 Subject: syz-hub: split client name and manager name This allows to reduce number of hub clients by grouping managers and creating one client per such group. --- pkg/rpctype/rpctype.go | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'pkg') diff --git a/pkg/rpctype/rpctype.go b/pkg/rpctype/rpctype.go index 8b251b717..ab3f2243a 100644 --- a/pkg/rpctype/rpctype.go +++ b/pkg/rpctype/rpctype.go @@ -58,21 +58,35 @@ type PollRes struct { } type HubConnectArgs struct { - Name string + // Client/Key are used for authentication. + Client string Key string - Fresh bool - Calls []string + // Manager name, must start with Client. + Manager 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 HubSyncArgs struct { - Name string - Key string - Add [][]byte - Del []string + // see HubConnectArgs. + Client string + Key string + Manager string + // Programs added to corpus since last sync or connect. + Add [][]byte + // Hashed of programs removed from corpus since last sync or connect. + Del []string } type HubSyncRes struct { + // Set of programs from other managers. Inputs [][]byte - More int + // Number of remaining pending programs, + // if >0 manager should do sync again. + More int } -- cgit mrf-deployment