/build/ldns-qX87Yo/ldns-1.8.4/str2host.c File Reference

Go to the source code of this file.

## Data Structures

struct | struct_svcparam_key_def

## Typedefs

typedef struct struct_svcparam_key_def | svcparam_key_def

## Functions

ldns_status | ldns_str2rdf_int16 (ldns_rdf **rd, const char *shortstr)
| convert a string to a int16 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 *salt_str)
ldns_status | ldns_str2rdf_period (ldns_rdf **rd, const char *period)
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_int8 (ldns_rdf **rd, const char *bytestr)
| convert a byte into wireformat
INLINE bool | parse_escape (uint8_t *ch_p, const char **str_p)
INLINE bool | parse_char (uint8_t *ch_p, const char **str_p)
ldns_status | ldns_str2rdf_dname (ldns_rdf **d, const char *str)
| convert a dname string into wireformat
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 an algorithm value into wireformat
ldns_status | ldns_str2rdf_certificate_usage (ldns_rdf **rd, const char *str)
| convert a tlsa certificate usage value into wireformat
ldns_status | ldns_str2rdf_selector (ldns_rdf **rd, const char *str)
| convert a tlsa selector value into wireformat
ldns_status | ldns_str2rdf_matching_type (ldns_rdf **rd, const char *str)
| convert a tlsa matching type value into wireformat
ldns_status | ldns_str2rdf_unknown (ATTR_UNUSED(ldns_rdf **rd), ATTR_UNUSED(const char *str))
ldns_status | ldns_str2rdf_service (ATTR_UNUSED(ldns_rdf **rd), ATTR_UNUSED(const char *str))
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_ilnp64 (ldns_rdf **rd, const char *str)
| convert 4 * 16bit hex separated by colons into wireformat
ldns_status | ldns_str2rdf_eui48 (ldns_rdf **rd, const char *str)
| convert 6 hex bytes separated by dashes into wireformat
ldns_status | ldns_str2rdf_eui64 (ldns_rdf **rd, const char *str)
| convert 8 hex bytes separated by dashes into wireformat
ldns_status | ldns_str2rdf_tag (ldns_rdf **rd, const char *str)
| Convert a non-zero sequence of US-ASCII letters and numbers into wireformat.
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.1., encoded as one bug chunk of data.
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.
ldns_status | ldns_str2rdf_amtrelay (ldns_rdf **rd, const char *str)
| Convert a "<precedence> <D-bit> <type> <relay>" encoding of the value field as specified in Section 4.3.1 of [draft-ietf-mboned-driad-amt-discovery], encoded as wireformat as specified in Section 4.2 of [draft-ietf-mboned-driad-amt-discovery].
INLINE bool | parse_escape2 (uint8_t *ch_p, const char **str_p)
ldns_status | svcparam_key2buffer_str (ldns_buffer *output, uint16_t key)
ldns_status | ldns_str2rdf_svcparams (ldns_rdf **rd, const char *str)
| Convert a series of "key[=<value>]" encodings to wireformat as described in [draft-ietf-dnsop-svcb-https].

## Typedef Documentation

## svcparam_key_def

typedef struct struct_svcparam_key_def svcparam_key_def

Definition at line 2184 of file str2host.c.

## Function Documentation

## ldns_str2rdf_int16()

ldns_status ldns_str2rdf_int16 | ( | ldns_rdf ** | rd,
|  | const char * | shortstr
| ) |  |

convert a string to a int16 in wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | shortstr | the string to be converted

Returns
  ldns_status

Definition at line 36 of file str2host.c.

References LDNS_FREE, LDNS_MALLOC, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT16, LDNS_STATUS_INVALID_INT, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_time()

ldns_status ldns_str2rdf_time | ( | ldns_rdf ** | rd,
|  | const char * | time
| ) |  |

convert a time string to a time value in wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | time | the string to be converted

Returns
  ldns_status

Definition at line 57 of file str2host.c.

