add wrapfd. improve fuzzer in makefile

--HG--
branch : fuzz
This commit is contained in:
Matt Johnston
2017-05-19 00:48:46 +08:00
parent 4dae8edb76
commit e7cdb2ebe5
7 changed files with 268 additions and 12 deletions

17
fuzz-wrapfd.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef FUZZ_WRAPFD_H
#define FUZZ_WRAPFD_H
#include "buffer.h"
enum wrapfd_mode {
UNUSED = 0,
PLAIN,
INPROGRESS,
RANDOMIN,
};
void wrapfd_setup(uint32_t wrapseed);
// doesn't take ownership of buf. buf is optional.
void wrapfd_add(int fd, buffer *buf, enum wrapfd_mode mode);
#endif // FUZZ_WRAPFD_H