1#if defined(HAVE_CONFIG_H)
14#define NS_RRFIXEDSZ 10
27#define RESIPROCATE_SUBSYSTEM resip::Subsystem::DNS
37 ParseBuffer pb(data,
"DnsNaptrRecord::RegExp parser");
39 const char delim = data[0];
40 const char* start = pb.
skipChar(delim);
43 pb.
data(mRegexp, start);
46 pb.
data(mReplacement, start);
54 if (regcomp(&mRe, mRegexp.c_str(), REG_EXTENDED) != 0)
72 return mRegexp.
empty();
103 throw NaptrException(
"Failed parse of NAPTR record", __FILE__, __LINE__);
107 mTTL = overlay.
ttl();
112 throw NaptrException(
"Failed parse of NAPTR record", __FILE__, __LINE__);
117 const unsigned char* pPos = overlay.
data() + 4;
124 throw NaptrException(
"Failed parse of NAPTR record", __FILE__, __LINE__);
127 mFlags =
Data(pPos + 1, len);
133 throw NaptrException(
"Failed parse of NAPTR record", __FILE__, __LINE__);
135 mService =
Data(pPos + 1, len);
141 throw NaptrException(
"Failed parse of NAPTR record", __FILE__, __LINE__);
152 throw NaptrException(
"Failed parse of NAPTR record", __FILE__, __LINE__);
160 throw NaptrException(
"Failed parse of NAPTR record", __FILE__, __LINE__);
167 return mReplacement == value;
173 strm << mName <<
" (NAPTR)--> o=" << mOrder <<
" p=" << mPreference <<
" s=" << mService <<
" ttl=" << mTTL;
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, int alen, char **s, long *enclen)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
size_type size() const noexcept
Returns the number of bytes in this Data.
Data apply(const Data &input) const
const Data & regexp() const
const Data & replacement() const
const RegExp & regexp() const
virtual const Data & name() const
virtual EncodeStream & dump(EncodeStream &strm) const
virtual bool isSameValue(const Data &value) const
Provides string-parsing functionality with protection from buffer overflow.
CurrentPosition skipToChar(char c)
CurrentPosition skipChar()
void data(Data &data, const char *start) const
make the passed in data share memory with the buffer (uses Data::Share)
const unsigned char * msg() const
const unsigned char * data() const
dcm! – add UnusedChecking(_enum) below;