This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: IP stack: gethostbyname, gethostbyaddr
- To: Fano Ramparany <Fano dot Ramparany at rd dot francetelecom dot fr>
- Subject: Re: [ECOS] IP stack: gethostbyname, gethostbyaddr
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- Date: Thu, 15 Mar 2001 16:50:56 +0100
- Cc: eCos Disuss <ecos-discuss at sourceware dot cygnus dot com>
- References: <3AB0D0FE.142AA3EE@rd.francetelecom.fr>
On Thu, Mar 15, 2001 at 03:26:06PM +0100, Fano Ramparany wrote:
> Given that gethostbyname and gethostbyaddr (defined in file gethost.c)
> are not implemented yet, is there a way to make a tcp connection to a
> given host (I'd like to develop a client application on my target).
Yes. These functions just do address resolution using DNS and
/etc/hosts etc. If you know the IP address, eg, 192.168.9.32 call
inet_aton and it will return a value to put into an sockaddr structure
and pass to connect.
If you want to use names, thats another matter. There is no DNS
support yet. Its something i keep thinking about, but never get around
to. It should not be too hard to port resolv from bind.
Andrew