Lines Matching refs:data
36 const unsigned char *data; /*!< pointer to start of data buffer */
37 size_t data_len; /*!< total size of data in buffer */
39 unsigned char *alloc_buf; /*!< Pointer to allocated data buffer,
41 size_t alloc_buf_len; /*!< Size of allocated data buffer */
100 ares__buf_t *ares__buf_create_const(const unsigned char *data, size_t data_len)
104 if (data == NULL || data_len == 0) {
113 buf->data = data;
134 if (buf->data != NULL && buf->alloc_buf == NULL) {
173 buf->data = buf->alloc_buf;
209 /* See if just moving consumed data frees up enough space */
237 buf->data = ptr;
256 ares_status_t ares__buf_append(ares__buf_t *buf, const unsigned char *data,
261 if (data == NULL || data_len == 0) {
270 memcpy(buf->alloc_buf + buf->data_len, data, data_len);
429 return buf->data + buf->tag_offset;
500 if (buf == NULL || len == NULL || buf->data == NULL) {
509 return buf->data + buf->offset;
858 ares__buf_t *data;
865 data = ares__buf_create_const(ptr, len);
867 data = ares__buf_create();
870 if (data == NULL) {
875 if (ares__llist_insert_last(*list, data) == NULL) {
876 ares__buf_destroy(data);
902 const unsigned char *data, size_t data_len)
907 if (ptr == NULL || data == NULL || data_len == 0) {
915 if (memcmp(ptr, data, data_len) != 0) {
1010 * Termination even though we are technically returning binary data.
1084 const unsigned char *data,
1106 status = ares__buf_append_num_hex(buf, data[i], 2);
1128 status = ares__buf_append_byte(buf, ares__isprint(data[i]) ? data[i] : '.');
1137 ares_status_t ares__buf_hexdump(ares__buf_t *buf, const unsigned char *data,
1145 status = ares__buf_hexdump_line(buf, i, data + i, len - i);