res_send and Ipv6 address

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


Please use "reply all" when replying, since you posted to the list in
the first place, and this information might be useful to others, too.



On 8/22/05, appaji arunkumar <arun_appaji at yahoo.co.in> wrote:
> Hi Stefan,=20
>  =20
> No, the IPv6 address is not changing frequently. I need to know my m/c IP=
v6
> address when m/c boot up.=20

What is m/c?=20

>  =20
> I have tried with storing  IPv6 name server list in the _init structure b=
ut
> there are some bugs  need to rectify, an experiment is going on.., mean
> while i have found that in the resolv.h file, the default file to look up
> the name server is resolv.conf file. Is is possile to change that file an=
d
> place my file.conf to access the name server. If I do that, by default fo=
r
> all name queries,  my IPv6 address name server is looked up?? or should I
> store my IPv6 name server address under domain name to be looked up and l=
et
> the program access my file.conf??

Well you could compile a version of libbind that reads in another
configuration file than resolv.conf, however, everything that links to
it (maybe other apps of yours, if there are any besides the one you're
talking about) will use that configuration, too. This doesn't affect
the resolver library provided with the system and the apps using it,
they will still use whatever is in /etc/resolv.conf

If you just need one app to access that nameserver, using a separate
configuration file would be an idea; adding it to the global
resolv.conf will make the system resolver library query that
nameserver, too, which you might not want. You would just have a
myresolv.conf or something like that with 'nameserver aaaa:bbbb:...',
where aaaa:bbbb:... etc. is the IPv6 address of the nameserver. I
haven't tried that to see if it works (I've only worked with libbind
over IPv4) , but I suppose it should.

If you've found some bugs in the libbind code which seem easy to fix,
you can submit a patch, but IIRC that code is dead now. I think only
security fixes are being applied, nothing else.

>=20
> Stefan Puiu <stefan.puiu at gmail.com> wrote:=20
> 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.
>=20
> OTOH, why don't you add the IP address to resolv.conf? Is it changing
> on a regular basis?
>=20
> On 8/19/05, appaji arunkumar 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.c=
onf
> > 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
> name
> > server to be contacted without reading resolv.conf to get IPv6 address =
for
> > the given domain name. Is it possible to use res_send() to send query t=
o
> > given IPv6 address name server?? by appending given IPV6 address to _in=
it
> > structure??=20
> >=20
> > kindly advice me.=20
> >=20
> > thanking you,=20
> >=20
> > arun.
> >=20
> > Stefan Puiu 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. Lo=
g
> 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 l=
ots
> > more.=20
> > http://in.promos.yahoo.com/rakhi/index.html
>=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=20
>=20
>



More information about the bind-users mailing list