Re: ipf_inject_input returns ENOTSUP
Re: ipf_inject_input returns ENOTSUP
- Subject: Re: ipf_inject_input returns ENOTSUP
- From: Allan Hoeltje <email@hidden>
- Date: Wed, 21 Sep 2005 14:38:46 -0700
OK, hopefully just one more question:
"Josh Graessley" <email@hidden> wrote on 9/20/05 1:37 PM:
> You could also potentially prepend a header that describes additional
> information. Part of this information would indicate whether the
> packet should be injected in or out. If you use sendmsg, you can fill
> out an iov so you don't have to get the header and the packet data in
> a contiguous block. You can use mbuf_adj in your kernel extension to
> trim the header off once you're done with it and inject the rest of
> the chain as is.
>
>> If I use ctl_send_func, will the mbuf chain contain a proper
>> M_PKTHDR in the
>> first mbuf? That is my biggest problem right now.
>
> Yes, the mbuf chain will start with an mbuf that has the M_PKTHDR
> flag set and the corresponding mbuf packet header fields filled out.
So, my user application sends a fully formed IP packet back to the kext
using send(). The kext receives this data as an mbuf via ctl_send_func.
How does the kernel know that the data I am sending back has a IP packet
header in it, especially if the user app has prepended my own additional
control header?
-Allan
_______________________________________________
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