summaryrefslogtreecommitdiffhomepage
path: root/fuzz-wrapfd.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-10-15 22:46:24 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-10-15 22:46:24 +0800
commitcc1b07dcf170890c34c43f247334dbc78d6f8647 (patch)
tree286b81aacc40b71d53c902804e65803f556f8427 /fuzz-wrapfd.h
parent0e3e8db5bfca0c579be55e7580a46c593c1384be (diff)
Make wrapfd share a common buffer for all FDs
--HG-- branch : fuzz
Diffstat (limited to 'fuzz-wrapfd.h')
-rw-r--r--fuzz-wrapfd.h10
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);