Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gethostbyname ?




hi,all
I had use Etherboot 4.2.10 and intel eepro100 to construct diskness workstation.(use ramdisk)
it looks like fine but ....
here:

/* kernel 2.2.15 redhat 6.0 
 filename test_gethostbyname.c 
 gcc -o test_gethostbyname test_gethostbyname.c
*/
 
#include <netdb.h>
int main()
{
    struct hostent *p;
    if (( p = gethostbyname("myname")) == NULL) { 
        printf("\n ERROR: return NULL");
        exit(0);
    } else {
        ......
    }
     return;
}

always "ERROR return NULL"
why?
 
my system environment is simple.
>less /etc/inittab
#  no login
id:3:initdefault:
si::sysinit:/etc/rc
1:3:respawn:/bin/sh

>less /etc/rc
#!/bin/sh
/bin/mount -av
/bin/hostname myname
/bin/insmod /module/eepro100.o
/bin/ifconfig eth0 192.168.0.3

>less /etc/fstab
/dev/ram0    /      ext2 defaults
/proc        /proc  proc defaules


no other

some hint?
need you help.   
    

===========================================================================
This Mail was sent to netboot mailing list by:
"jyllyj" <jyllyj@163.net>
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.