#include <isc/lang.h>
#include <isc/magic.h>
#include <isc/types.h>
Go to the source code of this file.
Data Structures | |
struct | isc_buffer |
Defines | |
#define | ISC_BUFFER_H 1 |
#define | ISC_BUFFER_INCR 2048 |
#define | ISC__BUFFER_INIT(_b, _base, _length) |
#define | ISC__BUFFER_INITNULL(_b) ISC__BUFFER_INIT(_b, NULL, 0) |
#define | ISC__BUFFER_INVALIDATE(_b) |
#define | ISC__BUFFER_REGION(_b, _r) |
#define | ISC__BUFFER_USEDREGION(_b, _r) |
#define | ISC__BUFFER_AVAILABLEREGION(_b, _r) |
#define | ISC__BUFFER_ADD(_b, _n) |
#define | ISC__BUFFER_SUBTRACT(_b, _n) |
#define | ISC__BUFFER_CLEAR(_b) |
#define | ISC__BUFFER_CONSUMEDREGION(_b, _r) |
#define | ISC__BUFFER_REMAININGREGION(_b, _r) |
#define | ISC__BUFFER_ACTIVEREGION(_b, _r) |
#define | ISC__BUFFER_SETACTIVE(_b, _n) |
#define | ISC__BUFFER_FIRST(_b) |
#define | ISC__BUFFER_FORWARD(_b, _n) |
#define | ISC__BUFFER_BACK(_b, _n) |
#define | ISC__BUFFER_PUTMEM(_b, _base, _length) |
#define | ISC__BUFFER_PUTSTR(_b, _source) |
#define | ISC__BUFFER_PUTUINT8(_b, _val) |
#define | ISC__BUFFER_PUTUINT16(_b, _val) |
#define | ISC__BUFFER_PUTUINT24(_b, _val) |
#define | ISC__BUFFER_PUTUINT32(_b, _val) |
#define | isc_buffer_init isc__buffer_init |
#define | isc_buffer_initnull isc__buffer_initnull |
#define | isc_buffer_invalidate isc__buffer_invalidate |
#define | isc_buffer_region isc__buffer_region |
#define | isc_buffer_usedregion isc__buffer_usedregion |
#define | isc_buffer_availableregion isc__buffer_availableregion |
#define | isc_buffer_add isc__buffer_add |
#define | isc_buffer_subtract isc__buffer_subtract |
#define | isc_buffer_clear isc__buffer_clear |
#define | isc_buffer_consumedregion isc__buffer_consumedregion |
#define | isc_buffer_remainingregion isc__buffer_remainingregion |
#define | isc_buffer_activeregion isc__buffer_activeregion |
#define | isc_buffer_setactive isc__buffer_setactive |
#define | isc_buffer_first isc__buffer_first |
#define | isc_buffer_forward isc__buffer_forward |
#define | isc_buffer_back isc__buffer_back |
#define | isc_buffer_putmem isc__buffer_putmem |
#define | isc_buffer_putstr isc__buffer_putstr |
#define | isc_buffer_putuint8 isc__buffer_putuint8 |
#define | isc_buffer_putuint16 isc__buffer_putuint16 |
#define | isc_buffer_putuint24 isc__buffer_putuint24 |
#define | isc_buffer_putuint32 isc__buffer_putuint32 |
#define | isc_buffer_constinit(_b, _d, _l) |
#define | isc_buffer_putuint48 isc__buffer_putuint48 |
#define | ISC_BUFFER_MAGIC 0x42756621U |
#define | ISC_BUFFER_VALID(b) ISC_MAGIC_VALID(b, ISC_BUFFER_MAGIC) |
#define | isc_buffer_base(b) ((void *)(b)->base) |
#define | isc_buffer_current(b) ((void *)((unsigned char *)(b)->base + (b)->current)) |
#define | isc_buffer_active(b) ((void *)((unsigned char *)(b)->base + (b)->active)) |
#define | isc_buffer_used(b) ((void *)((unsigned char *)(b)->base + (b)->used)) |
#define | isc_buffer_length(b) ((b)->length) |
#define | isc_buffer_usedlength(b) ((b)->used) |
#define | isc_buffer_consumedlength(b) ((b)->current) |
#define | isc_buffer_remaininglength(b) ((b)->used - (b)->current) |
#define | isc_buffer_activelength(b) ((b)->active - (b)->current) |
#define | isc_buffer_availablelength(b) ((b)->length - (b)->used) |
Functions | |
isc_result_t | isc_buffer_allocate (isc_mem_t *mctx, isc_buffer_t **dynbuffer, unsigned int length) |
Allocate a dynamic linkable buffer which has "length" bytes in the data region. | |
isc_result_t | isc_buffer_reallocate (isc_buffer_t **dynbuffer, unsigned int length) |
Reallocate the buffer to be "length" bytes long. The buffer pointer may move when you call this function. | |
isc_result_t | isc_buffer_reserve (isc_buffer_t **dynbuffer, unsigned int size) |
Make "size" bytes of space available in the buffer. The buffer pointer may move when you call this function. | |
void | isc_buffer_free (isc_buffer_t **dynbuffer) |
Release resources allocated for a dynamic buffer. | |
void | isc__buffer_init (isc_buffer_t *b, void *base, unsigned int length) |
Make 'b' refer to the 'length'-byte region starting at base. | |
void | isc__buffer_initnull (isc_buffer_t *b) |
Initialize a buffer 'b' with a null data and zero length/. | |
void | isc_buffer_reinit (isc_buffer_t *b, void *base, unsigned int length) |
Make 'b' refer to the 'length'-byte region starting at base. Any existing data will be copied. | |
void | isc__buffer_invalidate (isc_buffer_t *b) |
Make 'b' an invalid buffer. | |
void | isc__buffer_region (isc_buffer_t *b, isc_region_t *r) |
Make 'r' refer to the region of 'b'. | |
void | isc__buffer_usedregion (isc_buffer_t *b, isc_region_t *r) |
Make 'r' refer to the used region of 'b'. | |
void | isc__buffer_availableregion (isc_buffer_t *b, isc_region_t *r) |
Make 'r' refer to the available region of 'b'. | |
void | isc__buffer_add (isc_buffer_t *b, unsigned int n) |
Increase the 'used' region of 'b' by 'n' bytes. | |
void | isc__buffer_subtract (isc_buffer_t *b, unsigned int n) |
Decrease the 'used' region of 'b' by 'n' bytes. | |
void | isc__buffer_clear (isc_buffer_t *b) |
Make the used region empty. | |
void | isc__buffer_consumedregion (isc_buffer_t *b, isc_region_t *r) |
Make 'r' refer to the consumed region of 'b'. | |
void | isc__buffer_remainingregion (isc_buffer_t *b, isc_region_t *r) |
Make 'r' refer to the remaining region of 'b'. | |
void | isc__buffer_activeregion (isc_buffer_t *b, isc_region_t *r) |
Make 'r' refer to the active region of 'b'. | |
void | isc__buffer_setactive (isc_buffer_t *b, unsigned int n) |
Sets the end of the active region 'n' bytes after current. | |
void | isc__buffer_first (isc_buffer_t *b) |
Make the consumed region empty. | |
void | isc__buffer_forward (isc_buffer_t *b, unsigned int n) |
Increase the 'consumed' region of 'b' by 'n' bytes. | |
void | isc__buffer_back (isc_buffer_t *b, unsigned int n) |
Decrease the 'consumed' region of 'b' by 'n' bytes. | |
void | isc_buffer_compact (isc_buffer_t *b) |
Compact the used region by moving the remaining region so it occurs at the start of the buffer. The used region is shrunk by the size of the consumed region, and the consumed region is then made empty. | |
isc_uint8_t | isc_buffer_getuint8 (isc_buffer_t *b) |
Read an unsigned 8-bit integer from 'b' and return it. | |
void | isc__buffer_putuint8 (isc_buffer_t *b, isc_uint8_t val) |
Store an unsigned 8-bit integer from 'val' into 'b'. | |
isc_uint16_t | isc_buffer_getuint16 (isc_buffer_t *b) |
Read an unsigned 16-bit integer in network byte order from 'b', convert it to host byte order, and return it. | |
void | isc__buffer_putuint16 (isc_buffer_t *b, isc_uint16_t val) |
Store an unsigned 16-bit integer in host byte order from 'val' into 'b' in network byte order. | |
isc_uint32_t | isc_buffer_getuint32 (isc_buffer_t *b) |
Read an unsigned 32-bit integer in network byte order from 'b', convert it to host byte order, and return it. | |
void | isc__buffer_putuint32 (isc_buffer_t *b, isc_uint32_t val) |
Store an unsigned 32-bit integer in host byte order from 'val' into 'b' in network byte order. | |
isc_uint64_t | isc_buffer_getuint48 (isc_buffer_t *b) |
Read an unsigned 48-bit integer in network byte order from 'b', convert it to host byte order, and return it. | |
void | isc__buffer_putuint48 (isc_buffer_t *b, isc_uint64_t val) |
Store an unsigned 48-bit integer in host byte order from 'val' into 'b' in network byte order. | |
void | isc__buffer_putuint24 (isc_buffer_t *b, isc_uint32_t val) |
void | isc__buffer_putmem (isc_buffer_t *b, const unsigned char *base, unsigned int length) |
Copy 'length' bytes of memory at 'base' into 'b'. | |
void | isc__buffer_putstr (isc_buffer_t *b, const char *source) |
Copy 'source' into 'b', not including terminating NUL. | |
isc_result_t | isc_buffer_copyregion (isc_buffer_t *b, const isc_region_t *r) |
Copy the contents of 'r' into 'b'. |
The 'used region' and the 'available' region are disjoint, and their union is the buffer's region. The used region extends from the beginning of the buffer region to the last used byte. The available region extends from one byte greater than the last used byte to the end of the buffer's region. The size of the used region can be changed using various buffer commands. Initially, the used region is empty.
The used region is further subdivided into two disjoint regions: the 'consumed region' and the 'remaining region'. The union of these two regions is the used region. The consumed region extends from the beginning of the used region to the byte before the 'current' offset (if any). The 'remaining' region the current pointer to the end of the used region. The size of the consumed region can be changed using various buffer commands. Initially, the consumed region is empty.
The 'active region' is an (optional) subregion of the remaining region. It extends from the current offset to an offset in the remaining region that is selected with isc_buffer_setactive(). Initially, the active region is empty. If the current offset advances beyond the chosen offset, the active region will also be empty.
* /------------entire length---------------\ * /----- used region -----\/-- available --\ * +----------------------------------------+ * | consumed | remaining | | * +----------------------------------------+ * a b c d e * * a == base of buffer. * b == current pointer. Can be anywhere between a and d. * c == active pointer. Meaningful between b and d. * d == used pointer. * e == length of buffer. * * a-e == entire length of buffer. * a-d == used region. * a-b == consumed region. * b-d == remaining region. * b-c == optional active region. *
The following invariants are maintained by all routines:
length > 0 base is a valid pointer to length bytes of memory 0 <= used <= length 0 <= current <= used 0 <= active <= used (although active < current implies empty active region) *
Definition in file buffer.h.
#define ISC_BUFFER_MAGIC 0x42756621U |
#define ISC_BUFFER_VALID | ( | b | ) | ISC_MAGIC_VALID(b, ISC_BUFFER_MAGIC) |
To make many functions be inline macros (via #define) define this. If it is undefined, a function will be used.
Magic numbers
Definition at line 125 of file buffer.h.
Referenced by ATF_TC_BODY(), build_msghdr_recv(), build_msghdr_send(), dns_message_takebuffer(), dns_name_concatenate(), dns_name_downcase(), dns_name_fromtext(), dns_name_fromwire(), dns_name_tofilenametext(), dns_name_totext2(), dns_name_towire(), doio_recv(), isc__buffer_activeregion(), isc__buffer_add(), isc__buffer_availableregion(), isc__buffer_back(), isc__buffer_clear(), isc__buffer_consumedregion(), isc__buffer_first(), isc__buffer_forward(), isc__buffer_invalidate(), isc__buffer_putmem(), isc__buffer_putstr(), isc__buffer_putuint16(), isc__buffer_putuint24(), isc__buffer_putuint32(), isc__buffer_putuint48(), isc__buffer_putuint8(), isc__buffer_region(), isc__buffer_remainingregion(), isc__buffer_setactive(), isc__buffer_subtract(), isc__buffer_usedregion(), isc_buffer_compact(), isc_buffer_copyregion(), isc_buffer_free(), isc_buffer_getuint16(), isc_buffer_getuint32(), isc_buffer_getuint48(), isc_buffer_getuint8(), isc_buffer_reallocate(), isc_buffer_reserve(), isc_bufferlist_availablecount(), and isc_bufferlist_usedcount().
#define ISC_BUFFER_INCR 2048 |
Size granularity for dynamically resizeable buffers; when reserving space in a buffer, we round the allocated buffer length up to the nearest * multiple of this value.
Definition at line 133 of file buffer.h.
Referenced by isc_buffer_reserve().
#define isc_buffer_base | ( | b | ) | ((void *)(b)->base) |
Fundamental buffer elements. (A through E in the introductory comment.)
Definition at line 146 of file buffer.h.
Referenced by _dns_tkey_dumpmessage(), cfg_print_rawaddr(), control_recvmessage(), dns_keytable_dump(), dns_message_buildopt(), dns_message_parse(), dns_ntatable_dump(), dns_sdb_putrr(), dns_tkey_buildgssquery(), generate_session_key(), get_rndckey(), isc_lex_getlasttokentext(), log_rr(), modrdataset(), ns_lwresd_parseeresolvconf(), ns_server_dumpsecroots(), printa(), printmessage(), printrdata(), process_dhtkey(), process_gsstkey(), register_keys(), rndc_recvdone(), rndc_recvnonce(), save_opt(), setup_lookup(), and show_message().
#define isc_buffer_current | ( | b | ) | ((void *)((unsigned char *)(b)->base + (b)->current)) |
Fundamental buffer elements. (A through E in the introductory comment.)
Definition at line 147 of file buffer.h.
Referenced by dns_message_pseudosectiontotext(), dns_name_fromwire(), dns_rdata_fromwire(), isc_buffer_compact(), isc_buffer_getuint16(), isc_buffer_getuint32(), isc_buffer_getuint48(), isc_buffer_getuint8(), load_raw(), log_nsid(), and process_opt().
#define isc_buffer_active | ( | b | ) | ((void *)((unsigned char *)(b)->base + (b)->active)) |
#define isc_buffer_used | ( | b | ) | ((void *)((unsigned char *)(b)->base + (b)->used)) |
Fundamental buffer elements. (A through E in the introductory comment.)
Definition at line 151 of file buffer.h.
Referenced by buildfilename(), control_recvmessage(), dns_client_updaterec(), dns_name_fromtext(), dns_name_fromwire(), dns_name_tofilenametext(), dns_name_totext2(), dns_rdata_fromstruct(), dns_rdata_fromtext(), dns_rdata_fromwire(), fromtext_hip(), fromtext_naptr(), fromwire_naptr(), hmacmd5_sign(), hmacsha1_sign(), hmacsha224_sign(), hmacsha256_sign(), hmacsha384_sign(), hmacsha512_sign(), isc__buffer_putstr(), isc_buffer_copyregion(), isc_httpd_addheader(), isc_httpd_addheaderuint(), isc_httpd_endheaders(), isc_httpd_response(), isccc_base64_decode(), isccc_base64_encode(), isccc_cc_towire(), lookup_done(), read_and_check(), rndc_recvdone(), and rndc_recvnonce().
#define isc_buffer_length | ( | b | ) | ((b)->length) |
Fundamental buffer elements. (A through E in the introductory comment.)
Definition at line 153 of file buffer.h.
Referenced by isc_httpd_recvdone(), isc_httpd_senddone(), and pushandgrow().
#define isc_buffer_usedlength | ( | b | ) | ((b)->used) |
Derived lengths. (Described in the introductory comment.)
Definition at line 160 of file buffer.h.
Referenced by _dns_tkey_dumpmessage(), add_bad(), add_initial_keys(), ATF_TC_BODY(), build_msghdr_send(), cfg_print_rawaddr(), check_options(), checknext(), client_request(), configure_view(), control_recvmessage(), dns_dnssec_findmatchingkeys(), dns_keytable_dump(), dns_message_parse(), dns_nsec3_noexistnodata(), dns_ntatable_dump(), dns_rdata_fromstruct(), dns_rdata_fromtext(), dns_rdata_fromwire(), dns_sdb_putrr(), dns_tkey_buildgssquery(), dns_tsig_sign(), dump_rdataset_raw(), evaluate_key(), fromtext_cdnskey(), fromtext_dnskey(), fromtext_key(), fromtext_keydata(), fromtext_nsec3(), generate_session_key(), get_rndckey(), isc_bufferlist_usedcount(), isc_httpd_recvdone(), isdelegation(), load_configuration(), log_rr(), logfmtpacket(), lookup_done(), main(), make_log_buf(), modrdataset(), ns_client_dumpmessage(), ns_client_error(), ns_lwresd_parseeresolvconf(), ns_server_changezone(), ns_server_delzone(), ns_server_dumpsecroots(), ns_server_mkeys(), ns_server_showzone(), ns_server_signing(), ns_server_tsiglist(), nsec3clean(), opcodestat_dump(), printa(), printmessage(), printrdata(), process_dhtkey(), process_gsstkey(), rdata_validate(), record_found(), recvsoa(), register_keys(), report(), resquery_response(), save_opt(), setup_keystr(), setup_lookup(), setup_text_key(), show_message(), unknown_fromtext(), update_action(), update_completed(), verifyzone(), writeheader(), zone_name_tostr(), zone_namerd_tostr(), zone_rdclass_tostr(), and zone_viewname_tostr().
#define isc_buffer_consumedlength | ( | b | ) | ((b)->current) |
Derived lengths. (Described in the introductory comment.)
Definition at line 161 of file buffer.h.
Referenced by isc_lex_getlasttokentext(), isc_lex_gettoken(), isc_lex_ungettoken(), and load_raw().
#define isc_buffer_remaininglength | ( | b | ) | ((b)->used - (b)->current) |
Derived lengths. (Described in the introductory comment.)
Definition at line 162 of file buffer.h.
Referenced by check_tsig_error(), dns_message_pseudosectiontotext(), dns_name_fromtext(), dns_ncache_towire(), dst_key_fromdns(), frombuffer(), get_edns_expire(), isc_buffer_compact(), isc_lex_gettoken(), load_raw(), process_ecs(), process_opt(), read_and_check(), read_one_rr(), recv_done(), and render_ecs().
#define isc_buffer_activelength | ( | b | ) | ((b)->active - (b)->current) |
Derived lengths. (Described in the introductory comment.)
Definition at line 163 of file buffer.h.
Referenced by dns_rdata_fromwire(), and fromwire_hip().
#define isc_buffer_availablelength | ( | b | ) | ((b)->length - (b)->used) |
Derived lengths. (Described in the introductory comment.)
Definition at line 164 of file buffer.h.
Referenced by buffer_putstr(), build_msghdr_recv(), buildfilename(), dns_journal_writediff(), dns_message_pseudosectiontotext(), dns_name_fromtext(), dns_name_fromwire(), dns_name_tofilenametext(), dns_name_totext2(), dns_opcode_totext(), dns_rdata_fromwire(), dns_rdataclass_format(), dns_rdatatype_format(), dns_ssu_external_match(), dns_tsig_sign(), doio_recv(), dst_key_getfilename(), dst_key_todns(), dump_rdataset_raw(), emit(), hmacmd5_sign(), hmacmd5_todns(), hmacsha1_sign(), hmacsha1_todns(), hmacsha224_sign(), hmacsha224_todns(), hmacsha256_sign(), hmacsha256_todns(), hmacsha384_sign(), hmacsha384_todns(), hmacsha512_sign(), hmacsha512_todns(), inet_totext(), isc__buffer_putstr(), isc_buffer_copyregion(), isc_bufferlist_availablecount(), isc_httpd_addheader(), isc_httpd_addheaderuint(), isc_httpd_endheaders(), isc_httpd_response(), isc_netaddr_format(), isc_netaddr_totext(), isc_sockaddr_totext(), load_raw(), loadkeyset(), opendb(), pushandgrow(), rdataset_totext(), read_and_check(), zone_name_tostr(), zone_namerd_tostr(), and zone_viewname_tostr().
#define ISC__BUFFER_INIT | ( | _b, | |||
_base, | |||||
_length | ) |
Value:
do { \ (_b)->base = _base; \ (_b)->length = (_length); \ (_b)->used = 0; \ (_b)->current = 0; \ (_b)->active = 0; \ (_b)->mctx = NULL; \ ISC_LINK_INIT(_b, link); \ (_b)->magic = ISC_BUFFER_MAGIC; \ } while (0)
Definition at line 731 of file buffer.h.
Referenced by isc__buffer_init(), and isc__buffer_initnull().
#define ISC__BUFFER_INITNULL | ( | _b | ) | ISC__BUFFER_INIT(_b, NULL, 0) |
#define ISC__BUFFER_INVALIDATE | ( | _b | ) |
Value:
do { \ (_b)->magic = 0; \ (_b)->base = NULL; \ (_b)->length = 0; \ (_b)->used = 0; \ (_b)->current = 0; \ (_b)->active = 0; \ } while (0)
Definition at line 745 of file buffer.h.
Referenced by isc__buffer_invalidate().
#define ISC__BUFFER_REGION | ( | _b, | |||
_r | ) |
Value:
do { \ (_r)->base = (_b)->base; \ (_r)->length = (_b)->length; \ } while (0)
Definition at line 755 of file buffer.h.
Referenced by isc__buffer_region().
#define ISC__BUFFER_USEDREGION | ( | _b, | |||
_r | ) |
Value:
do { \ (_r)->base = (_b)->base; \ (_r)->length = (_b)->used; \ } while (0)
Definition at line 761 of file buffer.h.
Referenced by isc__buffer_usedregion().
#define ISC__BUFFER_AVAILABLEREGION | ( | _b, | |||
_r | ) |
Value:
do { \ (_r)->base = isc_buffer_used(_b); \ (_r)->length = isc_buffer_availablelength(_b); \ } while (0)
Definition at line 767 of file buffer.h.
Referenced by isc__buffer_availableregion().
#define ISC__BUFFER_ADD | ( | _b, | |||
_n | ) |
Value:
do { \ (_b)->used += (_n); \ } while (0)
Definition at line 773 of file buffer.h.
Referenced by isc__buffer_add().
#define ISC__BUFFER_SUBTRACT | ( | _b, | |||
_n | ) |
Value:
do { \ (_b)->used -= (_n); \ if ((_b)->current > (_b)->used) \ (_b)->current = (_b)->used; \ if ((_b)->active > (_b)->used) \ (_b)->active = (_b)->used; \ } while (0)
Definition at line 778 of file buffer.h.
Referenced by isc__buffer_subtract().
#define ISC__BUFFER_CLEAR | ( | _b | ) |
Value:
do { \ (_b)->used = 0; \ (_b)->current = 0; \ (_b)->active = 0; \ } while (0)
Definition at line 787 of file buffer.h.
Referenced by isc__buffer_clear().
#define ISC__BUFFER_CONSUMEDREGION | ( | _b, | |||
_r | ) |
Value:
do { \ (_r)->base = (_b)->base; \ (_r)->length = (_b)->current; \ } while (0)
Definition at line 794 of file buffer.h.
Referenced by isc__buffer_consumedregion().
#define ISC__BUFFER_REMAININGREGION | ( | _b, | |||
_r | ) |
Value:
do { \ (_r)->base = isc_buffer_current(_b); \ (_r)->length = isc_buffer_remaininglength(_b); \ } while (0)
Definition at line 800 of file buffer.h.
Referenced by isc__buffer_remainingregion().
#define ISC__BUFFER_ACTIVEREGION | ( | _b, | |||
_r | ) |
Value:
do { \ if ((_b)->current < (_b)->active) { \ (_r)->base = isc_buffer_current(_b); \ (_r)->length = isc_buffer_activelength(_b); \ } else { \ (_r)->base = NULL; \ (_r)->length = 0; \ } \ } while (0)
Definition at line 806 of file buffer.h.
Referenced by isc__buffer_activeregion().
#define ISC__BUFFER_SETACTIVE | ( | _b, | |||
_n | ) |
Value:
do { \ (_b)->active = (_b)->current + (_n); \ } while (0)
Definition at line 817 of file buffer.h.
Referenced by isc__buffer_setactive().
#define ISC__BUFFER_FIRST | ( | _b | ) |
Value:
do { \ (_b)->current = 0; \ } while (0)
Definition at line 822 of file buffer.h.
Referenced by isc__buffer_first().
#define ISC__BUFFER_FORWARD | ( | _b, | |||
_n | ) |
Value:
do { \ (_b)->current += (_n); \ } while (0)
Definition at line 827 of file buffer.h.
Referenced by isc__buffer_forward().
#define ISC__BUFFER_BACK | ( | _b, | |||
_n | ) |
Value:
do { \ (_b)->current -= (_n); \ } while (0)
Definition at line 832 of file buffer.h.
Referenced by isc__buffer_back().
#define ISC__BUFFER_PUTMEM | ( | _b, | |||
_base, | |||||
_length | ) |
Value:
do { \ memmove(isc_buffer_used(_b), (_base), (_length)); \ (_b)->used += (_length); \ } while (0)
Definition at line 837 of file buffer.h.
Referenced by isc__buffer_putmem().
#define ISC__BUFFER_PUTSTR | ( | _b, | |||
_source | ) |
Value:
do { \ unsigned int _length; \ unsigned char *_cp; \ _length = strlen(_source); \ _cp = isc_buffer_used(_b); \ memmove(_cp, (_source), _length); \ (_b)->used += (_length); \ } while (0)
#define ISC__BUFFER_PUTUINT8 | ( | _b, | |||
_val | ) |
Value:
do { \ unsigned char *_cp; \ isc_uint8_t _val2 = (_val); \ _cp = isc_buffer_used(_b); \ (_b)->used++; \ _cp[0] = _val2 & 0x00ff; \ } while (0)
Definition at line 853 of file buffer.h.
Referenced by isc__buffer_putuint8().
#define ISC__BUFFER_PUTUINT16 | ( | _b, | |||
_val | ) |
Value:
do { \ unsigned char *_cp; \ isc_uint16_t _val2 = (_val); \ _cp = isc_buffer_used(_b); \ (_b)->used += 2; \ _cp[0] = (unsigned char)((_val2 & 0xff00U) >> 8); \ _cp[1] = (unsigned char)(_val2 & 0x00ffU); \ } while (0)
Definition at line 862 of file buffer.h.
Referenced by isc__buffer_putuint16(), and isc__buffer_putuint48().
#define ISC__BUFFER_PUTUINT24 | ( | _b, | |||
_val | ) |
Value:
do { \ unsigned char *_cp; \ isc_uint32_t _val2 = (_val); \ _cp = isc_buffer_used(_b); \ (_b)->used += 3; \ _cp[0] = (unsigned char)((_val2 & 0xff0000U) >> 16); \ _cp[1] = (unsigned char)((_val2 & 0xff00U) >> 8); \ _cp[2] = (unsigned char)(_val2 & 0x00ffU); \ } while (0)
Definition at line 872 of file buffer.h.
Referenced by isc__buffer_putuint24().
#define ISC__BUFFER_PUTUINT32 | ( | _b, | |||
_val | ) |
Value:
do { \ unsigned char *_cp; \ isc_uint32_t _val2 = (_val); \ _cp = isc_buffer_used(_b); \ (_b)->used += 4; \ _cp[0] = (unsigned char)((_val2 & 0xff000000) >> 24); \ _cp[1] = (unsigned char)((_val2 & 0x00ff0000) >> 16); \ _cp[2] = (unsigned char)((_val2 & 0x0000ff00) >> 8); \ _cp[3] = (unsigned char)((_val2 & 0x000000ff)); \ } while (0)
Definition at line 883 of file buffer.h.
Referenced by isc__buffer_putuint32(), and isc__buffer_putuint48().
#define isc_buffer_init isc__buffer_init |
Definition at line 919 of file buffer.h.
Referenced by _dns_tkey_dumpmessage(), add_bad(), add_callback(), add_initial_keys(), add_ns(), add_sigs(), add_test_data(), addnsec3param(), addoptout(), ATF_TC_BODY(), bind9_check_key(), buffer_fromregion(), cfg_print_rawaddr(), check_options(), check_test_data(), check_trusted_key(), check_ttls(), checkandaddsoa(), checknext(), checkowner_nsec3(), client_allocsendbuf(), client_request(), compute_tag(), computeid(), configure_view(), control_recvmessage(), create_keydata(), createiterator(), dns_badcache_add(), dns_byaddr_createptrname2(), dns_client_updaterec(), dns_db_getsoaserial(), dns_diff_print(), dns_dnssec_findmatchingkeys(), dns_dnssec_findzonekeys2(), dns_dnssec_keyfromrdata(), dns_dnssec_keylistfromrdataset(), dns_dnssec_sign(), dns_dnssec_signmessage(), dns_dnssec_verify3(), dns_ds_buildrdata(), dns_dsdigest_format(), dns_journal_print(), dns_journal_writediff(), dns_master_dumpnodetostream(), dns_message_checksig(), dns_message_pseudosectiontotext(), dns_message_renderend(), dns_name_digest(), dns_name_downcase(), dns_name_format(), dns_name_print(), dns_name_tostring(), dns_ncache_current(), dns_ncache_getrdataset(), dns_ncache_getsigrdataset(), dns_ncache_towire(), dns_nsec3_addnsec3(), dns_nsec3_delnsec3(), dns_nsec3_hashname(), dns_nsec3_maxiterations(), dns_nsec3_noexistnodata(), dns_nsec3param_fromprivate(), dns_ntatable_save(), dns_private_totext(), dns_rdataclass_format(), dns_rdatatype_format(), dns_rootns_create(), dns_sdb_create(), dns_sdb_putrr(), dns_sdlzallowzonexfr(), dns_sdlzfindzone(), dns_secalg_format(), dns_soa_buildrdata(), dns_ssu_external_match(), dns_tkey_buildgssquery(), dns_tkey_gssnegotiate(), dns_tkey_processdhresponse(), dns_tkey_processgssresponse(), dns_tkey_processquery(), dns_tsig_sign(), dns_tsig_verify(), dns_tsigkey_create(), dns_view_loadnta(), dns_view_untrust(), dst__privstruct_parse(), dst__privstruct_writefile(), dst_gssapi_acceptctx(), dst_gssapi_acquirecred(), dst_gssapi_identitymatchesrealmkrb5(), dst_gssapi_identitymatchesrealmms(), dst_gssapi_initctx(), dst_key_fromfile(), dst_key_read_public(), dstkey_fromconfig(), dump_rdataset(), dump_rdataset_raw(), dump_rdatasets_text(), dumptostreaminc(), emit(), evaluate_key(), evaluate_zone(), findnodeext(), fixup_nsec3param(), forward_callback(), fromstruct_in_apl(), fromtext_nsec3(), generate(), generate_salt(), generate_session_key(), get_dst_key(), get_edns_expire(), get_key(), get_rndckey(), getnodedata(), hmacmd5_generate(), hmacmd5_parse(), hmacsha1_generate(), hmacsha1_parse(), hmacsha224_generate(), hmacsha224_parse(), hmacsha256_generate(), hmacsha256_parse(), hmacsha384_generate(), hmacsha384_parse(), hmacsha512_generate(), hmacsha512_parse(), init_gabn(), init_gnba(), init_grbn(), initname(), insert_soa(), ip2name(), isc_buffer_allocate(), isc_httpd_accept(), isc_netaddr_format(), isc_sockaddr_format(), isccc_base64_decode(), isccc_base64_encode(), isdelegation(), journal_open(), keyfetch_done(), load_configuration(), load_header(), load_raw(), load_text(), loadkey(), loadkeyset(), loadzone(), log_rr(), logfmtpacket(), logkey(), main(), make_dnskey(), make_log_buf(), make_nsec3(), minimal_update(), newzone_parse(), normalize_key(), notify_done(), ns_client_addopt(), ns_client_dumpmessage(), ns_client_error(), ns_config_parsedefaults(), ns_lwdclient_processgabn(), ns_lwdclient_processgrbn(), ns_lwresd_parseeresolvconf(), ns_server_nta(), ns_server_signing(), nsec3clean(), opcodestat_dump(), opendb(), parse_name(), parse_rdata(), printa(), printrdata(), printsection(), printtime(), process_dhtkey(), process_opt(), pub_compare(), query_newname(), record_found(), recv_done(), recv_length(), recvsoa(), refresh_callback(), register_keys(), report(), resigned(), resquery_response(), resquery_send(), restore_key(), reverse_from_address(), revocable(), rndc_connected(), rndc_recvnonce(), roll_forward(), save_opt(), setup_keystr(), setup_lookup(), setup_master(), setup_text_key(), sign_a_node(), signwithkey(), stf_from_address(), stub_callback(), tcp_length_done(), totext_ctx_init(), trust_key(), tsig_verify_tcp(), type_format(), udp_recv(), update_action(), update_completed(), value_towire(), verifyzone(), write_public_key(), writeheader(), writeset(), xfrin_create(), xfrout_ctx_create(), zone_name_tostr(), zone_namerd_tostr(), zone_rdclass_tostr(), and zone_viewname_tostr().
#define isc_buffer_initnull isc__buffer_initnull |
Definition at line 920 of file buffer.h.
Referenced by isc_httpd_accept(), and isc_httpd_recvdone().
#define isc_buffer_invalidate isc__buffer_invalidate |
Definition at line 921 of file buffer.h.
Referenced by clear_query(), flush_lookup_list(), isc_buffer_free(), parse_name(), recv_done(), reset_client(), and tcp_length_done().
#define isc_buffer_region isc__buffer_region |
Definition at line 922 of file buffer.h.
Referenced by dns_sdlzssumatch(), dns_ssu_external_match(), grow_headerspace(), and writeheader().
#define isc_buffer_usedregion isc__buffer_usedregion |
Definition at line 923 of file buffer.h.
Referenced by build_msghdr_send(), check_trusted_key(), check_ttls(), client_send(), client_sendpkg(), compute_secret(), computeid(), copy_name(), create_keydata(), dns_diff_print(), dns_dnssec_sign(), dns_dnssec_signmessage(), dns_dnssec_verify3(), dns_dnssec_verifymessage(), dns_dsdigest_format(), dns_journal_writediff(), dns_message_parse(), dns_message_renderchangebuffer(), dns_message_renderend(), dns_message_setquerytsig(), dns_name_digest(), dns_name_format(), dns_name_print(), dns_name_tostring(), dns_request_createraw4(), dns_sdb_putrdata(), dns_secalg_format(), dns_tkey_builddhquery(), dns_tkey_processdhresponse(), dns_tsig_sign(), dns_tsig_verify(), dns_ttl_totext2(), dst__privstruct_parse(), dst__privstruct_writefile(), dstkey_fromconfig(), dump_rdataset(), dump_rdatasets_text(), dumpnode(), emit(), generate_session_key(), hex_dump(), loadkey(), make_dnskey(), notify_createmessage(), parse_rdata(), printrdata(), printsection(), printtime(), process_dhtkey(), pub_compare(), pushandgrow(), recv_done(), req_render(), req_response(), req_send(), resquery_send(), say_message(), sendstream(), start_lookup(), tsig_verify_tcp(), type_format(), unknown_fromtext(), write_public_key(), writeheader(), writeset(), and xfrin_send_request().
#define isc_buffer_availableregion isc__buffer_availableregion |
Definition at line 924 of file buffer.h.
Referenced by add_log_str(), add_rdata_to_list(), addoptout(), build_msghdr_recv(), byte_btoa(), compute_secret(), copy_rdataset(), dns_message_renderbegin(), dns_message_renderchangebuffer(), dns_message_renderheader(), dns_message_renderreserve(), dns_name_fromregion(), dns_ncache_towire(), dns_rdata_towire(), dns_time64_totext(), dump_rdataset_raw(), fromstruct_any_tsig(), fromtext_hs_a(), fromtext_in_a(), fromtext_in_aaaa(), fromtext_in_wks(), fromtext_ipseckey(), fromtext_l32(), fromwire_afsdb(), fromwire_ch_a(), fromwire_hs_a(), fromwire_in_a(), fromwire_in_aaaa(), fromwire_in_apl(), fromwire_in_wks(), fromwire_opt(), fromwire_rt(), fromwire_soa(), indent(), isc_sockaddr_totext(), mem_tobuffer(), multitxt_fromtext(), multitxt_totext(), ns_client_sendraw(), putbyte(), query_dns64(), query_getnamebuf(), query_newname(), question_totext(), rdataset_totext(), sendstream(), str_totext(), totext_ctx_init(), towire_afsdb(), towire_ch_a(), towire_hs_a(), towire_in_a(), towire_in_aaaa(), towire_rt(), towire_soa(), towire_spf(), towire_txt(), towiresorted(), ttlfmt(), txt_fromtext(), txt_fromwire(), txt_totext(), uint16_tobuffer(), uint32_tobuffer(), and uint8_tobuffer().
#define isc_buffer_add isc__buffer_add |
Definition at line 925 of file buffer.h.
Referenced by add_initial_keys(), add_log_str(), add_test_data(), ATF_TC_BODY(), buffer_fromregion(), buildfilename(), byte_btoa(), check_dual_stack(), check_keylist(), check_orderent(), check_servers(), check_test_data(), check_trusted_key(), check_update_policy(), check_zoneconf(), client_request(), client_send(), compute_secret(), configure_alternates(), configure_order(), configure_session_key(), configure_staticstub_servernames(), configure_view_nametable(), configure_zone(), configure_zone_ssutable(), control_recvmessage(), convert_keyname(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), dns64_reverse(), dns_byaddr_createptrname2(), dns_client_setdlv(), dns_db_getsoaserial(), dns_dlz_writeablezone(), dns_dnssec_keyfromrdata(), dns_dnssec_sign(), dns_dnssec_verify3(), dns_message_checksig(), dns_message_pseudosectiontotext(), dns_message_renderbegin(), dns_message_renderchangebuffer(), dns_message_renderend(), dns_name_concatenate(), dns_name_copy(), dns_name_downcase(), dns_name_fromregion(), dns_name_fromstring2(), dns_name_fromtext(), dns_name_fromwire(), dns_name_tofilenametext(), dns_name_totext2(), dns_name_towire(), dns_ncache_current(), dns_ncache_getrdataset(), dns_ncache_getsigrdataset(), dns_ncache_towire(), dns_nsec3_maxiterations(), dns_nsec3param_fromprivate(), dns_peer_setkeybycharp(), dns_rdata_towire(), dns_rootns_create(), dns_sdb_putrr(), dns_sdlz_putnamedrr(), dns_sdlz_putrr(), dns_test_makezone(), dns_time64_totext(), dns_tkey_processquery(), dns_tsigkey_create(), dns_view_loadnta(), doio_recv(), dst_gssapi_acceptctx(), dst_key_read_public(), dstkey_fromconfig(), emit(), evaluate_key(), evaluate_zone(), fromstruct_in_apl(), fromtext_hs_a(), fromtext_in_a(), fromtext_in_aaaa(), fromtext_in_wks(), fromtext_ipseckey(), fromtext_l32(), fromwire_afsdb(), fromwire_ch_a(), fromwire_hs_a(), fromwire_in_a(), fromwire_in_aaaa(), fromwire_in_wks(), fromwire_opt(), fromwire_rt(), fromwire_soa(), generate(), get_dst_key(), get_edns_expire(), get_key(), getnode(), hmacmd5_generate(), hmacmd5_parse(), hmacmd5_sign(), hmacsha1_generate(), hmacsha1_parse(), hmacsha1_sign(), hmacsha224_generate(), hmacsha224_parse(), hmacsha224_sign(), hmacsha256_generate(), hmacsha256_parse(), hmacsha256_sign(), hmacsha384_generate(), hmacsha384_parse(), hmacsha384_sign(), hmacsha512_generate(), hmacsha512_parse(), hmacsha512_sign(), indent(), initname(), ip2name(), isc_httpd_addheader(), isc_httpd_addheaderuint(), isc_httpd_endheaders(), isc_httpd_response(), load_header(), load_raw(), load_text(), load_zone(), loadzone(), logkey(), main(), make_name(), mem_tobuffer(), multitxt_fromtext(), multitxt_totext(), mustbesecure(), newzone_parse(), ns_config_getipandkeylist(), ns_config_parsedefaults(), ns_lwdclient_processgabn(), ns_lwdclient_processgrbn(), ns_lwdmanager_create(), ns_server_changezone(), ns_server_flushnode(), ns_server_nta(), ns_tkeyctx_fromconfig(), on_disable_list(), parse_name(), parse_rdata(), process_opt(), putbyte(), query_dns64(), query_keepname(), question_totext(), rdataset_totext(), read_and_check(), read_one_rr(), recv_message(), render_404(), render_500(), render_xsl(), resquery_send(), restore_key(), reverse_from_address(), rndc_connected(), rndc_recvnonce(), sendstream(), setup_keystr(), setup_lookup(), setup_master(), stf_from_address(), str_totext(), totext_ctx_init(), towire_afsdb(), towire_ch_a(), towire_hs_a(), towire_in_a(), towire_in_aaaa(), towire_rt(), towire_soa(), towire_spf(), towire_txt(), towiresorted(), ttlfmt(), txt_fromtext(), txt_fromwire(), txt_totext(), and udp_recv().
#define isc_buffer_subtract isc__buffer_subtract |
#define isc_buffer_clear isc__buffer_clear |
Definition at line 927 of file buffer.h.
Referenced by add_sigs(), control_recvmessage(), dns_message_renderbegin(), dns_message_renderchangebuffer(), dns_message_renderend(), dns_name_concatenate(), dns_name_copy(), dns_name_downcase(), dns_name_fromregion(), dns_name_fromtext(), dns_name_fromwire(), dns_tsig_sign(), dns_tsig_verify(), dump_rdataset(), dump_rdataset_raw(), dump_rdatasets_text(), dumpnode(), emit(), launch_next_query(), load_raw(), main(), msgreset(), ns_server_dumpsecroots(), reset_client(), rndc_connected(), rndc_recvnonce(), sendstream(), sign_a_node(), and size_buffer().
#define isc_buffer_consumedregion isc__buffer_consumedregion |
#define isc_buffer_remainingregion isc__buffer_remainingregion |
Definition at line 929 of file buffer.h.
Referenced by addoptout(), dns_message_parse(), dns_message_peekheader(), dns_ncache_current(), dns_ncache_getrdataset(), dns_ncache_getsigrdataset(), dns_ncache_towire(), dst_key_fromdns(), getquestions(), getsection(), hmacmd5_fromdns(), hmacsha1_fromdns(), hmacsha224_fromdns(), hmacsha256_fromdns(), hmacsha384_fromdns(), hmacsha512_fromdns(), query_dns64(), and query_filter64().
#define isc_buffer_activeregion isc__buffer_activeregion |
Definition at line 930 of file buffer.h.
Referenced by fromwire_afsdb(), fromwire_any_tsig(), fromwire_caa(), fromwire_cdnskey(), fromwire_cds(), fromwire_cert(), fromwire_ch_a(), fromwire_dlv(), fromwire_dnskey(), fromwire_ds(), fromwire_eui48(), fromwire_eui64(), fromwire_hip(), fromwire_hs_a(), fromwire_in_a(), fromwire_in_a6(), fromwire_in_aaaa(), fromwire_in_apl(), fromwire_in_dhcid(), fromwire_in_kx(), fromwire_in_nsap(), fromwire_in_px(), fromwire_in_srv(), fromwire_in_wks(), fromwire_ipseckey(), fromwire_key(), fromwire_keydata(), fromwire_l32(), fromwire_l64(), fromwire_loc(), fromwire_lp(), fromwire_mx(), fromwire_naptr(), fromwire_nid(), fromwire_nsec(), fromwire_nsec3(), fromwire_nsec3param(), fromwire_null(), fromwire_nxt(), fromwire_openpgpkey(), fromwire_opt(), fromwire_rrsig(), fromwire_rt(), fromwire_sig(), fromwire_soa(), fromwire_sshfp(), fromwire_tkey(), fromwire_tlsa(), fromwire_unspec(), fromwire_uri(), fromwire_x25(), and txt_fromwire().
#define isc_buffer_setactive isc__buffer_setactive |
Definition at line 931 of file buffer.h.
Referenced by ATF_TC_BODY(), buffer_fromregion(), dns_nsec3param_fromprivate(), fromstruct_in_apl(), generate(), getquestions(), getrdata(), getsection(), load_raw(), load_text(), rdata_validate(), read_one_rr(), and setup_master().
#define isc_buffer_first isc__buffer_first |
#define isc_buffer_forward isc__buffer_forward |
Definition at line 933 of file buffer.h.
Referenced by addoptout(), dns_db_getsoaserial(), dns_message_pseudosectiontotext(), dns_name_fromtext(), dns_name_fromwire(), dns_ncache_current(), dns_ncache_getrdataset(), dns_ncache_getsigrdataset(), dns_ncache_towire(), dns_rdata_fromwire(), fromwire_afsdb(), fromwire_any_tsig(), fromwire_caa(), fromwire_cdnskey(), fromwire_cds(), fromwire_cert(), fromwire_ch_a(), fromwire_dlv(), fromwire_dnskey(), fromwire_ds(), fromwire_eui48(), fromwire_eui64(), fromwire_hip(), fromwire_hs_a(), fromwire_in_a(), fromwire_in_a6(), fromwire_in_aaaa(), fromwire_in_apl(), fromwire_in_dhcid(), fromwire_in_kx(), fromwire_in_nsap(), fromwire_in_px(), fromwire_in_srv(), fromwire_in_wks(), fromwire_ipseckey(), fromwire_key(), fromwire_keydata(), fromwire_l32(), fromwire_l64(), fromwire_loc(), fromwire_lp(), fromwire_mx(), fromwire_naptr(), fromwire_nid(), fromwire_nsec(), fromwire_nsec3(), fromwire_nsec3param(), fromwire_null(), fromwire_nxt(), fromwire_openpgpkey(), fromwire_opt(), fromwire_rrsig(), fromwire_rt(), fromwire_sig(), fromwire_soa(), fromwire_sshfp(), fromwire_tkey(), fromwire_tlsa(), fromwire_unspec(), fromwire_uri(), get_edns_expire(), newzone_parse(), process_ecs(), process_opt(), query_dns64(), query_filter64(), and txt_fromwire().
#define isc_buffer_putmem isc__buffer_putmem |
Definition at line 935 of file buffer.h.
Referenced by buffer_putstr(), build_name_from_str(), copy_name(), dns_journal_writediff(), dns_message_buildopt(), dns_message_getquerytsig(), dns_message_pseudosectiontotext(), dns_message_setquerytsig(), dns_rdata_fromwire(), dns_ssu_external_match(), dns_tsig_sign(), hmacmd5_todns(), hmacsha1_todns(), hmacsha224_todns(), hmacsha256_todns(), hmacsha384_todns(), hmacsha512_todns(), isc_netaddr_totext(), isc_sockaddr_totext(), isccc_cc_towire(), notify_createmessage(), parse_rdata(), putmem(), query_filter64(), sendstream(), setup_lookup(), table_towire(), and value_towire().
#define isc_buffer_putstr isc__buffer_putstr |
Definition at line 936 of file buffer.h.
Referenced by buildfilename(), check_tsig_error(), dns_message_pseudosectiontotext(), dns_opcode_totext(), dns_private_totext(), dns_ssu_external_match(), emit(), inet_totext(), loadkeyset(), ns_client_error(), opendb(), putstr(), rdataset_totext(), setup_text_key(), zone_name_tostr(), zone_namerd_tostr(), and zone_viewname_tostr().
#define isc_buffer_putuint8 isc__buffer_putuint8 |
Definition at line 937 of file buffer.h.
Referenced by addoptout(), createiterator(), dns_dnssec_verify3(), dns_ntatable_save(), dns_private_totext(), dns_rdataclass_format(), dns_rdatatype_format(), dns_sdb_create(), dns_sdlzallowzonexfr(), dns_sdlzfindzone(), dns_ssu_external_match(), dst_gssapi_identitymatchesrealmkrb5(), dst_gssapi_identitymatchesrealmms(), dst_key_getfilename(), dst_key_todns(), findnodeext(), getnodedata(), isc_netaddr_format(), loadkeyset(), ns_client_addopt(), opendb(), pushandgrow(), putuint8(), setup_lookup(), table_towire(), uint8_tobuffer(), value_towire(), and writeset().
#define isc_buffer_putuint16 isc__buffer_putuint16 |
Definition at line 938 of file buffer.h.
Referenced by addoptout(), client_allocsendbuf(), client_send(), copy_rdataset(), dns_dnssec_sign(), dns_dnssec_verify3(), dns_journal_writediff(), dns_message_buildopt(), dns_message_renderheader(), dns_name_towire(), dns_ncache_towire(), dns_request_createraw4(), dns_tsig_sign(), dns_tsig_verify(), dst_key_todns(), dump_rdataset_raw(), launch_next_query(), ns_client_addopt(), req_render(), resquery_send(), sendstream(), setup_lookup(), towiresorted(), tsig_verify_tcp(), and uint16_tobuffer().
#define isc_buffer_putuint32 isc__buffer_putuint32 |
Definition at line 940 of file buffer.h.
Referenced by control_recvmessage(), dns_dnssec_sign(), dns_dnssec_verify3(), dns_journal_writediff(), dns_ncache_towire(), dns_ssu_external_match(), dns_tsig_sign(), dns_tsig_verify(), dump_rdataset_raw(), isccc_cc_towire(), ns_client_addopt(), rndc_connected(), rndc_recvnonce(), towiresorted(), uint32_tobuffer(), value_towire(), and writeheader().
#define isc_buffer_constinit | ( | _b, | |||
_d, | |||||
_l | ) |
Value:
do { \ union { void *_var; const void *_const; } _deconst; \ _deconst._const = (_d); \ isc_buffer_init((_b), _deconst._var, (_l)); \ } while (0)
Definition at line 943 of file buffer.h.
Referenced by add_initial_keys(), check_dual_stack(), check_keylist(), check_orderent(), check_servers(), check_trusted_key(), check_update_policy(), check_zoneconf(), configure_alternates(), configure_order(), configure_session_key(), configure_staticstub_servernames(), configure_view_nametable(), configure_zone(), configure_zone_ssutable(), convert_keyname(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), dns64_reverse(), dns_client_setdlv(), dns_dlz_writeablezone(), dns_name_fromstring2(), dns_peer_setkeybycharp(), dns_sdb_putrr(), dns_sdlz_putnamedrr(), dns_sdlz_putrr(), dns_test_makezone(), dstkey_fromconfig(), getnode(), load_zone(), make_name(), mustbesecure(), ns_config_getipandkeylist(), ns_lwdmanager_create(), ns_server_changezone(), ns_server_flushnode(), ns_tkeyctx_fromconfig(), and on_disable_list().
#define isc_buffer_putuint48 isc__buffer_putuint48 |
Definition at line 953 of file buffer.h.
Referenced by dns_tsig_sign(), dns_tsig_verify(), and tsig_verify_tcp().
isc_result_t isc_buffer_allocate | ( | isc_mem_t * | mctx, | |
isc_buffer_t ** | dynbuffer, | |||
unsigned int | length | |||
) |
Allocate a dynamic linkable buffer which has "length" bytes in the data region.
Requires:
Definition at line 447 of file buffer.c.
References isc_buffer_init, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, and REQUIRE.
Referenced by add_rdata_to_list(), ATF_TC_BODY(), build_name_from_str(), buildquery(), control_recvmessage(), copy_name(), dns_dnssec_sign(), dns_dnssec_signmessage(), dns_keytable_dump(), dns_message_buildopt(), dns_message_create(), dns_message_getquerytsig(), dns_message_setquerytsig(), dns_message_signer(), dns_ntatable_dump(), dns_request_createraw4(), dns_sdb_putrdata(), dns_sdlz_putrr(), dns_tkey_builddhquery(), dns_tkey_processdhresponse(), dns_tsig_sign(), dns_zone_forwardupdate(), dst_gssapi_acceptctx(), dst_key_fromgssapi(), dumpnode(), main(), modrdataset(), new_source(), newbuffer(), notify_createmessage(), parse_name(), parse_rdata(), printmessage(), printrdata(), process_dhtkey(), pushandgrow(), query_dns64(), query_filter64(), query_newnamebuf(), recv_done(), req_render(), req_response(), say_message(), setup_text_key(), show_message(), start_lookup(), and unknown_fromtext().
isc_result_t isc_buffer_reallocate | ( | isc_buffer_t ** | dynbuffer, | |
unsigned int | length | |||
) |
Reallocate the buffer to be "length" bytes long. The buffer pointer may move when you call this function.
Requires:
Definition at line 469 of file buffer.c.
References isc_buffer::base, INSIST, ISC_BUFFER_VALID, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_NOSPACE, ISC_R_SUCCESS, isc_buffer::length, isc_buffer::mctx, and REQUIRE.
Referenced by ATF_TC_BODY(), ATF_TP_ADD_TCS(), and isc_buffer_reserve().
isc_result_t isc_buffer_reserve | ( | isc_buffer_t ** | dynbuffer, | |
unsigned int | size | |||
) |
Make "size" bytes of space available in the buffer. The buffer pointer may move when you call this function.
Requires:
Definition at line 503 of file buffer.c.
References ISC_BUFFER_INCR, isc_buffer_reallocate(), ISC_BUFFER_VALID, ISC_R_NOMEMORY, ISC_R_NOSPACE, ISC_R_SUCCESS, and REQUIRE.
Referenced by ATF_TC_BODY(), ATF_TP_ADD_TCS(), isccc_cc_towire(), ns_server_testgen(), putmem(), putstr(), putuint8(), table_towire(), and value_towire().
void isc_buffer_free | ( | isc_buffer_t ** | dynbuffer | ) |
Release resources allocated for a dynamic buffer.
Requires:
Definition at line 532 of file buffer.c.
References isc_buffer_invalidate, ISC_BUFFER_VALID, isc_mem_put, isc_buffer::length, isc_buffer::mctx, mctx, and REQUIRE.
Referenced by ATF_TC_BODY(), build_name_from_str(), buildquery(), control_recvmessage(), destroy_libs(), destroy_lookup(), destroynode(), dns_dnssec_sign(), dns_dnssec_signmessage(), dns_keytable_dump(), dns_message_create(), dns_ntatable_dump(), dns_sdlz_putrr(), dns_tkey_builddhquery(), dns_tkey_processdhresponse(), dns_tsig_sign(), dst_key_free(), dumpnode(), fctx_cancelquery(), forward_destroy(), isc_lex_close(), main(), maybe_free(), maybe_free_connection(), modrdataset(), msgreset(), newconnection(), parse_rdata(), printmessage(), printrdata(), process_dhtkey(), process_gsstkey(), pushandgrow(), query_dns64(), query_filter64(), query_reset(), recv_done(), req_destroy(), req_render(), req_response(), say_message(), sendstream(), setup_text_key(), show_message(), start_lookup(), unknown_fromtext(), xfrin_recv_done(), xfrin_reset(), xfrin_send_request(), and xfrout_ctx_destroy().
void isc__buffer_init | ( | isc_buffer_t * | b, | |
void * | base, | |||
unsigned int | length | |||
) |
Make 'b' refer to the 'length'-byte region starting at base.
Requires:
Definition at line 29 of file buffer.c.
References ISC__BUFFER_INIT, and REQUIRE.
void isc__buffer_initnull | ( | isc_buffer_t * | b | ) |
Initialize a buffer 'b' with a null data and zero length/.
Definition at line 41 of file buffer.c.
References ISC__BUFFER_INIT.
void isc_buffer_reinit | ( | isc_buffer_t * | b, | |
void * | base, | |||
unsigned int | length | |||
) |
Make 'b' refer to the 'length'-byte region starting at base. Any existing data will be copied.
Requires:
Definition at line 51 of file buffer.c.
References isc_buffer::base, isc_buffer::length, and REQUIRE.
Referenced by grow_headerspace(), render_404(), render_500(), and render_xsl().
void isc__buffer_invalidate | ( | isc_buffer_t * | b | ) |
Make 'b' an invalid buffer.
Requires:
Definition at line 70 of file buffer.c.
References ISC__BUFFER_INVALIDATE, ISC_BUFFER_VALID, ISC_LINK_LINKED, isc_buffer::mctx, and REQUIRE.
void isc__buffer_region | ( | isc_buffer_t * | b, | |
isc_region_t * | r | |||
) |
Make 'r' refer to the region of 'b'.
Requires:
Definition at line 83 of file buffer.c.
References ISC__BUFFER_REGION, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_usedregion | ( | isc_buffer_t * | b, | |
isc_region_t * | r | |||
) |
Make 'r' refer to the used region of 'b'.
Requires:
Definition at line 95 of file buffer.c.
References ISC__BUFFER_USEDREGION, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_availableregion | ( | isc_buffer_t * | b, | |
isc_region_t * | r | |||
) |
Make 'r' refer to the available region of 'b'.
Requires:
Definition at line 107 of file buffer.c.
References ISC__BUFFER_AVAILABLEREGION, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_add | ( | isc_buffer_t * | b, | |
unsigned int | n | |||
) |
Increase the 'used' region of 'b' by 'n' bytes.
Requires:
Definition at line 119 of file buffer.c.
References ISC__BUFFER_ADD, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
void isc__buffer_subtract | ( | isc_buffer_t * | b, | |
unsigned int | n | |||
) |
Decrease the 'used' region of 'b' by 'n' bytes.
Requires:
Definition at line 131 of file buffer.c.
References ISC__BUFFER_SUBTRACT, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
void isc__buffer_clear | ( | isc_buffer_t * | b | ) |
Make the used region empty.
Requires:
Definition at line 143 of file buffer.c.
References ISC__BUFFER_CLEAR, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_consumedregion | ( | isc_buffer_t * | b, | |
isc_region_t * | r | |||
) |
Make 'r' refer to the consumed region of 'b'.
Requires:
Definition at line 154 of file buffer.c.
References ISC__BUFFER_CONSUMEDREGION, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_remainingregion | ( | isc_buffer_t * | b, | |
isc_region_t * | r | |||
) |
Make 'r' refer to the remaining region of 'b'.
Requires:
Definition at line 166 of file buffer.c.
References ISC__BUFFER_REMAININGREGION, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_activeregion | ( | isc_buffer_t * | b, | |
isc_region_t * | r | |||
) |
Make 'r' refer to the active region of 'b'.
Requires:
Definition at line 178 of file buffer.c.
References ISC__BUFFER_ACTIVEREGION, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_setactive | ( | isc_buffer_t * | b, | |
unsigned int | n | |||
) |
Sets the end of the active region 'n' bytes after current.
Requires:
Definition at line 190 of file buffer.c.
References isc_buffer::current, ISC__BUFFER_SETACTIVE, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_first | ( | isc_buffer_t * | b | ) |
Make the consumed region empty.
Requires:
Definition at line 202 of file buffer.c.
References ISC__BUFFER_FIRST, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_forward | ( | isc_buffer_t * | b, | |
unsigned int | n | |||
) |
Increase the 'consumed' region of 'b' by 'n' bytes.
Requires:
Definition at line 213 of file buffer.c.
References isc_buffer::current, ISC__BUFFER_FORWARD, ISC_BUFFER_VALID, and REQUIRE.
void isc__buffer_back | ( | isc_buffer_t * | b, | |
unsigned int | n | |||
) |
Decrease the 'consumed' region of 'b' by 'n' bytes.
Requires:
Definition at line 225 of file buffer.c.
References ISC__BUFFER_BACK, ISC_BUFFER_VALID, and REQUIRE.
void isc_buffer_compact | ( | isc_buffer_t * | b | ) |
Compact the used region by moving the remaining region so it occurs at the start of the buffer. The used region is shrunk by the size of the consumed region, and the consumed region is then made empty.
Requires:
Definition at line 237 of file buffer.c.
References isc_buffer::active, isc_buffer::base, isc_buffer::current, isc_buffer_current, isc_buffer_remaininglength, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
Referenced by isc_lex_gettoken().
isc_uint8_t isc_buffer_getuint8 | ( | isc_buffer_t * | b | ) |
Read an unsigned 8-bit integer from 'b' and return it.
Requires:
Definition at line 262 of file buffer.c.
References isc_buffer::current, isc_buffer_current, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
Referenced by dns_ncache_current(), dns_ncache_getrdataset(), dns_ncache_getsigrdataset(), dst_key_fromdns(), isc_lex_gettoken(), process_ecs(), and render_ecs().
void isc__buffer_putuint8 | ( | isc_buffer_t * | b, | |
isc_uint8_t | val | |||
) |
Store an unsigned 8-bit integer from 'val' into 'b'.
Requires:
Definition at line 281 of file buffer.c.
References ISC__BUFFER_PUTUINT8, ISC_BUFFER_VALID, isc_buffer::length, REQUIRE, and isc_buffer::used.
isc_uint16_t isc_buffer_getuint16 | ( | isc_buffer_t * | b | ) |
Read an unsigned 16-bit integer in network byte order from 'b', convert it to host byte order, and return it.
Requires:
Definition at line 289 of file buffer.c.
References isc_buffer::current, isc_buffer_current, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
Referenced by dns_message_parse(), dns_message_peekheader(), dns_message_pseudosectiontotext(), dns_ncache_current(), dns_ncache_getrdataset(), dns_ncache_getsigrdataset(), dns_ncache_towire(), dst_key_fromdns(), get_edns_expire(), getquestions(), getsection(), load_raw(), process_ecs(), process_opt(), read_one_rr(), render_ecs(), and tcp_length_done().
void isc__buffer_putuint16 | ( | isc_buffer_t * | b, | |
isc_uint16_t | val | |||
) |
Store an unsigned 16-bit integer in host byte order from 'val' into 'b' in network byte order.
Requires:
Definition at line 310 of file buffer.c.
References ISC__BUFFER_PUTUINT16, ISC_BUFFER_VALID, isc_buffer::length, REQUIRE, and isc_buffer::used.
isc_uint32_t isc_buffer_getuint32 | ( | isc_buffer_t * | b | ) |
Read an unsigned 32-bit integer in network byte order from 'b', convert it to host byte order, and return it.
Requires:
Definition at line 326 of file buffer.c.
References isc_buffer::current, isc_buffer_current, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
Referenced by dns_db_getsoaserial(), dns_message_pseudosectiontotext(), get_edns_expire(), getsection(), load_header(), load_raw(), and read_one_rr().
void isc__buffer_putuint32 | ( | isc_buffer_t * | b, | |
isc_uint32_t | val | |||
) |
Store an unsigned 32-bit integer in host byte order from 'val' into 'b' in network byte order.
Requires:
Definition at line 349 of file buffer.c.
References ISC__BUFFER_PUTUINT32, ISC_BUFFER_VALID, isc_buffer::length, REQUIRE, and isc_buffer::used.
isc_uint64_t isc_buffer_getuint48 | ( | isc_buffer_t * | b | ) |
Read an unsigned 48-bit integer in network byte order from 'b', convert it to host byte order, and return it.
Requires:
Definition at line 357 of file buffer.c.
References isc_buffer::current, isc_buffer_current, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
void isc__buffer_putuint48 | ( | isc_buffer_t * | b, | |
isc_uint64_t | val | |||
) |
Store an unsigned 48-bit integer in host byte order from 'val' into 'b' in network byte order.
Requires:
Definition at line 382 of file buffer.c.
References ISC__BUFFER_PUTUINT16, ISC__BUFFER_PUTUINT32, ISC_BUFFER_VALID, isc_buffer::length, REQUIRE, and isc_buffer::used.
void isc__buffer_putuint24 | ( | isc_buffer_t * | b, | |
isc_uint32_t | val | |||
) |
Store an unsigned 24-bit integer in host byte order from 'val' into 'b' in network byte order.
Requires:
Ensures:
Definition at line 318 of file buffer.c.
References ISC__BUFFER_PUTUINT24, ISC_BUFFER_VALID, isc_buffer::length, REQUIRE, and isc_buffer::used.
void isc__buffer_putmem | ( | isc_buffer_t * | b, | |
const unsigned char * | base, | |||
unsigned int | length | |||
) |
Copy 'length' bytes of memory at 'base' into 'b'.
Requires:
Definition at line 396 of file buffer.c.
References ISC__BUFFER_PUTMEM, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
void isc__buffer_putstr | ( | isc_buffer_t * | b, | |
const char * | source | |||
) |
Copy 'source' into 'b', not including terminating NUL.
Requires:
Definition at line 406 of file buffer.c.
References isc_buffer_availablelength, isc_buffer_used, ISC_BUFFER_VALID, REQUIRE, and isc_buffer::used.
isc_result_t isc_buffer_copyregion | ( | isc_buffer_t * | b, | |
const isc_region_t * | r | |||
) |
Copy the contents of 'r' into 'b'.
Requires:
Definition at line 426 of file buffer.c.
References isc_region::base, isc_buffer_availablelength, isc_buffer_used, ISC_BUFFER_VALID, ISC_R_NOSPACE, ISC_R_SUCCESS, isc_region::length, REQUIRE, and isc_buffer::used.
Referenced by addoptout(), copy_rdataset(), dns_client_updaterec(), dns_request_createraw4(), dns_sdb_putrdata(), dns_zone_forwardupdate(), dst_gssapi_acceptctx(), dst_gssapi_initctx(), dst_key_fromgssapi(), dump_rdataset_raw(), fromstruct_afsdb(), fromstruct_caa(), fromstruct_ch_a(), fromstruct_cname(), fromstruct_dname(), fromstruct_in_a6(), fromstruct_in_kx(), fromstruct_in_nsap_ptr(), fromstruct_in_px(), fromstruct_in_srv(), fromstruct_ipseckey(), fromstruct_lp(), fromstruct_mb(), fromstruct_md(), fromstruct_mf(), fromstruct_mg(), fromstruct_minfo(), fromstruct_mr(), fromstruct_mx(), fromstruct_naptr(), fromstruct_ns(), fromstruct_nsec(), fromstruct_nxt(), fromstruct_ptr(), fromstruct_rp(), fromstruct_rt(), fromstruct_soa(), name_tobuffer(), ns_client_sendraw(), pushandgrow(), recv_done(), req_render(), req_response(), and unknown_fromtext().