Call gethostbyname with FFI?

Lex Spoon lex at cc.gatech.edu
Fri Feb 11 01:26:33 UTC 2000


John Clonts <jclonts at mastnet.net> wrote:
> 
> I havent yet explored the FFI but it seems very flexible.  I wonder if I
> could use it to call 
> 
> 	hostent * gethostbyname( char * hostname);
> 
> And pull the address out of the resulting hostent struct?
> 
> (The reason: the primitive called by my NetNameResolver always returns
> 0.0.0.0, so maybe this is another way to skin the cat)
> 


Of course, duh, the right thing to do is fix that primitive, not lop
more code on top of it to work around it.  If you patch it, I'm sure
many people would be happy :)  Just look in sqUnixNetwork.c.... 
(assuming you are on unix, since you are talking about gethostbyname())


Lex





More information about the Squeak-dev mailing list