blob: 2dbad2a9f715f71c45b937d83f0295618983fd4e [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.fuzzer;
using zx;
/// See |Controller.GetCorpusWriter| and |Controller.GetCorpusReader|.
type Corpus = flexible enum : uint8 {
/// Indicates a set of fixed, immutable inputs typically provided at
/// start-up. These inputs are never discarded when merging.
SEED = 1;
/// Indicates a set of inputs generated by the fuzzer. These may be modified
/// and/or discarded when merging and minimizing the corpus.
LIVE = 2;
};
/// Sends a sequence of test inputs belonging to a fuzzer's corpus.
closed protocol CorpusReader {
/// Sends the next test input from the corpus.
///
/// + request `test_input` the byte sequence representing the next test
/// input in a corpus.
/// - response `result` one of the following:
/// - `ZX_OK` if the test input was sent.
/// - A socket error if transferring the input failed.
strict Next(resource struct {
test_input Input;
}) -> (struct {
result zx.Status;
});
};