annotate fuzz-wrapfd.h @ 1853:2be3115a8762 default tip main master

debugging test runner authorized_keys perms
author Matt Johnston <matt@ucc.asn.au>
date Tue, 19 Oct 2021 13:45:59 +0800
parents 685b47d8faf7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
685b47d8faf7 fuzz: wrap kill()
Matt Johnston <matt@ucc.asn.au>
parents: 1782
diff changeset
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
08f4fa4dc6a0 closer to working
Matt Johnston <matt@ucc.asn.au>
parents: 1356
diff changeset
19 // called via #defines for read/write/select
08f4fa4dc6a0 closer to working
Matt Johnston <matt@ucc.asn.au>
parents: 1356
diff changeset
20 int wrapfd_read(int fd, void *out, size_t count);
08f4fa4dc6a0 closer to working
Matt Johnston <matt@ucc.asn.au>
parents: 1356
diff changeset
21 int wrapfd_write(int fd, const void* in, size_t count);
08f4fa4dc6a0 closer to working
Matt Johnston <matt@ucc.asn.au>
parents: 1356
diff changeset
22 int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds,
08f4fa4dc6a0 closer to working
Matt Johnston <matt@ucc.asn.au>
parents: 1356
diff changeset
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
685b47d8faf7 fuzz: wrap kill()
Matt Johnston <matt@ucc.asn.au>
parents: 1782
diff changeset
25 int fuzz_kill(pid_t pid, int sig);
1357
08f4fa4dc6a0 closer to working
Matt Johnston <matt@ucc.asn.au>
parents: 1356
diff changeset
26
1356
3677a510f545 add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
27 #endif // FUZZ_WRAPFD_H