Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[VxW] using gethostname in vxworks

964 views
Skip to first unread message

linux guy

unread,
Apr 7, 2003, 12:33:43 AM4/7/03
to vxwe...@csg.lbl.gov
hi,guys
I'm porting some code to vxworks,,but when I rebuild the vxworks image,
it tells me that
undefined reference to `gethostbyname'
undefined reference to `gethostbyaddr'

I don't know wether the are some file similar with netdb.h in vxworks(I search them but no result),
anybody can give me any hint?
--
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze

Manjunath Bhat

unread,
Apr 7, 2003, 12:57:57 AM4/7/03
to vxwe...@csg.lbl.gov
Hi,
change it to 'hostGetByName' and 'hostGetByAddr' respectively....look into
the manuals for details...

HTH,
Manjunath.

>_______________________________________________
>VxWorks Users Group mailing list
>VxWe...@lbl.gov
>http://www-csg.lbl.gov/vxworks/


_________________________________________________________________
Say it now. Say it online. http://www.msn.co.in/ecards/ Send e-cards to your
love

Peter Du

unread,
Apr 7, 2003, 1:10:04 AM4/7/03
to VxWorks Users Group List
please check detail manual help guider. please change "gethostbyname" to "hostgetbyname"
"gethostbyaddr" to "hostgetbyaddr"

hostGetByAddr( )
NAME
hostGetByAddr( ) - look up a host in the host table by its Internet address

SYNOPSIS

STATUS hostGetByAddr
(
int addr, /* inet address of host */
char * name /* buffer to hold name */
)hostGetByName( )NAMEhostGetByName( ) - look up a host in the host table by its nameSYNOPSISint hostGetByName
(
char * name /* name of host */
)Peter

----- Original Message -----
From: "linux guy" <linu...@linuxmail.org>
To: <vxwe...@csg.lbl.gov>
Sent: Monday, April 07, 2003 12:33 PM
Subject: [VxW] using gethostname in vxworks

Shibasis Ganguly

unread,
Apr 7, 2003, 1:10:25 AM4/7/03
to VxWorks Users Group List
Hi,
The functions are hostGetByName( ) and hostGetByAddr( ) . Both of them are
defined is hostLib.h.
Here hostLib is the library for these functions.First check the function
prototype.Then Please verify whether your vxworks image contains the libary
(host lib).Before any of the routines in this hostLib library module can be
used, it must be initialized by hostTblInit( ). This is done automatically
if the configuration macro INCLUDE_NET_INIT is defined in config.h.
Thanks & Regards,

Shibasis Ganguly
S/W Developer Real time Group
Rebaca consultant (Pvt) Ltd
Block EP & GP,Sector-V
Salt lake city, calcutta-91.
e-mail: shib...@rebaca.com
phone: +91-33-23577177
fax: +91-33-2357 7178
mobile: 98303 11406
webside: www.rebaca.com

linux guy

unread,
Apr 7, 2003, 1:38:13 AM4/7/03
to vxwe...@csg.lbl.gov
thx a lot~

----- Original Message -----
From: "Manjunath Bhat" <mrb...@hotmail.com>
Date: Mon, 07 Apr 2003 04:57:57 +0000
To: vxwe...@csg.lbl.gov
Subject: Re: [VxW] using gethostname in vxworks

> Hi,
> change it to 'hostGetByName' and 'hostGetByAddr' respectively....look into
> the manuals for details...
>
> HTH,
> Manjunath.
>
>
>
> >From: "linux guy" <linu...@linuxmail.org>
> >Reply-To: VxWorks Users Group List <vxwe...@csg.lbl.gov>

> >To: vxwe...@csg.lbl.gov
> >Subject: [VxW] using gethostname in vxworks

> >Date: Mon, 07 Apr 2003 12:33:43 +0800
> >

> >hi,guys
> >I'm porting some code to vxworks,,but when I rebuild the vxworks image,
> >it tells me that
> >undefined reference to `gethostbyname'
> >undefined reference to `gethostbyaddr'
> >
> >I don't know wether the are some file similar with netdb.h in vxworks(I
> >search them but no result),
> >anybody can give me any hint?
> >--
> >______________________________________________
> >http://www.linuxmail.org/
> >Now with e-mail forwarding for only US$5.95/yr
> >
> >Powered by Outblaze
> >_______________________________________________
> >VxWorks Users Group mailing list
> >VxWe...@lbl.gov
> >http://www-csg.lbl.gov/vxworks/
>
>

> _________________________________________________________________
> Say it now. Say it online. http://www.msn.co.in/ecards/ Send e-cards to your
> love
>

0 new messages