view fuzz-wrapfd.h @ 1635:c9b5017b0a7b

drop obsolete definition for MAX_KEXHASHBUF (#65) The last code to make use of MAX_KEXHASHBUF was removed in 2005: https://github.com/mkj/dropbear/commit/736f370dce614b717193f45d084e9e009de723ce Signed-off-by: Andre McCurdy <[email protected]>
author Andre McCurdy <armccurdy@gmail.com>
date Wed, 20 Mar 2019 08:01:41 -0700
parents e75dab5bec71
children dfbe947bdf0d
line wrap: on
line source

#ifndef FUZZ_WRAPFD_H
#define FUZZ_WRAPFD_H

#include "buffer.h"

enum wrapfd_mode {
    UNUSED = 0,
    PLAIN,
    INPROGRESS,
    RANDOMIN
};

void wrapfd_setup(void);
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