discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnustep making me crazy


From: Richard Frith-Macdonald
Subject: Re: gnustep making me crazy
Date: Tue, 7 May 2002 20:20:22 +0100

On Tuesday, May 7, 2002, at 06:18 PM, Kees Cook wrote:

On Tue, May 07, 2002 at 04:59:36PM +0100, Richard Frith-Macdonald wrote:
It's the network address that the server is using ... it should be
0.0.0.0:0 (INADDR_ANY)
The fact that it's not would seem to indicate something severely wrong
with something on your system.
Perhaps the networking headers, perhaps the compiler, perhaps something
else entirely.
This is *so* wrong, that the only thing I can think of to try to track
it down is to
run the program under gdb and step through it line by line to see where
things are going wrong.

strace says:

socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("191.0.0.0")}}, 16) = -1 EADDRNOTAVAIL (Cannot assign requested address)

Hm, so here's where it's happening. There doesn't appear to be any config
files that it's coming from.

What can I do with gdb to catch it before the error?

You need to break in the GSTcpPort method +portWithNumber:onHost:forceAddress:listener:
and see what that is doing ...

It should be called with arguments 0, nil, nil, YES ... which should cause the bind() to be called with an
address of INADDR_ANY (see GSTcpPort.m).

The question is ... why is that looking like 191.0.0.0 when I would expect it to look like 0.0.0.0 ?

It could be some configuration problem effecting the GSSwapHostI32ToBig() function (See NSByteOrder.h), or could be an error on the internet header files, or could be something else???




reply via email to

[Prev in Thread] Current Thread [Next in Thread]