update.h File Reference

Defines functions to perform UPDATE queries. More...

Go to the source code of this file.

Functions

ldns_pktldns_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
ldns_status ldns_update_pkt_tsig_add (ldns_pkt *p, ldns_resolver *r)
 add tsig credentials to a packet from a resolver
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_adcount (const ldns_pkt *p)
 Get the zo count.
void ldns_update_set_zocount (ldns_pkt *p, uint16_t c)
 Set the zo count.
void ldns_update_set_prcount (ldns_pkt *p, uint16_t c)
 Set the pr count.
void ldns_update_set_upcount (ldns_pkt *p, uint16_t c)
 Set the up count.
void ldns_update_set_adcount (ldns_pkt *p, uint16_t c)
 Set the ad count.
ldns_status ldns_update_soa_mname (ldns_rdf *zone, ldns_resolver *r, ldns_rr_class class, ldns_rdf **mname)
ldns_status ldns_update_soa_zone_mname (const char *fqdn, ldns_resolver *r, ldns_rr_class class, ldns_rdf **zone_rdf, ldns_rdf **mname_rdf)


Detailed Description

Defines functions to perform UPDATE queries.

Definition in file update.h.


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.

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 269 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 275 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 281 of file update.c.

References ldns_pkt_nscount().

uint16_t ldns_update_adcount ( const ldns_pkt p  ) 

Get the zo count.

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

void ldns_update_set_zocount ( ldns_pkt p,
uint16_t  c 
)

Set the zo count.

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

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 299 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 305 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 311 of file update.c.

References ldns_pkt_set_arcount().

ldns_status ldns_update_soa_mname ( ldns_rdf zone,
ldns_resolver r,
ldns_rr_class  class,
ldns_rdf **  mname 
)

Definition at line 89 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  class,
ldns_rdf **  zone_rdf,
ldns_rdf **  mname_rdf 
)

Definition at line 128 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_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, and LDNS_STATUS_OK.


Generated on Wed Oct 10 16:24:41 2007 for ldns by  doxygen 1.5.2