/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 22 if (count == 0) in read_callback() 25 result = recv(fd, buf, count, MSG_WAITALL); in read_callback() 30 return result == count; in read_callback()
|
/nanopb-2.7.6/tests/fuzztest/ |
D | flakystream.c | 4 bool flakystream_callback(pb_istream_t *stream, pb_byte_t *buf, size_t count) in flakystream_callback() argument 8 if (state->position + count > state->msglen) in flakystream_callback() 13 else if (state->position + count > state->fail_after) in flakystream_callback() 18 memcpy(buf, state->buffer + state->position, count); in flakystream_callback() 19 state->position += count; in flakystream_callback()
|
D | random_data.c | 78 void rand_fill(uint8_t *buf, size_t count) in rand_fill() argument 80 for (; count > 0; count--) in rand_fill() 139 void rand_mess(uint8_t *buf, size_t count) in rand_mess() argument 146 int s = rand_int(0, count - 1); in rand_mess() 147 int l = rand_len(count - s); in rand_mess() 153 int a = rand_int(0, count - 1); in rand_mess() 154 int b = rand_int(0, count - 1); in rand_mess() 162 int s = rand_int(0, count - 2); in rand_mess() 163 int l = rand_len((count - s) / 2); in rand_mess() 169 int s = rand_int(0, count - 1); in rand_mess() [all …]
|
D | validation.c | 8 pb_size_t count = 1; in validate_static() local 16 count = *(pb_size_t*)iter->pSize; in validate_static() 17 assert(count <= iter->array_size); in validate_static() 34 for (i = 0; i < count; i++) in validate_static() 64 pb_size_t count = 1; in validate_pointer() local 91 count = *(pb_size_t*)iter->pSize; in validate_pointer() 92 assert(allocated_size >= count * iter->data_size); in validate_pointer() 100 for (i = 0; i < count; i++) in validate_pointer()
|
D | random_data.h | 30 void rand_fill(uint8_t *buf, size_t count); 36 void rand_mess(uint8_t *buf, size_t count);
|
/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()
|
D | decode_stream.c | 58 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) in callback() argument 61 size_t len = fread(buf, 1, count, file); in callback() 63 if (len == count) in callback()
|
/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() 13 if (len == count) in stream_callback()
|
/nanopb-2.7.6/tests/any_type/ |
D | decode_any.c | 14 size_t count; in main() local 19 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 20 stream = pb_istream_from_buffer(buffer, count); in main()
|
/nanopb-2.7.6/tests/basic_buffer/ |
D | decode_buffer.c | 65 size_t count; in main() local 69 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 78 stream = pb_istream_from_buffer(buffer, count); in main()
|
/nanopb-2.7.6/tests/extensions/ |
D | decode_extensions.c | 15 size_t count; in main() local 27 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 28 stream = pb_istream_from_buffer(buffer, count); in main()
|
/nanopb-2.7.6/tests/map/ |
D | decode_map.c | 29 size_t count; in main() local 32 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 44 pb_istream_t stream = pb_istream_from_buffer(buffer, count); in main()
|
/nanopb-2.7.6/tests/msgid/ |
D | decode_msgid.c | 61 size_t count; in main() local 67 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 75 stream = pb_istream_from_buffer(buffer, count); in main()
|
/nanopb-2.7.6/tests/anonymous_oneof/ |
D | decode_oneof.c | 57 size_t count; in main() local 68 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 80 stream = pb_istream_from_buffer(buffer, count); in main()
|
/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 21 while (count--) in read_callback() 31 bool write_callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) in write_callback() argument 35 while (count--) in write_callback()
|
/nanopb-2.7.6/tests/oneof/ |
D | decode_oneof.c | 94 size_t count; in main() local 105 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 117 stream = pb_istream_from_buffer(buffer, count); in main() 123 stream = pb_istream_from_buffer(buffer, count); in main()
|
/nanopb-2.7.6/ |
D | pb_encode.c | 23 static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 52 static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) in buf_write() argument 56 stream->state = dest + count; in buf_write() 58 for (i = 0; i < count; i++) in buf_write() 81 bool checkreturn pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) in pb_write() argument 83 if (count > 0 && stream->callback != NULL) in pb_write() 85 if (stream->bytes_written + count < stream->bytes_written || in pb_write() 86 stream->bytes_written + count > stream->max_size) in pb_write() 92 if (!buf_write(stream, buf, count)) in pb_write() 95 if (!stream->callback(stream, buf, count)) in pb_write() [all …]
|
D | pb_encode.h | 38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 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); 139 bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count);
|
/nanopb-2.7.6/tests/oneof_callback/ |
D | decode_oneof.c | 126 size_t count; in main() local 129 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 140 stream = pb_istream_from_buffer(buffer, count); in main()
|
/nanopb-2.7.6/examples/using_union_messages/ |
D | decode.c | 60 size_t count = fread(buffer, 1, sizeof(buffer), stdin); in main() local 61 pb_istream_t stream = pb_istream_from_buffer(buffer, count); in main()
|
/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() 34 if (len == count) in callback()
|
/nanopb-2.7.6/tests/fixed_count/ |
D | SConscript | 1 # Test that fixed count option works.
|
/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); 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); 139 bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count);
|