1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-30 11:18:12 +00:00
simplesshd/dropbear/fuzz-wrapfd.h

24 lines
630 B
C
Raw Normal View History

2019-06-09 20:44:26 +00:00
#ifndef FUZZ_WRAPFD_H
#define FUZZ_WRAPFD_H
#include "buffer.h"
enum wrapfd_mode {
UNUSED = 0,
2020-12-28 21:40:37 +00:00
COMMONBUF, // using the common buffer
2019-06-09 20:44:26 +00:00
};
2020-12-28 21:40:37 +00:00
// buf is a common buffer read by all wrapped FDs. doesn't take ownership of buf
void wrapfd_setup(buffer *buf);
2019-06-09 20:44:26 +00:00
void wrapfd_setseed(uint32_t seed);
2020-12-28 21:40:37 +00:00
int wrapfd_new();
2019-06-09 20:44:26 +00:00
// called via #defines for read/write/select
int wrapfd_read(int fd, void *out, size_t count);
int wrapfd_write(int fd, const void* in, size_t count);
int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout);
int wrapfd_close(int fd);
#endif // FUZZ_WRAPFD_H