1ldns(3)                    Library Functions Manual                    ldns(3)
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       #include <stdint.h>
13       #include <stdbool.h>
14
15       #include <ldns/ldns.h>
16
17       size_t ldns_buffer_limit(ldns_buffer *buffer);
18
19       void ldns_buffer_set_limit(ldns_buffer *buffer, size_t limit);
20
21       size_t ldns_buffer_capacity(ldns_buffer *buffer);
22
23       bool ldns_buffer_set_capacity(ldns_buffer *buffer, size_t capacity);
24
25       bool ldns_buffer_reserve(ldns_buffer *buffer, size_t amount);
26
27       uint8_t * ldns_buffer_at(const ldns_buffer *buffer, size_t at);
28
29       uint8_t * ldns_buffer_begin(const ldns_buffer *buffer);
30
31       uint8_t * ldns_buffer_end(ldns_buffer *buffer);
32
33       uint8_t * ldns_buffer_current(ldns_buffer *buffer);
34

DESCRIPTION

36       ldns_buffer_limit()  returns  the maximum size of the buffer \param[in]
37              buffer
38              Returns the size
39
40       ldns_buffer_set_limit() changes the buffer's limit.   If  the  buffer's
41              position  is  greater  than the new limit the position is set to
42              the limit.
43              buffer: the buffer
44              limit: the new limit
45
46       ldns_buffer_capacity() returns the number of bytes the buffer can hold.
47              buffer: the buffer
48              Returns the number of bytes
49
50       ldns_buffer_set_capacity() changes the buffer's capacity.  The data  is
51              reallocated so any pointers to the data may become invalid.  The
52              buffer's limit is set to the buffer's new capacity.
53              buffer: the buffer
54              capacity: the capacity to use
55              Returns whether this failed or succeeded
56
57       ldns_buffer_reserve() ensures BUFFER can contain at least  AMOUNT  more
58              bytes.   The  buffer's  capacity is increased if necessary using
59              buffer_set_capacity().
60
61              The buffer's limit is always set  to  the  (possibly  increased)
62              capacity.
63              buffer: the buffer
64              amount: amount to use
65              Returns whether this failed or succeeded
66
67       ldns_buffer_at()  returns  a pointer to the data at the indicated posi‐
68              tion.
69              buffer: the buffer
70              at: position
71              Returns the pointer to the data
72
73       ldns_buffer_begin() returns a pointer to the beginning  of  the  buffer
74              (the data at position 0).
75              buffer: the buffer
76              Returns the pointer
77
78       ldns_buffer_end()  returns a pointer to the end of the buffer (the data
79              at the buffer's limit).
80              buffer: the buffer
81              Returns the pointer
82
83       ldns_buffer_current() returns a pointer to the  data  at  the  buffer's
84              current position.
85              buffer: the buffer
86              Returns the pointer
87

AUTHOR

89       The  ldns  team  at  NLnet Labs. Which consists out of Jelte Jansen and
90       Miek Gieben.
91
92

REPORTING BUGS

94       Please report bugs to ldns-team@nlnetlabs.nl  or  in  our  bugzilla  at
95       http://www.nlnetlabs.nl/bugs/index.html
96
97
99       Copyright (c) 2004 - 2006 NLnet Labs.
100
101       Licensed under the BSD License. There is NO warranty; not even for MER‐
102       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
103
104

SEE ALSO

106       ldns_buffer.  And perldoc Net::DNS, RFC1034, RFC1035, RFC4033,  RFC4034
107       and RFC4035.
108

REMARKS

110       This manpage was automaticly generated from the ldns source code by use
111       of Doxygen and some perl.
112
113
114
115                                  30 May 2006                          ldns(3)
Impressum