Mercurial > dropbear
comparison fuzz-wrapfd.h @ 1777:97ad26e397a5
Add server postauth fuzzer, wrap connect_remote()
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 13 Nov 2020 23:18:05 +0800 |
parents | dfbe947bdf0d |
children | a6da10ac64b5 |
comparison
equal
deleted
inserted
replaced
1776:290caf301a4f | 1777:97ad26e397a5 |
---|---|
4 #include "buffer.h" | 4 #include "buffer.h" |
5 | 5 |
6 enum wrapfd_mode { | 6 enum wrapfd_mode { |
7 UNUSED = 0, | 7 UNUSED = 0, |
8 COMMONBUF, // using the common buffer | 8 COMMONBUF, // using the common buffer |
9 DUMMY, // reads return fixed output, of random length | |
9 }; | 10 }; |
10 | 11 |
11 // buf is a common buffer read by all wrapped FDs. doesn't take ownership of buf | 12 // buf is a common buffer read by all wrapped FDs. doesn't take ownership of buf |
12 void wrapfd_setup(buffer *buf); | 13 void wrapfd_setup(buffer *buf); |
13 void wrapfd_setseed(uint32_t seed); | 14 void wrapfd_setseed(uint32_t seed); |
14 int wrapfd_new(); | 15 int wrapfd_new_fuzzinput(); |
16 int wrapfd_new_dummy(); | |
15 | 17 |
16 // called via #defines for read/write/select | 18 // called via #defines for read/write/select |
17 int wrapfd_read(int fd, void *out, size_t count); | 19 int wrapfd_read(int fd, void *out, size_t count); |
18 int wrapfd_write(int fd, const void* in, size_t count); | 20 int wrapfd_write(int fd, const void* in, size_t count); |
19 int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds, | 21 int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds, |