Date: Tue, 14 Nov 2000 18:47:06 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: Steveb 99 <steveb98@earthlink.net> Cc: hackers@FreeBSD.ORG Subject: Re: Porting Linux to FreeBSD Message-ID: <20001114184706.C29448@fw.wintelcom.net> In-Reply-To: <003401c04ead$4a6537b0$0441d9cf@earthlink.net>; from steveb98@earthlink.net on Tue, Nov 14, 2000 at 06:39:34PM -0800 References: <200011140149.eAE1nRI14099@portnoy.lbl.gov> <3A11401F.85B7F51E@vangelderen.org> <003401c04ead$4a6537b0$0441d9cf@earthlink.net>
next in thread | previous in thread | raw e-mail | index | archive | help
* Steveb 99 <steveb98@earthlink.net> [001114 18:39] wrote: > How different is Linux from FreeBSD when it comes to porting code. Nothing > specific just in general, are there major differences or small differences. > Assuming same hardware just OS is different. Device driver vs applications. > What areas are the gottcha's? (I wish you had been more specific...) There can be a lot of gotchas if you're not careful and you use low level interfaces into the system, let me explain: If you use Linux's SOCK_PACKET to do packet filtering you're in for a minor headache when porting to FreeBSD because FreeBSD doesn't have this. However, if you use the freely available 'libpcap' your application would work on Linux and FreeBSD (and Solaris, and others) without problems because libpcap offers an abstraction over several 'native' packet filters. It's really a matter of how your code is done and how Linux specific it is, if you've already ported to Solaris as well as Linux you'll probably find most of the kinks worked out by the time you get around to FreeBSD. But if you make it a habit of #include <linux/foo.h> you're not going to have much fun. As far as device drivers there's some similarities but also a lot of differences with locking structure and internals such as network buffers and IO buffers, porting drivers is most likely going to be a lot more difficult that porting application code. best of luck, -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001114184706.C29448>