Lines Matching defs:at

239  * ensures BUFFER can contain at least AMOUNT more bytes.  The buffer's
251 * returns a pointer to the data at the indicated position.
253 * \param[in] at position
257 ldns_buffer_at(const ldns_buffer *buffer, size_t at)
259 assert(at <= buffer->_limit);
260 return buffer->_data + at;
264 * returns a pointer to the beginning of the buffer (the data at
276 * returns a pointer to the end of the buffer (the data at the buffer's
288 * returns a pointer to the data at the buffer's current position.
302 * \param[in] at indicated position
306 ldns_buffer_remaining_at(ldns_buffer *buffer, size_t at)
309 assert(at <= buffer->_limit);
310 return buffer->_limit - at;
326 * checks if the buffer has at least COUNT more bytes available.
330 * \param[in] at indicated position
335 ldns_buffer_available_at(ldns_buffer *buffer, size_t at, size_t count)
337 return count <= ldns_buffer_remaining_at(buffer, at);
341 * checks if the buffer has count bytes available at the current position
353 * writes the given data to the buffer at the specified position
355 * \param[in] at the position (in number of bytes) to write the data at
360 ldns_buffer_write_at(ldns_buffer *buffer, size_t at, const void *data, size_t count)
362 assert(ldns_buffer_available_at(buffer, at, count));
363 memcpy(buffer->_data + at, data, count);
380 * copies the given (null-delimited) string to the specified position at the buffer
382 * \param[in] at the position in the buffer
386 ldns_buffer_write_string_at(ldns_buffer *buffer, size_t at, const char *str)
388 ldns_buffer_write_at(buffer, at, str, strlen(str));
392 * copies the given (null-delimited) string to the current position at the buffer
403 * writes the given byte of data at the given position in the buffer
405 * \param[in] at the position in the buffer
409 ldns_buffer_write_u8_at(ldns_buffer *buffer, size_t at, uint8_t data)
411 assert(ldns_buffer_available_at(buffer, at, sizeof(data)));
412 buffer->_data[at] = data;
416 * writes the given byte of data at the current position in the buffer
428 * writes the given 2 byte integer at the given position in the buffer
430 * \param[in] at the position in the buffer
434 ldns_buffer_write_u16_at(ldns_buffer *buffer, size_t at, uint16_t data)
436 assert(ldns_buffer_available_at(buffer, at, sizeof(data)));
437 ldns_write_uint16(buffer->_data + at, data);
441 * writes the given 2 byte integer at the current position in the buffer
453 * writes the given 4 byte integer at the given position in the buffer
455 * \param[in] at the position in the buffer
459 ldns_buffer_write_u32_at(ldns_buffer *buffer, size_t at, uint32_t data)
461 assert(ldns_buffer_available_at(buffer, at, sizeof(data)));
462 ldns_write_uint32(buffer->_data + at, data);
466 * writes the given 4 byte integer at the current position in the buffer
478 * copies count bytes of data at the given position to the given data-array
480 * \param[in] at the position in the buffer to start
485 ldns_buffer_read_at(ldns_buffer *buffer, size_t at, void *data, size_t count)
487 assert(ldns_buffer_available_at(buffer, at, count));
488 memcpy(data, buffer->_data + at, count);
492 * copies count bytes of data at the current position to the given data-array
505 * returns the byte value at the given position in the buffer
507 * \param[in] at the position in the buffer
511 ldns_buffer_read_u8_at(ldns_buffer *buffer, size_t at)
513 assert(ldns_buffer_available_at(buffer, at, sizeof(uint8_t)));
514 return buffer->_data[at];
518 * returns the byte value at the current position in the buffer
531 * returns the 2-byte integer value at the given position in the buffer
533 * \param[in] at position in the buffer
537 ldns_buffer_read_u16_at(ldns_buffer *buffer, size_t at)
539 assert(ldns_buffer_available_at(buffer, at, sizeof(uint16_t)));
540 return ldns_read_uint16(buffer->_data + at);
544 * returns the 2-byte integer value at the current position in the buffer
557 * returns the 4-byte integer value at the given position in the buffer
559 * \param[in] at position in the buffer
563 ldns_buffer_read_u32_at(ldns_buffer *buffer, size_t at)
565 assert(ldns_buffer_available_at(buffer, at, sizeof(uint32_t)));
566 return ldns_read_uint32(buffer->_data + at);
570 * returns the 4-byte integer value at the current position in the buffer