GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DNSTABLE_READER(3)   DNSTABLE_READER(3)

dnstable_reader - read dnstable data from an mtbl source

#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);

dnstable_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.

dnstable_iter(3), dnstable_query(3), mtbl_source(3)
04/16/2021  

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.