Lines Matching defs:bytes

160 static status_t remove_header(net_buffer* _buffer, size_t bytes);
161 static status_t remove_trailer(net_buffer* _buffer, size_t bytes);
163 uint32 offset, size_t bytes);
859 /*! Tries to allocate \a size bytes from the free space in the header.
1023 /*! Appends up to \a size bytes from the data of the \a from net_buffer to the
1802 /*! Removes bytes from the beginning of the buffer.
1805 remove_header(net_buffer* _buffer, size_t bytes)
1809 T(RemoveHeader(buffer, bytes));
1813 if (bytes > buffer->size)
1816 TRACE(("%d: remove_header(buffer %p, %ld bytes)\n", find_thread(NULL),
1817 buffer, bytes));
1820 size_t left = bytes;
1860 node->offset -= bytes;
1864 buffer->size -= bytes;
1876 /*! Removes bytes from the end of the buffer.
1879 remove_trailer(net_buffer* buffer, size_t bytes)
1881 return trim_data(buffer, buffer->size - bytes);
1942 size_t bytes)
1944 if (bytes == 0)
1950 "bytes = %ld)\n", find_thread(NULL), buffer, source, offset, bytes));
1951 T(AppendCloned(buffer, source, offset, bytes));
1956 if (source->size < offset + bytes || source->size < offset)
1968 while (node != NULL && bytes > 0) {
1980 clone->used = min_c(bytes, node->used - offset);
1991 bytes -= clone->used;
1997 if (bytes != 0)
1998 panic("add_cloned_data() failed, bytes != 0!\n");
2109 restore_header(net_buffer* _buffer, uint32 offset, void* data, size_t bytes)
2116 || offset + bytes > buffer->stored_header_length + buffer->size)
2121 size_t copied = std::min(bytes, buffer->stored_header_length - offset);
2125 if (copied == bytes)
2129 bytes -= copied;
2134 return read_data(_buffer, offset, data, bytes);
2145 size_t bytes)
2152 || offset + bytes > source->stored_header_length + source->size)
2157 size_t appended = std::min(bytes, source->stored_header_length - offset);
2163 if (appended == bytes)
2166 bytes -= appended;
2171 return append_cloned_data(buffer, source, offset, bytes);
2226 // Since the maximum buffer size is 65536 bytes, it's impossible
2232 size_t bytes = min_c(size, node->used - offset);
2235 sum += __swap_int16(compute_checksum(node->start + offset, bytes));
2237 sum += compute_checksum(node->start + offset, bytes);
2239 size -= bytes;