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>
24 * create an update packet from zone name, class and the rr lists
25 * \param[in] zone_rdf name of the zone
26 * \param[in] clas zone class
27 * \param[in] pr_rrlist list of Prerequisite Section RRs
28 * \param[in] up_rrlist list of Updates Section RRs
29 * \param[in] ad_rrlist list of Additional Data Section RRs (currently unused)
30 * \return the new packet
32 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);
35 * add tsig credentials to
36 * a packet from a resolver
37 * \param[in] p packet to copy to
38 * \param[in] r resolver to copy from
40 * \return status wether successfull or not
42 ldns_status ldns_update_pkt_tsig_add(ldns_pkt *p, ldns_resolver *r);
44 /* access functions */
48 * \param[in] p the packet
49 * \return the zo count
51 uint16_t ldns_update_zocount(const ldns_pkt *p);
54 * \param[in] p the packet
55 * \return the pr count
57 uint16_t ldns_update_prcount(const ldns_pkt *p);
60 * \param[in] p the packet
61 * \return the up count
63 uint16_t ldns_update_upcount(const ldns_pkt *p);
66 * \param[in] p the packet
67 * \return the ad count
69 uint16_t ldns_update_ad(const ldns_pkt *p);
72 * \param[in] p the packet
73 * \param[in] c the zo count to set
75 void ldns_update_set_zo(ldns_pkt *p, uint16_t c);
78 * \param[in] p the packet
79 * \param[in] c the pr count to set
81 void ldns_update_set_prcount(ldns_pkt *p, uint16_t c);
84 * \param[in] p the packet
85 * \param[in] c the up count to set
87 void ldns_update_set_upcount(ldns_pkt *p, uint16_t c);
90 * \param[in] p the packet
91 * \param[in] c the ad count to set
93 void ldns_update_set_adcount(ldns_pkt *p, uint16_t c);
95 /* soa functions that need to be configured */
97 * Not sure if we want to keep these like this, therefore
100 ldns_status ldns_update_soa_mname(ldns_rdf *zone, ldns_resolver *r, ldns_rr_class c, ldns_rdf **mname);
102 * Not sure if we want to keep these like this, therefore
105 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);
107 #endif /* LDNS_UPDATE_H */