|
reSIProcate/stack
9694
|
#include <DnsInterface.hxx>


Classes | |
| class | Exception |
Public Member Functions | |
| DnsInterface (DnsStub &dnsStub) | |
| virtual | ~DnsInterface () |
| void | addTransportType (TransportType type, IpVersion version) |
| bool | isSupported (const Data &service) |
| bool | isSupported (TransportType t, IpVersion version) |
| bool | isSupportedProtocol (TransportType t) |
| int | supportedProtocols () |
| DnsResult * | createDnsResult (DnsHandler *handler=0) |
| void | lookup (DnsResult *res, const Uri &uri) |
| TupleMarkManager & | getMarkManager () |
Protected Types | |
| typedef std::vector< std::pair < TransportType, IpVersion > > | TransportMap |
Protected Attributes | |
| std::set< Data > | mSupportedNaptrs |
| TransportMap | mSupportedTransports |
| DnsStub & | mDnsStub |
| RRVip | mVip |
| TupleMarkManager | mMarkManager |
Friends | |
| class | DnsResult |
Definition at line 25 of file DnsInterface.hxx.
typedef std::vector<std::pair<TransportType, IpVersion> > resip::DnsInterface::TransportMap [protected] |
Definition at line 88 of file DnsInterface.hxx.
| DnsInterface::DnsInterface | ( | DnsStub & | dnsStub | ) |
Definition at line 35 of file DnsInterface.cxx.
References mDnsStub, mVip, and resip::DnsStub::setResultTransform().
: mDnsStub(dnsStub) { #ifdef USE_DNS_VIP mDnsStub.setResultTransform(&mVip); #endif }

| DnsInterface::~DnsInterface | ( | ) | [virtual] |
Definition at line 44 of file DnsInterface.cxx.
{
}
| void DnsInterface::addTransportType | ( | TransportType | type, |
| IpVersion | version | ||
| ) |
Definition at line 53 of file DnsInterface.cxx.
References resip::DTLS, DtlsNAPTRType, mSupportedNaptrs, mSupportedTransports, resip::TCP, TcpNAPTRType, resip::TLS, TlsNAPTRType, resip::UDP, and UdpNAPTRType.
Referenced by resip::TransportSelector::addTransportInternal().
{
mSupportedTransports.push_back(std::make_pair(type, version));
switch (type)
{
case UDP:
mSupportedNaptrs.insert(UdpNAPTRType);
break;
case TCP:
mSupportedNaptrs.insert(TcpNAPTRType);
break;
case TLS:
mSupportedNaptrs.insert(TlsNAPTRType);
break;
case DTLS:
mSupportedNaptrs.insert(DtlsNAPTRType);
break;
default:
assert(0);
break;
}
}
| DnsResult * DnsInterface::createDnsResult | ( | DnsHandler * | handler = 0 | ) |
| TupleMarkManager& resip::DnsInterface::getMarkManager | ( | ) | [inline] |
Definition at line 80 of file DnsInterface.hxx.
References mMarkManager.
Referenced by resip::DnsResult::blacklistLast(), resip::DnsResult::greylistLast(), resip::DnsResult::lookupInternal(), main(), resip::DnsResult::onDnsResult(), resip::TransportSelector::registerMarkListener(), and resip::TransportSelector::unregisterMarkListener().
{return mMarkManager;}
| bool DnsInterface::isSupported | ( | const Data & | service | ) |
Definition at line 77 of file DnsInterface.cxx.
References mSupportedNaptrs.
Referenced by resip::DnsResult::lookupHost(), resip::DnsResult::lookupInternal(), resip::DnsResult::onDnsResult(), resip::DnsResult::onNaptrResult(), and resip::DnsResult::primeResults().
{
return mSupportedNaptrs.count(service) != 0;
}
| bool DnsInterface::isSupported | ( | TransportType | t, |
| IpVersion | version | ||
| ) |
Definition at line 83 of file DnsInterface.cxx.
References mSupportedTransports.
{
return std::find(mSupportedTransports.begin(), mSupportedTransports.end(), std::make_pair(t, version)) != mSupportedTransports.end();
}
| bool DnsInterface::isSupportedProtocol | ( | TransportType | t | ) |
Definition at line 89 of file DnsInterface.cxx.
References mSupportedTransports.
Referenced by resip::DnsResult::lookupInternal(), and resip::DnsResult::onNaptrResult().
{
for (TransportMap::const_iterator i=mSupportedTransports.begin(); i != mSupportedTransports.end(); ++i)
{
if (i->first == t)
{
return true;
}
}
return false;
}
Definition at line 115 of file DnsInterface.cxx.
References resip::DnsStub::getEnumSuffixes(), resip::DnsResult::lookup(), and mDnsStub.
Referenced by resip::TransportSelector::dnsResolve().
{
res->lookup(uri, mDnsStub.getEnumSuffixes());
}

| int DnsInterface::supportedProtocols | ( | ) |
Definition at line 101 of file DnsInterface.cxx.
References mSupportedTransports.
{
return (int)mSupportedTransports.size();
}
friend class DnsResult [friend] |
Definition at line 85 of file DnsInterface.hxx.
Referenced by createDnsResult().
DnsStub& resip::DnsInterface::mDnsStub [protected] |
Definition at line 94 of file DnsInterface.hxx.
Referenced by createDnsResult(), DnsInterface(), and lookup().
TupleMarkManager resip::DnsInterface::mMarkManager [protected] |
Definition at line 96 of file DnsInterface.hxx.
Referenced by getMarkManager().
std::set<Data> resip::DnsInterface::mSupportedNaptrs [protected] |
Definition at line 87 of file DnsInterface.hxx.
Referenced by addTransportType(), and isSupported().
Definition at line 89 of file DnsInterface.hxx.
Referenced by addTransportType(), isSupported(), isSupportedProtocol(), and supportedProtocols().
RRVip resip::DnsInterface::mVip [protected] |
Definition at line 95 of file DnsInterface.hxx.
Referenced by createDnsResult(), and DnsInterface().
1.7.5.1