MOS Source Code
Loading...
Searching...
No Matches
flakystream.h
Go to the documentation of this file.
1/* This module implements a custom input stream that can be set to give IO error
2 * at specific point. */
3
4#ifndef FLAKYSTREAM_H
5#define FLAKYSTREAM_H
6
7#include <pb_decode.h>
8
9typedef struct {
10 pb_istream_t stream;
12 size_t position;
13 size_t msglen;
14 size_t fail_after;
16
17void flakystream_init(flakystream_t *stream, const uint8_t *buffer, size_t msglen, size_t fail_after);
18
19#endif
void flakystream_init(flakystream_t *stream, const uint8_t *buffer, size_t msglen, size_t fail_after)
Definition flakystream.c:23
unsigned char uint8_t
Definition pb_syshdr.h:20
size_t fail_after
Definition flakystream.h:14
size_t position
Definition flakystream.h:12
pb_istream_t stream
Definition flakystream.h:10
const uint8_t * buffer
Definition flakystream.h:11
static char buffer[2048]
Definition test_printf.c:7