Subject: Re: [PATCH] Handle shared SKBs in VLAN receive code

From: "David S. Miller" <[email-masked]>
Date: Sat, 11 Oct 2003 12:54:26 -0700

On Sat, 11 Oct 2003 12:55:23 -0700
Ben Greear <[email-masked]> wrote:

> I have read the sk_buf.h file repeatedly trying to get this all straight
> in my head, and I think I'm still missing things.  Is there any other
> documentation around that describes in detail exactly the things you must
> do to handle shared skbs in all contexts?

No there isn't, sorry.

If you just want to read the IP address in a packet, or anything else
in general you have two options:

1) if (pskb_may_pull(skb, len))
	goto drop;

   After this call, it is guarenteed you may look at
   the all bytes up to 'len' from the start of the SKB
   using skb->data et al.

2) Use skb_peek_bits().