From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15411 invoked by alias); 10 Jun 2012 02:34:43 -0000 Received: (qmail 15236 invoked by uid 22791); 10 Jun 2012 02:34:42 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,KHOP_THREADED,SARE_URI_EQUALS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 10 Jun 2012 02:34:29 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 9AE672F78008; Sun, 10 Jun 2012 03:34:28 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id etqXOobroHOc; Sun, 10 Jun 2012 03:34:27 +0100 (BST) Received: from lert.jifvik.org (jifvik.dyndns.org [85.158.45.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jlarmour@ecoscentric.com) by mail.ecoscentric.com (Postfix) with ESMTP id 315872F78001; Sun, 10 Jun 2012 03:34:27 +0100 (BST) Message-ID: <4FD407AD.1090102@eCosCentric.com> Date: Sun, 10 Jun 2012 02:34:00 -0000 From: Jonathan Larmour User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.10 MIME-Version: 1.0 To: darcy_diao@realsil.com.cn CC: ecos-maintainers@ecos.sourceware.org Subject: Re: ask help for port latest bsd tcp ip stack to eCos References: <3A17C6B2991D4973ADF4A89BECB1721F@realsil.com.cn> In-Reply-To: <3A17C6B2991D4973ADF4A89BECB1721F@realsil.com.cn> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-maintainers-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-maintainers-owner@ecos.sourceware.org X-SW-Source: 2012-06/txt/msg00001.txt.bz2 On 08/06/12 10:50, darcy wrote: > Dear all, > > The TCP/IP network stack of BSD included in eCos is out of date. > I want to port TCP/IP network stack from a latest FREEBSD version such as > 9.0. > I compared eCos 3.0 's bsd network stack with the one of 4.4 bsd and found > so many differences. > Can you give me some advices on network stack porting? It looks like you are already going down the route of what I would recommend: first trying to compare against the source base used for the initial port. However I suspect you don't have the correct source base. In fact, I thought the source base was a snapshot of the RELENG_4_4 branch of FreeBSD, as of 2002-01-07. But after some checks I now see it isn't a good match. In fact a particular KAME snapshot is the source base. I believe this should get you the source base you need for comparison: export CVSROOT=:pserver:anoncvs@anoncvs.kame.net:/cvsroot/kame cvs login cvs co -r freebsd4_snap_20020107 -P \ kame/freebsd4/sys/{netinet,netinet6,net,kern,netkey,sys} \ kame/kame/sys/{netinet,netinet6,net,kern,netkey} Once you have that, you will be able to make a better comparison with the files in eCos. Note that you have to find the files under both the kame/freebsd4 and kame/kame trees (although unhelpfully there are a few duplicates). With that, you will find the diffs are a lot more manageable. A lot of the changes that were done at the time of the port were to remove unnecessary things such as superuser permissions (suser()) and various sysctl runtime tunable parameters were simply removed. Many of the remaining differences can also be explained by subsequent changes (look in the eCos changelog). There are still plenty of changes left, but it will start to make a bit more sense than it used to. You may want to initially ignore the ipsec related changes (see the eCos changelog of 2003-11-22), at least initially. Good luck! It won't be a small job I'm afraid. Jifl