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

Classes | |
| class | OverlayException |
Public Member Functions | |
| RROverlay (const unsigned char *aptr, const unsigned char *abuf, int alen) | |
| const unsigned char * | data () const |
| const unsigned char * | msg () const |
| int | msgLength () const |
| int | dataLength () const |
| int | nameLength () const |
| int | ttl () const |
| int | type () const |
| const Data & | domain () const |
Private Attributes | |
| const unsigned char * | mData |
| const unsigned char * | mMsg |
| int | mMsgLen |
| int | mDataLen |
| int | mNameLen |
| int | mTTL |
| int | mType |
| Data | mDomain |
Friends | |
| bool | operator< (const RROverlay &r1, const RROverlay &r2) |
Definition at line 9 of file RROverlay.hxx.
| RROverlay::RROverlay | ( | const unsigned char * | aptr, |
| const unsigned char * | abuf, | ||
| int | alen | ||
| ) |
Definition at line 30 of file RROverlay.cxx.
References mData, mDataLen, mDomain, mMsg, mMsgLen, mNameLen, mTTL, mType, and RRFIXEDSZ.
: mData(0), mMsg(0), mMsgLen(0), mDataLen(0), mNameLen(0), mTTL(0), mType(-1) { char *name; long len = 0; // Parse the RR name. int status = ares_expand_name(aptr, abuf, alen, &name, &len); if (status != ARES_SUCCESS) { throw OverlayException("Failed parse of RR", __FILE__, __LINE__); } mDomain = name; aptr += len; mNameLen = len; free(name); // Make sure there is enough data after the RR name for the fixed // part of the RR. if (aptr + RRFIXEDSZ > abuf + alen) { throw OverlayException("Failed parse of RR", __FILE__, __LINE__); } // Parse the fixed part of the RR, and advance to the RR data field. // mType = DNS_RR_TYPE(aptr); mDataLen = DNS_RR_LEN(aptr); mTTL = DNS_RR_TTL(aptr); aptr += RRFIXEDSZ; if (aptr + mDataLen > abuf + alen) { throw OverlayException("Failed parse of RR", __FILE__, __LINE__); } mData = aptr; mMsgLen = alen; mMsg = abuf; aptr += mDataLen; }
| const unsigned char* resip::RROverlay::data | ( | ) | const [inline] |
Definition at line 38 of file RROverlay.hxx.
References mData.
Referenced by resip::DnsAAAARecord::DnsAAAARecord(), resip::DnsCnameRecord::DnsCnameRecord(), resip::DnsHostRecord::DnsHostRecord(), resip::DnsNaptrRecord::DnsNaptrRecord(), resip::DnsSrvRecord::DnsSrvRecord(), and resip::RRCache::getTTL().
{ return mData; }
| int resip::RROverlay::dataLength | ( | ) | const [inline] |
Definition at line 41 of file RROverlay.hxx.
References mDataLen.
Referenced by resip::DnsNaptrRecord::DnsNaptrRecord().
{ return mDataLen; }
| const Data& resip::RROverlay::domain | ( | ) | const [inline] |
| const unsigned char* resip::RROverlay::msg | ( | ) | const [inline] |
Definition at line 39 of file RROverlay.hxx.
References mMsg.
Referenced by resip::DnsAAAARecord::DnsAAAARecord(), resip::DnsCnameRecord::DnsCnameRecord(), resip::DnsHostRecord::DnsHostRecord(), resip::DnsNaptrRecord::DnsNaptrRecord(), resip::DnsSrvRecord::DnsSrvRecord(), and resip::RRCache::getTTL().
{ return mMsg; }
| int resip::RROverlay::msgLength | ( | ) | const [inline] |
Definition at line 40 of file RROverlay.hxx.
References mMsgLen.
Referenced by resip::DnsAAAARecord::DnsAAAARecord(), resip::DnsCnameRecord::DnsCnameRecord(), resip::DnsHostRecord::DnsHostRecord(), resip::DnsNaptrRecord::DnsNaptrRecord(), resip::DnsSrvRecord::DnsSrvRecord(), and resip::RRCache::getTTL().
{ return mMsgLen; }
| int resip::RROverlay::nameLength | ( | ) | const [inline] |
Definition at line 42 of file RROverlay.hxx.
References mNameLen.
Referenced by resip::DnsAAAARecord::DnsAAAARecord(), resip::DnsCnameRecord::DnsCnameRecord(), resip::DnsHostRecord::DnsHostRecord(), resip::DnsNaptrRecord::DnsNaptrRecord(), and resip::DnsSrvRecord::DnsSrvRecord().
{ return mNameLen; }
| int resip::RROverlay::ttl | ( | ) | const [inline] |
| int resip::RROverlay::type | ( | ) | const [inline] |
Definition at line 44 of file RROverlay.hxx.
References mType.
Referenced by resip::RRCache::getTTL().
{ return mType; }
Definition at line 11 of file RROverlay.hxx.
{
if (r1.mType < r2.mType)
{
return true;
}
if (r1.mType > r2.mType)
{
return false;
}
return r1.mDomain < r2.mDomain;
}
const unsigned char* resip::RROverlay::mData [private] |
Definition at line 48 of file RROverlay.hxx.
Referenced by data(), and RROverlay().
int resip::RROverlay::mDataLen [private] |
Definition at line 51 of file RROverlay.hxx.
Referenced by dataLength(), and RROverlay().
Data resip::RROverlay::mDomain [private] |
Definition at line 55 of file RROverlay.hxx.
Referenced by domain(), and RROverlay().
const unsigned char* resip::RROverlay::mMsg [private] |
Definition at line 49 of file RROverlay.hxx.
Referenced by msg(), and RROverlay().
int resip::RROverlay::mMsgLen [private] |
Definition at line 50 of file RROverlay.hxx.
Referenced by msgLength(), and RROverlay().
int resip::RROverlay::mNameLen [private] |
Definition at line 52 of file RROverlay.hxx.
Referenced by nameLength(), and RROverlay().
int resip::RROverlay::mTTL [private] |
Definition at line 53 of file RROverlay.hxx.
Referenced by RROverlay(), and ttl().
int resip::RROverlay::mType [private] |
Definition at line 54 of file RROverlay.hxx.
Referenced by RROverlay(), and type().
1.7.5.1