Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

zone.h File Reference

Go to the source code of this file.

Data Structures

struct  ldns_struct_zone
 Zone type. More...

Typedefs

typedef ldns_struct_zone ldns_zone

Functions

ldns_zoneldns_zone_new (void)
 create a new ldns_zone structure
ldns_rrldns_zone_soa (ldns_zone *z)
uint16_t ldns_zone_rr_count (ldns_zone *z)
 Returns the number of resource records in the zone, NOT counting the SOA record.
void ldns_zone_set_soa (ldns_zone *z, ldns_rr *soa)
ldns_rr_listldns_zone_rrs (ldns_zone *z)
void ldns_zone_set_rrs (ldns_zone *z, ldns_rr_list *rrlist)
bool ldns_zone_push_rr_list (ldns_zone *z, ldns_rr_list *list)
 push an rrlist to a zone structure.
bool ldns_zone_push_rr (ldns_zone *z, ldns_rr *rr)
 push an singkle rr to a zone structure.
ldns_rr_listldns_zone_glue_rr_list (ldns_zone *z)
 Retrieve all resource records from the zone that are glue records.
ldns_zoneldns_zone_new_frm_fp (FILE *fp, ldns_rdf *origin, uint16_t ttl, ldns_rr_class c)
ldns_zoneldns_zone_new_frm_fp_l (FILE *fp, ldns_rdf *origin, uint16_t ttl, ldns_rr_class c, int *line_nr)
void ldns_zone_free (ldns_zone *zone)
 Frees the allocated memory for the zone, and the rr_list structure in it.
void ldns_zone_deep_free (ldns_zone *zone)
 Frees the allocated memory for the zone, the soa rr in it, and the rr_list structure in it, including the rr's in that.


Typedef Documentation

typedef struct ldns_struct_zone ldns_zone
 

Definition at line 38 of file zone.h.


Function Documentation

void ldns_zone_deep_free ldns_zone zone  ) 
 

Frees the allocated memory for the zone, the soa rr in it, and the rr_list structure in it, including the rr's in that.

etc.

Parameters:
[in] zone the zone to free

void ldns_zone_free ldns_zone zone  ) 
 

Frees the allocated memory for the zone, and the rr_list structure in it.

Parameters:
[in] zone the zone to free

ldns_rr_list* ldns_zone_glue_rr_list ldns_zone z  ) 
 

Retrieve all resource records from the zone that are glue records.

The resulting list does *not* contain clones from the rrs

Parameters:
[in] z the zone to look for glue
Returns:
the rr_list with the glue

ldns_zone* ldns_zone_new void   ) 
 

create a new ldns_zone structure

ldns_zone* ldns_zone_new_frm_fp FILE *  fp,
ldns_rdf origin,
uint16_t  ttl,
ldns_rr_class  c
 

ldns_zone* ldns_zone_new_frm_fp_l FILE *  fp,
ldns_rdf origin,
uint16_t  ttl,
ldns_rr_class  c,
int *  line_nr
 

bool ldns_zone_push_rr ldns_zone z,
ldns_rr rr
 

push an singkle rr to a zone structure.

This function use pointer copying, so the rr_list structure inside z is modified!

Parameters:
[in] z the zone to add to
[in] rr the rr to add
Returns:
a true on succes otherwise falsed

bool ldns_zone_push_rr_list ldns_zone z,
ldns_rr_list list
 

push an rrlist to a zone structure.

This function use pointer copying, so the rr_list structure inside z is modified!

Parameters:
[in] z the zone to add to
[in] list the list to add
Returns:
a true on succes otherwise falsed

uint16_t ldns_zone_rr_count ldns_zone z  ) 
 

Returns the number of resource records in the zone, NOT counting the SOA record.

Parameters:
[in] z the zone to read from
Returns:
the number of rr's in the zone

ldns_rr_list* ldns_zone_rrs ldns_zone z  ) 
 

Parameters:
[in] z the zone to read from
Returns:
the rrs from this zone

void ldns_zone_set_rrs ldns_zone z,
ldns_rr_list rrlist
 

Parameters:
[in] z the zone to put the new soa in
[in] rrlist the rrlist to use

void ldns_zone_set_soa ldns_zone z,
ldns_rr soa
 

Parameters:
[in] z the zone to put the new soa in
[in] soa the soa to set

ldns_rr* ldns_zone_soa ldns_zone z  ) 
 

Parameters:
[in] z the zone to read from
Returns:
the soa record in the zone


Generated on Tue Jan 24 02:22:29 2006 for ldns by  doxygen 1.4.4