Common definitions for LDNS.
ldns_edns_option * ldns_edns_clone(ldns_edns_option *edns)
clone an EDNS option
ldns_edns_option_list * ldns_edns_option_list_new(void)
allocates space for a new list of EDNS options
ldns_edns_enum_ede_code
Extended DNS Error (RFC 8914) codes.
@ LDNS_EDE_DNSSEC_INDETERMINATE
@ LDNS_EDE_UNSUPPORTED_DNSKEY_ALG
@ LDNS_EDE_RRSIGS_MISSING
@ LDNS_EDE_NO_REACHABLE_AUTHORITY
@ LDNS_EDE_SIGNATURE_EXPIRED
@ LDNS_EDE_STALE_NXDOMAIN_ANSWER
@ LDNS_EDE_NO_ZONE_KEY_BIT_SET
@ LDNS_EDE_DNSKEY_MISSING
@ LDNS_EDE_SIGNATURE_EXPIRED_BEFORE_VALID
@ LDNS_EDE_NOT_AUTHORITATIVE
@ LDNS_EDE_SIGNATURE_NOT_YET_VALID
@ LDNS_EDE_UNSUPPORTED_DS_DIGEST
uint8_t * ldns_edns_get_data(const ldns_edns_option *edns)
returns the EDNS option data.
ldns_buffer * ldns_edns_get_wireformat_buffer(const ldns_edns_option *edns)
serialise the EDNS option into wireformat.
void ldns_edns_option_list_free(ldns_edns_option_list *options_list)
free the EDNS option list.
enum ldns_enum_edns_option ldns_edns_option_code
enum ldns_edns_enum_ede_code ldns_edns_ede_code
ldns_status ldns_edns_ede_get_code(const ldns_edns_option *edns, uint16_t *ede_code)
extract the RFC 8914 extended error code value.
ldns_edns_option * ldns_edns_new_from_data(ldns_edns_option_code code, size_t size, const void *data)
allocates a new EDNS structure and fills it.
size_t ldns_edns_option_list_get_options_size(const ldns_edns_option_list *options_list)
returns the total size of all the individual EDNS options in the EDNS list.
ldns_edns_option * ldns_edns_option_list_get_option(const ldns_edns_option_list *options_list, size_t index)
returns the EDNS option as the specified index in the list of EDNS options.
ldns_edns_option_code ldns_edns_get_code(const ldns_edns_option *edns)
returns the option code of the EDNS data.
ldns_edns_option * ldns_edns_option_list_set_option(ldns_edns_option_list *options_list, ldns_edns_option *option, size_t index)
adds an EDNS option to the list of options at the specified index.
ldns_edns_option * ldns_edns_option_list_pop(ldns_edns_option_list *options_list)
removes and returns the EDNS option at the end of the list of options.
ldns_status ldns_edns_ede_get_text(const ldns_edns_option *edns, char **ede_text)
extract the optional RFC 8914 extended error code text.
signed char ldns_edns_option_list_push(ldns_edns_option_list *options_list, ldns_edns_option *option)
adds an EDNS option at the end of the list of options.
void ldns_edns_option_list_deep_free(ldns_edns_option_list *options_list)
size_t ldns_edns_get_size(const ldns_edns_option *edns)
returns the size of the EDNS data.
void ldns_edns_deep_free(ldns_edns_option *edns)
free the EDNS option.
ldns_buffer * ldns_edns_option_list2wireformat_buffer(const ldns_edns_option_list *option_list)
serializes all the EDNS options into a single wireformat buffer
size_t ldns_edns_option_list_get_count(const ldns_edns_option_list *options_list)
returns the number of options in the EDNS options list.
ldns_edns_option_list * ldns_edns_option_list_clone(ldns_edns_option_list *options_list)
clone the EDNS options list and it's contents
ldns_edns_option * ldns_edns_new(ldns_edns_option_code code, size_t size, void *data)
allocates a new EDNS structure and fills it.
void ldns_edns_free(ldns_edns_option *edns)
ldns_enum_edns_option
EDNS option codes.
@ LDNS_EDNS_CLIENT_SUBNET
enum ldns_enum_status ldns_status
implementation of buffers to ease operations
ldns_edns_option ** _options
The struct that stores an ordered EDNS option.
ldns_edns_option_code _code