1ldns(25 Apr 2005)                                            ldns(25 Apr 2005)
2
3
4

NAME

6       ldns_buffer_limit,     ldns_buffer_set_limit,     ldns_buffer_capacity,
7       ldns_buffer_set_capacity,     ldns_buffer_reserve,      ldns_buffer_at,
8       ldns_buffer_begin, ldns_buffer_end, ldns_buffer_current
9
10

SYNOPSIS

12       #ifdef HAVE_STDINT_H
13       #include <stdint.h>
14       #endif /* HAVE_STDINT_H */
15
16       #ifdef HAVE_STDBOOL_H
17       #include <stdbool.h>
18       #endif /* HAVE_STDBOOL_H */
19
20       #include <ldns/ldns.h>
21
22       size_t ldns_buffer_limit(ldns_buffer *buffer);
23
24       void ldns_buffer_set_limit(ldns_buffer *buffer, size_t limit);
25
26       size_t ldns_buffer_capacity(ldns_buffer *buffer);
27
28       bool ldns_buffer_set_capacity(ldns_buffer *buffer, size_t capacity);
29
30       bool ldns_buffer_reserve(ldns_buffer *buffer, size_t amount);
31
32       uint8_t * ldns_buffer_at(ldns_buffer *buffer, size_t at);
33
34       uint8_t * ldns_buffer_begin(ldns_buffer *buffer);
35
36       uint8_t * ldns_buffer_end(ldns_buffer *buffer);
37
38       uint8_t * ldns_buffer_current(ldns_buffer *buffer);
39

DESCRIPTION

41       ldns_buffer_limit() returns the maximum size of the buffer
42
43       ldns_buffer_set_limit()  changes  the  buffer's limit.  If the buffer's
44              position is greater than the new limit the position  is  set  to
45              the limit.
46
47       ldns_buffer_capacity() returns the number of bytes the buffer can hold.
48
49       ldns_buffer_set_capacity()  changes the buffer's capacity.  The data is
50              reallocated so any pointers to the data may become invalid.  The
51              buffer's limit is set to the buffer's new capacity.
52
53       ldns_buffer_reserve()  ensures  BUFFER can contain at least AMOUNT more
54              bytes.  The buffer's capacity is increased  if  necessary  using
55              buffer_set_capacity().
56
57              The  buffer's  limit  is  always set to the (possibly increased)
58              capacity.
59
60       ldns_buffer_at() returns a pointer to the data at the  indicated  posi‐
61              tion.
62
63       ldns_buffer_begin()  returns  a  pointer to the beginning of the buffer
64              (the data at position 0).
65
66       ldns_buffer_end() returns a pointer to the end of the buffer (the  data
67              at the buffer's limit).
68
69       ldns_buffer_current()  returns  a  pointer  to the data at the buffer's
70              current position.
71

AUTHOR

73       The ldns team at NLnet Labs. Which consists out of: Jelte Jansen,  Erik
74       Rozendaal and Miek Gieben.
75
76

REPORTING BUGS

78       Please  report  bugs  to  ldns-team@nlnetlabs.nl  or in our Bugzilla at
79       http://www.nlnetlabs.nl/bugs/index.html
80
81       Be sure to select ldns as the product.
82
83
85       Copyright (c) 2004, 2005 NLnet Labs.  Licensed under the  BSD  License.
86       There  is  NO  warranty;  not even for MERCHANTABILITY or FITNESS FOR A
87       PARTICULAR PURPOSE.
88

SEE ALSO

90       perldoc Net::DNS, RFC1043, RFC1035, RFC4033, RFC4034 and RFC4035.
91

REMARKS

93       This manpage was automaticly generated from the ldns source code by use
94       of Doxygen and some perl.
95
96
97
98                                                             ldns(25 Apr 2005)
Impressum