1ldns(3)                    Library Functions Manual                    ldns(3)
2
3
4

NAME

6       ldns_buffer_new, ldns_buffer_new_frm_data, ldns_buffer_clear, ldns_buf‐
7       fer_printf, ldns_buffer_free, ldns_buffer_export
8
9

SYNOPSIS

11       #include <stdint.h>
12       #include <stdbool.h>
13
14       #include <ldns/ldns.h>
15
16       ldns_buffer* ldns_buffer_new(size_t capacity);
17
18       void ldns_buffer_new_frm_data(ldns_buffer *buffer, void  *data,  size_t
19       size);
20
21       void ldns_buffer_clear(ldns_buffer *buffer);
22
23       int ldns_buffer_printf(ldns_buffer *buffer, const char *format, ...);
24
25       void ldns_buffer_free(ldns_buffer *buffer);
26
27       void* ldns_buffer_export(ldns_buffer *buffer);
28

DESCRIPTION

30       ldns_buffer_new() creates a new buffer with the specified capacity.
31
32              capacity: the size (in bytes) to allocate for the buffer
33              Returns the created buffer
34
35       ldns_buffer_new_frm_data()  creates  a  buffer with the specified data.
36              The data IS copied and MEMORY allocations are done.  The  buffer
37              is not fixed and can be resized using buffer_reserve().
38
39              buffer: pointer to the buffer to put the data in
40              data: the data to encapsulate in the buffer
41              size: the size of the data
42
43       ldns_buffer_clear()  clears  the  buffer and make it ready for writing.
44              The buffer's limit is set to the capacity and  the  position  is
45              set to 0.
46              buffer: the buffer to clear
47
48       ldns_buffer_printf()  prints  to the buffer, increasing the capacity if
49              required using buffer_reserve(). The buffer's position is set to
50              the  terminating  '\\0' Returns the number of characters written
51              (not including the terminating '\\0') or -1 on failure.
52
53       ldns_buffer_free() frees the buffer.
54              *buffer: the buffer to be freed
55              Returns void
56
57       ldns_buffer_export() Makes the buffer fixed and returns  a  pointer  to
58              the data.  The caller is responsible for free'ing the result.
59              *buffer: the buffer to be exported
60              Returns void
61

AUTHOR

63       The  ldns  team  at  NLnet Labs. Which consists out of Jelte Jansen and
64       Miek Gieben.
65
66

REPORTING BUGS

68       Please report bugs to ldns-team@nlnetlabs.nl  or  in  our  bugzilla  at
69       http://www.nlnetlabs.nl/bugs/index.html
70
71
73       Copyright (c) 2004 - 2006 NLnet Labs.
74
75       Licensed under the BSD License. There is NO warranty; not even for MER‐
76       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
77
78

SEE ALSO

80       ldns_buffer.  And perldoc Net::DNS, RFC1034, RFC1035, RFC4033,  RFC4034
81       and RFC4035.
82

REMARKS

84       This manpage was automaticly generated from the ldns source code by use
85       of Doxygen and some perl.
86
87
88
89                                  30 May 2006                          ldns(3)
Impressum