Mercurial > dropbear
annotate fuzz-wrapfd.h @ 1652:d2753238f35f
Added signature for changeset ebcdb893992d
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 27 Mar 2019 22:15:23 +0800 |
parents | e75dab5bec71 |
children | dfbe947bdf0d |
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 |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
4 #include "buffer.h" |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
5 |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
6 enum wrapfd_mode { |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
7 UNUSED = 0, |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
8 PLAIN, |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
9 INPROGRESS, |
1575
e75dab5bec71
some linting after fuzz merge (#60)
François Perrad <francois.perrad@gadz.org>
parents:
1377
diff
changeset
|
10 RANDOMIN |
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 |
1575
e75dab5bec71
some linting after fuzz merge (#60)
François Perrad <francois.perrad@gadz.org>
parents:
1377
diff
changeset
|
13 void wrapfd_setup(void); |
1377
d4cc85e6c569
rearrange, all fuzzers now call fuzzer_set_input()
Matt Johnston <matt@ucc.asn.au>
parents:
1360
diff
changeset
|
14 void wrapfd_setseed(uint32_t seed); |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
15 // doesn't take ownership of buf. buf is optional. |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
16 void wrapfd_add(int fd, buffer *buf, enum wrapfd_mode mode); |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
17 |
1357 | 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); | |
1360
16f45f2df38f
ignore wrapfd_close for unknown
Matt Johnston <matt@ucc.asn.au>
parents:
1357
diff
changeset
|
23 int wrapfd_close(int fd); |
1357 | 24 |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
25 #endif // FUZZ_WRAPFD_H |