Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
DNSTABLE_ITER(3)						DNSTABLE_ITER(3)

NAME
     dnstable_iter - iterate over a sequence of dnstable entries

SYNOPSIS
     #include <dnstable.h>

     dnstable_res
     dnstable_iter_next(struct dnstable_iter *it, struct dnstable_entry **ent);

     dnstable_res
     dnstable_iter_get_count(struct dnstable_iter *it, dnstable_stat_stage stage,
			     dnstable_stat_category category, bool *exists, uint64_t *count);

     void
     dnstable_iter_set_stat_func(struct dnstable_iter *it, dnstable_iter_stat_func stat_func);

     dnstable_iter_destroy(struct dnstable_iter **it);

DESCRIPTION
     The  dnstable_iter  interface  is	used to return a sequence of one or more
     dnstable entries. Once the caller obtains a  dnstable_iter  object,  dnsta-
     ble_iter_next()  should  be repeatedly called on it until there are no more
     entries to retrieve, at which point the iterator object must  be  freed  by
     calling dnstable_iter_destroy().

     Query statistics are available through dnstable_iter_get_count(), which re-
     turns  dnstable_res_success for a valid count category and a valid process-
     ing stage, with *exists set to false if no such category is  supported  for
     the given stage stage. dnstable_res_failure is returned upon a query for an
     unknown stage, an unknown category, or if count is NULL.

RETURN VALUE
     dnstable_iter_next()  returns dnstable_res_success if an entry was success-
     fully retrieved, in which case ent will point to  a  dnstable_entry  object
     which  must  be  freed by the caller using dnstable_entry_destroy(). dnsta-
     ble_res_failure is returned if there are no more entries in the sequence.

SEE ALSO
     dnstable_entry(3) dnstable_stat(3)

				   12/20/2023			DNSTABLE_ITER(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dnstable_iter&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help