Re: dlil inject output problem
Re: dlil inject output problem
- Subject: Re: dlil inject output problem
- From: Joshua Graessley <email@hidden>
- Date: Mon, 7 Jul 2003 10:42:44 -0700
There are a few problems here. I believe that your call to output will
cause the packet to go through your output filter again. I'm not sure
why you're calling m_copym. You could just pass m to
dlil_inject_if_output and return EJUSTRETURN.
-josh
On Monday, July 7, 2003, at 10:13, Hale, Darrian J wrote:
Hello,
Has anyone ever used dlil_inject_if_output or dlil_inject_pr_output
successfully?
I cant seem to get either one to work correctly. Whenever I use
either of
them i seem to get repeat packets. I don't get this problem using
dlil_inject_xx_input however.
A simple test I tried for the interface filter is as follows:
u_long if_hook_id;
// Do some startup to get if_hook_id
// Function that gets called on outbound packet
int if_hook_output(caddr_t cookie, struct ifnet **ifp, struct mbuf **m)
{
int ret = 0;
struct mbuf *mbf = NULL;
mbf = m_copym(*m,0,M_COPYALL,M_WAIT);
if((ret = dlil_inject_if_output(mbf,if_hook_id)) != 0)
printf("dlil_inject_if_output failure, errno %d...\n",ret);
return -1;
}
Thanks for your help, Darrian
_______________________________________________
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.
_______________________________________________
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.