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 * The returned packet will take ownership of zone_rdf, so the caller should not free it
31 * \param[in] clas zone class
32 * \param[in] pr_rrlist list of Prerequisite Section RRs
33 * \param[in] up_rrlist list of Updates Section RRs
34 * \param[in] ad_rrlist list of Additional Data Section RRs (currently unused)
35 * \return the new packet
37 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);
40 * add tsig credentials to
41 * a packet from a resolver
42 * \param[in] p packet to copy to
43 * \param[in] r resolver to copy from
45 * \return status wether successfull or not
47 ldns_status ldns_update_pkt_tsig_add(ldns_pkt *p, const ldns_resolver *r);
49 /* access functions */
53 * \param[in] p the packet
54 * \return the zo count
56 uint16_t ldns_update_zocount(const ldns_pkt *p);
59 * \param[in] p the packet
60 * \return the pr count
62 uint16_t ldns_update_prcount(const ldns_pkt *p);
65 * \param[in] p the packet
66 * \return the up count
68 uint16_t ldns_update_upcount(const ldns_pkt *p);
71 * \param[in] p the packet
72 * \return the ad count
74 uint16_t ldns_update_ad(const ldns_pkt *p);
77 * \param[in] p the packet
78 * \param[in] c the zo count to set
80 void ldns_update_set_zo(ldns_pkt *p, uint16_t c);
83 * \param[in] p the packet
84 * \param[in] c the pr count to set
86 void ldns_update_set_prcount(ldns_pkt *p, uint16_t c);
89 * \param[in] p the packet
90 * \param[in] c the up count to set
92 void ldns_update_set_upcount(ldns_pkt *p, uint16_t c);
95 * \param[in] p the packet
96 * \param[in] c the ad count to set
98 void ldns_update_set_adcount(ldns_pkt *p, uint16_t c);
100 /* soa functions that need to be configured */
102 * Not sure if we want to keep these like this, therefore
105 ldns_status ldns_update_soa_mname(ldns_rdf *zone, ldns_resolver *r, ldns_rr_class c, ldns_rdf **mname);
107 * Not sure if we want to keep these like this, therefore
110 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);
116 #endif /* LDNS_UPDATE_H */