reSIProcate/rutil  9694
Public Member Functions | Private Attributes
resip::DnsHostRecord Class Reference

#include <DnsHostRecord.hxx>

Inheritance diagram for resip::DnsHostRecord:
Inheritance graph
[legend]
Collaboration diagram for resip::DnsHostRecord:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DnsHostRecord (const RROverlay &)
 DnsHostRecord (const Data name, const in_addr addr)
 ~DnsHostRecord ()
Data host () const
in_addr addr () const
const Dataname () const
bool isSameValue (const Data &value) const
EncodeStream & dump (EncodeStream &strm) const

Private Attributes

in_addr mAddr
Data mName

Detailed Description

Definition at line 17 of file DnsHostRecord.hxx.


Constructor & Destructor Documentation

DnsHostRecord::DnsHostRecord ( const RROverlay overlay)

Definition at line 27 of file DnsHostRecord.cxx.

References resip::RROverlay::data(), mAddr, mName, resip::RROverlay::msg(), resip::RROverlay::msgLength(), name(), resip::RROverlay::nameLength(), and RRFIXEDSZ.

{
   char* name = 0;
   long len = 0;
   int status = ares_expand_name(overlay.data()-overlay.nameLength()-RRFIXEDSZ, overlay.msg(), overlay.msgLength(), &name, &len);
   (void)status;
   assert(status == ARES_SUCCESS);      // .kw. what should we do if bad?
   mName = name;
   free(name);
   memcpy(&mAddr, overlay.data(), sizeof(in_addr));
}

Here is the call graph for this function:

resip::DnsHostRecord::DnsHostRecord ( const Data  name,
const in_addr  addr 
) [inline]

Definition at line 21 of file DnsHostRecord.hxx.

: mAddr(addr), mName(name){};
resip::DnsHostRecord::~DnsHostRecord ( ) [inline]

Definition at line 22 of file DnsHostRecord.hxx.

{}

Member Function Documentation

in_addr resip::DnsHostRecord::addr ( ) const [inline]

Definition at line 26 of file DnsHostRecord.hxx.

References mAddr.

{ return mAddr; }
EncodeStream & DnsHostRecord::dump ( EncodeStream &  strm) const [virtual]

Implements resip::DnsResourceRecord.

Definition at line 50 of file DnsHostRecord.cxx.

References resip::DnsUtil::inet_ntop(), mAddr, and mName.

{
   strm << mName << "(A)--> " << DnsUtil::inet_ntop(mAddr);
   return strm;
}

Here is the call graph for this function:

Data DnsHostRecord::host ( ) const

Definition at line 39 of file DnsHostRecord.cxx.

References mAddr.

Referenced by resip::RRList::encodeRecordItem().

{
   return Data(inet_ntoa(mAddr));
}
bool DnsHostRecord::isSameValue ( const Data value) const [virtual]

Implements resip::DnsResourceRecord.

Definition at line 44 of file DnsHostRecord.cxx.

References resip::DnsUtil::inet_ntop(), and mAddr.

{
   return DnsUtil::inet_ntop(mAddr) == value;
}

Here is the call graph for this function:

const Data& resip::DnsHostRecord::name ( ) const [inline, virtual]

Implements resip::DnsResourceRecord.

Definition at line 27 of file DnsHostRecord.hxx.

References mName.

Referenced by DnsHostRecord(), and resip::RRList::encodeRecordItem().

{ return mName; }

Member Data Documentation

in_addr resip::DnsHostRecord::mAddr [private]

Definition at line 32 of file DnsHostRecord.hxx.

Referenced by addr(), DnsHostRecord(), dump(), host(), and isSameValue().

Definition at line 33 of file DnsHostRecord.hxx.

Referenced by DnsHostRecord(), dump(), and name().


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