Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 77008 invoked from network); 12 Jun 2007 21:16:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2007 21:16:17 -0000 Received: (qmail 60018 invoked by uid 500); 12 Jun 2007 21:16:20 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 59979 invoked by uid 500); 12 Jun 2007 21:16:20 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 59967 invoked by uid 99); 12 Jun 2007 21:16:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2007 14:16:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of enriquer9@gmail.com designates 209.85.146.179 as permitted sender) Received: from [209.85.146.179] (HELO wa-out-1112.google.com) (209.85.146.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2007 14:16:16 -0700 Received: by wa-out-1112.google.com with SMTP id k40so3220084wah for ; Tue, 12 Jun 2007 14:15:55 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cG0IsFS11ZoD3rVXrM3mv6pi8kDSWhzp6OOli7OUgwiFOJRwdmbBVcvrftlGudBRqPSEN0/h6SIaEZiKU1DpKADn5Bv+K1PVtiw8RrZ8gsw0AD6w82+IzAYa7JQQwh/b43fEV9CuD372KlCIAwEVd1a7xksv+m3iFN4Fs9eSU5s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cfOzxMV3NUwU+U6pF7/nZR/s2SgljlesxS9wl7BBpRUHwj8myBC3CmATY4yxO7yKohDV4nUCeeuLXABVsq66rmk+ovSEgsUY0QVkTtvlPTuf/EAUBYKyozDn63GTIlJlFWqOWPTf7344p6LAFuyR07xP1z0u6bkD2nV6+1wNn1U= Received: by 10.114.134.1 with SMTP id h1mr7142931wad.1181682955128; Tue, 12 Jun 2007 14:15:55 -0700 (PDT) Received: by 10.115.111.7 with HTTP; Tue, 12 Jun 2007 14:15:50 -0700 (PDT) Message-ID: <568753d90706121415s77cf96e9g80c78acee11e2c76@mail.gmail.com> Date: Tue, 12 Jun 2007 14:15:50 -0700 From: "Enrique Rodriguez" Reply-To: erodriguez@apache.org To: "Apache Directory Developers List" , jvermillard@archean.fr Subject: Re: DNS : RecordStore In-Reply-To: <1181658958.24438.34.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1181658958.24438.34.camel@localhost> X-Virus-Checked: Checked by ClamAV on apache.org On 6/12/07, Julien Vermillard wrote: > ... > 1# > In DNS protocol, the RecordStore interface > http://tinyurl.com/2prg84 I added your suggestion, re: generics and some minor Javadocs. I recently completed a Javadoc run on Kerberos and Change Password and DNS was on my TODO list. I'll step it up. > 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 set=new HashSet(); > HashMap attr= new HashMap(); > 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 ? Just eyeballing it, the only thing in 'attr' should be IP address. The rest is redundant (and domain name conflicts) with the info put into the RR constructor. What is your dig statement? If you query for "mydomaine.net" but are returning "totoz.net" that could give you a problem. With the above code you should be dig'ing: $ dig totoz.net and getting "192.168.66.66". Your reply could also be corrupted if UDP/TCP isn't being handled properly. Our DNS provider doesn't have TCP support, though it is trivial to add with MINA. TCP uses a 2-byte pre-pended size, which could be throwing off the client-side decode. Enrique