Lines Matching refs:bytes
68 static status_t remove_header(net_buffer *_buffer, size_t bytes);
69 static status_t remove_trailer(net_buffer *_buffer, size_t bytes);
358 Removes bytes from the beginning of the buffer.
361 remove_header(net_buffer *_buffer, size_t bytes)
365 if (bytes > buffer->size)
367 if (bytes == 0)
370 buffer->size -= bytes;
371 memmove(buffer->data, buffer->data + bytes, buffer->size);
379 Removes bytes from the end of the buffer.
382 remove_trailer(net_buffer *buffer, size_t bytes)
384 return trim_data(buffer, buffer->size - bytes);
415 size_t bytes)
417 if (bytes == 0)
423 if (offset + bytes > source->size)
426 return append_data(buffer, source->data + offset, bytes);