site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com -josh On Mar 8, 2005, at 3:28 PM, Carl Smith wrote: // for filter type 1 dlil_find_dltag() dlil_attach_protocol_filter() // for filter type 2 dlil_find_dltag(); dlil_attach_protocol_filter() dlil_inject_pr_input() Another method I found was: dlil_reg_if_modules() The above function inputs functions pointers to: my_add_proto() my_del_proto() dlil_reg_proto_module() The above function has function pointers to: my _inet_attach dlil_attach_protocol() my_inet_detach dlil_detach_protocol() And the final approach I was thinking of was: // get an interface structure dlil_if_acquire() // register the interface dlil_if_attach() // attach the protocol dlil_if_detach() dlil_if_release() Thanks This email sent to jgraessley@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com You can attach an interface filter to an interface (dlil_attach_interface_filter) and you will get all packets on that interface. You can attach a protocol filter to an interface (dlil_attach_protocol_filter) and you will receive packets for that protocol on that interface. dlil_reg_if_modules is used to register an interface module for an interface family that hasn't been registered yet. dlil_reg_proto_module is for registering a function to attach a protocol to an interface. Unless you are support a new protocol over an existing interface family or an existing protocol over a new interface family, you don't need this. After some research I have come up, from some other examples, three ways to do filtering via a NKE. What I want to do is be a DNKE between the interface family and the Network Driver layer. The first method that I can extract is from SharedIP, which goes something like In the above I was thinking maybe I would want to use dlil_attach_interface_filter in place of the dlil_attach_protocol_filter to get myself wedged in the correct spot. dlil_plumb_protocol() // a little fuzzy on what this function does This final approach I happened to notice was a similar approach that the object IOEthernetInterface uses. So my question to all, what is the consensus as to what might be the best path to approach for my particular need? da _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/ jgraessley%40apple.com smime.p7s