1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_buffer_write_at, ldns_buffer_write, ldns_buffer_write_string_at,
7 ldns_buffer_write_string, ldns_buffer_write_u8_at, ldns_buf‐
8 fer_write_u8, ldns_buffer_write_u16_at, ldns_buffer_write_u16,
9 ldns_buffer_read_at, ldns_buffer_read, ldns_buffer_read_u8_at,
10 ldns_buffer_read_u8, ldns_buffer_read_u16_at, ldns_buffer_read_u16,
11 ldns_buffer_read_u32_at, ldns_buffer_read_u32, ldns_buffer_write_u32,
12 ldns_buffer_write_u32_at - reading and writing buffers
13
14
16 #include <stdint.h>
17 #include <stdbool.h>
18
19 #include <ldns/ldns.h>
20
21 void ldns_buffer_write_at(ldns_buffer *buffer, size_t at, const void
22 *data, size_t count);
23
24 void ldns_buffer_write(ldns_buffer *buffer, const void *data, size_t
25 count);
26
27 void ldns_buffer_write_string_at(ldns_buffer *buffer, size_t at, const
28 char *str);
29
30 void ldns_buffer_write_string(ldns_buffer *buffer, const char *str);
31
32 void ldns_buffer_write_u8_at(ldns_buffer *buffer, size_t at, uint8_t
33 data);
34
35 void ldns_buffer_write_u8(ldns_buffer *buffer, uint8_t data);
36
37 void ldns_buffer_write_u16_at(ldns_buffer *buffer, size_t at, uint16_t
38 data);
39
40 void ldns_buffer_write_u16(ldns_buffer *buffer, uint16_t data);
41
42 void ldns_buffer_read_at(const ldns_buffer *buffer, size_t at, void
43 *data, size_t count);
44
45 void ldns_buffer_read(ldns_buffer *buffer, void *data, size_t count);
46
47 uint8_t ldns_buffer_read_u8_at(const ldns_buffer *buffer, size_t at);
48
49 uint8_t ldns_buffer_read_u8(ldns_buffer *buffer);
50
51 uint16_t ldns_buffer_read_u16_at(ldns_buffer *buffer, size_t at);
52
53 uint16_t ldns_buffer_read_u16(ldns_buffer *buffer);
54
55 uint32_t ldns_buffer_read_u32_at(ldns_buffer *buffer, size_t at);
56
57 uint32_t ldns_buffer_read_u32(ldns_buffer *buffer);
58
59 void ldns_buffer_write_u32(ldns_buffer *buffer, uint32_t data);
60
61 void ldns_buffer_write_u32_at(ldns_buffer *buffer, size_t at, uint32_t
62 data);
63
65 ldns_buffer_write_at() writes the given data to the buffer at the spec‐
66 ified position
67 buffer: the buffer
68 at: the position (in number of bytes) to write the data at
69 data: pointer to the data to write to the buffer
70 count: the number of bytes of data to write
71
72 ldns_buffer_write() writes count bytes of data to the current position
73 of the buffer
74 buffer: the buffer
75 data: the data to write
76 count: the length of the data to write
77
78 ldns_buffer_write_string_at() copies the given (null-delimited) string
79 to the specified position at the buffer
80 buffer: the buffer
81 at: the position in the buffer
82 str: the string to write
83
84 ldns_buffer_write_string() copies the given (null-delimited) string to
85 the current position at the buffer
86 buffer: the buffer
87 str: the string to write
88
89 ldns_buffer_write_u8_at() writes the given byte of data at the given
90 position in the buffer
91 buffer: the buffer
92 at: the position in the buffer
93 data: the 8 bits to write
94
95 ldns_buffer_write_u8() writes the given byte of data at the current
96 position in the buffer
97 buffer: the buffer
98 data: the 8 bits to write
99
100 ldns_buffer_write_u16_at() writes the given 2 byte integer at the given
101 position in the buffer
102 buffer: the buffer
103 at: the position in the buffer
104 data: the 16 bits to write
105
106 ldns_buffer_write_u16() writes the given 2 byte integer at the current
107 position in the buffer
108 buffer: the buffer
109 data: the 16 bits to write
110
111 ldns_buffer_read_at() copies count bytes of data at the given position
112 to the given data-array
113 buffer: the buffer
114 at: the position in the buffer to start
115 data: buffer to copy to
116 count: the length of the data to copy
117
118 ldns_buffer_read() copies count bytes of data at the current position
119 to the given data-array
120 buffer: the buffer
121 data: buffer to copy to
122 count: the length of the data to copy
123
124 ldns_buffer_read_u8_at() returns the byte value at the given position
125 in the buffer
126 buffer: the buffer
127 at: the position in the buffer
128 Returns 1 byte integer
129
130 ldns_buffer_read_u8() returns the byte value at the current position in
131 the buffer
132 buffer: the buffer
133 Returns 1 byte integer
134
135 ldns_buffer_read_u16_at() returns the 2-byte integer value at the given
136 position in the buffer
137 buffer: the buffer
138 at: position in the buffer
139 Returns 2 byte integer
140
141 ldns_buffer_read_u16() returns the 2-byte integer value at the current
142 position in the buffer
143 buffer: the buffer
144 Returns 2 byte integer
145
146 ldns_buffer_read_u32_at() returns the 4-byte integer value at the given
147 position in the buffer
148 buffer: the buffer
149 at: position in the buffer
150 Returns 4 byte integer
151
152 ldns_buffer_read_u32() returns the 4-byte integer value at the current
153 position in the buffer
154 buffer: the buffer
155 Returns 4 byte integer
156
157 ldns_buffer_write_u32() writes the given 4 byte integer at the current
158 position in the buffer
159 buffer: the buffer
160 data: the 32 bits to write
161
162 ldns_buffer_write_u32_at() writes the given 4 byte integer at the given
163 position in the buffer
164 buffer: the buffer
165 at: the position in the buffer
166 data: the 32 bits to write
167
169 The ldns team at NLnet Labs. Which consists out of Jelte Jansen and
170 Miek Gieben.
171
172
174 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
175 http://www.nlnetlabs.nl/bugs/index.html
176
177
179 Copyright (c) 2004 - 2006 NLnet Labs.
180
181 Licensed under the BSD License. There is NO warranty; not even for MER‐
182 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
183
184
186 ldns_buffer. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
187 and RFC4035.
188
190 This manpage was automatically generated from the ldns source code by
191 use of Doxygen and some perl.
192
193
194
195 30 May 2006 ldns(3)