update.h
Go to the documentation of this file.
/*
* update.h
*
* Functions for RFC 2136 Dynamic Update
*
* Copyright (c) 2005-2008, NLnet Labs. All rights reserved.
*
* See LICENSE for the license.
*/
#ifndef LDNS_UPDATE_H
#define LDNS_UPDATE_H
#include <ldns/resolver.h>
#ifdef __cplusplus
extern "C" {
#endif
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);
ldns_status ldns_update_pkt_tsig_add(ldns_pkt *p, const ldns_resolver *r);
/* access functions */
uint16_t ldns_update_zocount(const ldns_pkt *p);
uint16_t ldns_update_prcount(const ldns_pkt *p);
uint16_t ldns_update_upcount(const ldns_pkt *p);
uint16_t ldns_update_ad(const ldns_pkt *p);
void ldns_update_set_zo(ldns_pkt *p, uint16_t c);
void ldns_update_set_prcount(ldns_pkt *p, uint16_t c);
void ldns_update_set_upcount(ldns_pkt *p, uint16_t c);
void ldns_update_set_adcount(ldns_pkt *p, uint16_t c);
/* soa functions that need to be configured */
/*
* Not sure if we want to keep these like this, therefore
* not documented
*/
ldns_status ldns_update_soa_mname(ldns_rdf *zone, ldns_resolver *r, ldns_rr_class c, ldns_rdf **mname);
/*
* Not sure if we want to keep these like this, therefore
* not documented
*/
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);
#ifdef __cplusplus
}
#endif
#endif /* LDNS_UPDATE_H */
ldns_status
enum ldns_enum_status ldns_status
Definition error.h:148
ldns_pkt
struct ldns_struct_pkt ldns_pkt
Definition packet.h:272
ldns_rdf
struct ldns_struct_rdf ldns_rdf
Definition rdata.h:205
resolver.h
Defines the ldns_resolver structure, a stub resolver that can send queries and parse answers.
ldns_resolver
struct ldns_struct_resolver ldns_resolver
Definition resolver.h:147
ldns_rr_list
struct ldns_struct_rr_list ldns_rr_list
Definition rr.h:351
ldns_rr_class
enum ldns_enum_rr_class ldns_rr_class
Definition rr.h:61
ldns_update_ad
uint16_t ldns_update_ad(const ldns_pkt *p)
Get the zo count.
Definition update.c:298
ldns_update_pkt_new
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
ldns_update_set_zo
void ldns_update_set_zo(ldns_pkt *p, uint16_t c)
Set the zo count.
Definition update.c:304
ldns_update_upcount
uint16_t ldns_update_upcount(const ldns_pkt *p)
Get the zo count.
Definition update.c:292
ldns_update_zocount
uint16_t ldns_update_zocount(const ldns_pkt *p)
Get the zo count.
Definition update.c:280
ldns_update_set_prcount
void ldns_update_set_prcount(ldns_pkt *p, uint16_t c)
Set the pr count.
Definition update.c:310
ldns_update_soa_zone_mname
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
ldns_update_set_upcount
void ldns_update_set_upcount(ldns_pkt *p, uint16_t c)
Set the up count.
Definition update.c:316
ldns_update_prcount
uint16_t ldns_update_prcount(const ldns_pkt *p)
Get the zo count.
Definition update.c:286
ldns_update_set_adcount
void ldns_update_set_adcount(ldns_pkt *p, uint16_t c)
Set the ad count.
Definition update.c:322
ldns_update_pkt_tsig_add
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_update_soa_mname
ldns_status ldns_update_soa_mname(ldns_rdf *zone, ldns_resolver *r, ldns_rr_class c, ldns_rdf **mname)
Definition update.c:90