Lines Matching refs:buffer

15 #include <isc/buffer.h>
239 isc_buffer_t *buffer, FILE *f);
360 * buffer is too small, because that would just make
362 * bigger target buffers. That's a different buffer,
696 * times with increasing buffer sizes until it succeeds,
850 * Print an rdataset. 'buffer' is a scratch buffer, which must have been
853 * the buffer will be grown automatically.
859 isc_buffer_t *buffer, FILE *f)
864 REQUIRE(buffer->length > 0);
876 isc_buffer_clear(buffer);
878 ISC_TRUE, buffer);
880 isc_buffer_usedregion(buffer, &r);
891 isc_buffer_clear(buffer);
895 * the buffer. If the buffer is too small, grow it.
901 ISC_FALSE, buffer);
905 newlength = buffer->length * 2;
909 isc_mem_put(mctx, buffer->base, buffer->length);
910 isc_buffer_init(buffer, newmem, newlength);
916 * Write the buffer contents to the master file.
918 isc_buffer_usedregion(buffer, &r);
986 isc_buffer_t *buffer, FILE *f)
998 isc_buffer_clear(buffer);
999 itresult = dns_name_totext(ctx->neworigin, ISC_FALSE, buffer);
1001 isc_buffer_usedregion(buffer, &r);
1037 buffer, f);
1083 isc_buffer_t *buffer, FILE *f)
1090 REQUIRE(buffer->length > 0);
1099 isc_buffer_clear(buffer);
1104 * can store all of them in the initial buffer.
1106 isc_buffer_availableregion(buffer, &r_hdr);
1108 isc_buffer_putuint32(buffer, totallen); /* XXX: leave space */
1109 isc_buffer_putuint16(buffer, rdataset->rdclass); /* 16-bit class */
1110 isc_buffer_putuint16(buffer, rdataset->type); /* 16-bit type */
1111 isc_buffer_putuint16(buffer, rdataset->covers); /* same as type */
1112 isc_buffer_putuint32(buffer, rdataset->ttl); /* 32-bit TTL */
1113 isc_buffer_putuint32(buffer, dns_rdataset_count(rdataset));
1114 totallen = isc_buffer_usedlength(buffer);
1118 INSIST(isc_buffer_availablelength(buffer) >=
1121 isc_buffer_putuint16(buffer, dlen);
1122 isc_buffer_copyregion(buffer, &r);
1134 * Copy the rdata into the buffer. If the buffer is too small,
1139 if (isc_buffer_availablelength(buffer) <
1144 newlength = buffer->length * 2;
1148 isc_mem_put(mctx, buffer->base, buffer->length);
1149 isc_buffer_init(buffer, newmem, newlength);
1152 isc_buffer_putuint16(buffer, dlen);
1153 isc_buffer_copyregion(buffer, &r);
1165 * for the total length in the buffer, we first remember the entire
1166 * buffer length in the region, "rewind", and then write the value.
1168 isc_buffer_usedregion(buffer, &r);
1169 isc_buffer_clear(buffer);
1170 isc_buffer_putuint32(buffer, totallen);
1171 INSIST(isc_buffer_usedlength(buffer) < totallen);
1174 * Write the buffer contents to the raw master file.
1191 isc_buffer_t *buffer, FILE *f)
1208 buffer, f);
1224 isc_buffer_t *buffer, FILE *f)
1230 UNUSED(buffer);
1237 * Initial size of text conversion buffer. The buffer is used
1533 isc_buffer_t buffer;
1543 isc_buffer_init(&buffer, bufmem, initial_buffer_length);
1556 result = dns_time32_totext(dctx->now, &buffer);
1558 isc_buffer_usedregion(&buffer, &r);
1567 isc_buffer_region(&buffer, &r);
1590 isc_buffer_putuint32(&buffer, dctx->format);
1591 isc_buffer_putuint32(&buffer, rawversion);
1592 isc_buffer_putuint32(&buffer, now32);
1595 isc_buffer_putuint32(&buffer, dctx->header.flags);
1596 isc_buffer_putuint32(&buffer,
1598 isc_buffer_putuint32(&buffer, dctx->header.lastxfrin);
1601 INSIST(isc_buffer_usedlength(&buffer) <= sizeof(rawheader));
1602 result = isc_stdio_write(buffer.base, 1,
1603 isc_buffer_usedlength(&buffer),
1613 isc_mem_put(dctx->mctx, buffer.base, buffer.length);
1620 isc_buffer_t buffer;
1631 isc_buffer_init(&buffer, bufmem, initial_buffer_length);
1685 &dctx->tctx, &buffer, dctx->f);
1740 isc_mem_put(dctx->mctx, buffer.base, buffer.length);
1995 isc_buffer_t buffer;
2014 isc_buffer_init(&buffer, bufmem, initial_buffer_length);
2019 result = dump_rdatasets_text(mctx, name, rdsiter, &ctx, &buffer, f);
2027 isc_mem_put(mctx, buffer.base, buffer.length);