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:
GenObject NaptrRecord SrvRecord TxtRecord

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 StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (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 NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

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 ( int  ttl,
int  order,
int  pref 
)
inline

Build a DNS record

Parameters
ttlRecord Time To Live
orderRecord order (priority)
prefRecord preference
DnsRecord ( )
inline

Default constructor

Member Function Documentation

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

Dump a record for debug purposes

Parameters
bufDestination buffer
sepFields separator

Reimplemented in NaptrRecord, SrvRecord, and TxtRecord.

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
listDestination list
recThe item to insert
ascPrefOrder preference ascending
Returns
True on success, false on failure (already in the list)
int order ( ) const
inline

Retrieve the record order

Returns
Record order
int pref ( ) const
inline

Retrieve the record preference

Returns
Record preference
int ttl ( ) const
inline

Retrieve the Time To Live

Returns
Record TTL

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