Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: if_set_bpf_tap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: if_set_bpf_tap



On Saturday, March 9, 2002, at 06:40 PM, Samuel Lellouche wrote:

Hi..

kern_return_t OSX_PF_start (kmod_info_t * ki, void * d)
{
int test;

printf("Module has loaded!\n");
test = 0;
if_set_bpf_tap(test,test,test);

You missed one minor point in the documentation: this procedure, as with others like if_output, is a procedure *variable*, and is part of the 'ifnet' structure created by a driver when it (or its family) registers with the DLIL network layer. Look at the xnu source for examples of its use (see xnu/bsd/net/bpf.c).

Typically, your KEXT would not have anything to do with this particular variable, unless you were writing a network device driver of some sort, and then all you would do is assign to it. This is used by the BPF support when a connection to the specified driver is opened.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | If you're not confused,
| You're not paying attention
*--------------------------------------*-------------------------------*
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.

References: 
 >if_set_bpf_tap (From: Samuel Lellouche <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.