This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Info on "Can't open display"
- To: robert dot collins at itdomain dot com dot au, cygwin-xfree at cygwin dot com
- Subject: Re: Info on "Can't open display"
- From: "Christopher Landrieu" <landrieu at hotmail dot com>
- Date: Fri, 15 Jun 2001 06:12:08
>From: "Robert Collins" <robert.collins@itdomain.com.au>
>Chris, the important point is that TeraTermSSH does not do TCP/IP with
>the xclient library code. I think we are all agreed that the X protocol
>per se is not the fault.
That is where I believe the problem is happening (in the xclient library
code). I absolutely agree that it is not the XProtocol layer that is at
fault. I believe it is how the xclient library code is trying to setup or
use the socket connection. It may be setting some socket options or TCP
options that are not properly or fully supported by cygwin's implementation
of the socket APIs. Or, maybe cygwin's socket API implementation is using
some funky features that Aventail breaks. What I would like to understand
is: what are the xclient libs doing beyond the usual
socket()...connect()...send() & recv()...close() sequence. Since no other
cygwin programs seem to be affected by Aventail, there must be something
here that the xclient libs are doing different.
> > to try. Do you have any recommendations?
>
>Uh yeah, try to establish answers to my fact finding questions suggested
>below.
Sorry, I meant any suggestions for other xclients (non-cygwin/xfree86) that
I could test with. I don't know many other free xclient apps for windows.
>Have you examined this or attempted to confirm your guess? I asked the
>question _because_ there are multiple answers.
I've done my share of client/server socket programming and, in general, the
following model is used in the most architectures:
clients: socket()...connect()...[ send() & recv() ]...close()
servers: socket()...bind()...listen()...[ accept()...[ send() & recv() ]
]...close()
(where square brackets [] denote loops)
I haven't yet looked at the socket calls in TeraTermSSH but you can see that
it is generally what is happening by playing with netstat. It will show you
sshd listening to port 6010 on the remote host and you can see TeraTermSSH's
connection from localhost random-port to localhost port 6000. It is this
local connection that should be equivalent to the cygwin/xfree86 xterm
connecting to localhost port 6000.
>... You are wrong about "all tcp/ip client programs unbound". TCP/IP
>client can ask for a random port on a random interface (a)
... which is basically just a socket() call and a connect(). In this case
thereis no opportunity to specify a source interface and port number.
>or a specific
>port on a random interface (still a - I wasn't worried about the
>partocular port)
... huh? How would you do that?
>or a random port on a given interface (one of b or c)
... Again, huh? How?
>or a specific port on a specific interface (one of b or c).
... using socket()...bind(), which is what server apps do.
>Chris, your guesssing is not helping debug the problem. Binding to a
>specific port on all interfaces != being "unbound" where you bind to a
>port, and no specific interface. (Binding to all interfaces you need to
>call bind() multiple times oince for each interface).
Actually, this is untrue. If you specify INADDR_ANY in the bind call, all
local interfaces are bound to one socket at the specified port.
> > >That sounds to me like Aventail dropping the connection.
> >
> > What is your reasoning?
>
>You see the beginning of a normal 3-way handshake, and then a ack|fin
>packet. That looks like a program other than the one listening on the
>socket interfering with the tcp session to get the remote end to drop
>it.
Oh... good thinking. I hadn't considered that possibility.
Chris
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com