str2host.h - conversion from str to the host fmt More...
Go to the source code of this file.
Functions | |
ldns_status | ldns_str2rdf_int8 (ldns_rdf **rd, const char *bytestr) |
convert a byte into wireformat | |
ldns_status | ldns_str2rdf_int16 (ldns_rdf **rd, const char *shortstr) |
convert a string to a int16 in wireformat | |
ldns_status | ldns_str2rdf_int32 (ldns_rdf **rd, const char *longstr) |
convert a strings into a 4 byte int in wireformat | |
ldns_status | ldns_str2rdf_time (ldns_rdf **rd, const char *time) |
convert a time string to a time value in wireformat | |
ldns_status | ldns_str2rdf_nsec3_salt (ldns_rdf **rd, const char *nsec3_salt) |
ldns_status | ldns_str2rdf_period (ldns_rdf **rd, const char *str) |
ldns_status | ldns_str2rdf_a (ldns_rdf **rd, const char *str) |
convert str with an A record into wireformat | |
ldns_status | ldns_str2rdf_aaaa (ldns_rdf **rd, const char *str) |
convert the str with an AAAA record into wireformat | |
ldns_status | ldns_str2rdf_str (ldns_rdf **rd, const char *str) |
convert a string into wireformat (think txt record) | |
ldns_status | ldns_str2rdf_apl (ldns_rdf **rd, const char *str) |
convert str with the apl record into wireformat | |
ldns_status | ldns_str2rdf_b64 (ldns_rdf **rd, const char *str) |
convert the string with the b64 data into wireformat | |
ldns_status | ldns_str2rdf_b32_ext (ldns_rdf **rd, const char *str) |
convert the string with the b32 ext hex data into wireformat | |
ldns_status | ldns_str2rdf_hex (ldns_rdf **rd, const char *str) |
convert a hex value into wireformat | |
ldns_status | ldns_str2rdf_nsec (ldns_rdf **rd, const char *str) |
convert string with nsec into wireformat | |
ldns_status | ldns_str2rdf_type (ldns_rdf **rd, const char *str) |
convert a rrtype into wireformat | |
ldns_status | ldns_str2rdf_class (ldns_rdf **rd, const char *str) |
convert string with a classname into wireformat | |
ldns_status | ldns_str2rdf_cert_alg (ldns_rdf **rd, const char *str) |
convert an certificate algorithm value into wireformat | |
ldns_status | ldns_str2rdf_alg (ldns_rdf **rd, const char *str) |
convert and algorithm value into wireformat | |
ldns_status | ldns_str2rdf_unknown (ldns_rdf **rd, const char *str) |
convert a string with a unknown RR into wireformat | |
ldns_status | ldns_str2rdf_tsig (ldns_rdf **rd, const char *str) |
convert string with a tsig? RR into wireformat | |
ldns_status | ldns_str2rdf_service (ldns_rdf **rd, const char *str) |
convert string with a protocol service into wireformat | |
ldns_status | ldns_str2rdf_loc (ldns_rdf **rd, const char *str) |
convert a string with a LOC RR into wireformat | |
ldns_status | ldns_str2rdf_wks (ldns_rdf **rd, const char *str) |
convert string with a WKS RR into wireformat | |
ldns_status | ldns_str2rdf_nsap (ldns_rdf **rd, const char *str) |
convert a str with a NSAP RR into wireformat | |
ldns_status | ldns_str2rdf_atma (ldns_rdf **rd, const char *str) |
convert a str with a ATMA RR into wireformat | |
ldns_status | ldns_str2rdf_ipseckey (ldns_rdf **rd, const char *str) |
convert a str with a IPSECKEY RR into wireformat | |
ldns_status | ldns_str2rdf_dname (ldns_rdf **rd, const char *str) |
convert a dname string into wireformat |
str2host.h - conversion from str to the host fmt
a Net::DNS like library for C
(c) NLnet Labs, 2005-2006
See the file LICENSE for the license
Defines functions to convert dns data in presentation format or text files to internal structures.
Definition in file str2host.h.
ldns_status ldns_str2rdf_int8 | ( | ldns_rdf ** | rd, |
const char * | bytestr | ||
) |
convert a byte into wireformat
[in] | rd | the rdf where to put the data |
[in] | bytestr | the string to be converted |
Definition at line 228 of file str2host.c.
References LDNS_MALLOC, LDNS_STATUS_MEM_ERR, LDNS_FREE, LDNS_STATUS_ERR, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT8, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_int16 | ( | ldns_rdf ** | rd, |
const char * | shortstr | ||
) |
convert a string to a int16 in wireformat
[in] | rd | the rdf where to put the data |
[in] | shortstr | the string to be converted |
Definition at line 36 of file str2host.c.
References LDNS_MALLOC, LDNS_STATUS_MEM_ERR, LDNS_FREE, LDNS_STATUS_INVALID_INT, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT16, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_int32 | ( | ldns_rdf ** | rd, |
const char * | longstr | ||
) |
convert a strings into a 4 byte int in wireformat
[in] | rd | the rdf where to put the data |
[in] | longstr | the string to be converted |
Definition at line 197 of file str2host.c.
References LDNS_MALLOC, LDNS_STATUS_MEM_ERR, strtoul, LDNS_FREE, LDNS_STATUS_ERR, LDNS_STATUS_SYNTAX_INTEGER_OVERFLOW, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT32, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_time | ( | ldns_rdf ** | rd, |
const char * | time | ||
) |
convert a time string to a time value in wireformat
[in] | rd | the rdf where to put the data |
[in] | time | the string to be converted |
Definition at line 57 of file str2host.c.
References LDNS_MALLOC, LDNS_STATUS_MEM_ERR, mktime_from_utc(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_TIME, LDNS_FREE, LDNS_STATUS_OK, LDNS_STATUS_ERR, LDNS_RDF_TYPE_INT32, and LDNS_STATUS_INVALID_TIME.
ldns_status ldns_str2rdf_nsec3_salt | ( | ldns_rdf ** | rd, |
const char * | nsec3_salt | ||
) |
Definition at line 126 of file str2host.c.
References LDNS_STATUS_NULL, LDNS_STATUS_INVALID_HEX, LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_hexdigit_to_int(), LDNS_FREE, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_NSEC3_SALT, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_period | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
Definition at line 178 of file str2host.c.
References ldns_str2period(), LDNS_STATUS_ERR, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_PERIOD, LDNS_STATUS_OK, and LDNS_STATUS_MEM_ERR.
ldns_status ldns_str2rdf_a | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert str with an A record into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 387 of file str2host.c.
References inet_pton(), LDNS_STATUS_INVALID_IP4, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_A, LDNS_STATUS_OK, and LDNS_STATUS_MEM_ERR.
ldns_status ldns_str2rdf_aaaa | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert the str with an AAAA record into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 400 of file str2host.c.
References LDNS_IP6ADDRLEN, inet_pton(), LDNS_STATUS_INVALID_IP6, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_AAAA, LDNS_STATUS_OK, and LDNS_STATUS_MEM_ERR.
ldns_status ldns_str2rdf_str | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a string into wireformat (think txt record)
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted (NULL terminated) |
Definition at line 414 of file str2host.c.
References LDNS_STATUS_INVALID_STR, LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, LDNS_FREE, LDNS_STATUS_SYNTAX_BAD_ESCAPE, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_STR, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_apl | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert str with the apl record into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 449 of file str2host.c.
References LDNS_STATUS_INVALID_STR, LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, LDNS_FREE, inet_pton(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_APL, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_b64 | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert the string with the b64 data into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 559 of file str2host.c.
References LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_b64_pton(), LDNS_FREE, LDNS_STATUS_INVALID_B64, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_B64, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_b32_ext | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert the string with the b32 ext hex data into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 584 of file str2host.c.
References LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_b32_pton_extended_hex(), LDNS_FREE, LDNS_STATUS_INVALID_B32_EXT, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_B32_EXT, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_hex | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a hex value into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 611 of file str2host.c.
References LDNS_MAX_RDFLEN, LDNS_STATUS_LABEL_OVERFLOW, LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_hexdigit_to_int(), LDNS_FREE, LDNS_STATUS_ERR, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_HEX, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_nsec | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert string with nsec into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 657 of file str2host.c.
References LDNS_XMALLOC, LDNS_MAX_RDFLEN, LDNS_STATUS_MEM_ERR, LDNS_FREE, LDNS_STATUS_NULL, LDNS_MALLOC, ldns_buffer_new_frm_data(), LDNS_STATUS_OK, ldns_bget_token(), LDNS_STATUS_ERR, ldns_get_rr_type_by_name(), ldns_dnssec_create_nsec_bitmap(), LDNS_RR_TYPE_NSEC, and ldns_buffer_free().
ldns_status ldns_str2rdf_type | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a rrtype into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 705 of file str2host.c.
References ldns_get_rr_type_by_name(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_TYPE, LDNS_STATUS_OK, and LDNS_STATUS_MEM_ERR.
ldns_status ldns_str2rdf_class | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert string with a classname into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 716 of file str2host.c.
References ldns_get_rr_class_by_name(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_CLASS, LDNS_STATUS_OK, and LDNS_STATUS_MEM_ERR.
ldns_status ldns_str2rdf_cert_alg | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert an certificate algorithm value into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 730 of file str2host.c.
References ldns_lookup_by_name(), ldns_cert_algorithms, LDNS_STATUS_OK, ldns_struct_lookup_table::id, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT16, LDNS_STATUS_ERR, ldns_str2rdf_int16(), ldns_rdf2native_int16(), and LDNS_STATUS_CERT_BAD_ALGORITHM.
ldns_status ldns_str2rdf_alg | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert and algorithm value into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 761 of file str2host.c.
References ldns_lookup_by_name(), ldns_algorithms, LDNS_STATUS_OK, ldns_native2rdf_int8(), LDNS_RDF_TYPE_INT8, ldns_struct_lookup_table::id, LDNS_STATUS_ERR, and ldns_str2rdf_int8().
ldns_status ldns_str2rdf_unknown | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a string with a unknown RR into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
ldns_status ldns_str2rdf_tsig | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert string with a tsig? RR into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
ldns_status ldns_str2rdf_service | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert string with a protocol service into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
ldns_status ldns_str2rdf_loc | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a string with a LOC RR into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 847 of file str2host.c.
References LDNS_STATUS_INVALID_STR, isblank(), LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_LOC, LDNS_FREE, and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_wks | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert string with a WKS RR into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 1022 of file str2host.c.
References LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, LDNS_MALLOC, LDNS_FREE, ldns_buffer_new_frm_data(), LDNS_STATUS_OK, ldns_bget_token(), ldns_buffer_free(), LDNS_STATUS_INVALID_STR, LDNS_XREALLOC, ldns_set_bit(), ldns_rdf_new_frm_data(), and LDNS_RDF_TYPE_WKS.
ldns_status ldns_str2rdf_nsap | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a str with a NSAP RR into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 1132 of file str2host.c.
References LDNS_STATUS_INVALID_STR, and ldns_str2rdf_hex().
ldns_status ldns_str2rdf_atma | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a str with a ATMA RR into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 1151 of file str2host.c.
References ldns_str2rdf_hex(), and LDNS_STATUS_OK.
ldns_status ldns_str2rdf_ipseckey | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a str with a IPSECKEY RR into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 1171 of file str2host.c.
References LDNS_STATUS_OK, LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, LDNS_MALLOC, LDNS_FREE, ldns_buffer_new_frm_data(), ldns_bget_token(), ldns_buffer_free(), LDNS_STATUS_INVALID_STR, ldns_str2rdf_a(), ldns_str2rdf_aaaa(), ldns_str2rdf_dname(), ldns_str2rdf_b64(), ldns_rdf_free(), ldns_rdf_size(), ldns_rdf_data(), ldns_rdf_new_frm_data(), and LDNS_RDF_TYPE_IPSECKEY.
ldns_status ldns_str2rdf_dname | ( | ldns_rdf ** | rd, |
const char * | str | ||
) |
convert a dname string into wireformat
[in] | rd | the rdf where to put the data |
[in] | str | the string to be converted |
Definition at line 296 of file str2host.c.
References LDNS_MAX_DOMAINLEN, LDNS_STATUS_DOMAINNAME_OVERFLOW, LDNS_STATUS_DOMAINNAME_UNDERFLOW, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_DNAME, LDNS_STATUS_OK, LDNS_MAX_LABELLEN, LDNS_STATUS_LABEL_OVERFLOW, LDNS_STATUS_EMPTY_LABEL, LDNS_STATUS_SYNTAX_BAD_ESCAPE, and ldns_dname_str_absolute().