Lines Matching full:payload
42 /* max framed data payload. Must be < (1 << 16)
83 * unframe messages (i.e. extract payload length + channel id from header,
84 * then the payload itself), before sending them to a generic receiver.
186 * It parses the header to extract the channel id and payload length,
237 QemudSink payload[1];
265 qemud_sink_save(f, s->payload);
284 qemud_sink_load(f, s->payload);
286 /* s->header and s->payload are only ever connected to s->data0 */
287 s->header->buff = s->payload->buff = s->data0;
291 D("%s: load failed: size of saved payload buffer (%d) exceeds "
322 /* otherwise, we're reading the payload */
323 return qemud_sink_needed(s->payload);
381 /* extract payload length + channel id */
399 /* prepare 'in_data' for payload */
401 qemud_sink_reset(s->payload, s->in_size, s->data0);
404 /* read payload bytes */
405 if (!qemud_sink_fill(s->payload, &from, &len))
408 /* zero-terminate payload, then send it to receiver */
409 s->payload->buff[s->payload->size] = 0;
411 s->in_channel, s->payload->size,
412 quote_bytes((const void*)s->payload->buff, s->payload->size));
414 s->recv_func( s->recv_opaque, s->in_channel, s->payload->buff, s->payload->size );
433 * <length><channel><payload>
437 * <channel><length><payload>
444 * - as the header of a 1-byte payload by the legacy daemon
445 * - as the header of a 256-byte payload by the normal one.
455 * the normal daemon will interpret this as a 256-byte payload
539 /* packetize the payload for the serial MTU */
664 QemudSink payload[1];
774 qemud_sink_reset(c->payload, frame_size, data);
779 /* read the payload */
780 if (!qemud_sink_fill(c->payload, (const uint8_t**)&msg, &msglen))
783 c->payload->buff[c->payload->size] = 0;
785 data = c->payload->buff;
791 c->clie_recv( c->clie_opaque, c->payload->buff, c->payload->size, c );
970 /* payload sink */
971 qemud_sink_save(f, c->payload);
972 qemu_put_buffer(f, c->payload->buff, c->payload->size);
1023 D("%s: load failed: payload buffer requires %d bytes, %d available\n",
1034 /* payload sink */
1035 if ((ret = qemud_sink_load(f, c->payload)))
1038 /* replace payload buffer by saved data */
1039 if (c->payload->buff) {
1040 AFREE(c->payload->buff);
1042 AARRAY_NEW(c->payload->buff, c->payload->size+1); /* +1 for terminating zero */
1043 if ((ret = qemu_get_buffer(f, c->payload->buff, c->payloadpayload->size) {
1044 D("%s: frame payload buffer load failed: expected %d bytes, got %d\n",
1045 __FUNCTION__, c->payload->size, ret);
1046 AFREE(c->payload->buff);
1652 /* packetize the payload for the serial MTU */
1702 AFREE(client->payload->buff);
2122 /* payload sink */
2123 qemud_sink_save(f, c->payload);
2124 qemu_put_buffer(f, c->payload->buff, c->payload->size);
2169 D("%s: load failed: payload buffer requires %d bytes, %d available\n",
2180 /* payload sink */
2181 if ((ret = qemud_sink_load(f, c->payload)))
2184 /* replace payload buffer by saved data */
2185 if (c->payload->buff) {
2186 AFREE(c->payload->buff);
2188 AARRAY_NEW(c->payload->buff, c->payload->size+1); /* +1 for terminating zero */
2189 if ((ret = qemu_get_buffer(f, c->payload->buff, c->payload->size)) != c->payload->size) {
2190 D("%s: frame payload buffer load failed: expected %d bytes, got %d\n",
2191 __FUNCTION__, c->payload->size, ret);
2192 AFREE(c->payload->buff);