31 #define LDNS_MAX_RDFLEN 65535 33 #define LDNS_RDF_SIZE_BYTE 1 34 #define LDNS_RDF_SIZE_WORD 2 35 #define LDNS_RDF_SIZE_DOUBLEWORD 4 36 #define LDNS_RDF_SIZE_6BYTES 6 37 #define LDNS_RDF_SIZE_8BYTES 8 38 #define LDNS_RDF_SIZE_16BYTES 16 40 #define LDNS_NSEC3_VARS_OPTOUT_MASK 0x01 434 uint8_t *hit_size, uint8_t** hit,
435 uint16_t *pk_size, uint8_t** pk);
448 uint8_t hit_size, uint8_t *hit, uint16_t pk_size, uint8_t *pk);
int ldns_rdf_compare(const ldns_rdf *rd1, const ldns_rdf *rd2)
compares two rdf's on their wire formats.
uint8_t ldns_rdf2native_int8(const ldns_rdf *rd)
returns the native uint8_t representation from the rdf.
void ldns_rdf_free(ldns_rdf *rd)
frees a rdf structure, leaving the data pointer intact.
enum ldns_enum_cert_algorithm ldns_cert_algorithm
ldns_rdf * ldns_native2rdf_int32(ldns_rdf_type type, uint32_t value)
returns an rdf that contains the given int32 value.
ldns_rdf * ldns_native2rdf_int16_data(size_t size, uint8_t *data)
returns an int16_data rdf that contains the data in the given array, preceded by an int16 specifying ...
ldns_rdf_type ldns_rdf_get_type(const ldns_rdf *rd)
returns the type of the rdf.
ldns_status ldns_rdf_new_frm_fp_l(ldns_rdf **r, ldns_rdf_type type, FILE *fp, int *line_nr)
creates a new rdf from a file containing a string.
time_t ldns_rdf2native_time_t(const ldns_rdf *rd)
returns the native time_t representation from the rdf.
ldns_status ldns_rdf_hip_get_alg_hit_pk(ldns_rdf *rdf, uint8_t *alg, uint8_t *hit_size, uint8_t **hit, uint16_t *pk_size, uint8_t **pk)
Gets the algorithm value, the HIT and Public Key data from the rdf with type LDNS_RDF_TYPE_HIP.
void ldns_rdf_set_size(ldns_rdf *rd, size_t size)
sets the size of the rdf.
uint8_t * ldns_rdf_data(const ldns_rdf *rd)
returns the data of the rdf.
ldns_enum_rdf_type
The different types of RDATA fields.
protocol and port bitmaps
A non-zero sequence of US-ASCII letters and numbers in lower case.
A <character-string> encoding of the value field as specified [RFC1035], Section 5....
size_t ldns_rdf_size(const ldns_rdf *rd)
returns the size of the rdf.
ldns_enum_cert_algorithm
algorithms used in CERT rrs
uint32_t ldns_str2period(const char *nptr, const char **endptr)
converts a ttl value (like 5d2h) to a long.
void ldns_rdf_set_type(ldns_rdf *rd, ldns_rdf_type type)
sets the size of the rdf.
Defines error numbers and functions to translate those to a readable string.
ldns_rdf * ldns_rdf_new(ldns_rdf_type type, size_t size, void *data)
allocates a new rdf structure and fills it.
ldns_rdf * ldns_rdf_new_frm_str(ldns_rdf_type type, const char *str)
creates a new rdf from a string.
enum ldns_enum_rdf_type ldns_rdf_type
Since RFC7218 TLSA records can be given with mnemonics, hence these rdata field types.
ldns_rdf * ldns_native2rdf_int16(ldns_rdf_type type, uint16_t value)
returns the rdf containing the native uint16_t representation.
void * _data
Pointer to the data (raw octets)
draft-ietf-mboned-driad-amt-discovery
variable length any type rdata where the length is specified by the first 2 bytes
uint32_t ldns_rdf2native_int32(const ldns_rdf *rd)
returns the native uint32_t representation from the rdf.
ldns_rdf * ldns_rdf_clone(const ldns_rdf *rd)
clones a rdf structure.
void ldns_rdf_deep_free(ldns_rdf *rd)
frees a rdf structure and frees the data.
ldns_rdf * ldns_rdf_address_reverse(const ldns_rdf *rd)
reverses an rdf, only actually useful for AAAA and A records.
ldns_status ldns_octet(char *word, size_t *length)
removes \DDD, \[space] and other escapes from the input.
ldns_status ldns_rdf_hip_new_frm_alg_hit_pk(ldns_rdf **rdf, uint8_t alg, uint8_t hit_size, uint8_t *hit, uint16_t pk_size, uint8_t *pk)
Creates a new LDNS_RDF_TYPE_HIP rdf from given data.
nsec3 base32 string (with length byte on wire
enum ldns_enum_status ldns_status
ldns_rdf * ldns_native2rdf_int8(ldns_rdf_type type, uint8_t value)
returns the rdf containing the native uint8_t repr.
size_t _size
The size of the data (in octets)
4 shorts represented as 4 * 16 bit hex numbers separated by colons.
Resource record data field.
Represents the Public Key Algorithm, HIT and Public Key fields for the HIP RR types.
Common definitions for LDNS.
void ldns_rdf_set_data(ldns_rdf *rd, void *data)
sets the size of the rdf.
ldns_rdf * ldns_rdf_new_frm_data(ldns_rdf_type type, size_t size, const void *data)
allocates a new rdf structure and fills it.
ldns_rdf_type _type
The type of the data.
8 * 8 bit hex numbers separated by dashes.
ldns_status ldns_rdf_new_frm_fp(ldns_rdf **r, ldns_rdf_type type, FILE *fp)
creates a new rdf from a file containing a string.
6 * 8 bit hex numbers separated by dashes.
uint16_t ldns_rdf2native_int16(const ldns_rdf *rd)
returns the native uint16_t representation from the rdf.