Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ldns/rdata.h
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | enum ldns_enum_rdf_type | ||||
/** Since RFC7218 TLSA records can be given with mnemonics, | /** Since RFC7218 TLSA records can be given with mnemonics, | ||||
* hence these rdata field types. But as with DNSKEYs, the output | * hence these rdata field types. But as with DNSKEYs, the output | ||||
* is always numeric. | * is always numeric. | ||||
*/ | */ | ||||
LDNS_RDF_TYPE_CERTIFICATE_USAGE, | LDNS_RDF_TYPE_CERTIFICATE_USAGE, | ||||
LDNS_RDF_TYPE_SELECTOR, | LDNS_RDF_TYPE_SELECTOR, | ||||
LDNS_RDF_TYPE_MATCHING_TYPE, | LDNS_RDF_TYPE_MATCHING_TYPE, | ||||
/** draft-ietf-mboned-driad-amt-discovery **/ | |||||
LDNS_RDF_TYPE_AMTRELAY, | |||||
/** draft-ietf-dnsop-svcb-https **/ | |||||
LDNS_RDF_TYPE_SVCPARAMS, | |||||
/* Aliases */ | /* Aliases */ | ||||
LDNS_RDF_TYPE_BITMAP = LDNS_RDF_TYPE_NSEC | LDNS_RDF_TYPE_BITMAP = LDNS_RDF_TYPE_NSEC | ||||
}; | }; | ||||
typedef enum ldns_enum_rdf_type ldns_rdf_type; | typedef enum ldns_enum_rdf_type ldns_rdf_type; | ||||
/** | /** | ||||
* algorithms used in CERT rrs | * algorithms used in CERT rrs | ||||
*/ | */ | ||||
enum ldns_enum_cert_algorithm | enum ldns_enum_cert_algorithm | ||||
{ | { | ||||
LDNS_CERT_PKIX = 1, | LDNS_CERT_PKIX = 1, | ||||
LDNS_CERT_SPKI = 2, | LDNS_CERT_SPKI = 2, | ||||
LDNS_CERT_PGP = 3, | LDNS_CERT_PGP = 3, | ||||
LDNS_CERT_IPKIX = 4, | LDNS_CERT_IPKIX = 4, | ||||
LDNS_CERT_ISPKI = 5, | LDNS_CERT_ISPKI = 5, | ||||
LDNS_CERT_IPGP = 6, | LDNS_CERT_IPGP = 6, | ||||
LDNS_CERT_ACPKIX = 7, | LDNS_CERT_ACPKIX = 7, | ||||
LDNS_CERT_IACPKIX = 8, | LDNS_CERT_IACPKIX = 8, | ||||
LDNS_CERT_URI = 253, | LDNS_CERT_URI = 253, | ||||
LDNS_CERT_OID = 254 | LDNS_CERT_OID = 254 | ||||
}; | }; | ||||
typedef enum ldns_enum_cert_algorithm ldns_cert_algorithm; | typedef enum ldns_enum_cert_algorithm ldns_cert_algorithm; | ||||
/** | |||||
* keys types in SVCPARAMS rdata fields | |||||
*/ | |||||
enum ldns_enum_svcparam_key | |||||
{ | |||||
LDNS_SVCPARAM_KEY_MANDATORY = 0, | |||||
LDNS_SVCPARAM_KEY_ALPN = 1, | |||||
LDNS_SVCPARAM_KEY_NO_DEFAULT_ALPN = 2, | |||||
LDNS_SVCPARAM_KEY_PORT = 3, | |||||
LDNS_SVCPARAM_KEY_IPV4HINT = 4, | |||||
LDNS_SVCPARAM_KEY_ECH = 5, | |||||
LDNS_SVCPARAM_KEY_IPV6HINT = 6, | |||||
LDNS_SVCPARAM_KEY_DOHPATH = 7, | |||||
LDNS_SVCPARAM_KEY_LAST_KEY = 7, | |||||
LDNS_SVCPARAM_KEY_RESERVED = 65535 | |||||
}; | |||||
typedef enum ldns_enum_svcparam_key ldns_svcparam_key; | |||||
/** | /** | ||||
* Resource record data field. | * Resource record data field. | ||||
* | * | ||||
* The data is a network ordered array of bytes, which size is specified by | * The data is a network ordered array of bytes, which size is specified by | ||||
* the (16-bit) size field. To correctly parse it, use the type | * the (16-bit) size field. To correctly parse it, use the type | ||||
* specified in the (16-bit) type field with a value from \ref ldns_rdf_type. | * specified in the (16-bit) type field with a value from \ref ldns_rdf_type. | ||||
*/ | */ | ||||
struct ldns_struct_rdf | struct ldns_struct_rdf | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
uint8_t *ldns_rdf_data(const ldns_rdf *rd); | uint8_t *ldns_rdf_data(const ldns_rdf *rd); | ||||
/* creator functions */ | /* creator functions */ | ||||
/** | /** | ||||
* allocates a new rdf structure and fills it. | * allocates a new rdf structure and fills it. | ||||
* This function DOES NOT copy the contents from | * This function DOES NOT copy the contents from | ||||
* the buffer, unlinke ldns_rdf_new_frm_data() | * the buffer, unlike ldns_rdf_new_frm_data() | ||||
* \param[in] type type of the rdf | * \param[in] type type of the rdf | ||||
* \param[in] size size of the buffer | * \param[in] size size of the buffer | ||||
* \param[in] data pointer to the buffer to be copied | * \param[in] data pointer to the buffer to be copied | ||||
* \return the new rdf structure or NULL on failure | * \return the new rdf structure or NULL on failure | ||||
*/ | */ | ||||
ldns_rdf *ldns_rdf_new(ldns_rdf_type type, size_t size, void *data); | ldns_rdf *ldns_rdf_new(ldns_rdf_type type, size_t size, void *data); | ||||
/** | /** | ||||
* allocates a new rdf structure and fills it. | * allocates a new rdf structure and fills it. | ||||
* This function _does_ copy the contents from | * This function _does_ copy the contents from | ||||
* the buffer, unlinke ldns_rdf_new() | * the buffer, unlike ldns_rdf_new() | ||||
* \param[in] type type of the rdf | * \param[in] type type of the rdf | ||||
* \param[in] size size of the buffer | * \param[in] size size of the buffer | ||||
* \param[in] data pointer to the buffer to be copied | * \param[in] data pointer to the buffer to be copied | ||||
* \return the new rdf structure or NULL on failure | * \return the new rdf structure or NULL on failure | ||||
*/ | */ | ||||
ldns_rdf *ldns_rdf_new_frm_data(ldns_rdf_type type, size_t size, const void *data); | ldns_rdf *ldns_rdf_new_frm_data(ldns_rdf_type type, size_t size, const void *data); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |