[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Fwd: SRV support in konqueror ?
From:       Peter_Håkanson <peter () ipsec ! nu>
Date:       2001-07-25 12:48:02
[Download RAW message or body]

On 25 Jul 2001, Thiago Macieira wrote:

> 
> 
> On Tue, 24 Jul 2001 09:52:29 -0700, Waldo Bastian <bastian@kde.org> wrote :
> 
> > We pretty much depend on the operating system to do the DNS for us. We 
> use 
> > getaddrinfo(3) to do name lookups. getaddrinfo is part of glibc and I 
> assume 
> > that support for SRV should be added there.
> > 
> > Thiago is our DNS expert though, maybe he can give you a better answer.
> > 
> > > I hope i address the right person here, but i would like
> > > an added feature in konqueror, namely the ability to
> > > examine and follow DNS SRV records.
> 
> Hmm, that's an interesting feature. However, there's no way we can do that 
> now without sending the DNS packets ourselves, or with use of the libresolv 
> library (or equivalent). We have to set up the packets, send them, wait for 
> the answer and then cache them. Maybe a daemon could be set up to do that.
True, but i doubt that it would be _that much work_ I could 
contribute som c-code here

Doing it yourself , right before the getaadrinfo() ( yes, it's
here it should be done, since the SRV gives back a FQDN that should be used)
See it as a filter that is given an fqdn and returns a struct
containing an array of fqdn+port numbers.
> 
> However, there are two better ways:
> 1) wait for getresrrset function or something like that, that is to be 
> included in the BIND 9 API and would allow us to ask for a resolution of a 
> certain RR kind, not necessarily A, AAAA, A6 or PTR
you still need to do a second lookup, since the data returned in
the SRV record is a port and a fqdn. So a second question is needed.

> 2) wait for the SRV API to be standardised and be supported by the 
> underlying resolving layer. When that is so, I trust getaddrinfo will do 
> that for us, without the need to rewrite anything else in the code, except 
> to have the service port ("http", for instance) be passed on to the 
> resolution, instead of doing getservbyname(3).
I don't thing getaddrinfo() will ever do this since that would
break existing code. And, in addition, teh resolver api _does_
support srv ( has done for a long time). It's only the
"convenience routines" ( getnnnbyzzz() that does not ( and will
break if adjusted)

Additionally, doing the resolver calls yourself will liberate
from different platforms peculiar ways of dealing with dns.

See rfc2782 for details how it's supposed to work.

Regards
> 
> 
> --
>   Thiago Macieira - UFOT Registry number: 1001
>  thiagom@mail.com
>    ICQ UIN: 1967141  PGP: 0x8F2978D5 and 0xEA9037A5 (PGP 2.x)
>      Registered Linux user #65028
> 
> 
> 

--  
-- quote of the week 
        There's never money to do it right, but always money to do it
	again ... and again ... and again ... and again.

=========================================================================
Peter Håkanson            Phone     +46707328101       Fax +4631223190
IPSec sverige                Email      peter@ipsec.nu  
"Safe by design"             Address    Bror Nilssons gata 16  Lundbystrand
                                        S-417 55  Gothenburg   Sweden         

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic