Hello.  Depending on the amount of data yu want to pass between kernel 
space and user
space, you might consider writing a simple device driver kernel module which 
implements ioctl(2) 
functions or read(2) and write(2) functionality.  Ioctl commands are good for 
passing data in chunks 
of less than 256 bytes in either direction and read/write functions can move 
arbitrary amounts of 
data between kernel and user space.  Depending on how your current linux user 
space code works,
this might give yu the ability to provide the same functionality in NetBSD that 
linux provides
from the user space program's perspective.  Kernel modules don't have to be 
complex, it's
better if they're not, and they give you a lot of flexibility about how you 
want to interface
with the kernel.  Using a module also lets yu develop your interface without 
having to touch as
many other kernel source files.  While it's true you would need to recompile 
your module for
kernel updates, the basic API's for dealing with ioctls and read/write calls 
have been stable
in NetBSD for many years.  I recently migrated a module from NetBSD-5, for 
example, to
NetBSD-current, and the code changes required to make it work were very few and 
only took me an
hour or so to make and test.  that's not bad for such a large jump in version.

Just a thought.

-thanks
-Brian

Reply via email to