res_send and Ipv6 address

Stefan Puiu stefan.puiu at gmail.com
Mon Aug 22 08:08:45 UTC 2005


Not looking at the libbind code (which I haven't used in at least
months), I think you are correct - you need to modify the res_state to
add this IP(v6) address to the ns address list. IIRC, the IPv6
addresses were stored in the ext part indeed, but I can't tell you for
sure; I guess you should experiment with it, and also set RES_DEBUG in
the resolver options, that should show you quite clearly what
nameserver is being queried, what happens, etc.

OTOH, why don't you add the IP address to resolv.conf? Is it changing
on a regular basis?

On 8/19/05, appaji arunkumar <arun_appaji at yahoo.co.in> wrote:
> Hi stefan,=20
>  =20
> Thanx for your kind reply.=20
>  =20
> Actually when we call res_init(), it reads the address from the resol.con=
f
> file. and res_send() senda  name lookup  query to the name servers listed=
 in
> the resol.conf file.=20
>  =20
> but I have a situation like , I am given directly with IPv6 address of na=
me
> server to be contacted without reading resolv.conf to get IPv6 address fo=
r
> the given domain name. Is it possible to use res_send() to send  query to
> given IPv6 address name server??  by appending given IPV6 address to _ini=
t
> structure??=20
>  =20
> kindly advice me.=20
>  =20
> thanking you,=20
>  =20
> arun.
>=20
> Stefan Puiu <stefan.puiu at gmail.com> wrote:=20
> I fail to understand what you want to do. If you want to fetch the
> IPv6 address for a domain name, you just need to do an AAAA query
> instead of A. The ext part in the resolver state, IIRC, is used to
> store IPv6 addresses of nameservers, but you shouldn't worry about
> that; the nsaddr[] vector is read in from /etc/resolve.conf, see
> lib/resolv/res_init.c in the BIND 8 source, or look for the res_init()
> function (I can't seem to remember the name of the actual function it
> calls to do the work, was it res_vinit?).
>=20
> On 8/16/05, appaji arunkumar wrote:
> >=20
> > Hi I am a Navie user to DNS.
> >=20
> > I would like to know, does BIND8 queries such as
> > res_send(), used if the underlying socket is IPv6.
> > and we are intresed to retrive the IPv6 address from
> > the name server. Given an IPv6 address of name server
> > X , is it possible that we can get IPv6 address for
> > the given domain name by adding address to
> > _res.EXT.ext->nsaddr[].sin, please suggest me am i
> > going in a right track??
> >=20
> > Thanx in advance,
> > Arun.
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> > ____________________________________________________
> > Send a rakhi to your brother, buy gifts and win attractive prizes. Log =
on
> to http://in.promos.yahoo.com/rakhi/index.html
> >=20
> >=20
> >
>=20
>=20
>  ________________________________
> Check out Yahoo! India Rakhi Special for Rakhi shopping, contests and lot=
s
> more.=20
>  http://in.promos.yahoo.com/rakhi/index.html



More information about the bind-users mailing list