Mercurial > dropbear
annotate fuzz-wrapfd.h @ 1852:e0c1825c567d
Debug pytest password auth failing
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 19 Oct 2021 13:30:58 +0800 |
parents | 685b47d8faf7 |
children |
rev | line source |
---|---|
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
1 #ifndef FUZZ_WRAPFD_H |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
2 #define FUZZ_WRAPFD_H |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
3 |
1791 | 4 #include "includes.h" |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
5 #include "buffer.h" |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
6 |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
7 enum wrapfd_mode { |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
8 UNUSED = 0, |
1740
dfbe947bdf0d
Make wrapfd share a common buffer for all FDs
Matt Johnston <matt@ucc.asn.au>
parents:
1575
diff
changeset
|
9 COMMONBUF, // using the common buffer |
1777
97ad26e397a5
Add server postauth fuzzer, wrap connect_remote()
Matt Johnston <matt@ucc.asn.au>
parents:
1740
diff
changeset
|
10 DUMMY, // reads return fixed output, of random length |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
11 }; |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
12 |
1740
dfbe947bdf0d
Make wrapfd share a common buffer for all FDs
Matt Johnston <matt@ucc.asn.au>
parents:
1575
diff
changeset
|
13 // buf is a common buffer read by all wrapped FDs. doesn't take ownership of buf |
dfbe947bdf0d
Make wrapfd share a common buffer for all FDs
Matt Johnston <matt@ucc.asn.au>
parents:
1575
diff
changeset
|
14 void wrapfd_setup(buffer *buf); |
1377
d4cc85e6c569
rearrange, all fuzzers now call fuzzer_set_input()
Matt Johnston <matt@ucc.asn.au>
parents:
1360
diff
changeset
|
15 void wrapfd_setseed(uint32_t seed); |
1782
a6da10ac64b5
fuzz: make postauth set authdone properly
Matt Johnston <matt@ucc.asn.au>
parents:
1777
diff
changeset
|
16 int wrapfd_new_fuzzinput(void); |
a6da10ac64b5
fuzz: make postauth set authdone properly
Matt Johnston <matt@ucc.asn.au>
parents:
1777
diff
changeset
|
17 int wrapfd_new_dummy(void); |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
18 |
1357 | 19 // called via #defines for read/write/select |
20 int wrapfd_read(int fd, void *out, size_t count); | |
21 int wrapfd_write(int fd, const void* in, size_t count); | |
22 int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds, | |
23 fd_set *exceptfds, struct timeval *timeout); | |
1360
16f45f2df38f
ignore wrapfd_close for unknown
Matt Johnston <matt@ucc.asn.au>
parents:
1357
diff
changeset
|
24 int wrapfd_close(int fd); |
1791 | 25 int fuzz_kill(pid_t pid, int sig); |
1357 | 26 |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
27 #endif // FUZZ_WRAPFD_H |