Lines Matching refs:at

312  * ensures BUFFER can contain at least AMOUNT more bytes.  The buffer's
324 * returns a pointer to the data at the indicated position.
326 * \param[in] at position
330 sldns_buffer_at(const sldns_buffer *buffer, size_t at)
332 assert(at <= buffer->_limit);
333 return buffer->_data + at;
337 * returns a pointer to the beginning of the buffer (the data at
349 * returns a pointer to the end of the buffer (the data at the buffer's
361 * returns a pointer to the data at the buffer's current position.
375 * \param[in] at indicated position
379 sldns_buffer_remaining_at(sldns_buffer *buffer, size_t at)
382 assert(at <= buffer->_limit);
383 return at < buffer->_limit ? buffer->_limit - at : 0;
399 * checks if the buffer has at least COUNT more bytes available.
403 * \param[in] at indicated position
408 sldns_buffer_available_at(sldns_buffer *buffer, size_t at, size_t count)
410 return count <= sldns_buffer_remaining_at(buffer, at);
414 * checks if the buffer has count bytes available at the current position
426 * writes the given data to the buffer at the specified position
428 * \param[in] at the position (in number of bytes) to write the data at
433 sldns_buffer_write_at(sldns_buffer *buffer, size_t at, const void *data, size_t count)
435 assert(sldns_buffer_available_at(buffer, at, count));
436 memcpy(buffer->_data + at, data, count);
440 * set the given byte to the buffer at the specified position
442 * \param[in] at the position (in number of bytes) to write the data at
448 sldns_buffer_set_at(sldns_buffer *buffer, size_t at, int c, size_t count)
450 assert(sldns_buffer_available_at(buffer, at, count));
451 memset(buffer->_data + at, c, count);
469 * copies the given (null-delimited) string to the specified position at the buffer
471 * \param[in] at the position in the buffer
475 sldns_buffer_write_string_at(sldns_buffer *buffer, size_t at, const char *str)
477 sldns_buffer_write_at(buffer, at, str, strlen(str));
481 * copies the given (null-delimited) string to the current position at the buffer
492 * writes the given byte of data at the given position in the buffer
494 * \param[in] at the position in the buffer
498 sldns_buffer_write_u8_at(sldns_buffer *buffer, size_t at, uint8_t data)
500 assert(sldns_buffer_available_at(buffer, at, sizeof(data)));
501 buffer->_data[at] = data;
505 * writes the given byte of data at the current position in the buffer
517 * writes the given 2 byte integer at the given position in the buffer
519 * \param[in] at the position in the buffer
523 sldns_buffer_write_u16_at(sldns_buffer *buffer, size_t at, uint16_t data)
525 assert(sldns_buffer_available_at(buffer, at, sizeof(data)));
526 sldns_write_uint16(buffer->_data + at, data);
530 * writes the given 2 byte integer at the current position in the buffer
542 * writes the given 4 byte integer at the given position in the buffer
544 * \param[in] at the position in the buffer
548 sldns_buffer_write_u32_at(sldns_buffer *buffer, size_t at, uint32_t data)
550 assert(sldns_buffer_available_at(buffer, at, sizeof(data)));
551 sldns_write_uint32(buffer->_data + at, data);
555 * writes the given 6 byte integer at the given position in the buffer
557 * \param[in] at the position in the buffer
561 sldns_buffer_write_u48_at(sldns_buffer *buffer, size_t at, uint64_t data)
563 assert(sldns_buffer_available_at(buffer, at, 6));
564 sldns_write_uint48(buffer->_data + at, data);
568 * writes the given 4 byte integer at the current position in the buffer
580 * writes the given 6 byte integer at the current position in the buffer
592 * copies count bytes of data at the given position to the given data-array
594 * \param[in] at the position in the buffer to start
599 sldns_buffer_read_at(sldns_buffer *buffer, size_t at, void *data, size_t count)
601 assert(sldns_buffer_available_at(buffer, at, count));
602 memcpy(data, buffer->_data + at, count);
606 * copies count bytes of data at the current position to the given data-array
619 * returns the byte value at the given position in the buffer
621 * \param[in] at the position in the buffer
625 sldns_buffer_read_u8_at(sldns_buffer *buffer, size_t at)
627 assert(sldns_buffer_available_at(buffer, at, sizeof(uint8_t)));
628 return buffer->_data[at];
632 * returns the byte value at the current position in the buffer
645 * returns the 2-byte integer value at the given position in the buffer
647 * \param[in] at position in the buffer
651 sldns_buffer_read_u16_at(sldns_buffer *buffer, size_t at)
653 assert(sldns_buffer_available_at(buffer, at, sizeof(uint16_t)));
654 return sldns_read_uint16(buffer->_data + at);
658 * returns the 2-byte integer value at the current position in the buffer
671 * returns the 4-byte integer value at the given position in the buffer
673 * \param[in] at position in the buffer
677 sldns_buffer_read_u32_at(sldns_buffer *buffer, size_t at)
679 assert(sldns_buffer_available_at(buffer, at, sizeof(uint32_t)));
680 return sldns_read_uint32(buffer->_data + at);
684 * returns the 4-byte integer value at the current position in the buffer