Sending sk_buffs without being tied to a struct sock
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Quoted 22 lines · Patrick McHardy
Quoted 10 lines · Joshua Stewart
I'm trying to take "hand-built"
sk_buffswith little more than some data and a dev member and push them to the NIC for transmission. I would like to simply give them todev_queue_xmit. Does anybody know what state I should have them in before handing them todev_queue_xmit? Shouldskb->datapoint 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 thenskb->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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html