References LDNS_FREE, LDNS_MALLOC, ldns_mktime_from_utc(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT32, LDNS_RDF_TYPE_TIME, LDNS_STATUS_ERR, LDNS_STATUS_INVALID_TIME, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_nsec3_salt()

ldns_status ldns_str2rdf_nsec3_salt | ( | ldns_rdf ** | rd,
|  | const char * | salt_str
| ) |  |

Definition at line 126 of file str2host.c.

References LDNS_FREE, ldns_hexdigit_to_int(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_NSEC3_SALT, LDNS_STATUS_INVALID_HEX, LDNS_STATUS_MEM_ERR, LDNS_STATUS_NULL, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_period()

ldns_status ldns_str2rdf_period | ( | ldns_rdf ** | rd,
|  | const char * | period
| ) |  |

Definition at line 178 of file str2host.c.

References ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_PERIOD, LDNS_STATUS_ERR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and ldns_str2period().

## ldns_str2rdf_int32()

ldns_status ldns_str2rdf_int32 | ( | ldns_rdf ** | rd,
|  | const char * | longstr
| ) |  |

convert a strings into a 4 byte int in wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | longstr | the string to be converted

Returns
  ldns_status

Definition at line 197 of file str2host.c.

References LDNS_FREE, LDNS_MALLOC, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT32, LDNS_STATUS_ERR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and LDNS_STATUS_SYNTAX_INTEGER_OVERFLOW.

## ldns_str2rdf_int8()

ldns_status ldns_str2rdf_int8 | ( | ldns_rdf ** | rd,
|  | const char * | bytestr
| ) |  |

convert a byte into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | bytestr | the string to be converted

Returns
  ldns_status

Definition at line 228 of file str2host.c.

References LDNS_FREE, LDNS_MALLOC, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT8, LDNS_STATUS_ERR, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## parse_escape()

INLINE bool parse_escape | ( | uint8_t * | ch_p,
|  | const char ** | str_p
| ) |  |

Definition at line 261 of file str2host.c.

## parse_char()

INLINE bool parse_char | ( | uint8_t * | ch_p,
|  | const char ** | str_p
| ) |  |

Definition at line 291 of file str2host.c.

References parse_escape().

## ldns_str2rdf_dname()

ldns_status ldns_str2rdf_dname | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a dname string into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 311 of file str2host.c.

References ldns_dname_str_absolute(), LDNS_MAX_DOMAINLEN, LDNS_MAX_LABELLEN, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_DNAME, LDNS_STATUS_DOMAINNAME_OVERFLOW, LDNS_STATUS_DOMAINNAME_UNDERFLOW, LDNS_STATUS_EMPTY_LABEL, LDNS_STATUS_LABEL_OVERFLOW, LDNS_STATUS_OK, LDNS_STATUS_SYNTAX_BAD_ESCAPE, and parse_escape().

## ldns_str2rdf_a()

ldns_status ldns_str2rdf_a | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert str with an A record into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 401 of file str2host.c.

References ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_A, LDNS_STATUS_INVALID_IP4, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_aaaa()

ldns_status ldns_str2rdf_aaaa | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert the str with an AAAA record into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 414 of file str2host.c.

References LDNS_IP6ADDRLEN, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_AAAA, LDNS_STATUS_INVALID_IP6, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_str()

ldns_status ldns_str2rdf_str | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a string into wireformat (think txt record)

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted (NULL terminated)

Returns
  ldns_status

Definition at line 428 of file str2host.c.

References LDNS_FREE, ldns_rdf_new(), LDNS_RDF_TYPE_STR, LDNS_STATUS_INVALID_STR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, LDNS_STATUS_SYNTAX_BAD_ESCAPE, LDNS_XMALLOC, LDNS_XREALLOC, and parse_char().

## ldns_str2rdf_apl()

ldns_status ldns_str2rdf_apl | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert str with the apl record into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 472 of file str2host.c.

References LDNS_FREE, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_APL, LDNS_STATUS_INVALID_STR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_b64()

ldns_status ldns_str2rdf_b64 | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert the string with the b64 data into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 583 of file str2host.c.

References ldns_b64_pton(), LDNS_FREE, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_B64, LDNS_STATUS_INVALID_B64, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_b32_ext()

ldns_status ldns_str2rdf_b32_ext | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert the string with the b32 ext hex data into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 613 of file str2host.c.

References ldns_b32_pton_extended_hex(), LDNS_FREE, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_B32_EXT, LDNS_STATUS_INVALID_B32_EXT, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_hex()

ldns_status ldns_str2rdf_hex | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a hex value into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 644 of file str2host.c.

References LDNS_FREE, ldns_hexdigit_to_int(), LDNS_MAX_RDFLEN, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_HEX, LDNS_STATUS_ERR, LDNS_STATUS_LABEL_OVERFLOW, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_nsec()

ldns_status ldns_str2rdf_nsec | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert string with nsec into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 690 of file str2host.c.

References ldns_bget_token(), ldns_buffer_free(), ldns_buffer_new_frm_data(), ldns_dnssec_create_nsec_bitmap(), LDNS_FREE, ldns_get_rr_type_by_name(), LDNS_MALLOC, LDNS_MAX_RDFLEN, LDNS_RR_TYPE_NSEC, LDNS_STATUS_ERR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_NULL, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_type()

ldns_status ldns_str2rdf_type | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a rrtype into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 738 of file str2host.c.

References ldns_get_rr_type_by_name(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_TYPE, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_class()

ldns_status ldns_str2rdf_class | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert string with a classname into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 749 of file str2host.c.

References ldns_get_rr_class_by_name(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_CLASS, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_cert_alg()

ldns_status ldns_str2rdf_cert_alg | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert an certificate algorithm value into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 763 of file str2host.c.

References ldns_struct_lookup_table::id, ldns_cert_algorithms, ldns_lookup_by_name(), ldns_rdf2native_int16(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_INT16, LDNS_STATUS_CERT_BAD_ALGORITHM, LDNS_STATUS_ERR, LDNS_STATUS_OK, and ldns_str2rdf_int16().

## ldns_str2rdf_alg()

ldns_status ldns_str2rdf_alg | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert an algorithm value into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 833 of file str2host.c.

References ldns_algorithms.

## ldns_str2rdf_certificate_usage()

ldns_status ldns_str2rdf_certificate_usage | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a tlsa certificate usage value into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 839 of file str2host.c.

## ldns_str2rdf_selector()

ldns_status ldns_str2rdf_selector | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a tlsa selector value into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 846 of file str2host.c.

## ldns_str2rdf_matching_type()

ldns_status ldns_str2rdf_matching_type | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a tlsa matching type value into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 852 of file str2host.c.

## ldns_str2rdf_unknown()

ldns_status ldns_str2rdf_unknown | ( | ATTR_UNUSED(ldns_rdf **rd) | ,
|  | ATTR_UNUSED(const char *str) |
| ) |  |

Definition at line 858 of file str2host.c.

References LDNS_STATUS_NOT_IMPL.

## ldns_str2rdf_service()

ldns_status ldns_str2rdf_service | ( | ATTR_UNUSED(ldns_rdf **rd) | ,
|  | ATTR_UNUSED(const char *str) |
| ) |  |

Definition at line 868 of file str2host.c.

References LDNS_STATUS_NOT_IMPL.

## ldns_str2rdf_loc()

ldns_status ldns_str2rdf_loc | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a string with a LOC RR into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 916 of file str2host.c.

References LDNS_FREE, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_LOC, LDNS_STATUS_INVALID_STR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_wks()

ldns_status ldns_str2rdf_wks | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert string with a WKS RR into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1091 of file str2host.c.

References ldns_bget_token(), ldns_buffer_free(), ldns_buffer_new_frm_data(), LDNS_FREE, LDNS_MALLOC, ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_WKS, ldns_set_bit(), LDNS_STATUS_INVALID_STR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, LDNS_XMALLOC, and LDNS_XREALLOC.

## ldns_str2rdf_nsap()

ldns_status ldns_str2rdf_nsap | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a str with a NSAP RR into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1236 of file str2host.c.

References LDNS_STATUS_INVALID_STR, and ldns_str2rdf_hex().

## ldns_str2rdf_atma()

ldns_status ldns_str2rdf_atma | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a str with a ATMA RR into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1255 of file str2host.c.

References LDNS_STATUS_OK, and ldns_str2rdf_hex().

## ldns_str2rdf_ipseckey()

ldns_status ldns_str2rdf_ipseckey | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert a str with a IPSECKEY RR into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1275 of file str2host.c.

References ldns_bget_token(), ldns_buffer_free(), ldns_buffer_new_frm_data(), LDNS_FREE, LDNS_MALLOC, ldns_rdf_data(), ldns_rdf_deep_free(), ldns_rdf_free(), ldns_rdf_new_frm_data(), ldns_rdf_size(), LDNS_RDF_TYPE_IPSECKEY, LDNS_STATUS_INVALID_STR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, ldns_str2rdf_a(), ldns_str2rdf_aaaa(), ldns_str2rdf_b64(), ldns_str2rdf_dname(), and LDNS_XMALLOC.

## ldns_str2rdf_ilnp64()

ldns_status ldns_str2rdf_ilnp64 | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert 4 * 16bit hex separated by colons into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1429 of file str2host.c.

References ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_ILNP64, LDNS_STATUS_INVALID_ILNP64, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_eui48()

ldns_status ldns_str2rdf_eui48 | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert 6 hex bytes separated by dashes into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1452 of file str2host.c.

References ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_EUI48, LDNS_STATUS_INVALID_EUI48, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_eui64()

ldns_status ldns_str2rdf_eui64 | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

convert 8 hex bytes separated by dashes into wireformat

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1475 of file str2host.c.

References ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_EUI64, LDNS_STATUS_INVALID_EUI64, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.

## ldns_str2rdf_tag()

ldns_status ldns_str2rdf_tag | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

Convert a non-zero sequence of US-ASCII letters and numbers into wireformat.

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1500 of file str2host.c.

References LDNS_FREE, ldns_rdf_new(), LDNS_RDF_TYPE_TAG, LDNS_STATUS_INVALID_TAG, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, and LDNS_XMALLOC.

## ldns_str2rdf_long_str()

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.1., encoded as one bug chunk of data.

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1529 of file str2host.c.

References LDNS_FREE, LDNS_MAX_RDFLEN, ldns_rdf_new(), LDNS_RDF_TYPE_LONG_STR, LDNS_STATUS_INVALID_STR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, LDNS_STATUS_SYNTAX_BAD_ESCAPE, LDNS_XMALLOC, LDNS_XREALLOC, and parse_char().

## ldns_str2rdf_hip()

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.

of [RFC5205], encoded as wireformat as specified in Section 5. of [RFC5205].

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1576 of file str2host.c.

References ldns_b64_pton(), LDNS_FREE, ldns_hexdigit_to_int(), LDNS_MAX_RDFLEN, ldns_rdf_new(), LDNS_RDF_TYPE_HIP, LDNS_STATUS_INVALID_B64, LDNS_STATUS_INVALID_HEX, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, LDNS_STATUS_SYNTAX_ERR, and LDNS_XMALLOC.

## ldns_str2rdf_amtrelay()

ldns_status ldns_str2rdf_amtrelay | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

Convert a "<precedence> <D-bit> <type> <relay>" encoding of the value field as specified in Section 4.3.1 of [draft-ietf-mboned-driad-amt-discovery], encoded as wireformat as specified in Section 4.2 of [draft-ietf-mboned-driad-amt-discovery].

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 1672 of file str2host.c.

References ldns_bget_token(), ldns_buffer_free(), ldns_buffer_new_frm_data(), LDNS_FREE, LDNS_MALLOC, ldns_rdf_data(), ldns_rdf_free(), ldns_rdf_new_frm_data(), ldns_rdf_size(), LDNS_RDF_TYPE_AMTRELAY, LDNS_STATUS_INVALID_STR, LDNS_STATUS_MEM_ERR, LDNS_STATUS_OK, ldns_str2rdf_a(), ldns_str2rdf_aaaa(), ldns_str2rdf_dname(), and LDNS_XMALLOC.

## parse_escape2()

INLINE bool parse_escape2 | ( | uint8_t * | ch_p,
|  | const char ** | str_p
| ) |  |

Definition at line 1892 of file str2host.c.

References parse_escape().

## svcparam_key2buffer_str()

ldns_status svcparam_key2buffer_str | ( | ldns_buffer * | output,
|  | uint16_t | key
| ) |  |

Definition at line 2201 of file str2host.c.

References ldns_buffer_printf(), LDNS_SVCPARAM_KEY_LAST_KEY, and struct_svcparam_key_def::str.

## ldns_str2rdf_svcparams()

ldns_status ldns_str2rdf_svcparams | ( | ldns_rdf ** | rd,
|  | const char * | str
| ) |  |

Convert a series of "key[=<value>]" encodings to wireformat as described in [draft-ietf-dnsop-svcb-https].

Parameters

  [out] | rd | the rdf where to put the data
  [in] | str | the string to be converted

Returns
  ldns_status

Definition at line 2331 of file str2host.c.

References LDNS_FREE, ldns_rdf_new(), LDNS_RDF_TYPE_SVCPARAMS, LDNS_STATUS_MEM_ERR, LDNS_STATUS_NULL, LDNS_STATUS_OK, LDNS_XMALLOC, and struct_svcparam_key_def::str.