This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: IP stack: gethostbyname, gethostbyaddr


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]