11#include "alltypes_static.pb.h"
14#ifndef FUZZTEST_BUFSIZE
15#define FUZZTEST_BUFSIZE 4096
35 *((
pb_size_t*)iter.pSize) %= iter.array_size;
51 alltypes_static_AllTypes msg;
52 alltypes_static_TestExtension extmsg = alltypes_static_TestExtension_init_zero;
56 pb_ostream_t stream = {0};
62 rand_fill((
void*)&extmsg,
sizeof(extmsg));
63 ext.type = &alltypes_static_TestExtension_testextension;
66 msg.extensions = &ext;
69 }
while (!
pb_encode(&stream, alltypes_static_AllTypes_fields, &msg));
78 fprintf(
stderr,
"Usage: generate_message <seed>\n");
static void limit_sizes(alltypes_static_AllTypes *msg)
static void generate_message()
size_t fwrite(const void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)
#define PB_BYTES_ARRAY_T_ALLOCSIZE(n)
#define PB_HTYPE_REPEATED
#define pb_extension_init_zero
bool pb_field_iter_next(pb_field_iter_t *iter)
bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message)
pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize)
bool pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct)
void random_set_seed(uint32_t seed)
void rand_fill(uint8_t *buf, size_t count)