Hi , I am trying to understand what exactly pskb_copy is doing. From
the comment above the code, I understand that it makes a private copy
of the header in the new skb but does not copy the data, eg for TCP
packets it will copy the tcp, ip header etc in the new skb (using
memcpy) but will not copy the data.
But then in the code, it seems to be allocating :
struct sk_buff *n = alloc_skb(skb->end - skb->head, gfp_mask);
ie it seems to be allocating space for the whole data portion on the
original skb (protocol headers + data).
If the intention is just to copy the protocol headers, then why
allocate space for protocol headers + protocol data ?
Shavian..
|