diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-10-18 22:53:44 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-10-18 22:53:44 +0800 |
commit | 6ca24af24afe3a3572e9d043df3f8342d38c84b1 (patch) | |
tree | b06b58a6f94bd2827d023f0de10e7f3843a6e28c /fuzz-wrapfd.h | |
parent | 17873e8c922eded2cec86184673a6d110df6403f (diff) | |
parent | 400c7c161f8fd4859f557339f77025044ec950e0 (diff) |
Merge fuzz branch
Diffstat (limited to 'fuzz-wrapfd.h')
-rw-r--r-- | fuzz-wrapfd.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fuzz-wrapfd.h b/fuzz-wrapfd.h index 7aed43a..60c66a7 100644 --- a/fuzz-wrapfd.h +++ b/fuzz-wrapfd.h @@ -5,15 +5,13 @@ enum wrapfd_mode { UNUSED = 0, - PLAIN, - INPROGRESS, - RANDOMIN + COMMONBUF, // using the common buffer }; -void wrapfd_setup(void); +// buf is a common buffer read by all wrapped FDs. doesn't take ownership of buf +void wrapfd_setup(buffer *buf); void wrapfd_setseed(uint32_t seed); -// doesn't take ownership of buf. buf is optional. -void wrapfd_add(int fd, buffer *buf, enum wrapfd_mode mode); +int wrapfd_new(); // called via #defines for read/write/select int wrapfd_read(int fd, void *out, size_t count); |