From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6395 invoked by alias); 22 Apr 2004 12:37:36 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 6388 invoked from network); 22 Apr 2004 12:37:36 -0000 Received: from unknown (HELO mail.broadpark.no) (217.13.4.2) by sources.redhat.com with SMTP; 22 Apr 2004 12:37:36 -0000 Received: from famine (217-13-20-38.dd.nextgentel.com [217.13.20.38]) by mail.broadpark.no (Postfix) with ESMTP id 6508E3317 for ; Thu, 22 Apr 2004 14:37:41 +0200 (MEST) From: =?ISO-8859-1?Q?=D8yvind?= Harboe To: ecos-discuss@sources.redhat.com Content-Type: multipart/mixed; boundary="=-iknG35R8Ndo2K+uaHr10" Organization: Zylin AS Message-Id: <1082637454.19993.21.camel@famine> Mime-Version: 1.0 Date: Thu, 22 Apr 2004 15:14:00 -0000 Subject: [ECOS] Problems with ppp and Windows X-SW-Source: 2004-04/txt/msg00327.txt.bz2 --=-iknG35R8Ndo2K+uaHr10 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-length: 1133 I've run out of food and drink. This will be my last note in my log :-) - the problem is that accept() in the attached application does not wake up until I kill the telnet process. I'm pretty confident that this app is correct, because it works when I compile and runit from CygWin. - Debugging TCP/IP is really difficult without an in depth knowledge of TCP/IP and the freebsd stack. However, I believe that accept() should be awoken by the invocation of soisconnected() from tcp_input.c since this is what happens when I kill the windows telnet process. I don't know what the significance, if any, it is that TCPOPT_CC is not received and hence a "3 way handshake" is to be used instead. - As near as I can tell, Windows believes it is connected, because I receive packets in my eCos application for the text I typed into the telnet session before I kill the telnet process. - I've submitted various patches lately in this regard, but nothing earthshattering. Attached: echo.c CygWin/Linux echo app. Same code gets stuck on accept() w/PPP, Windows PPP server when running under eCos. -- Øyvind Harboe http://www.zylin.com --=-iknG35R8Ndo2K+uaHr10 Content-Disposition: attachment; filename=echo.c Content-Type: text/x-c; name=echo.c; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 1341 #include #include #include #include #include #include #include #include int main() { int sd, sd_current; struct sockaddr_in sin; struct sockaddr_in pin; /* get an internet domain socket */ if ((sd = socket(AF_INET, SOCK_STREAM, 0)) != -1) { /* complete the socket structure */ memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = INADDR_ANY; sin.sin_port = htons(23); /* bind the socket to the port number */ if (bind(sd, (struct sockaddr *) &sin, sizeof(sin)) != -1) { /* show that we are willing to listen */ if (listen(sd, SOMAXCONN) != -1) { /* wait for a client to talk to us */ socklen_t addrlen = sizeof(pin); if ((sd_current = accept(sd, (struct sockaddr *) &pin, &addrlen)) != -1) { for (;;) { /* get a message from the client */ char dir[10]; int len; len=recv(sd_current, dir, sizeof(dir), 0); if (len == -1) { break; } /* acknowledge the message, reply w/ the file names */ if (send(sd_current, dir, len, 0) != len) { break; } } /* close up both sockets */ close(sd_current); } } } close(sd); } return 0; } --=-iknG35R8Ndo2K+uaHr10 Content-Type: text/plain; charset=us-ascii Content-length: 148 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss --=-iknG35R8Ndo2K+uaHr10--