struct sk_buff

Name

struct sk_buff --  socket buffer

Synopsis

struct sk_buff {
  struct sk_buff * next;
  struct sk_buff * prev;
  struct sk_buff_head * list;
  struct sock * sk;
  struct timeval stamp;
  struct net_device * dev;
  struct net_device * input_dev;
  struct net_device * real_dev;
  union h;
  union nh;
  union mac;
  struct dst_entry * dst;
  char cb[40];
  unsigned int len;
  unsigned int data_len;
  unsigned int mac_len;
  unsigned int csum;
  unsigned char cloned;
  unsigned char pkt_type;
  unsigned char ip_summed;
  __u32 priority;
  unsigned short protocol;
  unsigned short security;
  void (* destructor) (struct sk_buff *skb);
#ifdef CONFIG_NETFILTER
  unsigned long nfmark;
  __u32 nfcache;
  __u32 nfctinfo;
  struct nf_conntrack * nfct;
#ifdef CONFIG_NETFILTER_DEBUG
  unsigned int nf_debug;
#endif
#ifdef CONFIG_BRIDGE_NETFILTER
  struct nf_bridge_info * nf_bridge;
#endif
#endif
#if defined(CONFIG_HIPPI)
  union private;
#endif
#ifdef CONFIG_NET_SCHED
  __u32 tc_index;
#ifdef CONFIG_NET_CLS_ACT
#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

list

List we are on

sk

Socket we are owned by

stamp

Time we arrived

dev

Device we arrived on/are leaving by

input_dev

Device we arrived on

real_dev

The real device we are using

h

Transport layer header

nh

Network layer header

mac

Link layer header

dst

FIXME: Describe this field

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

cloned

Head may be cloned (check refcnt to be sure)

pkt_type

Packet class

ip_summed

Driver fed us an IP checksum

priority

Packet queueing priority

protocol

Packet protocol from driver

security

Security level of packet

destructor

Destruct function

nfmark

Can be used for communication between hooks

nfcache

Cache info

nfctinfo

Relationship of this skb to the connection

nfct

Associated connection, if any

nf_debug

Netfilter debugging

nf_bridge

Saved data about a bridged frame - see br_netfilter.c

private

Data which is private to the HIPPI implementation

tc_index

Traffic control index

truesize

Buffer size

users

User count - see {datagram,tcp}.c

head

Head of buffer

data

Data head pointer

tail

Tail pointer

end

End pointer