netdev
[Top] [All Lists]

Re: Some questions about skbuff's

To: netdev@xxxxxxxxxxx
Subject: Re: Some questions about skbuff's
From: PaCoRRo <pacorro@xxxxxxxxxxx>
Date: Tue, 19 Feb 2002 20:33:33 +0100
In-reply-to: <200202190220.g1J2Kb413551@host2.espaweb.org>; from laudney@21cn.com on Tue, Feb 19, 2002 at 10:23:30AM +0800
References: <200202190220.g1J2Kb413551@host2.espaweb.org>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
El Tue, 19 de Feb de 2002, a las 10:23:30AM +0800, Laurence dijo:
> Sorry, although I'm quite clear about skb, I don't
> understand your question clearly enough. You should
> try to express your ideas more clearly.
> 
> -- Laudney
> 
> 
Ok, i will try to express the problem crealy.
I have seen many examples with skbuff's and when a tcp packet arrives in the 
code appears...
skb->h.raw = skb->nh.raw + skb->nh.iph->ihl*4;
skb->data = (unsigned char *)skb->h.raw +(skb->h.th->doff <<2);
skb->len -= skb->nh.iph->ihl*4 + (skb->h.th->doff <<2);
and after these lines skb->data points to payload of the packet and skb->len 
contains length 
of packet payload.
My problem is that i don't understand those lines, you can explain me? and if 
packet would be 
UDP or ICMP how can i put skb->data pointing to payload?

Thanks You

<Prev in Thread] Current Thread [Next in Thread>