Extract the payload of the packet from SKB buffer at Layer-2

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Thu May 29 08:52:12 EDT 2014


On Thu, 29 May 2014 13:06:58 +0530, Ramana Reddy said:
> Is there any mechanism to get the payload area after extracting the transport
> header from skb at layer-2.

Step 0: Figure out why you're committing a layering violation and poking
around in the data down at layer 2.  Ask yourself if a fragmented packet
has been dealt with at that point.  Or if you even *know* down at layer 2
of the OSI 7-layer burrito if there *is* a payload (Hint - which types of
ICMP packets do and don't have a payload?  How about a TCP window probe?).
How does IPv4 versus IPv6 versus Decnet fit in here?

So what are you trying to do here?  It's usually very hard to recommend a
good API to use without a hint or two of what the actual goal is...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140529/fdc8f490/attachment.bin 


More information about the Kernelnewbies mailing list