Name

struct sk_buff — socket buffer

Synopsis

struct sk_buff {
  struct sk_buff * next;
  struct sk_buff * prev;
  struct sock * sk;
  struct skb_timeval tstamp;
  struct net_device * dev;
  struct net_device * input_dev;
  union h;
  union nh;
  union mac;
  struct dst_entry * dst;
  struct sec_path * sp;
  char cb[40];
  unsigned int len;
  unsigned int data_len;
  unsigned int mac_len;
  unsigned int csum;
  __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;
  __be16 protocol;
  void (* destructor) (struct sk_buff *skb);
#ifdef CONFIG_NETFILTER
  __u32 nfmark;
  struct nf_conntrack * nfct;
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
  struct sk_buff * nfct_reasm;
#endif
#ifdef CONFIG_BRIDGE_NETFILTER
  struct nf_bridge_info * nf_bridge;
#endif
#endif
#ifdef CONFIG_NET_SCHED
  __u16 tc_index;
#ifdef CONFIG_NET_CLS_ACT
  __u16 tc_verd;
#endif
#endif
  unsigned int truesize;
  atomic_t users;
  unsigned char * head;
  unsigned char * data;
  unsigned char * tail;
  unsigned char * end;
};  

Members

next

Next buffer in list

prev

Previous buffer in list

sk

Socket we are owned by

tstamp

Time we arrived

dev

Device we arrived on/are leaving by

input_dev

Device we arrived on

h

Transport layer header

nh

Network layer header

mac

Link layer header

dst

destination entry

sp

the security path, used for xfrm

cb[40]

Control buffer. Free for use by every layer. Put private vars here

len

Length of actual data

data_len

Data length

mac_len

Length of link layer header

csum

Checksum

priority

Packet queueing priority

local_df

allow local fragmentation

cloned

Head may be cloned (check refcnt to be sure)

ip_summed

Driver fed us an IP checksum

nohdr

Payload reference only, must not modify header

nfctinfo

Relationship of this skb to the connection

pkt_type

Packet class

fclone

skbuff clone status

ipvs_property

skbuff is owned by ipvs

protocol

Packet protocol from driver

destructor

Destruct function

nfmark

Can be used for communication between hooks

nfct

Associated connection, if any

nfct_reasm

netfilter conntrack re-assembly pointer

nf_bridge

Saved data about a bridged frame - see br_netfilter.c

tc_index

Traffic control index

tc_verd

traffic control verdict

truesize

Buffer size

users

User count - see {datagram,tcp}.c

head

Head of buffer

data

Data head pointer

tail

Tail pointer

end

End pointer