site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: AcV8Lcx+zAYNsd2TQE6O5SFg1BnzYAAArDvg Thread-topic: mbuf from scratch Great news Josh, this solves a few headaches for me. I appreciate your come back. Carl -----Original Message----- From: darwin-kernel-bounces+csmith=fortresstech.com@lists.apple.com [mailto:darwin-kernel-bounces+csmith=fortresstech.com@lists.apple.com] On Behalf Of Josh Graessley Sent: Tuesday, June 28, 2005 6:08 PM To: Darwin Kernel Subject: Re: mbuf from scratch On Jun 28, 2005, at 2:37 PM, Justin C. Walker wrote:
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?
As Justin noted, the rcvif is ignored for the outbound path, hence the name receive if. This will usually be NULL on the outbound path. If you go to inject a packet inbound, you will need to set the rcvif to something as well as fiddle with the packet to get it in the right state. -josh _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Carl Smith