Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple Protocol Filters



In addition to Justin's comments, I have one further thought on multiple-registration.

When you register, you provide the NFDescriptor struct which describes your filter (entry addresses etc). You can provide separate descriptor structs for TCP and UDP and have the dispatch vectors in both point to the same entries (or some different ones as needed).

You can find out which caused you to be called by looking at
kextcb->e_nfd to see which NFDescriptor applies to this call.

This way you know if it's TCP or UDP without having to rely on protosw>pr_protocol

Regards.....Peter



On Sunday, December 15, 2002, at 10:52 PM, Ben Lachman wrote:

Does anyone know the process for installing multiple socket based protocol filters from one NKE? For instance, I would like to filter both TCP and UDP from a single extension. I noticed that register_socketfilter()'s definition in kext_net.h says a bit about insert location, but doesn't explain it at all:

/* How to register: filter, insert location, target protosw, flags */
extern int register_sockfilter(struct NFDescriptor *,
struct NFDescriptor *,
struct protosw *, int);


Any advice would be great!

->Ben

--
"If you drink, don't drive. Don't even putt." - Dean Martin
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Multiple Protocol Filters (From: Ben Lachman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.