Lines Matching full: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) in sldns_buffer_at() argument
332 assert(at <= buffer->_limit); in sldns_buffer_at()
333 return buffer->_data + at; in sldns_buffer_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) in sldns_buffer_remaining_at() argument
382 assert(at <= buffer->_limit); in sldns_buffer_remaining_at()
383 return at < buffer->_limit ? buffer->_limit - at : 0; in sldns_buffer_remaining_at()
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) in sldns_buffer_available_at() argument
410 return count <= sldns_buffer_remaining_at(buffer, at); in sldns_buffer_available_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) in sldns_buffer_write_at() argument
435 assert(sldns_buffer_available_at(buffer, at, count)); in sldns_buffer_write_at()
436 memcpy(buffer->_data + at, data, count); in sldns_buffer_write_at()
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) in sldns_buffer_set_at() argument
450 assert(sldns_buffer_available_at(buffer, at, count)); in sldns_buffer_set_at()
451 memset(buffer->_data + at, c, count); in sldns_buffer_set_at()
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) in sldns_buffer_write_string_at() argument
477 sldns_buffer_write_at(buffer, at, str, strlen(str)); in sldns_buffer_write_string_at()
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) in sldns_buffer_write_u8_at() argument
500 assert(sldns_buffer_available_at(buffer, at, sizeof(data))); in sldns_buffer_write_u8_at()
501 buffer->_data[at] = data; in sldns_buffer_write_u8_at()
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) in sldns_buffer_write_u16_at() argument
525 assert(sldns_buffer_available_at(buffer, at, sizeof(data))); in sldns_buffer_write_u16_at()
526 sldns_write_uint16(buffer->_data + at, data); in sldns_buffer_write_u16_at()
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) in sldns_buffer_write_u32_at() argument
550 assert(sldns_buffer_available_at(buffer, at, sizeof(data))); in sldns_buffer_write_u32_at()
551 sldns_write_uint32(buffer->_data + at, data); in sldns_buffer_write_u32_at()
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) in sldns_buffer_write_u48_at() argument
563 assert(sldns_buffer_available_at(buffer, at, 6)); in sldns_buffer_write_u48_at()
564 sldns_write_uint48(buffer->_data + at, data); in sldns_buffer_write_u48_at()
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) in sldns_buffer_read_at() argument
601 assert(sldns_buffer_available_at(buffer, at, count)); in sldns_buffer_read_at()
602 memcpy(data, buffer->_data + at, count); in sldns_buffer_read_at()
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) in sldns_buffer_read_u8_at() argument
627 assert(sldns_buffer_available_at(buffer, at, sizeof(uint8_t))); in sldns_buffer_read_u8_at()
628 return buffer->_data[at]; in sldns_buffer_read_u8_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) in sldns_buffer_read_u16_at() argument
653 assert(sldns_buffer_available_at(buffer, at, sizeof(uint16_t))); in sldns_buffer_read_u16_at()
654 return sldns_read_uint16(buffer->_data + at); in sldns_buffer_read_u16_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) in sldns_buffer_read_u32_at() argument
679 assert(sldns_buffer_available_at(buffer, at, sizeof(uint32_t))); in sldns_buffer_read_u32_at()
680 return sldns_read_uint32(buffer->_data + at); in sldns_buffer_read_u32_at()
684 * returns the 4-byte integer value at the current position in the buffer