How to Enable DNS (Using PPPD)

Mike Siers mikes at poliac.com
Thu Nov 1 15:26:14 UTC 2001


Hi Chris,
Thanks for the hints.  The current version of the pppd code does
have a reference to the resolv.conf file.  I would prefer to have
the DNS entries updated using C code directly since my application
has no need for a file system.

I have added code to set the rtems_bsdnet_nameserver_count and
rtems_bsdnet_nameserver[] values.  But my calls to gethostbyname()
are still failing (error code 2).  I will try a few other things
and let you know if I get it to work.

Mike Siers

-----Original Message-----
From: cjohns at kiwi.objectivedesign.com.au
[mailto:cjohns at kiwi.objectivedesign.com.au]On Behalf Of Chris Johns
Sent: Tuesday, October 30, 2001 4:27 PM
To: rtems
Subject: Re: How to Enable DNS (Using PPPD)


> Mike Siers wrote:
> 
> I am using pppd to make a network connection and I would like
> try and enable DNS.  The non-RTEMS pppd code just creates
> a resolv.conf file.  Is this the way to enable DNS under RTEMS?

It is one way and I feel the best as it is the way the TCP stack is
designed to work. In the lastest snapshot (I think) look for some code
under "c/src/libmisc/rootfs" that helps create a root fs with these
files.

> Or are there some C functions that I can call to enable the service
> (this is how I would prefer to do it).

Not sure. I know the stack has been changed to read some DNS entries
from the rtems_bsdnet_nameserver structure. Look in
"c/src/libnetworking/libc/res_init.c".

> 
> Any information would be greatly appreciated.
> 

I did notice the lastest pppd code has a reference to
"/etc/ppp/resolv.conf". I am not sure if this used.

-- 
 Chris Johns, cjohns at cybertec.com.au





More information about the users mailing list