• Home
  • Raw
  • Download

Lines Matching refs:msglen

176 static bool do_static_encode(uint8_t *buffer, size_t *msglen)  in do_static_encode()  argument
194 *msglen = stream.bytes_written; in do_static_encode()
202 static void do_protobuf_noise(uint8_t *buffer, size_t *msglen) in do_protobuf_noise() argument
205 size_t max_size = BUFSIZE - 32 - *msglen; in do_protobuf_noise()
210 size_t s = rand_fill_protobuf(tmp, rand_len(max_size), BUFSIZE - *msglen, 512); in do_protobuf_noise()
211 memmove(buffer + s, buffer, *msglen); in do_protobuf_noise()
214 *msglen += s; in do_protobuf_noise()
219 size_t s = rand_fill_protobuf(buffer + *msglen, rand_len(max_size), BUFSIZE - *msglen, 512); in do_protobuf_noise()
220 *msglen += s; in do_protobuf_noise()
224 static bool do_static_decode(uint8_t *buffer, size_t msglen, bool assert_success) in do_static_decode() argument
231 stream = pb_istream_from_buffer(buffer, msglen); in do_static_decode()
248 static bool do_pointer_decode(uint8_t *buffer, size_t msglen, bool assert_success) in do_pointer_decode() argument
256 stream = pb_istream_from_buffer(buffer, msglen); in do_pointer_decode()
273 static void do_static_roundtrip(uint8_t *buffer, size_t msglen) in do_static_roundtrip() argument
285 pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); in do_static_roundtrip()
320 static void do_pointer_roundtrip(uint8_t *buffer, size_t msglen) in do_pointer_roundtrip() argument
332 pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); in do_pointer_roundtrip()
371 size_t msglen; in run_iteration() local
376 if (do_static_encode(buffer, &msglen)) in run_iteration()
378 do_protobuf_noise(buffer, &msglen); in run_iteration()
380 status = do_static_decode(buffer, msglen, true); in run_iteration()
383 do_static_roundtrip(buffer, msglen); in run_iteration()
385 status = do_pointer_decode(buffer, msglen, true); in run_iteration()
388 do_pointer_roundtrip(buffer, msglen); in run_iteration()
396 msglen = rand_int(0, BUFSIZE); in run_iteration()
398 status = do_static_decode(buffer, msglen, false); in run_iteration()
399 do_pointer_decode(buffer, msglen, status); in run_iteration()
403 do_static_roundtrip(buffer, msglen); in run_iteration()
404 do_pointer_roundtrip(buffer, msglen); in run_iteration()