struct sk_buff — socket buffer
struct sk_buff { struct sk_buff * next; struct sk_buff * prev; struct sock * sk; ktime_t tstamp; struct net_device * dev; union {unnamed_union}; struct sec_path * sp; char cb[48]; unsigned int len; unsigned int data_len; __u16 mac_len; __u16 hdr_len; union {unnamed_union}; __u32 priority; __u8 local_df:1; __u8 cloned:1; __u8 ip_summed:2; __u8 nohdr:1; __u8 nfctinfo:3; __u8 pkt_type:3; __u8 fclone:2; __u8 ipvs_property:1; __u8 peeked:1; __u8 nf_trace:1; __be16 protocol; void (* destructor) (struct sk_buff *skb); #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) struct nf_conntrack * nfct; struct sk_buff * nfct_reasm; #endif #ifdef CONFIG_BRIDGE_NETFILTER struct nf_bridge_info * nf_bridge; #endif int iif; #ifdef CONFIG_NETDEVICES_MULTIQUEUE __u16 queue_mapping; #endif #ifdef CONFIG_NET_SCHED __u16 tc_index; #ifdef CONFIG_NET_CLS_ACT __u16 tc_verd; #endif #endif #ifdef CONFIG_IPV6_NDISC_NODETYPE __u8 ndisc_nodetype:2; #endif #ifdef CONFIG_NET_DMA dma_cookie_t dma_cookie; #endif #ifdef CONFIG_NETWORK_SECMARK __u32 secmark; #endif __u32 mark; sk_buff_data_t transport_header; sk_buff_data_t network_header; sk_buff_data_t mac_header; sk_buff_data_t tail; sk_buff_data_t end; unsigned char * head; unsigned char * data; unsigned int truesize; atomic_t users; };
Next buffer in list
Previous buffer in list
Socket we are owned by
Time we arrived
Device we arrived on/are leaving by
anonymous
the security path, used for xfrm
Control buffer. Free for use by every layer. Put private vars here
Length of actual data
Data length
Length of link layer header
writable header length of cloned skb
anonymous
Packet queueing priority
allow local fragmentation
Head may be cloned (check refcnt to be sure)
Driver fed us an IP checksum
Payload reference only, must not modify header
Relationship of this skb to the connection
Packet class
skbuff clone status
skbuff is owned by ipvs
this packet has been seen already, so stats have been done for it, don't do them again
netfilter packet trace flag
Packet protocol from driver
Destruct function
Associated connection, if any
netfilter conntrack re-assembly pointer
Saved data about a bridged frame - see br_netfilter.c
ifindex of device we arrived on
Queue mapping for multiqueue devices
Traffic control index
traffic control verdict
router type (from link layer)
a cookie to one of several possible DMA operations done by skb DMA functions
security marking
Generic packet mark
Transport layer header
Network layer header
Link layer header
Tail pointer
End pointer
Head of buffer
Data head pointer
Buffer size
User count - see {datagram,tcp}.c