[openbeosnetteam] Re: New stack

  • From: "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx>
  • To: "OpenBeOS Network" <openbeosnetteam@xxxxxxxxxxxxx>
  • Date: Wed, 23 Jul 2003 13:31:16 +0200

> Vladimir reikine told us:
> > >> > I could really need some way to set up nameservers from the kernel.
> > >>
> > >> And editing /etc/resolv.conf is not an option?
> > >
> > >Editing a file from kernel-land? I would not like to do that.
> > It should be the same as regular DHCP client, IMHO.
>
> I'm not familiar with regular DHCP client way to do it.
> Someone care to give details?

Most clients (did not look at all clients) edit the resolv.conf file.
Linux PPPd (2.4.0) adds its entries to /etc/ppp/resolv.conf.

> > >I did not think of a DNS protocol module. Instead, the protocol itself
> > >should do that. An IPv4 nameserver should be added to the IPv4 module.
> > >The DNS module could work, too.
> > >Are there any cases where moving the nameserver from its protocol to
the
> > DNS
> > >module is better? I think it is sufficient to add the entries as
attributes
> > >to the protocol.
> >
> > I don't think that it would be suffucient.
> > gethostbyname() should not depend on what protocol is used.

Do we not need to implement it for each protocol, anyway? How does our
libnet know how to handle IPv6 DNS servers (or something completely
different)?
Is it not the same as calling the protocol module (IPv4, IPv6, etc.)
directly? We need to implement the code for retrieving IPv4 addresses and in
addition to this we need to implement the IPv6 code. But I think those code
blocks were similar, so it might be a good idea to put IPv4 and IPv6
together. What about other protocols?

> Agreed, you got a point.
> So, we're back to name resolver in userland libnet.so, but how to
> dynamicly setup nameserver(s) from kernel land modules?

The dynamic nameservers should be stored as attributes. The stack driver
should allow to talk directly to modules. This way we can talk to the DNS
module and ask for all dynamic attributes called "DNS".
Did you plan something different?

> > Moreover, it shouldn't depend on interface neither (PPP is going
> > to be bound to particular interface, right ?)

I do not understand what you mean here.
To the user PPP will be an interface (ppp0, ppp1, etc.) like ethernet (eth0,
eth1, etc.) only with a different type.
I hope this answers your question.

> But the nameserver(s) used to achieve a gethostbyname() call can/would be
> differents for each interface(s), no?

It could be useful to be interface-specific sometimes because some
DNS servers might be only usable on the authenticated interface (trying to
use another dial-up link could result in problems); though, I really doubt
that.

Most DHCP clients (maybe there are exceptions) just edit /etc/resolv.conf.
So they are not interface-specific.

> > Aren't we going to be POSIX compliant one day, are we ?
> > DNS client daemon/module is the only solution I can see.
>
> You seems to have wider knowlegde on DNS support than me.
> Not that's so hard ;-)
> Anyway, being POSIX compliant implies we should have working get*by*()
calls,
> but not how they should works behind the scene...

Right.

> ISC BIND is best option, obvioulsy, but we need to fix our port currently
in
> libnet.so. Making multithread aware, at least.

Just curious: Which fixes are needed? :)

Waldemar


Other related posts: