4 * Functions for RFC 2136 Dynamic Update
6 * Copyright (c) 2005-2008, NLnet Labs. All rights reserved.
8 * See LICENSE for the license.
14 * Defines functions to perform UPDATE queries
21 #include <ldns/resolver.h>
28 * create an update packet from zone name, class and the rr lists
29 * \param[in] zone_rdf name of the zone
30 * \param[in] clas zone class
31 * \param[in] pr_rrlist list of Prerequisite Section RRs
32 * \param[in] up_rrlist list of Updates Section RRs
33 * \param[in] ad_rrlist list of Additional Data Section RRs (currently unused)
34 * \return the new packet
36 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);
39 * add tsig credentials to
40 * a packet from a resolver
41 * \param[in] p packet to copy to
42 * \param[in] r resolver to copy from
44 * \return status wether successfull or not
46 ldns_status ldns_update_pkt_tsig_add(ldns_pkt *p, ldns_resolver *r);
48 /* access functions */
52 * \param[in] p the packet
53 * \return the zo count
55 uint16_t ldns_update_zocount(const ldns_pkt *p);
58 * \param[in] p the packet
59 * \return the pr count
61 uint16_t ldns_update_prcount(const ldns_pkt *p);
64 * \param[in] p the packet
65 * \return the up count
67 uint16_t ldns_update_upcount(const ldns_pkt *p);
70 * \param[in] p the packet
71 * \return the ad count
73 uint16_t ldns_update_ad(const ldns_pkt *p);
76 * \param[in] p the packet
77 * \param[in] c the zo count to set
79 void ldns_update_set_zo(ldns_pkt *p, uint16_t c);
82 * \param[in] p the packet
83 * \param[in] c the pr count to set
85 void ldns_update_set_prcount(ldns_pkt *p, uint16_t c);
88 * \param[in] p the packet
89 * \param[in] c the up count to set
91 void ldns_update_set_upcount(ldns_pkt *p, uint16_t c);
94 * \param[in] p the packet
95 * \param[in] c the ad count to set
97 void ldns_update_set_adcount(ldns_pkt *p, uint16_t c);
99 /* soa functions that need to be configured */
101 * Not sure if we want to keep these like this, therefore
104 ldns_status ldns_update_soa_mname(ldns_rdf *zone, ldns_resolver *r, ldns_rr_class c, ldns_rdf **mname);
106 * Not sure if we want to keep these like this, therefore
109 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);
115 #endif /* LDNS_UPDATE_H */