update.c File Reference

Go to the source code of this file.

Functions

ldns_pktldns_update_pkt_new (ldns_rdf *zone_rdf, ldns_rr_class c, ldns_rr_list *pr_rrlist, ldns_rr_list *up_rrlist, ldns_rr_list *ad_rrlist)
 create an update packet from zone name, class and the rr lists
ldns_status ldns_update_pkt_tsig_add (ldns_pkt *p, ldns_resolver *r)
 add tsig credentials to a packet from a resolver
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.
uint16_t ldns_update_prcount (const ldns_pkt *p)
 Get the zo count.
uint16_t ldns_update_upcount (const ldns_pkt *p)
 Get the zo count.
uint16_t ldns_update_ad (const ldns_pkt *p)
 Get the zo count.
void ldns_update_set_zo (ldns_pkt *p, uint16_t v)
 Set the zo count.
void ldns_update_set_prcount (ldns_pkt *p, uint16_t v)
 Set the pr count.
void ldns_update_set_upcount (ldns_pkt *p, uint16_t v)
 Set the up count.
void ldns_update_set_adcount (ldns_pkt *p, uint16_t v)
 Set the ad count.

Function Documentation

ldns_pkt* ldns_update_pkt_new ( ldns_rdf zone_rdf,
ldns_rr_class  clas,
ldns_rr_list pr_rrlist,
ldns_rr_list up_rrlist,
ldns_rr_list ad_rrlist 
)

create an update packet from zone name, class and the rr lists

Parameters:
[in] zone_rdf name of the zone
[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)
Returns:
the new packet

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,
ldns_resolver r 
)

add tsig credentials to a packet from a resolver

Parameters:
[in] p packet to copy to
[in] r resolver to copy from
Returns:
status wether successfull or not

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 
)
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.

Parameters:
[in] p the packet
Returns:
the zo count

Definition at line 273 of file update.c.

References ldns_pkt_qdcount().

uint16_t ldns_update_prcount ( const ldns_pkt p  ) 

Get the zo count.

Parameters:
[in] p the packet
Returns:
the pr count

Definition at line 279 of file update.c.

References ldns_pkt_ancount().

uint16_t ldns_update_upcount ( const ldns_pkt p  ) 

Get the zo count.

Parameters:
[in] p the packet
Returns:
the up count

Definition at line 285 of file update.c.

References ldns_pkt_nscount().

uint16_t ldns_update_ad ( const ldns_pkt p  ) 

Get the zo count.

Parameters:
[in] p the packet
Returns:
the ad count

Definition at line 291 of file update.c.

References ldns_pkt_arcount().

void ldns_update_set_zo ( ldns_pkt p,
uint16_t  c 
)

Set the zo count.

Parameters:
[in] p the packet
[in] c the zo count to set

Definition at line 297 of file update.c.

References ldns_pkt_set_qdcount().

void ldns_update_set_prcount ( ldns_pkt p,
uint16_t  c 
)

Set the pr count.

Parameters:
[in] p the packet
[in] c the pr count to set

Definition at line 303 of file update.c.

References ldns_pkt_set_ancount().

void ldns_update_set_upcount ( ldns_pkt p,
uint16_t  c 
)

Set the up count.

Parameters:
[in] p the packet
[in] c the up count to set

Definition at line 309 of file update.c.

References ldns_pkt_set_nscount().

void ldns_update_set_adcount ( ldns_pkt p,
uint16_t  c 
)

Set the ad count.

Parameters:
[in] p the packet
[in] c the ad count to set

Definition at line 315 of file update.c.

References ldns_pkt_set_arcount().


Generated on 11 May 2016 for ldns by  doxygen 1.6.1