Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2010 12:18:45 -0700
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        Anjali Kulkarni <anjali@juniper.net>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Common OS/kernel code between freebsd and linux
Message-ID:  <AANLkTildjrO2PezVUy0-iS8YrPzsvN3ZpcN4l8kjaByS@mail.gmail.com>
In-Reply-To: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net>
References:  <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 22, 2010 at 5:09 AM, Anjali Kulkarni <anjali@juniper.net> wrote=
:
> Hi Folks,
>
> 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 th=
ere could be some set of APIs to call into the OS specific parts. This coul=
d 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 i=
s 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.

Hi Anjali,

About the closest that you'll probably get to portability between OSes
is the POSIX layer (which is just libcalls for the most part, and thus
doesn't include the scope you're requesting). Even so, there are areas
that *BSD is not 100% POSIX compliant, Linux is not 100% POSIX
compliant, and there are other areas beyond that where stuff doesn't
meet requirements like it says in the manpage documentation under
Linux [ioctl(2)'s, for instance].

While this may seem like a valiant effort, I think that trying to
unify a network stack and kernel code between FreeBSD and Linux would
result in a `religious' war over licensing, ownership, and style.

Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTildjrO2PezVUy0-iS8YrPzsvN3ZpcN4l8kjaByS>