FW: mbuf from scratch
FW: mbuf from scratch
- Subject: FW: mbuf from scratch
- From: "Carl Smith" <email@hidden>
- Date: Tue, 28 Jun 2005 17:50:16 -0400
- Thread-topic: mbuf from scratch
Thanks Justin, I am not interested in the loopback interface, mostly the
'en' interfaces. "rcvif on outbound packets is NULL;" If that is true,
then that would be or great relief to me. I'll do some
checking/testing/printf stuff. :) I have looked at the ip_output, but
now that you bring it up I will be more scrutinizing.
Carl
PS I would be interested in Josh's comments, also. :)
-----Original Message-----
From: darwin-kernel-bounces+csmith=email@hidden
[mailto:darwin-kernel-bounces+csmith=email@hidden]
On Behalf Of Justin C. Walker
Sent: Tuesday, June 28, 2005 5:38 PM
To: Darwin Kernel
Subject: Re: mbuf from scratch
On Jun 28, 2005, at 14:24 , Carl Smith wrote:
>
> Justin-
>
> Got it, guess I was just confused on the 'ifp' struct.
>
> Using the term 'create from scratch' was with idea that when I capture
> the original mbuf I play around with it, i.e. the data, then send
> it out
> after I copy back 'my' data. In the mean time, other mbufs, might/will
> be coming in to a pool, of mbufs, I have. Of course I keep the flow
> all
> linear, but I was just concerned with 'hanging' on to the 'ifp' as
> other
> mbufs backed up. But then I am not 'hanging' onto the original, my
> pool
> of mbufs, are 'copies' of the originals.
Thanks for enlarging on that idea.
It's been a while since I looked deeply at the output path, but there
are a few things to consider here. Perhaps Josh can comment.
I believe that, unless the destination is the loopback adapter
("lo0"), rcvif on outbound packets is NULL; it is mostly used on the
input path.
If it is used in a serious way on the outbound path, you should be
really careful about doing what you are doing. If there is an "ifp"
associated to the mbuf, and it is somehow pointing to the outbound
interface, a change in routing information that occurs between the
time you snag the original and the time that you inject the munged
mbuf might affect the proper value for that ifp. I don't think this
is the case, but you should try to verify it (i.e., try to follow the
ip_output code, as well as that for the transport protocols :-}).
This is just a note of caution; as I said, I don't think it's an
issue. Josh?
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Men are from Earth.
Women are from Earth.
Deal with it.
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
ch.com
This email sent to email@hidden
_______________________________________________
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