Hi Quinn,
I've checked BSDLLCTest
already, I think the question is PF_NDRV
requires root privileges,
we can not ask common users to run
applications with root account as usual. We need
another
way to slove it.
Maybe we can open the
socket in the kernel space, such as in a socker filter, and acces the
filter
in the user space, we can avoid the privileges
problem.
How about your
ideas?
Thanks.
Regards,
Robin
> >If by this, you mean "raw ethernet
packets with a new type", then you >can do this in a couple of
ways: BPF or raw ethernet (PF_NDRV). >FWIW, the system does
not take kindly to you siphoning off TCP >packets. I suspect
that isn't what you want to do, however. > >The BPF approach is
probably simplest and most portable, and there >are several
applications in the darwin source tree that show how it's >done
(see the bootp project, for example). > >I don't know what shape the
PF_NDRV code is in now. This is a >"protocol" handler that is
a kext, and so requires kernel >programming. The SharedIP
kext uses this to get ethernet packets to >and from the Classic Mac
OS environment.
|