Sean Boudreau(deleted)
08/12/2009 12:57 PM
post35839
|
On Wed, Aug 12, 2009 at 10:17:16AM -0400, Senthil K wrote:
> Hi Sean,
>
> if i added that _KERNEL in make file,thats gave bunch of error.
The short answer is this:
What you're trying to create would normally be a kernel
module on a monotithic operating system. On QNX it's
a dll that loads into io-pkt. A large part of io-pkt
therefore is essentially a chunk of the NetBSD kernel
which is why a lot of the code we've ported requires
_KERNEL defined and assumes a netbsd kernel module
compilation environment. In our networking repo the
majority of this code is under sys and gets this
environment set up by including sys/qnx.h. You'll
have to get your environment set up in a similar manner.
-seanb
|
|
|
Robert craig
08/12/2009 1:11 PM
post35840
|
Couple of things:
http://netbsd.gw.com/cgi-bin/man-cgi?pfil++NetBSD-current
Note "If the packet processing is to stop, it is the responsibility of the filter to free the packet" so you do have to
do the free in the filter as you suspected.
In order to create an LSM, make sure that you have the ENTIRE source tree checked out and place your source files under
a new directory in the sys/lsm directory. There are a couple of examples (e.g. nraw) of fairly complex filters that you
can copy to at least set up the proper build environment.
While it is possible to deviate from this, it is not recommended and requires a lot of understanding of the make and
build process in order to make it work.
R.
|
|
|