[reSIProcate] Using RRCache from DnsInterface
Hello resip,
I have a DnsInterface subclass similar to the one in testDns.cxx, and I need
to add a DNS cache to it. I see the testDnsCache.cxx sample program but it
does the lookups from DnsStub, while testDns uses DnsInterface::lookup. I
don't see a way to pass a DnsResultSink through this interface to the stub
inside. Am I missing something? testDnsCache.cxx doesn't actually show how
to use the RRCache - an example would really help.
Also, I saw the comment in testDnsCache.cxx that says you need to restore
the "#define USE_LOCAL_DNS" in ExternalDnsFactory.cxx if you want to use the
cache. However, when I do this, I get the error below when I make. It
looks like LocalDns is missing an init(...) method. I checked the source
tree and didn't see a newer version.
Dave
g++ -march=i686 -D_REENTRANT -g -Wall -I..
-I../build/../contrib/ares -I/externals/rw_mvlinux
-I/externals/rw_mvlinux/include -I/externals/jtc/0.0.0.4/jtc/include
-DUSE_ARES -DGENBAND -D_RWCONFIG=12d -DLINUX
-DRW_CLASSIC_TEMPLATE_CONTAINERS -c -o
obj.debug.Linux.i686/dns/ExternalDnsFactory.o dns/ExternalDnsFactory.cxx
dns/ExternalDnsFactory.cxx: In static member function `static
resip::ExternalDns* resip::ExternalDnsFactory::createExternalDns()':
dns/ExternalDnsFactory.cxx:23: cannot allocate an object of type `
resip::LocalDns'
dns/ExternalDnsFactory.cxx:23: because the following virtual functions are
abstract:
../rutil/dns/ExternalDns.hxx:32: virtual int
resip::ExternalDns::init(const
std::vector<resip::GenericIPAddress,
std::allocator<resip::GenericIPAddress>
>&, void (*)(int, int, const char*, int), int = 0, int = 0)