|
NAMEdnstable_reader - read dnstable data from an mtbl sourceSYNOPSIS#include <dnstable.h>struct dnstable_reader * dnstable_reader_init(const struct mtbl_source *s); struct dnstable_reader * dnstable_reader_init_setfile(const char *setfile); void dnstable_reader_reload_setfile(struct dnstable_reader *r); void dnstable_reader_destroy(struct dnstable_reader **r); struct dnstable_iter * dnstable_reader_iter(struct dnstable_reader *r); struct dnstable_iter * dnstable_reader_iter_rrset(struct dnstable_reader *r); struct dnstable_iter * dnstable_reader_iter_rrset_names(struct dnstable_reader *r); struct dnstable_iter * dnstable_reader_iter_rdata(struct dnstable_reader *r); struct dnstable_iter * dnstable_reader_iter_rdata_names(struct dnstable_reader *r); struct dnstable_iter * dnstable_reader_iter_time_range(struct dnstable_reader *r); struct dnstable_iter * dnstable_reader_iter_version(struct dnstable_reader *r); struct dnstable_iter * dnstable_reader_query(struct dnstable_reader *r, struct dnstable_query *q); DESCRIPTIONdnstable_reader is the high-level interface for reading dnstable entries from a dnstable data source. Results are returned through the dnstable_iter interface.dnstable_reader objects can be initialized by calling dnstable_reader_init(), which takes an mtbl_source object, or by calling dnstable_reader_init_setfile(), which takes a full path name to a "setfile", which is a text file containing a list of dnstable data file paths, one per line. The directory name of that path is prepended to each data file’s path. For example, if the setfile path is "/export/dnstable/mtbl/dns.fileset", and a line in it is of the form "dns.2017.Y.mtbl" then dnstable will try to open "/export/dnstable/mtbl/dns.2017.Y.mtbl". dnstable_reader_reload_setfile() will force a reload of a dnstable_reader object initialized by dnstable_reader_init_setfile() by re-reading the underlying setfile. dnstable_reader_iter() iterates over every entry object in the data source. dnstable_reader_iter_rrset() iterates over just the entries of type DNSTABLE_ENTRY_TYPE_RRSET. Likewise, dnstable_reader_iter_rdata() iterates over just the entries of type DNSTABLE_ENTRY_TYPE_RDATA, dnstable_reader_iter_rrset_names() iterates over entries of type DNSTABLE_ENTRY_TYPE_RRSET_NAME_FWD, and dnstable_reader_iter_rdata_names() iterates over just the entries of type DNSTABLE_ENTRY_TYPE_RDATA_NAME_REV. dnstable_reader_query() iterates over all the entry objects that match the specified query object. The query object is used during the operation of the returned iterator, and must not be destroyed until after the iterator is destroyed. SEE ALSOdnstable_iter(3), dnstable_query(3), mtbl_source(3)
Visit the GSP FreeBSD Man Page Interface. |