[BUG] Linux 2.8 VM running the Network Unit tests

Ned Konz ned at bike-nomad.com
Tue Jul 18 05:58:40 UTC 2000


Rob Withers wrote:

> sqSocketRemotePort(peername  -1,  AF_INET  2,  socketFamily  10273)
> 
> It looks like the socket family is wrong for some reason.   I don't
> think I can test this one further, as I've never tested the contents of
> a sockstruct before...sorry.

I'm sure you know this, but remember that some of these things are other
than "int" sized (like unsigned short, etc.). Make sure you cast them
into ints or unsigned ints before passing them to fprintf.

I've been bit before by this...

Also, there's no guarantee that these numbers (error codes, flag values, etc.)
have predictable values between operating systems; there should probably
be a lookup table on one side or another (that is: either don't return raw C
return
values, or be able to decode them on the Smalltalk side).

Hmm... what about making a primitive that just returns a lookup table
that can be made into a Dictionary? It could be returned in a Smalltalk-supplied
buffer, as a series of:

	name (NUL terminated string), value (4-byte integer value)

pairs.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list