How to Enable DNS (Using PPPD)

Fernando RUIZ CASAS (E-mail) fernando.ruiz at ctv.es
Fri Nov 2 08:33:30 UTC 2001


It's possible normalize the creation of a common rootfs tree with 
ALL the files necesaries for each modules but in a shared place?

I can think around /etc files like /dev directory.

In shell.c I have placed a 
 write_file(char * file_name,char * contents)
in order to write a file from a constant. With this I can write 
/etc/passwd, /etc/group & more. 

The first action is call to getpwent("root") in order to 
setup the directories environment making a mkdir("/etc")
in the rtems filesystem startup code like size effect.
I would to have all of this in a more friendly way.

I can think about the tcp/ip stack files to be builded in a common
procedure.
Fernando RUIZ CASAS

home:correo at fernando-ruiz-com
work:fernanro.ruiz at ctv.es



-----Mensaje original-----
De: cjohns at kiwi.objectivedesign.com.au
[mailto:cjohns at kiwi.objectivedesign.com.au]En nombre de Chris Johns
Enviado el: viernes, 02 de noviembre de 2001 3:58
Para: Mike Siers
CC: rtems-users at oarcorp.com
Asunto: Re: How to Enable DNS (Using PPPD)


Mike Siers wrote:
> 
> 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.
> 

Well the TCP/IP stack needs a small number of files. To me the over head
of using them is worth it.

> I have added code to set the rtems_bsdnet_nameserver_count and
> rtems_bsdnet_nameserver[] values.

I do not think this code should be put back into RTEMS as this allows
applications to use interfaces that are not standard to the stack. These
RTEMS extensions may not exists in future ports of the stack as the
filesystem now exists and is stable.

>  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.

The entries are only read from this table at start up. By the time you
add the extra code to support a C function call API I suspect you will
use more memory than the file will use. Please reconsider using the
file.

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




More information about the users mailing list