Re: struct dlil_if_flt_str
Re: struct dlil_if_flt_str
- Subject: Re: struct dlil_if_flt_str
- From: Stephane Sudre <email@hidden>
- Date: Mon, 21 Mar 2005 11:07:51 +0100
On 18 mars 05, at 19:53, Carl Smith wrote:
After some thought I believe the correct method, for me, is as you
suggested by injecting a new packet by using dlil_input.
What I need some help and/or direction in is how to create a copy
and/or
new mbuf.
My plan was to get the data I needed from the original mbuf that I am
capturing, then MFREE()ing the original mbuf, so I do not hold up the
stack. After I have 'manipulated' my data I want to inject this altered
packet back into the stack, ala dlil_input. Being new to UNIX/DARWIN I
am not clear on what portions of the original mbuf I need to keep and
how to copy them into the new mbuf. Of course I know I need the
Ethernet
frame held in m_data, but mbuf has a reference to struct ifnet which in
turn is a linked list. So I am confused on how to handle this. I know I
can keep the interface name and some other simple ifnet parameters
around but do I need them? Do I even need to keep any of the ifnet
structure around if I know the interface and family I want to send this
altered mbuf to?
Since the re-injected packet is supposed to come from the outside
before any processing, I don't see why you would need to provide any
ifnet information.
Additionally, dlil_input is taking the targeted(?) ifnet as its first
parameter.
_______________________________________________
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