|
reSIProcate/rutil
9694
|
#include <DnsSrvRecord.hxx>


Classes | |
| class | SrvException |
Public Member Functions | |
| DnsSrvRecord (const RROverlay &) | |
| ~DnsSrvRecord () | |
| int | priority () const |
| int & | priority () |
| int | weight () const |
| int | port () const |
| const Data & | target () const |
| const Data & | name () const |
| bool | isSameValue (const Data &value) const |
| EncodeStream & | dump (EncodeStream &strm) const |
Private Attributes | |
| int | mPriority |
| int | mWeight |
| int | mPort |
| Data | mTarget |
| Data | mName |
Definition at line 16 of file DnsSrvRecord.hxx.
| DnsSrvRecord::DnsSrvRecord | ( | const RROverlay & | overlay | ) |
Definition at line 26 of file DnsSrvRecord.cxx.
References resip::RROverlay::data(), mName, mPort, mPriority, resip::RROverlay::msg(), resip::RROverlay::msgLength(), mTarget, mWeight, name(), resip::RROverlay::nameLength(), and RRFIXEDSZ.
{
char* name = 0;
long len = 0;
if (ARES_SUCCESS != ares_expand_name(overlay.data()-overlay.nameLength()-RRFIXEDSZ, overlay.msg(), overlay.msgLength(), &name, &len))
{
throw SrvException("Failed parse of SRV record", __FILE__, __LINE__);
}
mName = name;
free(name);
mPriority = DNS__16BIT(overlay.data());
mWeight = DNS__16BIT(overlay.data() + 2);
mPort = DNS__16BIT(overlay.data() + 4);
if (ARES_SUCCESS != ares_expand_name(overlay.data() + 6, overlay.msg(), overlay.msgLength(), &name, &len))
{
throw SrvException("Failed parse of SRV record", __FILE__, __LINE__);
}
mTarget = name;
free(name);
}

| resip::DnsSrvRecord::~DnsSrvRecord | ( | ) | [inline] |
Definition at line 31 of file DnsSrvRecord.hxx.
{}
| EncodeStream & DnsSrvRecord::dump | ( | EncodeStream & | strm | ) | const [virtual] |
| bool DnsSrvRecord::isSameValue | ( | const Data & | value | ) | const [virtual] |
Implements resip::DnsResourceRecord.
Definition at line 49 of file DnsSrvRecord.cxx.
| const Data& resip::DnsSrvRecord::name | ( | ) | const [inline, virtual] |
Implements resip::DnsResourceRecord.
Definition at line 39 of file DnsSrvRecord.hxx.
References mName.
Referenced by DnsSrvRecord(), and resip::RRList::encodeRecordItem().
{ return mName; }
| int resip::DnsSrvRecord::port | ( | ) | const [inline] |
Definition at line 37 of file DnsSrvRecord.hxx.
References mPort.
Referenced by resip::RRList::encodeRecordItem().
{ return mPort; }
| int resip::DnsSrvRecord::priority | ( | ) | const [inline] |
Definition at line 34 of file DnsSrvRecord.hxx.
References mPriority.
Referenced by resip::RRList::encodeRecordItem(), and resip::RRVip::SrvTransform::transform().
{ return mPriority; }
| int& resip::DnsSrvRecord::priority | ( | ) | [inline] |
| const Data& resip::DnsSrvRecord::target | ( | ) | const [inline] |
Definition at line 38 of file DnsSrvRecord.hxx.
References mTarget.
Referenced by resip::RRList::encodeRecordItem().
{ return mTarget; }
| int resip::DnsSrvRecord::weight | ( | ) | const [inline] |
Definition at line 36 of file DnsSrvRecord.hxx.
References mWeight.
Referenced by resip::RRList::encodeRecordItem().
{ return mWeight; }
Data resip::DnsSrvRecord::mName [private] |
Definition at line 48 of file DnsSrvRecord.hxx.
Referenced by DnsSrvRecord(), dump(), and name().
int resip::DnsSrvRecord::mPort [private] |
Definition at line 46 of file DnsSrvRecord.hxx.
Referenced by DnsSrvRecord(), dump(), isSameValue(), and port().
int resip::DnsSrvRecord::mPriority [private] |
Definition at line 44 of file DnsSrvRecord.hxx.
Referenced by DnsSrvRecord(), dump(), and priority().
Data resip::DnsSrvRecord::mTarget [private] |
Definition at line 47 of file DnsSrvRecord.hxx.
Referenced by DnsSrvRecord(), dump(), isSameValue(), and target().
int resip::DnsSrvRecord::mWeight [private] |
Definition at line 45 of file DnsSrvRecord.hxx.
Referenced by DnsSrvRecord(), dump(), and weight().
1.7.5.1