directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrique Rodriguez" <enriqu...@gmail.com>
Subject Re: DNS : RecordStore
Date Fri, 15 Jun 2007 04:05:10 GMT
On 6/14/07, Enrique Rodriguez <enriquer9@gmail.com> wrote:
> ...
> I have duplicated this behavior and I have traced it back to bad
> encoding introduced in the last patch.  Unfortunately, the bad
> encoding is reinforced by unit tests that I will have to correct, as
> well.  I think I will have it sorted out in the next couple hours.

Hi, Julien,

I corrected the issue with encoding and was able to verify interop
with the dig command.

If you'll 'svn up' you will get the fix as well as 2 new files:  (1) a
stub implementation of the store called RecordStoreStub that is much
like your store and (2) a Main class with a main() method for starting
a DNS server with the stub store.  A couple things to look at:

a)  The Main class shows how to use a class called "DnsServer" to
start an instance of a server.  This is what we use in ApacheDS and it
encapsulates the combination of DNS configuration, a MINA UDP
acceptor, and a store implementation.  By starting a DnsServer with a
DnsConfiguration and any store impl you can have a little DNS server.
This Main uses the stub store but in ApacheDS, of course, we use a
JNDI store.

b)  The store stub uses the modifier as I described.

If you run the Main you can hit the DNS instance by default with:

$ dig @localhost -p 10053 www.example.com

I made the store return 2 records to make sure the encoding worked for
more than one record.

HTH,

Enrique

Mime
View raw message