Common OS/kernel code between freebsd and linux

Garrett Cooper yanefbsd at gmail.com
Sat May 22 19:50:17 UTC 2010


On Sat, May 22, 2010 at 5:09 AM, Anjali Kulkarni <anjali at 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 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.

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


More information about the freebsd-net mailing list