Lines Matching defs:at

300  * ensures BUFFER can contain at least AMOUNT more bytes.  The buffer's
312 * returns a pointer to the data at the indicated position.
314 * \param[in] at position
318 sldns_buffer_at(const sldns_buffer *buffer, size_t at)
320 assert(at <= buffer->_limit);
321 return buffer->_data + at;
325 * returns a pointer to the beginning of the buffer (the data at
337 * returns a pointer to the end of the buffer (the data at the buffer's
349 * returns a pointer to the data at the buffer's current position.
363 * \param[in] at indicated position
367 sldns_buffer_remaining_at(sldns_buffer *buffer, size_t at)
370 assert(at <= buffer->_limit);
371 return buffer->_limit - at;
387 * checks if the buffer has at least COUNT more bytes available.
391 * \param[in] at indicated position
396 sldns_buffer_available_at(sldns_buffer *buffer, size_t at, size_t count)
398 return count <= sldns_buffer_remaining_at(buffer, at);
402 * checks if the buffer has count bytes available at the current position
414 * writes the given data to the buffer at the specified position
416 * \param[in] at the position (in number of bytes) to write the data at
421 sldns_buffer_write_at(sldns_buffer *buffer, size_t at, const void *data, size_t count)
423 assert(sldns_buffer_available_at(buffer, at, count));
424 memcpy(buffer->_data + at, data, count);
441 * copies the given (null-delimited) string to the specified position at the buffer
443 * \param[in] at the position in the buffer
447 sldns_buffer_write_string_at(sldns_buffer *buffer, size_t at, const char *str)
449 sldns_buffer_write_at(buffer, at, str, strlen(str));
453 * copies the given (null-delimited) string to the current position at the buffer
464 * writes the given byte of data at the given position in the buffer
466 * \param[in] at the position in the buffer
470 sldns_buffer_write_u8_at(sldns_buffer *buffer, size_t at, uint8_t data)
472 assert(sldns_buffer_available_at(buffer, at, sizeof(data)));
473 buffer->_data[at] = data;
477 * writes the given byte of data at the current position in the buffer
489 * writes the given 2 byte integer at the given position in the buffer
491 * \param[in] at the position in the buffer
495 sldns_buffer_write_u16_at(sldns_buffer *buffer, size_t at, uint16_t data)
497 assert(sldns_buffer_available_at(buffer, at, sizeof(data)));
498 sldns_write_uint16(buffer->_data + at, data);
502 * writes the given 2 byte integer at the current position in the buffer
514 * writes the given 4 byte integer at the given position in the buffer
516 * \param[in] at the position in the buffer
520 sldns_buffer_write_u32_at(sldns_buffer *buffer, size_t at, uint32_t data)
522 assert(sldns_buffer_available_at(buffer, at, sizeof(data)));
523 sldns_write_uint32(buffer->_data + at, data);
527 * writes the given 4 byte integer at the current position in the buffer
539 * copies count bytes of data at the given position to the given data-array
541 * \param[in] at the position in the buffer to start
546 sldns_buffer_read_at(sldns_buffer *buffer, size_t at, void *data, size_t count)
548 assert(sldns_buffer_available_at(buffer, at, count));
549 memcpy(data, buffer->_data + at, count);
553 * copies count bytes of data at the current position to the given data-array
566 * returns the byte value at the given position in the buffer
568 * \param[in] at the position in the buffer
572 sldns_buffer_read_u8_at(sldns_buffer *buffer, size_t at)
574 assert(sldns_buffer_available_at(buffer, at, sizeof(uint8_t)));
575 return buffer->_data[at];
579 * returns the byte value at the current position in the buffer
592 * returns the 2-byte integer value at the given position in the buffer
594 * \param[in] at position in the buffer
598 sldns_buffer_read_u16_at(sldns_buffer *buffer, size_t at)
600 assert(sldns_buffer_available_at(buffer, at, sizeof(uint16_t)));
601 return sldns_read_uint16(buffer->_data + at);
605 * returns the 2-byte integer value at the current position in the buffer
618 * returns the 4-byte integer value at the given position in the buffer
620 * \param[in] at position in the buffer
624 sldns_buffer_read_u32_at(sldns_buffer *buffer, size_t at)
626 assert(sldns_buffer_available_at(buffer, at, sizeof(uint32_t)));
627 return sldns_read_uint32(buffer->_data + at);
631 * returns the 4-byte integer value at the current position in the buffer