Go to the source code of this file.
Functions | |
ldns_pkt * | ldns_update_pkt_new (ldns_rdf *zone_rdf, ldns_rr_class c, const ldns_rr_list *pr_rrlist, const ldns_rr_list *up_rrlist, const ldns_rr_list *ad_rrlist) |
create an update packet from zone name, class and the rr lists More... | |
ldns_status | ldns_update_pkt_tsig_add (ldns_pkt *p, const ldns_resolver *r) |
add tsig credentials to a packet from a resolver More... | |
ldns_status | ldns_update_soa_mname (ldns_rdf *zone, ldns_resolver *r, ldns_rr_class c, ldns_rdf **mname) |
ldns_status | ldns_update_soa_zone_mname (const char *fqdn, ldns_resolver *r, ldns_rr_class c, ldns_rdf **zone_rdf, ldns_rdf **mname_rdf) |
uint16_t | ldns_update_zocount (const ldns_pkt *p) |
Get the zo count. More... | |
uint16_t | ldns_update_prcount (const ldns_pkt *p) |
Get the zo count. More... | |
uint16_t | ldns_update_upcount (const ldns_pkt *p) |
Get the zo count. More... | |
uint16_t | ldns_update_ad (const ldns_pkt *p) |
Get the zo count. More... | |
void | ldns_update_set_zo (ldns_pkt *p, uint16_t v) |
Set the zo count. More... | |
void | ldns_update_set_prcount (ldns_pkt *p, uint16_t v) |
Set the pr count. More... | |
void | ldns_update_set_upcount (ldns_pkt *p, uint16_t v) |
Set the up count. More... | |
void | ldns_update_set_adcount (ldns_pkt *p, uint16_t v) |
Set the ad count. More... | |
ldns_pkt* ldns_update_pkt_new | ( | ldns_rdf * | zone_rdf, |
ldns_rr_class | clas, | ||
const ldns_rr_list * | pr_rrlist, | ||
const ldns_rr_list * | up_rrlist, | ||
const ldns_rr_list * | ad_rrlist | ||
) |
create an update packet from zone name, class and the rr lists
[in] | zone_rdf | name of the zone The returned packet will take ownership of zone_rdf, so the caller should not free it |
[in] | clas | zone class |
[in] | pr_rrlist | list of Prerequisite Section RRs |
[in] | up_rrlist | list of Updates Section RRs |
[in] | ad_rrlist | list of Additional Data Section RRs (currently unused) |
Definition at line 27 of file update.c.
References ldns_struct_pkt::_additional, ldns_struct_pkt::_answer, ldns_struct_pkt::_authority, LDNS_PACKET_UPDATE, ldns_pkt_query_new(), ldns_pkt_set_additional(), ldns_pkt_set_answer(), ldns_pkt_set_authority(), ldns_pkt_set_opcode(), LDNS_RD, LDNS_RR_CLASS_IN, ldns_rr_list_clone(), ldns_rr_list_deep_free(), ldns_rr_list_rr_count(), LDNS_RR_TYPE_SOA, ldns_update_set_adcount(), ldns_update_set_prcount(), and ldns_update_set_upcount().
ldns_status ldns_update_pkt_tsig_add | ( | ldns_pkt * | p, |
const ldns_resolver * | r | ||
) |
add tsig credentials to a packet from a resolver
[in] | p | packet to copy to |
[in] | r | resolver to copy from |
Definition at line 70 of file update.c.
References ldns_pkt_tsig_sign(), ldns_resolver_tsig_algorithm(), ldns_resolver_tsig_keydata(), ldns_resolver_tsig_keyname(), and LDNS_STATUS_OK.
ldns_status ldns_update_soa_mname | ( | ldns_rdf * | zone, |
ldns_resolver * | r, | ||
ldns_rr_class | c, | ||
ldns_rdf ** | mname | ||
) |
Definition at line 90 of file update.c.
References ldns_pkt_answer(), ldns_pkt_free(), ldns_pkt_query_new(), ldns_pkt_set_random_id(), LDNS_RD, ldns_rdf_clone(), ldns_resolver_send_pkt(), ldns_rr_get_type(), ldns_rr_list_pop_rr(), ldns_rr_rdf(), LDNS_RR_TYPE_SOA, LDNS_STATUS_ERR, and LDNS_STATUS_OK.
ldns_status ldns_update_soa_zone_mname | ( | const char * | fqdn, |
ldns_resolver * | r, | ||
ldns_rr_class | c, | ||
ldns_rdf ** | zone_rdf, | ||
ldns_rdf ** | mname_rdf | ||
) |
Definition at line 130 of file update.c.
References ldns_dname_new_frm_str(), ldns_pkt_ancount(), ldns_pkt_answer(), ldns_pkt_authority(), ldns_pkt_free(), ldns_pkt_query_new(), ldns_pkt_set_random_id(), LDNS_RD, ldns_rdf_clone(), ldns_rdf_compare(), ldns_resolver_clone(), ldns_resolver_free(), ldns_resolver_nameserver_count(), ldns_resolver_nameservers(), ldns_resolver_push_nameserver(), ldns_resolver_send_pkt(), ldns_resolver_set_random(), ldns_rr_get_type(), ldns_rr_list_pop_rr(), ldns_rr_owner(), ldns_rr_rdf(), LDNS_RR_TYPE_A, LDNS_RR_TYPE_SOA, LDNS_STATUS_ERR, LDNS_STATUS_MEM_ERR, and LDNS_STATUS_OK.
uint16_t ldns_update_zocount | ( | const ldns_pkt * | p | ) |
Get the zo count.
[in] | p | the packet |
Definition at line 280 of file update.c.
References ldns_pkt_qdcount().
uint16_t ldns_update_prcount | ( | const ldns_pkt * | p | ) |
Get the zo count.
[in] | p | the packet |
Definition at line 286 of file update.c.
References ldns_pkt_ancount().
uint16_t ldns_update_upcount | ( | const ldns_pkt * | p | ) |
Get the zo count.
[in] | p | the packet |
Definition at line 292 of file update.c.
References ldns_pkt_nscount().
uint16_t ldns_update_ad | ( | const ldns_pkt * | p | ) |
Get the zo count.
[in] | p | the packet |
Definition at line 298 of file update.c.
References ldns_pkt_arcount().
void ldns_update_set_zo | ( | ldns_pkt * | p, |
uint16_t | c | ||
) |
Set the zo count.
[in] | p | the packet |
[in] | c | the zo count to set |
Definition at line 304 of file update.c.
References ldns_pkt_set_qdcount().
void ldns_update_set_prcount | ( | ldns_pkt * | p, |
uint16_t | c | ||
) |
Set the pr count.
[in] | p | the packet |
[in] | c | the pr count to set |
Definition at line 310 of file update.c.
References ldns_pkt_set_ancount().
void ldns_update_set_upcount | ( | ldns_pkt * | p, |
uint16_t | c | ||
) |
Set the up count.
[in] | p | the packet |
[in] | c | the up count to set |
Definition at line 316 of file update.c.
References ldns_pkt_set_nscount().
void ldns_update_set_adcount | ( | ldns_pkt * | p, |
uint16_t | c | ||
) |
Set the ad count.
[in] | p | the packet |
[in] | c | the ad count to set |
Definition at line 322 of file update.c.
References ldns_pkt_set_arcount().