directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@archean.fr>
Subject DNS : RecordStore
Date Tue, 12 Jun 2007 14:35:58 GMT
Hi !

I started to take a look at ADS DNS provider for fitting my very light
needs.

I simply got two questions :

1# 
In DNS protocol, the RecordStore interface
http://tinyurl.com/2prg84

It would be nice to specify the returned Set type, like :

public interface RecordStore
{
    public Set<ResourceRecord> getRecords( QuestionRecord question ) throws Exception;
}

Due to the lack of javadoc, it could improve the code readability ;)


2#
I made my minimal RecordStore for just resolving few hostname to IP
address. Be carefull, my knowledge of DNS is very low :)

public Set getRecords(QuestionRecord question) throws Exception 
   System.err.println("My store ! : "+question);
   Set<ResourceRecord> set=new HashSet<ResourceRecord>();
   HashMap<String, Object> attr= new HashMap<String, Object>();
   attr.put(DnsAttribute.DOMAIN_NAME,"mydomaine.net");
   attr.put(DnsAttribute.IP_ADDRESS,"192.168.66.66");
   attr.put(DnsAttribute.TYPE,"IN");
   attr.put(DnsAttribute.CLASS,"A");
   ResourceRecord rr=new ResourceRecordImpl("totoz.net",
          RecordType.A,RecordClass.IN,10000,attr);
   set.add(rr);
   return set;
}

dig report me "corrupted reply".

Any idea of what I'm doing wrong ?


Julien


Mime
View raw message