From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11202 invoked by alias); 8 Nov 2007 08:23:04 -0000 Received: (qmail 11191 invoked by uid 22791); 8 Nov 2007 08:23:03 -0000 X-Spam-Check-By: sourceware.org Received: from pop132.ocn.ne.jp (HELO pop132.ocn.ne.jp) (60.37.31.215) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Nov 2007 08:22:57 +0000 Received: from ariga (p1143-ipbf2202marunouchi.tokyo.ocn.ne.jp [122.17.131.143]) by pop132.ocn.ne.jp (OCN) with SMTP id lA88MqtG009171; Thu, 8 Nov 2007 17:22:52 +0900 (JST) Message-ID: <001001c821e0$8d1edc60$1c0110ac@ariga> From: "ariga masahiro" To: "Gary Thomas" , "Alok Singh" , "Andrew Lunn" Cc: References: <47173F99.80405@mlbassoc.com> <000601c8120c$667aa3c0$1c0110ac@ariga> <47187EEB.5020109@mlbassoc.com> <000501c8154d$ecc04db0$1c0110ac@ariga> <000301c816ab$6acbf7f0$1c0110ac@ariga> <000a01c81a9e$6b8c2240$1c0110ac@ariga> <001a01c82044$937a9b50$1c0110ac@ariga> <001501c8204f$486d3180$1c0110ac@ariga> <20071106083527.GB16191@lunn.ch> <000301c820cf$6a8a0b50$1c0110ac@ariga> <000801c820da$3d702c20$1c0110ac@ariga> <002101c8210d$f76211b0$1c0110ac@ariga> <001301c82117$a6bb3430$1c0110ac@ariga> <002101c821aa$8ea9d1b0$1c0110ac@ariga> Date: Thu, 08 Nov 2007 08:23:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Can't Connect,TCP CHECKSUM INCORRECT X-SW-Source: 2007-11/txt/msg00048.txt.bz2 Hello, Please read this mail with next consent. I never doubt anything of eCos source code. I just like to find out suffering points because of hardware oddity and my bad concoction.I beseech you to help me find that suffering points. And I mail this if my discovery have any merit for you to pinpoint that suffering points.I am not good at TCP/IP.My opinion is greatly loaded with conjectures. I traced tcp_output function. It looks to me, at tcp_output's next points, append option part. line 688-691 if (optlen) { bcopy(opt, th + 1, optlen); th->th_off = (sizeof (struct tcphdr) + optlen) >> 2; } Although peer sent 8 bytes option,optlen was 4. Also it looks to me, in generating SYN-ACK packet, at next switch sentence, case (TH_SYN|TH_ACK) context should be executed. But it all passed out these block, never entered if sentence(line 445) block. At that time tp->t_flags was 0xA1,flags was 0x12. line 445-510 /* * Send `CC-family' options if our side wants to use them (TF_REQ_CC), * options are allowed (!TF_NOOPT) and it's not a RST. */ if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC && (flags & TH_RST) == 0) { switch (flags & (TH_SYN|TH_ACK)) { /* * This is a normal ACK, send CC if we received CC before * from our peer. */ case TH_ACK: if (!(tp->t_flags & TF_RCVD_CC)) break; /*FALLTHROUGH*/ /* * We can only get here in T/TCP's SYN_SENT* state, when * we're a sending a non-SYN segment without waiting for * the ACK of our SYN. A check above assures that we only * do this if our peer understands T/TCP. */ case 0: opt[optlen++] = TCPOPT_NOP; opt[optlen++] = TCPOPT_NOP; opt[optlen++] = TCPOPT_CC; opt[optlen++] = TCPOLEN_CC; *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send); optlen += 4; break; /* * This is our initial SYN, check whether we have to use * CC or CC.new. */ case TH_SYN: opt[optlen++] = TCPOPT_NOP; opt[optlen++] = TCPOPT_NOP; opt[optlen++] = tp->t_flags & TF_SENDCCNEW ? TCPOPT_CCNEW : TCPOPT_CC; opt[optlen++] = TCPOLEN_CC; *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send); optlen += 4; break; /* * This is a SYN,ACK; send CC and CC.echo if we received * CC from our peer. */ case (TH_SYN|TH_ACK): if (tp->t_flags & TF_RCVD_CC) { opt[optlen++] = TCPOPT_NOP; opt[optlen++] = TCPOPT_NOP; opt[optlen++] = TCPOPT_CC; opt[optlen++] = TCPOLEN_CC; *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send); optlen += 4; opt[optlen++] = TCPOPT_NOP; opt[optlen++] = TCPOPT_NOP; opt[optlen++] = TCPOPT_CCECHO; opt[optlen++] = TCPOLEN_CC; *(u_int32_t *)&opt[optlen] = htonl(tp->cc_recv); optlen += 4; } break; } } Possibly I am wrong,anyway I inform you on the risk of showing ignarance. I sincerely beseech your help. Masahiro Ariga -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss