tux

skb = socket buffer

In C, implemented as struct sk_buff.

It represents a packet in linux.

 

Socket Buffer Design

SKB consists of three primary data. Headers(L2 – L4 layers), linear data, non-linear data.

It has layer specific fields.

It is manipulated by each layer for the network functionality – for example, IP layer adds ip header to the data before the packet is sent to the link layer.

It supports scatter – gather based data transfer using non-linear data field.

Using list of skb’s, fragmentation can also be stored.

It can be queued for traffic shaping, packet filtering – netfilter, packet scheduling – net_sched(Qdisc).

Tied to user space process through struct sock pointer.