Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bind9/isc
File: buffer.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef ISC_BUFFER_H
[11] Fix | Delete
#define ISC_BUFFER_H 1
[12] Fix | Delete
[13] Fix | Delete
/*****
[14] Fix | Delete
***** Module Info
[15] Fix | Delete
*****/
[16] Fix | Delete
[17] Fix | Delete
/*! \file isc/buffer.h
[18] Fix | Delete
*
[19] Fix | Delete
* \brief A buffer is a region of memory, together with a set of related subregions.
[20] Fix | Delete
* Buffers are used for parsing and I/O operations.
[21] Fix | Delete
*
[22] Fix | Delete
* The 'used region' and the 'available' region are disjoint, and their
[23] Fix | Delete
* union is the buffer's region. The used region extends from the beginning
[24] Fix | Delete
* of the buffer region to the last used byte. The available region
[25] Fix | Delete
* extends from one byte greater than the last used byte to the end of the
[26] Fix | Delete
* buffer's region. The size of the used region can be changed using various
[27] Fix | Delete
* buffer commands. Initially, the used region is empty.
[28] Fix | Delete
*
[29] Fix | Delete
* The used region is further subdivided into two disjoint regions: the
[30] Fix | Delete
* 'consumed region' and the 'remaining region'. The union of these two
[31] Fix | Delete
* regions is the used region. The consumed region extends from the beginning
[32] Fix | Delete
* of the used region to the byte before the 'current' offset (if any). The
[33] Fix | Delete
* 'remaining' region the current pointer to the end of the used
[34] Fix | Delete
* region. The size of the consumed region can be changed using various
[35] Fix | Delete
* buffer commands. Initially, the consumed region is empty.
[36] Fix | Delete
*
[37] Fix | Delete
* The 'active region' is an (optional) subregion of the remaining region.
[38] Fix | Delete
* It extends from the current offset to an offset in the remaining region
[39] Fix | Delete
* that is selected with isc_buffer_setactive(). Initially, the active region
[40] Fix | Delete
* is empty. If the current offset advances beyond the chosen offset, the
[41] Fix | Delete
* active region will also be empty.
[42] Fix | Delete
*
[43] Fix | Delete
* \verbatim
[44] Fix | Delete
* /------------entire length---------------\
[45] Fix | Delete
* /----- used region -----\/-- available --\
[46] Fix | Delete
* +----------------------------------------+
[47] Fix | Delete
* | consumed | remaining | |
[48] Fix | Delete
* +----------------------------------------+
[49] Fix | Delete
* a b c d e
[50] Fix | Delete
*
[51] Fix | Delete
* a == base of buffer.
[52] Fix | Delete
* b == current pointer. Can be anywhere between a and d.
[53] Fix | Delete
* c == active pointer. Meaningful between b and d.
[54] Fix | Delete
* d == used pointer.
[55] Fix | Delete
* e == length of buffer.
[56] Fix | Delete
*
[57] Fix | Delete
* a-e == entire length of buffer.
[58] Fix | Delete
* a-d == used region.
[59] Fix | Delete
* a-b == consumed region.
[60] Fix | Delete
* b-d == remaining region.
[61] Fix | Delete
* b-c == optional active region.
[62] Fix | Delete
*\endverbatim
[63] Fix | Delete
*
[64] Fix | Delete
* The following invariants are maintained by all routines:
[65] Fix | Delete
*
[66] Fix | Delete
*\code
[67] Fix | Delete
* length > 0
[68] Fix | Delete
*
[69] Fix | Delete
* base is a valid pointer to length bytes of memory
[70] Fix | Delete
*
[71] Fix | Delete
* 0 <= used <= length
[72] Fix | Delete
*
[73] Fix | Delete
* 0 <= current <= used
[74] Fix | Delete
*
[75] Fix | Delete
* 0 <= active <= used
[76] Fix | Delete
* (although active < current implies empty active region)
[77] Fix | Delete
*\endcode
[78] Fix | Delete
*
[79] Fix | Delete
* \li MP:
[80] Fix | Delete
* Buffers have no synchronization. Clients must ensure exclusive
[81] Fix | Delete
* access.
[82] Fix | Delete
*
[83] Fix | Delete
* \li Reliability:
[84] Fix | Delete
* No anticipated impact.
[85] Fix | Delete
*
[86] Fix | Delete
* \li Resources:
[87] Fix | Delete
* Memory: 1 pointer + 6 unsigned integers per buffer.
[88] Fix | Delete
*
[89] Fix | Delete
* \li Security:
[90] Fix | Delete
* No anticipated impact.
[91] Fix | Delete
*
[92] Fix | Delete
* \li Standards:
[93] Fix | Delete
* None.
[94] Fix | Delete
*/
[95] Fix | Delete
[96] Fix | Delete
/***
[97] Fix | Delete
*** Imports
[98] Fix | Delete
***/
[99] Fix | Delete
[100] Fix | Delete
#include <inttypes.h>
[101] Fix | Delete
#include <stdbool.h>
[102] Fix | Delete
[103] Fix | Delete
#include <isc/assertions.h>
[104] Fix | Delete
#include <isc/formatcheck.h>
[105] Fix | Delete
#include <isc/lang.h>
[106] Fix | Delete
#include <isc/likely.h>
[107] Fix | Delete
#include <isc/magic.h>
[108] Fix | Delete
#include <isc/types.h>
[109] Fix | Delete
[110] Fix | Delete
/*!
[111] Fix | Delete
* To make many functions be inline macros (via \#define) define this.
[112] Fix | Delete
* If it is undefined, a function will be used.
[113] Fix | Delete
*/
[114] Fix | Delete
/* #define ISC_BUFFER_USEINLINE */
[115] Fix | Delete
[116] Fix | Delete
[117] Fix | Delete
ISC_LANG_BEGINDECLS
[118] Fix | Delete
[119] Fix | Delete
/*@{*/
[120] Fix | Delete
/*!
[121] Fix | Delete
*** Magic numbers
[122] Fix | Delete
***/
[123] Fix | Delete
#define ISC_BUFFER_MAGIC 0x42756621U /* Buf!. */
[124] Fix | Delete
#define ISC_BUFFER_VALID(b) ISC_MAGIC_VALID(b, ISC_BUFFER_MAGIC)
[125] Fix | Delete
/*@}*/
[126] Fix | Delete
[127] Fix | Delete
/*!
[128] Fix | Delete
* Size granularity for dynamically resizable buffers; when reserving
[129] Fix | Delete
* space in a buffer, we round the allocated buffer length up to the
[130] Fix | Delete
* nearest * multiple of this value.
[131] Fix | Delete
*/
[132] Fix | Delete
#define ISC_BUFFER_INCR 2048
[133] Fix | Delete
[134] Fix | Delete
/*
[135] Fix | Delete
* The following macros MUST be used only on valid buffers. It is the
[136] Fix | Delete
* caller's responsibility to ensure this by using the ISC_BUFFER_VALID
[137] Fix | Delete
* check above, or by calling another isc_buffer_*() function (rather than
[138] Fix | Delete
* another macro.)
[139] Fix | Delete
*/
[140] Fix | Delete
[141] Fix | Delete
/*@{*/
[142] Fix | Delete
/*!
[143] Fix | Delete
* Fundamental buffer elements. (A through E in the introductory comment.)
[144] Fix | Delete
*/
[145] Fix | Delete
#define isc_buffer_base(b) ((void *)(b)->base) /*a*/
[146] Fix | Delete
#define isc_buffer_current(b) \
[147] Fix | Delete
((void *)((unsigned char *)(b)->base + (b)->current)) /*b*/
[148] Fix | Delete
#define isc_buffer_active(b) \
[149] Fix | Delete
((void *)((unsigned char *)(b)->base + (b)->active)) /*c*/
[150] Fix | Delete
#define isc_buffer_used(b) \
[151] Fix | Delete
((void *)((unsigned char *)(b)->base + (b)->used)) /*d*/
[152] Fix | Delete
#define isc_buffer_length(b) ((b)->length) /*e*/
[153] Fix | Delete
/*@}*/
[154] Fix | Delete
[155] Fix | Delete
/*@{*/
[156] Fix | Delete
/*!
[157] Fix | Delete
* Derived lengths. (Described in the introductory comment.)
[158] Fix | Delete
*/
[159] Fix | Delete
#define isc_buffer_usedlength(b) ((b)->used) /* d-a */
[160] Fix | Delete
#define isc_buffer_consumedlength(b) ((b)->current) /* b-a */
[161] Fix | Delete
#define isc_buffer_remaininglength(b) ((b)->used - (b)->current) /* d-b */
[162] Fix | Delete
#define isc_buffer_activelength(b) ((b)->active - (b)->current) /* c-b */
[163] Fix | Delete
#define isc_buffer_availablelength(b) ((b)->length - (b)->used) /* e-d */
[164] Fix | Delete
/*@}*/
[165] Fix | Delete
[166] Fix | Delete
/*!
[167] Fix | Delete
* Note that the buffer structure is public. This is principally so buffer
[168] Fix | Delete
* operations can be implemented using macros. Applications are strongly
[169] Fix | Delete
* discouraged from directly manipulating the structure.
[170] Fix | Delete
*/
[171] Fix | Delete
[172] Fix | Delete
struct isc_buffer {
[173] Fix | Delete
unsigned int magic;
[174] Fix | Delete
void *base;
[175] Fix | Delete
/*@{*/
[176] Fix | Delete
/*! The following integers are byte offsets from 'base'. */
[177] Fix | Delete
unsigned int length;
[178] Fix | Delete
unsigned int used;
[179] Fix | Delete
unsigned int current;
[180] Fix | Delete
unsigned int active;
[181] Fix | Delete
/*@}*/
[182] Fix | Delete
/*! linkable */
[183] Fix | Delete
ISC_LINK(isc_buffer_t) link;
[184] Fix | Delete
/*! private internal elements */
[185] Fix | Delete
isc_mem_t *mctx;
[186] Fix | Delete
/* automatically realloc buffer at put* */
[187] Fix | Delete
bool autore;
[188] Fix | Delete
};
[189] Fix | Delete
[190] Fix | Delete
/***
[191] Fix | Delete
*** Functions
[192] Fix | Delete
***/
[193] Fix | Delete
[194] Fix | Delete
isc_result_t
[195] Fix | Delete
isc_buffer_allocate(isc_mem_t *mctx, isc_buffer_t **dynbuffer,
[196] Fix | Delete
unsigned int length);
[197] Fix | Delete
/*!<
[198] Fix | Delete
* \brief Allocate a dynamic linkable buffer which has "length" bytes in the
[199] Fix | Delete
* data region.
[200] Fix | Delete
*
[201] Fix | Delete
* Requires:
[202] Fix | Delete
*\li "mctx" is valid.
[203] Fix | Delete
*
[204] Fix | Delete
*\li "dynbuffer" is non-NULL, and "*dynbuffer" is NULL.
[205] Fix | Delete
*
[206] Fix | Delete
* Returns:
[207] Fix | Delete
*\li ISC_R_SUCCESS - success
[208] Fix | Delete
*\li ISC_R_NOMEMORY - no memory available
[209] Fix | Delete
*
[210] Fix | Delete
* Note:
[211] Fix | Delete
*\li Changing the buffer's length field is not permitted.
[212] Fix | Delete
*/
[213] Fix | Delete
[214] Fix | Delete
isc_result_t
[215] Fix | Delete
isc_buffer_reallocate(isc_buffer_t **dynbuffer, unsigned int length);
[216] Fix | Delete
/*!<
[217] Fix | Delete
* \brief Reallocate the buffer to be "length" bytes long. The buffer
[218] Fix | Delete
* pointer may move when you call this function.
[219] Fix | Delete
*
[220] Fix | Delete
* Requires:
[221] Fix | Delete
*\li "dynbuffer" is not NULL.
[222] Fix | Delete
*
[223] Fix | Delete
*\li "*dynbuffer" is a valid dynamic buffer.
[224] Fix | Delete
*
[225] Fix | Delete
*\li 'length' > current length of buffer.
[226] Fix | Delete
*
[227] Fix | Delete
* Returns:
[228] Fix | Delete
*\li ISC_R_SUCCESS - success
[229] Fix | Delete
*\li ISC_R_NOMEMORY - no memory available
[230] Fix | Delete
*
[231] Fix | Delete
* Ensures:
[232] Fix | Delete
*\li "*dynbuffer" will be valid on return and will contain all the
[233] Fix | Delete
* original data. However, the buffer pointer may be moved during
[234] Fix | Delete
* reallocation.
[235] Fix | Delete
*/
[236] Fix | Delete
[237] Fix | Delete
isc_result_t
[238] Fix | Delete
isc_buffer_reserve(isc_buffer_t **dynbuffer, unsigned int size);
[239] Fix | Delete
/*!<
[240] Fix | Delete
* \brief Make "size" bytes of space available in the buffer. The buffer
[241] Fix | Delete
* pointer may move when you call this function.
[242] Fix | Delete
*
[243] Fix | Delete
* Requires:
[244] Fix | Delete
*\li "dynbuffer" is not NULL.
[245] Fix | Delete
*
[246] Fix | Delete
*\li "*dynbuffer" is a valid dynamic buffer.
[247] Fix | Delete
*
[248] Fix | Delete
* Returns:
[249] Fix | Delete
*\li ISC_R_SUCCESS - success
[250] Fix | Delete
*\li ISC_R_NOMEMORY - no memory available
[251] Fix | Delete
*
[252] Fix | Delete
* Ensures:
[253] Fix | Delete
*\li "*dynbuffer" will be valid on return and will contain all the
[254] Fix | Delete
* original data. However, the buffer pointer may be moved during
[255] Fix | Delete
* reallocation.
[256] Fix | Delete
*/
[257] Fix | Delete
[258] Fix | Delete
void
[259] Fix | Delete
isc_buffer_free(isc_buffer_t **dynbuffer);
[260] Fix | Delete
/*!<
[261] Fix | Delete
* \brief Release resources allocated for a dynamic buffer.
[262] Fix | Delete
*
[263] Fix | Delete
* Requires:
[264] Fix | Delete
*\li "dynbuffer" is not NULL.
[265] Fix | Delete
*
[266] Fix | Delete
*\li "*dynbuffer" is a valid dynamic buffer.
[267] Fix | Delete
*
[268] Fix | Delete
* Ensures:
[269] Fix | Delete
*\li "*dynbuffer" will be NULL on return, and all memory associated with
[270] Fix | Delete
* the dynamic buffer is returned to the memory context used in
[271] Fix | Delete
* isc_buffer_allocate().
[272] Fix | Delete
*/
[273] Fix | Delete
[274] Fix | Delete
void
[275] Fix | Delete
isc__buffer_init(isc_buffer_t *b, void *base, unsigned int length);
[276] Fix | Delete
/*!<
[277] Fix | Delete
* \brief Make 'b' refer to the 'length'-byte region starting at base.
[278] Fix | Delete
*
[279] Fix | Delete
* Requires:
[280] Fix | Delete
*
[281] Fix | Delete
*\li 'length' > 0
[282] Fix | Delete
*
[283] Fix | Delete
*\li 'base' is a pointer to a sequence of 'length' bytes.
[284] Fix | Delete
*
[285] Fix | Delete
*/
[286] Fix | Delete
[287] Fix | Delete
void
[288] Fix | Delete
isc__buffer_initnull(isc_buffer_t *b);
[289] Fix | Delete
/*!<
[290] Fix | Delete
*\brief Initialize a buffer 'b' with a null data and zero length/
[291] Fix | Delete
*/
[292] Fix | Delete
[293] Fix | Delete
void
[294] Fix | Delete
isc_buffer_reinit(isc_buffer_t *b, void *base, unsigned int length);
[295] Fix | Delete
/*!<
[296] Fix | Delete
* \brief Make 'b' refer to the 'length'-byte region starting at base.
[297] Fix | Delete
* Any existing data will be copied.
[298] Fix | Delete
*
[299] Fix | Delete
* Requires:
[300] Fix | Delete
*
[301] Fix | Delete
*\li 'length' > 0 AND length >= previous length
[302] Fix | Delete
*
[303] Fix | Delete
*\li 'base' is a pointer to a sequence of 'length' bytes.
[304] Fix | Delete
*
[305] Fix | Delete
*/
[306] Fix | Delete
[307] Fix | Delete
void
[308] Fix | Delete
isc__buffer_invalidate(isc_buffer_t *b);
[309] Fix | Delete
/*!<
[310] Fix | Delete
* \brief Make 'b' an invalid buffer.
[311] Fix | Delete
*
[312] Fix | Delete
* Requires:
[313] Fix | Delete
*\li 'b' is a valid buffer.
[314] Fix | Delete
*
[315] Fix | Delete
* Ensures:
[316] Fix | Delete
*\li If assertion checking is enabled, future attempts to use 'b' without
[317] Fix | Delete
* calling isc_buffer_init() on it will cause an assertion failure.
[318] Fix | Delete
*/
[319] Fix | Delete
[320] Fix | Delete
void
[321] Fix | Delete
isc_buffer_setautorealloc(isc_buffer_t *b, bool enable);
[322] Fix | Delete
/*!<
[323] Fix | Delete
* \brief Enable or disable autoreallocation on 'b'.
[324] Fix | Delete
*
[325] Fix | Delete
* Requires:
[326] Fix | Delete
*\li 'b' is a valid dynamic buffer (b->mctx != NULL).
[327] Fix | Delete
*
[328] Fix | Delete
*/
[329] Fix | Delete
[330] Fix | Delete
void
[331] Fix | Delete
isc__buffer_region(isc_buffer_t *b, isc_region_t *r);
[332] Fix | Delete
/*!<
[333] Fix | Delete
* \brief Make 'r' refer to the region of 'b'.
[334] Fix | Delete
*
[335] Fix | Delete
* Requires:
[336] Fix | Delete
*
[337] Fix | Delete
*\li 'b' is a valid buffer.
[338] Fix | Delete
*
[339] Fix | Delete
*\li 'r' points to a region structure.
[340] Fix | Delete
*/
[341] Fix | Delete
[342] Fix | Delete
void
[343] Fix | Delete
isc__buffer_usedregion(const isc_buffer_t *b, isc_region_t *r);
[344] Fix | Delete
/*!<
[345] Fix | Delete
* \brief Make 'r' refer to the used region of 'b'.
[346] Fix | Delete
*
[347] Fix | Delete
* Requires:
[348] Fix | Delete
*
[349] Fix | Delete
*\li 'b' is a valid buffer.
[350] Fix | Delete
*
[351] Fix | Delete
*\li 'r' points to a region structure.
[352] Fix | Delete
*/
[353] Fix | Delete
[354] Fix | Delete
void
[355] Fix | Delete
isc__buffer_availableregion(isc_buffer_t *b, isc_region_t *r);
[356] Fix | Delete
/*!<
[357] Fix | Delete
* \brief Make 'r' refer to the available region of 'b'.
[358] Fix | Delete
*
[359] Fix | Delete
* Requires:
[360] Fix | Delete
*
[361] Fix | Delete
*\li 'b' is a valid buffer.
[362] Fix | Delete
*
[363] Fix | Delete
*\li 'r' points to a region structure.
[364] Fix | Delete
*/
[365] Fix | Delete
[366] Fix | Delete
void
[367] Fix | Delete
isc__buffer_add(isc_buffer_t *b, unsigned int n);
[368] Fix | Delete
/*!<
[369] Fix | Delete
* \brief Increase the 'used' region of 'b' by 'n' bytes.
[370] Fix | Delete
*
[371] Fix | Delete
* Requires:
[372] Fix | Delete
*
[373] Fix | Delete
*\li 'b' is a valid buffer
[374] Fix | Delete
*
[375] Fix | Delete
*\li used + n <= length
[376] Fix | Delete
*
[377] Fix | Delete
*/
[378] Fix | Delete
[379] Fix | Delete
void
[380] Fix | Delete
isc__buffer_subtract(isc_buffer_t *b, unsigned int n);
[381] Fix | Delete
/*!<
[382] Fix | Delete
* \brief Decrease the 'used' region of 'b' by 'n' bytes.
[383] Fix | Delete
*
[384] Fix | Delete
* Requires:
[385] Fix | Delete
*
[386] Fix | Delete
*\li 'b' is a valid buffer
[387] Fix | Delete
*
[388] Fix | Delete
*\li used >= n
[389] Fix | Delete
*
[390] Fix | Delete
*/
[391] Fix | Delete
[392] Fix | Delete
void
[393] Fix | Delete
isc__buffer_clear(isc_buffer_t *b);
[394] Fix | Delete
/*!<
[395] Fix | Delete
* \brief Make the used region empty.
[396] Fix | Delete
*
[397] Fix | Delete
* Requires:
[398] Fix | Delete
*
[399] Fix | Delete
*\li 'b' is a valid buffer
[400] Fix | Delete
*
[401] Fix | Delete
* Ensures:
[402] Fix | Delete
*
[403] Fix | Delete
*\li used = 0
[404] Fix | Delete
*
[405] Fix | Delete
*/
[406] Fix | Delete
[407] Fix | Delete
void
[408] Fix | Delete
isc__buffer_consumedregion(isc_buffer_t *b, isc_region_t *r);
[409] Fix | Delete
/*!<
[410] Fix | Delete
* \brief Make 'r' refer to the consumed region of 'b'.
[411] Fix | Delete
*
[412] Fix | Delete
* Requires:
[413] Fix | Delete
*
[414] Fix | Delete
*\li 'b' is a valid buffer.
[415] Fix | Delete
*
[416] Fix | Delete
*\li 'r' points to a region structure.
[417] Fix | Delete
*/
[418] Fix | Delete
[419] Fix | Delete
void
[420] Fix | Delete
isc__buffer_remainingregion(isc_buffer_t *b, isc_region_t *r);
[421] Fix | Delete
/*!<
[422] Fix | Delete
* \brief Make 'r' refer to the remaining region of 'b'.
[423] Fix | Delete
*
[424] Fix | Delete
* Requires:
[425] Fix | Delete
*
[426] Fix | Delete
*\li 'b' is a valid buffer.
[427] Fix | Delete
*
[428] Fix | Delete
*\li 'r' points to a region structure.
[429] Fix | Delete
*/
[430] Fix | Delete
[431] Fix | Delete
void
[432] Fix | Delete
isc__buffer_activeregion(isc_buffer_t *b, isc_region_t *r);
[433] Fix | Delete
/*!<
[434] Fix | Delete
* \brief Make 'r' refer to the active region of 'b'.
[435] Fix | Delete
*
[436] Fix | Delete
* Requires:
[437] Fix | Delete
*
[438] Fix | Delete
*\li 'b' is a valid buffer.
[439] Fix | Delete
*
[440] Fix | Delete
*\li 'r' points to a region structure.
[441] Fix | Delete
*/
[442] Fix | Delete
[443] Fix | Delete
void
[444] Fix | Delete
isc__buffer_setactive(isc_buffer_t *b, unsigned int n);
[445] Fix | Delete
/*!<
[446] Fix | Delete
* \brief Sets the end of the active region 'n' bytes after current.
[447] Fix | Delete
*
[448] Fix | Delete
* Requires:
[449] Fix | Delete
*
[450] Fix | Delete
*\li 'b' is a valid buffer.
[451] Fix | Delete
*
[452] Fix | Delete
*\li current + n <= used
[453] Fix | Delete
*/
[454] Fix | Delete
[455] Fix | Delete
void
[456] Fix | Delete
isc__buffer_first(isc_buffer_t *b);
[457] Fix | Delete
/*!<
[458] Fix | Delete
* \brief Make the consumed region empty.
[459] Fix | Delete
*
[460] Fix | Delete
* Requires:
[461] Fix | Delete
*
[462] Fix | Delete
*\li 'b' is a valid buffer
[463] Fix | Delete
*
[464] Fix | Delete
* Ensures:
[465] Fix | Delete
*
[466] Fix | Delete
*\li current == 0
[467] Fix | Delete
*
[468] Fix | Delete
*/
[469] Fix | Delete
[470] Fix | Delete
void
[471] Fix | Delete
isc__buffer_forward(isc_buffer_t *b, unsigned int n);
[472] Fix | Delete
/*!<
[473] Fix | Delete
* \brief Increase the 'consumed' region of 'b' by 'n' bytes.
[474] Fix | Delete
*
[475] Fix | Delete
* Requires:
[476] Fix | Delete
*
[477] Fix | Delete
*\li 'b' is a valid buffer
[478] Fix | Delete
*
[479] Fix | Delete
*\li current + n <= used
[480] Fix | Delete
*
[481] Fix | Delete
*/
[482] Fix | Delete
[483] Fix | Delete
void
[484] Fix | Delete
isc__buffer_back(isc_buffer_t *b, unsigned int n);
[485] Fix | Delete
/*!<
[486] Fix | Delete
* \brief Decrease the 'consumed' region of 'b' by 'n' bytes.
[487] Fix | Delete
*
[488] Fix | Delete
* Requires:
[489] Fix | Delete
*
[490] Fix | Delete
*\li 'b' is a valid buffer
[491] Fix | Delete
*
[492] Fix | Delete
*\li n <= current
[493] Fix | Delete
*
[494] Fix | Delete
*/
[495] Fix | Delete
[496] Fix | Delete
void
[497] Fix | Delete
isc_buffer_compact(isc_buffer_t *b);
[498] Fix | Delete
/*!<
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function