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


Manual Reference Pages  -  DNSTABLE_ENTRY (3)

.ds Aq ’

NAME

dnstable_entry - dnstable entry objects

CONTENTS

SYNOPSIS

#include <dnstable.h>

typedef enum {
    DNSTABLE_ENTRY_TYPE_RRSET,
    DNSTABLE_ENTRY_TYPE_RRSET_NAME_FWD,
    DNSTABLE_ENTRY_TYPE_RDATA,
    DNSTABLE_ENTRY_TYPE_RDATA_NAME_REV,
} dnstable_entry_type;

struct dnstable_entry *
dnstable_entry_decode(
    const uint8_t *key, size_t len_key,
    const uint8_t *val, size_t len_val);

void
dnstable_entry_destroy(struct dnstable_entry **ent);

char *
dnstable_entry_to_text(struct dnstable_entry *ent);

char *
dnstable_entry_to_json(struct dnstable_entry *ent);

dnstable_entry_type
dnstable_entry_get_type(struct dnstable_entry *ent);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 *      DNSTABLE_ENTRY_TYPE_RRSET_NAME_FWD
 *      DNSTABLE_ENTRY_TYPE_RDATA
 */
dnstable_res
dnstable_entry_get_rrname(
    struct dnstable_entry *ent,
    const uint8_t **owner, size_t *len_owner);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 *      DNSTABLE_ENTRY_TYPE_RDATA
 */
dnstable_res
dnstable_entry_get_rrtype(
    struct dnstable_entry *ent,
    uint16_t *rrtype);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 */
dnstable_res
dnstable_entry_get_bailiwick(
    struct dnstable_entry *ent,
    const uint8_t **bailiwick, size_t *len_bailiwick);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 *      DNSTABLE_ENTRY_TYPE_RDATA
 */
dnstable_res
dnstable_entry_get_num_rdata(
    struct dnstable_entry *ent,
    size_t *num_rdata);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 *      DNSTABLE_ENTRY_TYPE_RDATA
 */
dnstable_res
dnstable_entry_get_rdata(
    struct dnstable_entry *ent,
    const uint8_t **rdata, size_t *len_rdata);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RDATA_NAME_REV
 */
dnstable_res
dnstable_entry_get_rdata_name(
    struct dnstable_entry *ent,
    const uint8_t **rdata_name, size_t *len_rdata_name);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 *      DNSTABLE_ENTRY_TYPE_RDATA
 */
dnstable_res
dnstable_entry_get_time_first(
    struct dnstable_entry *ent,
    uint64_t *time_first);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 *      DNSTABLE_ENTRY_TYPE_RDATA
 */
dnstable_res
dnstable_entry_get_time_last(
    struct dnstable_entry *ent,
    uint64_t *time_last);

/* valid for entry types:
 *      DNSTABLE_ENTRY_TYPE_RRSET
 *      DNSTABLE_ENTRY_TYPE_RDATA
 */
dnstable_res
dnstable_entry_get_count(
    struct dnstable_entry *ent,
    uint64_t *count);

DESCRIPTION

dnstable_entry objects represent the data entries stored in dnstable data files. Various dnstable library functions return dnstable_entry objects through the dnstable_iter(3) interface, or they can be created directly by the dnstable_entry_decode() function, which parses raw dnstable-encoded key/value pairs.

A dnstable_entry object has a particular type which can be retrieved with the dnstable_entry_get_type() function. Possible values are enumerated in dnstable_entry_type. For details about how each type is encoded, see dnstable-encoding(5).

For presentation or interchange purposes, the dnstable_entry_to_text() and dnstable_entry_to_json() functions can be used to generate the text or JSON-encoded form of a dnstable_entry object. These functions return a dynamically allocated string which must be free()d by the caller.

The remaining dnstable_entry_get_*() accessor functions return particular fields of the dnstable_entry object, if present. dnstable_res_success will be returned if the entry has the requested field, and dnstable_res_failure if not. None of the accessor functions allocate memory. For the accessors which return pointers, these pointers are valid as long as the dnstable_entry object is valid. For field descriptions, see dnstable-encoding(5).

SEE ALSO

dnstable-encoding(5)

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


& DNSTABLE_ENTRY (3) 11/10/2015

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