Re: enetlognke and KEXT questions
Re: enetlognke and KEXT questions
- Subject: Re: enetlognke and KEXT questions
- From: Allan Hoeltje <email@hidden>
- Date: Mon, 04 Jul 2005 13:41:59 -0700
Raj,
Thank you for that information! The only reason why I thought the
pkthdr_header had to be set was the comment in enetlognke that mentions
"system panic". Maybe it is only a concern with Interface filters.
-Allan
"Raj Doshi" <email@hidden> wrote on 7/3/05 6:30 PM:
> Hi,
>
> I implemented an IP filter with injection like you are describing
> without ever modifying mbuf_pkthdr_header. Even when I made a copy
> of an mbuf and injected the copy instead of the original, I did not
> set the mbuf_pkthdr_header (although there are other fields that need
> to be set like checksum requested/performed in this case). So, I
> think the answer is no, you do not need to worry about
> mbuf_pkthdr_header in an IP filter. You should be able to inject a
> filtered mbuf, as is.
>
> Raj Doshi
>
> On Jul 1, 2005, at 8:27 PM, Allan Hoeltje wrote:
>
>> First off, thank you Quinn and Josh for the pointers you have given
>> me so
>> far.
>>
>> Second, I need some more pointers!
>>
>> I have been testing the enetlognke interface filter sample and
>> mundged it
>> into what I hope is the beginning of an IP filter.
>>
>> The problem I am running into is that the mbuf_t data passed to my
>> ipf_input_func (and ipf_output_func) always has a NULL
>> mbuf_pkthdr_header.
>>
>> For enetlognke this is OK since the interface filter
>> enet_input_func is
>> passed a reference to a frame header. There is even a comment that
>> says:
>> "Before we swallow the packet, we need to make sure that the very
>> first mbuf
>> has the pkthdr_header field set, else the system will panic when we
>> inject
>> the packet. The input routine is passed the frame_header pointer,
>> so we can
>> use this value to set as the pkthdr_header."
>>
>> Is there some api I can use to get the frame header in my
>> ipf_input_func?
>> Does any of this matter for an IP filter?
>>
>> Sorry if this is a dumb question but there is very little
>> documentation and
>> even less sample code for mbufs and kernel extensions.
>>
>> Help!
>>
>> -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