RE: skbuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for your prompt reply. I appreciate it.

But, am still confused with data_len field. Just like I said before in my mail, 

len (skb->tail - skb->data)  : Actual data length for the specific protocol layer. Depending on the layer which is examining the stack, the data pointer ( and/or tail pointer) could move and len will indicate the portion of the memory which the protocol is examining!

But, what is data_len?

>From what I could figure from Geetha's reply, explanation of data_len is same as what am thinking of 'len' field! Please help!

Amit, thanks for the URL. It talks about len and truesize. But, does not talk about "data_len" field.

Regards,
Anu







-----Original Message-----
From: Geetha [mailto:geetha.r@ionidea.com]
Sent: Monday, February 18, 2002 1:36 AM
To: Sonnenahalli, Anupama
Cc: kernelnewbies@nl.linux.org
Subject: Re: skbuff


Hi,
unsigned char *head
 unsigned char *data
unsigned char *tail
unsigned char *end

head points to the beginning of the allocated space, data is the beginning
of the valid octets( usually slightly greater than head ), tail is the end
of the valid octets and end points to the address tail can reach.

  Another way to look available buffer space is
     skb->end - skb->head

  and currently used data space is
    skb->tail - skb->data

 So the length of the data itself (skb->tail - skb->data).


Geetha


----- Original Message -----
From: <anupama.sonnenahalli@amd.com>
To: <kernelnewbies@nl.linux.org>
Sent: Saturday, February 16, 2002 2:05 AM
Subject: skbuff


> I had a quick question about skbuff.
>
>
> In the skb, I understand that skb->len = skb->data - skb->tail.
>
> What is data_len field? Is this skb->data_len = skb-end - skb->data ?
>
> But, looking from the code, it looks like skb->len is always greater than
skb->data_len!
>
> Your answer will be greatly appreciated.
>
> Sincerely,
> Anu
>
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> IRC Channel:   irc.openprojects.net / #kernelnewbies
> Web Page:      http://www.kernelnewbies.org/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux