update.h
Go to the documentation of this file.
1 /*
2  * update.h
3  *
4  * Functions for RFC 2136 Dynamic Update
5  *
6  * Copyright (c) 2005-2008, NLnet Labs. All rights reserved.
7  *
8  * See LICENSE for the license.
9  */
10 
18 #ifndef LDNS_UPDATE_H
19 #define LDNS_UPDATE_H
20 
21 #include <ldns/resolver.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
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);
38 
48 
49 /* access functions */
50 
56 uint16_t ldns_update_zocount(const ldns_pkt *p);
62 uint16_t ldns_update_prcount(const ldns_pkt *p);
68 uint16_t ldns_update_upcount(const ldns_pkt *p);
74 uint16_t ldns_update_ad(const ldns_pkt *p);
80 void ldns_update_set_zo(ldns_pkt *p, uint16_t c);
86 void ldns_update_set_prcount(ldns_pkt *p, uint16_t c);
92 void ldns_update_set_upcount(ldns_pkt *p, uint16_t c);
98 void ldns_update_set_adcount(ldns_pkt *p, uint16_t c);
99 
100 /* soa functions that need to be configured */
101 /*
102  * Not sure if we want to keep these like this, therefore
103  * not documented
104  */
106 /*
107  * Not sure if we want to keep these like this, therefore
108  * not documented
109  */
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);
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif /* LDNS_UPDATE_H */
enum ldns_enum_status ldns_status
Definition: error.h:146
Defines the ldns_resolver structure, a stub resolver that can send queries and parse answers.
enum ldns_enum_rr_class ldns_rr_class
Definition: rr.h:61
DNS packet.
Definition: packet.h:235
Resource record data field.
Definition: rdata.h:197
DNS stub resolver structure.
Definition: resolver.h:60
List or Set of Resource Records.
Definition: rr.h:338
uint16_t ldns_update_ad(const ldns_pkt *p)
Get the zo count.
Definition: update.c:298
void ldns_update_set_zo(ldns_pkt *p, uint16_t c)
Set the zo count.
Definition: update.c:304
uint16_t ldns_update_upcount(const ldns_pkt *p)
Get the zo count.
Definition: update.c:292
uint16_t ldns_update_zocount(const ldns_pkt *p)
Get the zo count.
Definition: update.c:280
void ldns_update_set_prcount(ldns_pkt *p, uint16_t c)
Set the pr count.
Definition: update.c:310
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)
Definition: update.c:130
void ldns_update_set_upcount(ldns_pkt *p, uint16_t c)
Set the up count.
Definition: update.c:316
uint16_t ldns_update_prcount(const ldns_pkt *p)
Get the zo count.
Definition: update.c:286
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)
create an update packet from zone name, class and the rr lists
Definition: update.c:27
void ldns_update_set_adcount(ldns_pkt *p, uint16_t c)
Set the ad count.
Definition: update.c:322
ldns_status ldns_update_pkt_tsig_add(ldns_pkt *p, const ldns_resolver *r)
add tsig credentials to a packet from a resolver
Definition: update.c:70
ldns_status ldns_update_soa_mname(ldns_rdf *zone, ldns_resolver *r, ldns_rr_class c, ldns_rdf **mname)
Definition: update.c:90