mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 10:57:01 +00:00
b8fa712847
--HG-- branch : fuzz
26 lines
631 B
C
26 lines
631 B
C
#ifndef FUZZ_WRAPFD_H
|
|
#define FUZZ_WRAPFD_H
|
|
|
|
#include "buffer.h"
|
|
|
|
enum wrapfd_mode {
|
|
UNUSED = 0,
|
|
PLAIN,
|
|
INPROGRESS,
|
|
RANDOMIN,
|
|
};
|
|
|
|
void wrapfd_setup();
|
|
void wrapfd_setseed(uint32_t seed);
|
|
// doesn't take ownership of buf. buf is optional.
|
|
void wrapfd_add(int fd, buffer *buf, enum wrapfd_mode mode);
|
|
|
|
// 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
|