From: Joshua Stewart <joshua.stewart@comcast.net>
To: Patrick McHardy <kaber@trash.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Sending sk_buffs without being tied to a struct sock
Date: Sun, 12 Jan 2003 22:11:51 -0500 [thread overview]
Message-ID: <1042427512.22006.2.camel@localhost.localdomain> (raw)
In-Reply-To: <3E21A5AE.5060607@trash.net>
At this point, if I call skb->dst->output() what should skb->data point
to? A properly crafted IP packet? Checksummed and all? I shouldn't
need any layer 2 info in my skb at all to use this solution, should I?
Thanks for the help. I think this will do the trick.
J
On Sun, 2003-01-12 at 12:28, Patrick McHardy wrote:
> Joshua Stewart wrote:
>
> >
> >I'm trying to take "hand-built" sk_buffs with little more than some data
> >and a dev member and push them to the NIC for transmission. I would
> >like to simply give them to dev_queue_xmit. Does anybody know what
> >state I should have them in before handing them to dev_queue_xmit?
> >Should skb->data point to the start of a MAC header or an IP header?
> >
> >Also, given an IP address in skb->nh.iph->daddr, what's the easiest way
> >to get the appropriate MAC address?
> >
> use ip_route_output_key() and then skb->dst->output(), that way it will work on all media
> and you don't have to care about l2 resolving at all.
>
>
> Patrick
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
parent reply other threads:[~2003-01-13 3:03 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <3E21A5AE.5060607@trash.net>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1042427512.22006.2.camel@localhost.localdomain \
--to=joshua.stewart@comcast.net \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome