In message <[EMAIL PROTECTED]> Dave Preece 
writes:
: I'm writing some C++ code that currently uses divert sockets off the
: firewall and for performance reasons moving the code kernel mode is looking
: like a (long term) good idea.
: 
: The question is: Should I bite the bullet and start writing in pure C now
: (and therefore save pain later)? Can I just provide an API using extern "C"
: and link it in (with some calling functions in ipfw.c, of course)? Would an
: lkm be the best way to go?

I've run C++ code in the kernel.  You couldn't easily use: templates,
exceptions, global ctors, and sometimes you had to be careful with
automatic instantiation of things.  I implemented only new and delete
and was able to get sample code to run in the kernel.  I punted at
that point due to the pain in actually knowing if these things were
being used or not.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to