Yate: DnsRecord Class Reference

Yate

Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
DnsRecord Class Reference

A DNS record. More...

`#include <yateclass.h>`

Inheritance diagram for DnsRecord:

## Public Member Functions
| DnsRecord (int ttl, int order, int pref)
| DnsRecord ()
int | ttl () const
int | order () const
int | pref () const
virtual void | dump (String &buf, const char *sep=" ")
Public Member Functions inherited from GenObject
| GenObject ()
virtual | ~GenObject ()
virtual bool | alive () const
virtual void | destruct ()
virtual const String & | toString () const
virtual const String & | traceId () const
virtual void * | getObject (const String &name) const
NamedCounter * | getObjCounter () const
NamedCounter * | setObjCounter (NamedCounter *counter)

## Static Public Member Functions
static bool | insert (ObjList &list, DnsRecord *rec, bool ascPref)
Static Public Member Functions inherited from GenObject
static void * | getObject (const String &name, const GenObject *obj)
static bool | getObjCounting ()
static void | setObjCounting (bool enable)
static NamedCounter * | getObjCounter (const String &name, bool create=true)
static ObjList & | getObjCounters ()

## Protected Attributes
int | m_ttl
int | m_order
int | m_pref

## Detailed Description

A DNS record.

This class holds a DNS (resolver) record

## Constructor & Destructor Documentation

## ◆ DnsRecord() [1/2]

DnsRecord | ( | int | ttl,
|  | int | order,
|  | int | pref )
| inline

Build a DNS record

Parameters

  ttl | Record Time To Live
  order | Record order (priority)
  pref | Record preference

## ◆ DnsRecord() [2/2]

DnsRecord | ( |  | ) |
| inline

Default constructor

## Member Function Documentation

## ◆ dump()

virtual void dump | ( | String & | buf,
|  | const char * | sep = " " )
| virtual

Dump a record for debug purposes

Parameters

  buf | Destination buffer
  sep | Fields separator

Reimplemented in NaptrRecord, SrvRecord, and TxtRecord.

## ◆ insert()

static bool insert | ( | ObjList & | list,
|  | DnsRecord * | rec,
|  | bool | ascPref )
| static

Insert a DnsRecord into a list in the proper location given by order and preference

Parameters

  list | Destination list
  rec | The item to insert
  ascPref | Order preference ascending

Returns
  True on success, false on failure (already in the list)

## ◆ order()

int order | ( |  | ) | const
| inline

Retrieve the record order

Returns
  Record order

## ◆ pref()

int pref | ( |  | ) | const
| inline

Retrieve the record preference

Returns
  Record preference

## ◆ ttl()

int ttl | ( |  | ) | const
| inline

Retrieve the Time To Live

Returns
  Record TTL

The documentation for this class was generated from the following file:

- yateclass.h