Mercurial > dropbear
comparison fuzz-wrapfd.h @ 1580:7f2be495dff6 coverity
merge coverity
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 04 Mar 2018 15:07:09 +0800 |
parents | e75dab5bec71 |
children | dfbe947bdf0d |
comparison
equal
deleted
inserted
replaced
1545:0b991dec7ab9 | 1580:7f2be495dff6 |
---|---|
1 #ifndef FUZZ_WRAPFD_H | |
2 #define FUZZ_WRAPFD_H | |
3 | |
4 #include "buffer.h" | |
5 | |
6 enum wrapfd_mode { | |
7 UNUSED = 0, | |
8 PLAIN, | |
9 INPROGRESS, | |
10 RANDOMIN | |
11 }; | |
12 | |
13 void wrapfd_setup(void); | |
14 void wrapfd_setseed(uint32_t seed); | |
15 // doesn't take ownership of buf. buf is optional. | |
16 void wrapfd_add(int fd, buffer *buf, enum wrapfd_mode mode); | |
17 | |
18 // called via #defines for read/write/select | |
19 int wrapfd_read(int fd, void *out, size_t count); | |
20 int wrapfd_write(int fd, const void* in, size_t count); | |
21 int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds, | |
22 fd_set *exceptfds, struct timeval *timeout); | |
23 int wrapfd_close(int fd); | |
24 | |
25 #endif // FUZZ_WRAPFD_H |