From owner-freebsd-net@FreeBSD.ORG Sat May 22 15:49:44 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2A5A106566B; Sat, 22 May 2010 15:49:44 +0000 (UTC) (envelope-from aman.jassal@esigetel.fr) Received: from smtpfb2-g21.free.fr (smtpfb2-g21.free.fr [212.27.42.10]) by mx1.freebsd.org (Postfix) with ESMTP id F3DCE8FC16; Sat, 22 May 2010 15:49:42 +0000 (UTC) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by smtpfb2-g21.free.fr (Postfix) with ESMTP id 39ED0CA9C12; Sat, 22 May 2010 17:32:58 +0200 (CEST) Received: from smtp2-g21.free.fr (localhost [127.0.0.1]) by smtp2-g21.free.fr (Postfix) with ESMTP id 223C24B00B7; Sat, 22 May 2010 17:32:50 +0200 (CEST) Received: from [127.0.0.1] (san94-2-78-239-228-93.fbx.proxad.net [78.239.228.93]) by smtp2-g21.free.fr (Postfix) with ESMTP; Sat, 22 May 2010 17:32:49 +0200 (CEST) Message-ID: <4BF7F90E.7060901@esigetel.fr> Date: Sat, 22 May 2010 17:32:30 +0200 From: Aman Jassal User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: sthaug@nethelp.no References: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> <20100522.143511.74745433.sthaug@nethelp.no> In-Reply-To: <20100522.143511.74745433.sthaug@nethelp.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 100522-0, 22/05/2010), Outbound message X-Antivirus-Status: Clean Cc: freebsd-net@freebsd.org, anjali@juniper.net, freebsd-hackers@freebsd.org Subject: Re: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 15:49:45 -0000 Hello, sthaug@nethelp.no a écrit : >> I am not sure the right forum to ask this question - is there any effort done to find portable code between different OSes, particularly freebsd and linux? >> Specifically, the networking layer could be portable between the 2 and there could be some set of APIs to call into the OS specific parts. This could be modeled as - if I want to port the networking layer or other stuff to userland, what set of code could reside in userspace such that that layer is portable between OSes ? For eg, there could be an API to access mbufs or skbuffs in freebsd or linux respectively, but the processing to be done for IP etc could remain the same. I don't know if this is worth thinking about? Please share your thoughts. >> > > Are you sure the Linux crowd is interested in this? > > As far as I know the BSD networking code has been *available* to the > Linux crowd basically from day 1 - but they chose to write their own... > > Steinar Haug, Nethelp consulting, sthaug@nethelp.no > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > I don't think the BSD and Linux networking code are similar enough, or that there is any effort being done to make them similar. Linux also has a few interfaces that are exclusive to it (and were written from scratch), like the Netlink socket to mention but one (although I remember Bruce Simpson saying that it would be worthwhile implementing this socket for BSD, it was some time ago...). Therefore, their networking stack probably has some features and APIs that will be a little difficult to port... I don't have a lot of experience with the Linux networking kernel, but as Steinar Haug pointed out : if the Linux community was interested in our networking code, something would have been done or in the process of being done already. If I may : Anjali, what kind of project are you working on (that would require portability between both networking code) ? ---------------- Aman Jassal Wisdom comes from experience. Experience comes from a lack of wisdom.