1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_bget_token, ldns_bgetc, ldns_bskipcs - get tokens from buffers
7
8
10 #include <stdint.h>
11 #include <stdbool.h>
12
13 #include <ldns/ldns.h>
14
15 ssize_t ldns_bget_token(ldns_buffer *b, char *token, const char *delim,
16 size_t limit);
17
18 int ldns_bgetc(ldns_buffer *buffer);
19
20 void ldns_bskipcs(ldns_buffer *buffer, const char *s);
21
23 ldns_bget_token() returns a token/char from the buffer b. This func‐
24 tion deals with ( and ) in the buffer, and ignores when it finds
25 them.
26 *b: the buffer to read from
27 *token: the token is put here
28 *delim: chars at which the parsing should stop
29 *limit: how much to read. If 0 the builtin maximum is used
30 Returns s 0 on error of EOF of b. Otherwise return the length of
31 what is read
32
33 ldns_bgetc() returns the next character from a buffer. Advances the po‐
34 sition pointer with 1. When end of buffer is reached returns
35 EOF. This is the buffer's equivalent for getc().
36 *buffer: buffer to read from
37 Returns EOF on failure otherwise return the character
38
39 ldns_bskipcs() skips all of the characters in the given string in the
40 buffer, moving the position to the first character that is not
41 in *s.
42 *buffer: buffer to use
43 *s: characters to skip
44 Returns void
45
47 The ldns team at NLnet Labs.
48
49
51 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
52 http://www.nlnetlabs.nl/bugs/index.html
53
54
56 Copyright (c) 2004 - 2006 NLnet Labs.
57
58 Licensed under the BSD License. There is NO warranty; not even for MER‐
59 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
60
61
63 ldns_buffer. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
64 and RFC4035.
65
67 This manpage was automatically generated from the ldns source code.
68
69
70
71 30 May 2006 ldns(3)