ldns  1.7.0
str2host.h
Go to the documentation of this file.
1 
11 #ifndef LDNS_2HOST_H
12 #define LDNS_2HOST_H
13 
14 #include <ldns/common.h>
15 #include <ldns/error.h>
16 #include <ldns/rr.h>
17 #include <ldns/rdata.h>
18 #include <ldns/packet.h>
19 #include <ldns/buffer.h>
20 #include <ctype.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
39 ldns_status ldns_str2rdf_int8(ldns_rdf **rd, const char *bytestr);
40 
47 ldns_status ldns_str2rdf_int16(ldns_rdf **rd, const char *shortstr);
48 
55 ldns_status ldns_str2rdf_int32(ldns_rdf **rd, const char *longstr);
56 
63 ldns_status ldns_str2rdf_time(ldns_rdf **rd, const char *time);
64 
65 /* convert string with NSEC3 salt to wireformat)
66  * \param[in] rd the rdf where to put the data
67  * \param[in] str the string to be converted
68  * return ldns_status
69  */
70 ldns_status ldns_str2rdf_nsec3_salt(ldns_rdf **rd, const char *nsec3_salt);
71 
72 /* convert a time period (think TTL's) to wireformat)
73  * \param[in] rd the rdf where to put the data
74  * \param[in] str the string to be converted
75  * return ldns_status
76  */
77 ldns_status ldns_str2rdf_period(ldns_rdf **rd, const char *str);
78 
85 ldns_status ldns_str2rdf_a(ldns_rdf **rd, const char *str);
86 
93 ldns_status ldns_str2rdf_aaaa(ldns_rdf **rd, const char *str);
94 
101 ldns_status ldns_str2rdf_str(ldns_rdf **rd, const char *str);
102 
109 ldns_status ldns_str2rdf_apl(ldns_rdf **rd, const char *str);
110 
117 ldns_status ldns_str2rdf_b64(ldns_rdf **rd, const char *str);
118 
125 ldns_status ldns_str2rdf_b32_ext(ldns_rdf **rd, const char *str);
126 
133 ldns_status ldns_str2rdf_hex(ldns_rdf **rd, const char *str);
134 
141 ldns_status ldns_str2rdf_nsec(ldns_rdf **rd, const char *str);
142 
149 ldns_status ldns_str2rdf_type(ldns_rdf **rd, const char *str);
150 
157 ldns_status ldns_str2rdf_class(ldns_rdf **rd, const char *str);
158 
165 ldns_status ldns_str2rdf_cert_alg(ldns_rdf **rd, const char *str);
166 
173 ldns_status ldns_str2rdf_alg(ldns_rdf **rd, const char *str);
174 
182 
189 ldns_status ldns_str2rdf_selector(ldns_rdf **rd, const char *str);
190 
197 ldns_status ldns_str2rdf_matching_type(ldns_rdf **rd, const char *str);
198 
205 ldns_status ldns_str2rdf_unknown(ldns_rdf **rd, const char *str);
206 
213 ldns_status ldns_str2rdf_service(ldns_rdf **rd, const char *str);
214 
221 ldns_status ldns_str2rdf_loc(ldns_rdf **rd, const char *str);
222 
229 ldns_status ldns_str2rdf_wks(ldns_rdf **rd, const char *str);
230 
237 ldns_status ldns_str2rdf_nsap(ldns_rdf **rd, const char *str);
238 
245 ldns_status ldns_str2rdf_atma(ldns_rdf **rd, const char *str);
246 
253 ldns_status ldns_str2rdf_ipseckey(ldns_rdf **rd, const char *str);
254 
261 ldns_status ldns_str2rdf_dname(ldns_rdf **rd, const char *str);
262 
269 ldns_status ldns_str2rdf_ilnp64(ldns_rdf **rd, const char *str);
270 
277 ldns_status ldns_str2rdf_eui48(ldns_rdf **rd, const char *str);
278 
285 ldns_status ldns_str2rdf_eui64(ldns_rdf **rd, const char *str);
286 
293 ldns_status ldns_str2rdf_tag(ldns_rdf **rd, const char *str);
294 
302 ldns_status ldns_str2rdf_long_str(ldns_rdf **rd, const char *str);
303 
312 ldns_status ldns_str2rdf_hip(ldns_rdf **rd, const char *str);
313 
314 
315 #ifdef __cplusplus
316 }
317 #endif
318 
319 #endif /* LDNS_2HOST_H */
ldns_status ldns_str2rdf_int32(ldns_rdf **rd, const char *longstr)
convert a strings into a 4 byte int in wireformat
Definition: str2host.c:197
ldns_status ldns_str2rdf_long_str(ldns_rdf **rd, const char *str)
Convert a <character-string> encoding of the value field as specified [RFC1035], Section 5...
Definition: str2host.c:1477
ldns_status ldns_str2rdf_aaaa(ldns_rdf **rd, const char *str)
convert the str with an AAAA record into wireformat
Definition: str2host.c:414
ldns_status ldns_str2rdf_atma(ldns_rdf **rd, const char *str)
convert a str with a ATMA RR into wireformat
Definition: str2host.c:1205
Defines ldns_rdf and functions to manipulate those.
ldns_status ldns_str2rdf_nsec(ldns_rdf **rd, const char *str)
convert string with nsec into wireformat
Definition: str2host.c:680
ldns_status ldns_str2rdf_ilnp64(ldns_rdf **rd, const char *str)
convert 4 * 16bit hex separated by colons into wireformat
Definition: str2host.c:1377
ldns_status ldns_str2rdf_int16(ldns_rdf **rd, const char *shortstr)
convert a string to a int16 in wireformat
Definition: str2host.c:36
ldns_status ldns_str2rdf_selector(ldns_rdf **rd, const char *str)
convert a tlsa selector value into wireformat
Definition: str2host.c:836
ldns_status ldns_str2rdf_b64(ldns_rdf **rd, const char *str)
convert the string with the b64 data into wireformat
Definition: str2host.c:582
Contains the definition of ldns_rr and functions to manipulate those.
ldns_status ldns_str2rdf_alg(ldns_rdf **rd, const char *str)
convert an algorithm value into wireformat
Definition: str2host.c:823
ldns_status ldns_str2rdf_period(ldns_rdf **rd, const char *str)
Definition: str2host.c:178
ldns_status ldns_str2rdf_certificate_usage(ldns_rdf **rd, const char *str)
convert a tlsa certificate usage value into wireformat
Definition: str2host.c:829
ldns_status ldns_str2rdf_eui48(ldns_rdf **rd, const char *str)
convert 6 hex bytes separated by dashes into wireformat
Definition: str2host.c:1400
Defines error numbers and functions to translate those to a readable string.
ldns_status ldns_str2rdf_class(ldns_rdf **rd, const char *str)
convert string with a classname into wireformat
Definition: str2host.c:739
ldns_status ldns_str2rdf_nsap(ldns_rdf **rd, const char *str)
convert a str with a NSAP RR into wireformat
Definition: str2host.c:1186
ldns_status ldns_str2rdf_nsec3_salt(ldns_rdf **rd, const char *nsec3_salt)
Definition: str2host.c:126
ldns_status ldns_str2rdf_matching_type(ldns_rdf **rd, const char *str)
convert a tlsa matching type value into wireformat
Definition: str2host.c:842
ldns_status ldns_str2rdf_b32_ext(ldns_rdf **rd, const char *str)
convert the string with the b32 ext hex data into wireformat
Definition: str2host.c:607
ldns_status ldns_str2rdf_wks(ldns_rdf **rd, const char *str)
convert string with a WKS RR into wireformat
Definition: str2host.c:1078
ldns_status ldns_str2rdf_hex(ldns_rdf **rd, const char *str)
convert a hex value into wireformat
Definition: str2host.c:634
ldns_status ldns_str2rdf_cert_alg(ldns_rdf **rd, const char *str)
convert an certificate algorithm value into wireformat
Definition: str2host.c:753
ldns_status ldns_str2rdf_loc(ldns_rdf **rd, const char *str)
convert a string with a LOC RR into wireformat
Definition: str2host.c:903
enum ldns_enum_status ldns_status
Definition: error.h:134
ldns_status ldns_str2rdf_tag(ldns_rdf **rd, const char *str)
Convert a non-zero sequence of US-ASCII letters and numbers into wireformat.
Definition: str2host.c:1448
ldns_status ldns_str2rdf_unknown(ldns_rdf **rd, const char *str)
convert a string with a unknown RR into wireformat
This file contains the definition of ldns_buffer, and functions to manipulate those.
ldns_status ldns_str2rdf_str(ldns_rdf **rd, const char *str)
convert a string into wireformat (think txt record)
Definition: str2host.c:428
ldns_status ldns_str2rdf_hip(ldns_rdf **rd, const char *str)
Convert a "<algorithm> <hit> <pk>" encoding of the value field as specified in Section 6...
Definition: str2host.c:1518
ldns_status ldns_str2rdf_a(ldns_rdf **rd, const char *str)
convert str with an A record into wireformat
Definition: str2host.c:401
Contains the definition of ldns_pkt and its parts, as well as functions to manipulate those...
ldns_status ldns_str2rdf_time(ldns_rdf **rd, const char *time)
convert a time string to a time value in wireformat
Definition: str2host.c:57
Resource record data field.
Definition: rdata.h:174
Common definitions for LDNS.
ldns_status ldns_str2rdf_dname(ldns_rdf **rd, const char *str)
convert a dname string into wireformat
Definition: str2host.c:311
ldns_status ldns_str2rdf_type(ldns_rdf **rd, const char *str)
convert a rrtype into wireformat
Definition: str2host.c:728
ldns_status ldns_str2rdf_apl(ldns_rdf **rd, const char *str)
convert str with the apl record into wireformat
Definition: str2host.c:471
ldns_status ldns_str2rdf_service(ldns_rdf **rd, const char *str)
convert string with a protocol service into wireformat
ldns_status ldns_str2rdf_eui64(ldns_rdf **rd, const char *str)
convert 8 hex bytes separated by dashes into wireformat
Definition: str2host.c:1423
ldns_status ldns_str2rdf_ipseckey(ldns_rdf **rd, const char *str)
convert a str with a IPSECKEY RR into wireformat
Definition: str2host.c:1225
ldns_status ldns_str2rdf_int8(ldns_rdf **rd, const char *bytestr)
convert a byte into wireformat
Definition: str2host.c:228