Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ldns/zone.h
Show All 37 Lines | |||||
* A list of RR's with some | * A list of RR's with some | ||||
* extra information which comes from the SOA RR | * extra information which comes from the SOA RR | ||||
* Note: nothing has been done to make this efficient (yet). | * Note: nothing has been done to make this efficient (yet). | ||||
*/ | */ | ||||
struct ldns_struct_zone | struct ldns_struct_zone | ||||
{ | { | ||||
/** the soa defines a zone */ | /** the soa defines a zone */ | ||||
ldns_rr *_soa; | ldns_rr *_soa; | ||||
/* basicly a zone is a list of rr's */ | /* basically a zone is a list of rr's */ | ||||
ldns_rr_list *_rrs; | ldns_rr_list *_rrs; | ||||
/* we could change this to be a b-tree etc etc todo */ | /* we could change this to be a b-tree etc etc todo */ | ||||
}; | }; | ||||
typedef struct ldns_struct_zone ldns_zone; | typedef struct ldns_struct_zone ldns_zone; | ||||
/** | /** | ||||
* create a new ldns_zone structure | * create a new ldns_zone structure | ||||
* \return a pointer to a ldns_zone structure | * \return a pointer to a ldns_zone structure | ||||
Show All 37 Lines | |||||
*/ | */ | ||||
void ldns_zone_set_rrs(ldns_zone *z, ldns_rr_list *rrlist); | void ldns_zone_set_rrs(ldns_zone *z, ldns_rr_list *rrlist); | ||||
/** | /** | ||||
* push an rrlist to a zone structure. This function use pointer | * push an rrlist to a zone structure. This function use pointer | ||||
* copying, so the rr_list structure inside z is modified! | * copying, so the rr_list structure inside z is modified! | ||||
* \param[in] z the zone to add to | * \param[in] z the zone to add to | ||||
* \param[in] list the list to add | * \param[in] list the list to add | ||||
* \return a true on succes otherwise falsed | * \return a true on success otherwise false | ||||
*/ | */ | ||||
bool ldns_zone_push_rr_list(ldns_zone *z, const ldns_rr_list *list); | bool ldns_zone_push_rr_list(ldns_zone *z, const ldns_rr_list *list); | ||||
/** | /** | ||||
* push an single rr to a zone structure. This function use pointer | * push an single rr to a zone structure. This function use pointer | ||||
* copying, so the rr_list structure inside z is modified! | * copying, so the rr_list structure inside z is modified! | ||||
* \param[in] z the zone to add to | * \param[in] z the zone to add to | ||||
* \param[in] rr the rr to add | * \param[in] rr the rr to add | ||||
* \return a true on succes otherwise falsed | * \return a true on success otherwise false | ||||
*/ | */ | ||||
bool ldns_zone_push_rr(ldns_zone *z, ldns_rr *rr); | bool ldns_zone_push_rr(ldns_zone *z, ldns_rr *rr); | ||||
/** | /** | ||||
* Retrieve all resource records from the zone that are glue | * Retrieve all resource records from the zone that are glue | ||||
* records. The resulting list does are pointer references | * records. The resulting list does are pointer references | ||||
* to the zone's data. | * to the zone's data. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |