Web Server Demo Program

Joel Sherrill joel.sherrill at OARcorp.com
Wed Feb 26 17:46:28 UTC 2003



Mike Siers wrote:
> 
> Hi,
> I think my real problem is in the untarring of the IMFS image.
> I stepped through the function Untar_FromMemory().  This function
> takes an unsigned char pointer and a size value.  It does an offset
> into the buffer and a string length compare with the string "ustar  "
> and a length of 7.  This string compare is failing.  The string that
> I have in my buffer is just "ustar" instead of "ustar  ".
> 
> I am building using an OpenBSD system instead of the traditional
> Linux system.  Could this be my problem?  Or is this a bug in
> the untar function?  I will try hacking the function to see if it
> fixes my problem.

According to the OpenGroup tar.h specification, TMAGIC is "ustar"
which is "ustar plus null byte".  So I think it is incorrect to
assume that the space is there.  TMAGLEN is 6 as the length of 
TMAGIC.    The standard is online so you can read it yourself.

 
> Also, when I build the application, the call to i386-rtems-objcopy
> to create the tarfile.o object file gives a warning that the output
> file cannot represent architecture UNKNOWN.  Is this warning normal?

This is normal from my experience.

> Thanks
> Mike Siers
> 
> -----Original Message-----
> From: Mike Siers [mailto:mikes at poliac.com]
> Sent: Wednesday, February 26, 2003 9:52 AM
> To: RTEMS Users
> Subject: Web Server Demo Program
> 
> Hi,
> I am trying to get the http demo up and running.  I am
> using RTEMS snapshot 20021118 and network demos 20021018.
> 
> The http task (rtems_httpd_daemon) first calls to get the
> host name (gethostname) and then calls to get the host
> address (gethostbyname).  The gethostbyname() function
> is failing.  I have added an entry into the rootfs/etc/hosts
> file for my host name but when gethostbyname() does an
> fopen() on the host file, the fopen call fails.  I have my
> CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS set to 20.
> 
> Any thoughts or hints on how I can get the http demo to
> work would be greatly appreciated.
> 
> Thanks
> Mike Siers



More information about the users mailing list