/nanopb-2.7.6/tests/common/ |
D | malloc_wrappers.c | 56 char *buf = NULL; in malloc_with_check() local 60 buf = malloc(round_blocksize(size + GUARD_SIZE)); in malloc_with_check() 63 if (buf) in malloc_with_check() 65 ((size_t*)buf)[0] = size; in malloc_with_check() 66 ((size_t*)buf)[1] = CHECK1; in malloc_with_check() 67 ((size_t*)(buf + size))[2] = CHECK2; in malloc_with_check() 70 …if (DEBUG_MALLOC) fprintf(stderr, "Alloc 0x%04x/%u\n", (unsigned)(uintptr_t)(buf + PREFIX_SIZE), (… in malloc_with_check() 71 return buf + PREFIX_SIZE; in malloc_with_check() 85 char *buf = (char*)mem - PREFIX_SIZE; in free_with_check() local 86 size_t size = ((size_t*)buf)[0]; in free_with_check() [all …]
|
/nanopb-2.7.6/tests/regression/issue_166/ |
D | enum_encoded_size.c | 11 uint8_t buf[256]; in main() local 20 s = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 27 s = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 36 s = pb_ostream_from_buffer(buf, sizeof(buf)); in main()
|
/nanopb-2.7.6/tests/fuzztest/ |
D | random_data.c | 78 void rand_fill(uint8_t *buf, size_t count) in rand_fill() argument 82 *buf++ = rand_byte(); in rand_fill() 87 size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag) in rand_fill_protobuf() argument 89 pb_ostream_t stream = pb_ostream_from_buffer(buf, max_bytes); in rand_fill_protobuf() 120 uint8_t *buf; in rand_fill_protobuf() local 127 buf = malloc(len); in rand_fill_protobuf() 129 rand_fill(buf, len); in rand_fill_protobuf() 130 pb_write(&stream, buf, len); in rand_fill_protobuf() 131 free(buf); in rand_fill_protobuf() 139 void rand_mess(uint8_t *buf, size_t count) in rand_mess() argument [all …]
|
D | random_data.h | 30 void rand_fill(uint8_t *buf, size_t count); 33 size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag); 36 void rand_mess(uint8_t *buf, size_t count);
|
D | generate_message.c | 55 static uint8_t buf[FUZZTEST_BUFSIZE]; in generate_message() local 68 stream = pb_ostream_from_buffer(buf, sizeof(buf)); in generate_message() 71 fwrite(buf, 1, stream.bytes_written, stdout); in generate_message()
|
D | flakystream.c | 4 bool flakystream_callback(pb_istream_t *stream, pb_byte_t *buf, size_t count) in flakystream_callback() argument 18 memcpy(buf, state->buffer + state->position, count); in flakystream_callback()
|
/nanopb-2.7.6/tests/float_double_conversion/ |
D | float_double_conversion.c | 34 uint8_t buf[16]; in main() local 48 pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 59 pb_istream_t stream = pb_istream_from_buffer(buf, msglen); in main() 65 ostream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 73 pb_istream_t stream = pb_istream_from_buffer(buf, msglen); in main()
|
/nanopb-2.7.6/tests/regression/issue_227/ |
D | unaligned_uint64.c | 6 uint8_t buf[128]; in main() local 7 pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); in main()
|
/nanopb-2.7.6/tests/regression/issue_547/ |
D | test.c | 8 pb_byte_t buf[512]; in main() local 10 pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); in main()
|
/nanopb-2.7.6/tests/regression/issue_247/ |
D | padding.c | 21 pb_byte_t buf[128] = {0}; in main() local 22 pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); in main()
|
/nanopb-2.7.6/examples/network_server/ |
D | common.c | 11 static bool write_callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) in write_callback() argument 14 return send(fd, buf, count, 0) == count; in write_callback() 17 static bool read_callback(pb_istream_t *stream, uint8_t *buf, size_t count) in read_callback() argument 25 result = recv(fd, buf, count, MSG_WAITALL); in read_callback()
|
/nanopb-2.7.6/tests/regression/issue_558/ |
D | mixed.c | 10 pb_byte_t buf[64]; in main() local 14 pb_ostream_t ostream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 32 pb_istream_t istream = pb_istream_from_buffer(buf, msglen); in main()
|
/nanopb-2.7.6/tests/enum_sizes/ |
D | enumsizes_unittests.c | 21 uint8_t buf[256]; in main() local 26 pb_ostream_t s = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 33 pb_istream_t s = pb_istream_from_buffer(buf, msgsize); in main() 48 pb_ostream_t s = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 55 pb_istream_t s = pb_istream_from_buffer(buf, msgsize); in main()
|
/nanopb-2.7.6/tests/regression/issue_229/ |
D | multiple_oneof.c | 9 uint8_t buf[128]; in main() local 13 pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 24 pb_istream_t stream = pb_istream_from_buffer(buf, msglen); in main()
|
/nanopb-2.7.6/tests/proto3_optional/ |
D | optional.c | 9 uint8_t buf[256]; in main() local 14 pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 28 pb_istream_t stream = pb_istream_from_buffer(buf, msglen); in main()
|
/nanopb-2.7.6/tests/regression/issue_544/ |
D | submsg_callback.c | 24 pb_byte_t buf[64]; in main() local 28 pb_ostream_t ostream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 45 pb_istream_t istream = pb_istream_from_buffer(buf, msglen); in main()
|
/nanopb-2.7.6/tests/regression/issue_249/ |
D | test.c | 36 pb_byte_t buf[128] = {0}; in main() local 41 pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 49 pb_istream_t stream = pb_istream_from_buffer(buf, msglen); in main()
|
/nanopb-2.7.6/tests/sort_by_tag/ |
D | sort_by_tag.c | 10 pb_byte_t buf[256]; in main() local 13 pb_ostream_t ostream = pb_ostream_from_buffer(buf, sizeof(buf)); in main() 35 pb_istream_t istream = pb_istream_from_buffer(buf, msglen); in main()
|
/nanopb-2.7.6/tests/basic_stream/ |
D | encode_stream.c | 10 bool streamcallback(pb_ostream_t *stream, const uint8_t *buf, size_t count) in streamcallback() argument 13 return fwrite(buf, 1, count, file) == count; in streamcallback()
|
/nanopb-2.7.6/tests/regression/GHSA-gcx3-7m76-287p/ |
D | test.c | 8 bool stream_callback(pb_istream_t *stream, uint8_t *buf, size_t count) in stream_callback() argument 11 size_t len = fread(buf, 1, count, file); in stream_callback()
|
/nanopb-2.7.6/tests/io_errors/ |
D | io_errors.c | 17 bool read_callback(pb_istream_t *stream, uint8_t *buf, size_t count) in read_callback() argument 26 *buf++ = *state->buffer++; in read_callback() 31 bool write_callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) in write_callback() argument 40 *state->buffer++ = *buf++; in write_callback()
|
/nanopb-2.7.6/tests/raw_decode/ |
D | raw_decode.c | 17 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) in callback() argument 20 size_t len = fread(buf, 1, count, file); in callback() 25 memcpy(g_history + HISTORY_LEN - len, buf, len); in callback() 29 memcpy(g_history, buf + len - HISTORY_LEN, HISTORY_LEN); in callback()
|
/nanopb-2.7.6/ |
D | pb_encode.h | 38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 104 pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); 124 bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
|
D | pb_decode.h | 37 bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); 134 pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen); 139 bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count);
|
/nanopb-2.7.6/spm_headers/nanopb/ |
D | pb_encode.h | 38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 104 pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); 124 bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
|