Re: Socket Filter NKE for both TCP and UDP
Re: Socket Filter NKE for both TCP and UDP
- Subject: Re: Socket Filter NKE for both TCP and UDP
- From: Peter Lovell <email@hidden>
- Date: Wed, 21 Jun 2006 18:50:47 -0400
On Jun 21, 2006, at 5:31 PM, Russell Seehafer (RIT Student) wrote:
I was wondering if there is a way to register a socket filter nke
(such as the tcplognke sample) so that it is attached to both TCP
and UDP sockets. Are there special values to specify for the
domain, type, and protocol of the sflt_register function? Or, could
it be possible to call sflt_register twice - once for udp and
datagram sockets and once for stream and tcp sockets - from within
the nke's start function? Any input would be greatly appreciated.
Thanks,
Russ
Hi Russ,
you can do this without a lot of pain. Be sure you have a pointer
struct and a separate signature for each, though. So it's one kext
with a bunch of entry points, two structs and two signatures. You do
call sflt_register twice within the start.
In my usage, I also have separate signatures so that I can register
for (and differentiate between) IPv4 and IPv6 calls, so I actually
have <four>.
Regards.....Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden