skb - Linux network buffers Harald Welte $Revision: 1.3 $, $Date: 2000/10/14 21:27:02 $ Short description about the linux network buffers (skb's) Introduction

At the time I wanted to know more about the Linux network stack, I always wanted a document like this to exist. But unfortunately I never found one. After I gained some basic knowledge about the Linux network stack internals, I wrote one.

I'm happy if this document is of any use for other people trying to learn about the Linux kernel.

Please let me know of any bugs in this document. It should now resemble kernel version 2.6.0-testX. skbuff's

skbuffs are the buffers in which the linux kernel handles network packets. The packet is received by the network card, put into a skbuff and then passed to the network stack, which uses the skbuff all the time. struct sk_buff

The struct sk_buff is defined in <linux/skbuff.h> as follows: skb support functions

There are a bunch of skb support functions provided by the sk_buff layer. I briefly describe the most important ones in this section. allocation / free / copy / clone and expansion functions

anciliary functions

1)? operations on lists of skb's

operations on skb data

Glossary

data+something!. Use skb_copy_bits() instead and operate on the copy.