Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Data Fields
sock Struct Reference

#include <sock.h>

Public Member Functions

 kmemcheck_bitfield_begin (flags)
 
 kmemcheck_bitfield_end (flags)
 

Data Fields

struct sock_common __sk_common
 
socket_lock_t sk_lock
 
struct sk_buff_head sk_receive_queue
 
struct {
   atomic_t   rmem_alloc
 
   int   len
 
   struct sk_buff *   head
 
   struct sk_buff *   tail
 
sk_backlog
 
int sk_forward_alloc
 
atomic_t sk_drops
 
int sk_rcvbuf
 
struct sk_filter __rcusk_filter
 
struct socket_wq __rcusk_wq
 
unsigned long sk_flags
 
struct dst_entrysk_rx_dst
 
struct dst_entrysk_dst_cache
 
spinlock_t sk_dst_lock
 
atomic_t sk_wmem_alloc
 
atomic_t sk_omem_alloc
 
int sk_sndbuf
 
struct sk_buff_head sk_write_queue
 
unsigned int sk_shutdown: 2
 
unsigned int sk_no_check: 2
 
unsigned int sk_userlocks: 4
 
unsigned int sk_protocol: 8
 
unsigned int sk_type: 16
 
int sk_wmem_queued
 
gfp_t sk_allocation
 
netdev_features_t sk_route_caps
 
netdev_features_t sk_route_nocaps
 
int sk_gso_type
 
unsigned int sk_gso_max_size
 
u16 sk_gso_max_segs
 
int sk_rcvlowat
 
unsigned long sk_lingertime
 
struct sk_buff_head sk_error_queue
 
struct protosk_prot_creator
 
rwlock_t sk_callback_lock
 
int sk_err
 
int sk_err_soft
 
unsigned short sk_ack_backlog
 
unsigned short sk_max_ack_backlog
 
__u32 sk_priority
 
struct pidsk_peer_pid
 
struct credsk_peer_cred
 
long sk_rcvtimeo
 
long sk_sndtimeo
 
voidsk_protinfo
 
struct timer_list sk_timer
 
ktime_t sk_stamp
 
struct socketsk_socket
 
voidsk_user_data
 
struct page_frag sk_frag
 
struct sk_buffsk_send_head
 
__s32 sk_peek_off
 
int sk_write_pending
 
__u32 sk_mark
 
u32 sk_classid
 
struct cg_protosk_cgrp
 
void(* sk_state_change )(struct sock *sk)
 
void(* sk_data_ready )(struct sock *sk, int bytes)
 
void(* sk_write_space )(struct sock *sk)
 
void(* sk_error_report )(struct sock *sk)
 
int(* sk_backlog_rcv )(struct sock *sk, struct sk_buff *skb)
 
void(* sk_destruct )(struct sock *sk)
 

Detailed Description

struct sock - network layer representation of sockets : shared layout with inet_timewait_sock : mask of SEND_SHUTDOWN and/or RCV_SHUTDOWN : SO_SNDBUF and SO_RCVBUF settings : synchronizer : size of receive buffer in bytes : sock wait queue and async head : receive input route used by early tcp demux : destination cache : destination cache lock : flow policy : incoming packets : transmit queue bytes committed : Packet sending queue : DMA copied packets : "o" is "option" or "other" : persistent queue size : space allocated forward : allocation mode : size of send buffer in bytes : SO_LINGER (l_onoff), SO_BROADCAST, SO_KEEPALIVE, SO_OOBINLINE settings, SO_TIMESTAMPING settings : SO_NO_CHECK setting, wether or not checkup packets : route capabilities (e.g. NETIF_F_TSO) : forbidden route capabilities (e.g NETIF_F_GSO_MASK) : GSO type (e.g. SKB_GSO_TCPV4) : Maximum GSO segment size to build : Maximum number of GSO segments : SO_LINGER l_linger setting : always used with the per-socket spinlock held : used with the callbacks in the end of this struct : rarely used : sk_prot of original sock creator (see ipv6_setsockopt, IPV6_ADDRFORM for instance) : last error : errors that don't cause failure but are the cause of a persistent failure not just 'timed out' : raw/udp drops counter : current listen backlog : listen backlog set in listen() : SO_PRIORITY setting : socket group's priority map index : socket type (SOCK_STREAM, etc) : which protocol this socket belongs in this network family : &struct pid for this socket's peer : SO_PEERCRED setting : SO_RCVLOWAT setting : SO_RCVTIMEO setting : SO_SNDTIMEO setting : flow hash received from netif layer : socket filtering instructions : private area, net family specific, when not using slab : sock cleanup timer : time stamp of last packet received : Identd and reporting IO signals : RPC layer private data : cached page frag : current peek_offset value : front of stuff to transmit : used by security modules : generic packet mark : this socket's cgroup classid : this socket's cgroup-specific proto data : a write to stream socket waits to start : callback to indicate change in the state of the sock : callback to indicate there is data to be processed : callback to indicate there is bf sending space available : callback to indicate errors (e.g. MSG_ERRQUEUE) : callback to process the backlog : called at sock freeing time, i.e. when all refcnt == 0

Definition at line 265 of file sock.h.

Member Function Documentation

kmemcheck_bitfield_begin ( flags  )
kmemcheck_bitfield_end ( flags  )

Field Documentation

struct sock_common __sk_common

Definition at line 270 of file sock.h.

Definition at line 299 of file sock.h.

int len

Definition at line 298 of file sock.h.

atomic_t rmem_alloc

Definition at line 297 of file sock.h.

unsigned short sk_ack_backlog

Definition at line 349 of file sock.h.

gfp_t sk_allocation

Definition at line 336 of file sock.h.

struct { ... } sk_backlog
int(* sk_backlog_rcv)(struct sock *sk, struct sk_buff *skb)

Definition at line 378 of file sock.h.

rwlock_t sk_callback_lock

Definition at line 346 of file sock.h.

struct cg_proto* sk_cgrp

Definition at line 373 of file sock.h.

u32 sk_classid

Definition at line 372 of file sock.h.

void(* sk_data_ready)(struct sock *sk, int bytes)

Definition at line 375 of file sock.h.

void(* sk_destruct)(struct sock *sk)

Definition at line 380 of file sock.h.

atomic_t sk_drops

Definition at line 307 of file sock.h.

struct dst_entry* sk_dst_cache

Definition at line 322 of file sock.h.

spinlock_t sk_dst_lock

Definition at line 323 of file sock.h.

int sk_err

Definition at line 347 of file sock.h.

int sk_err_soft

Definition at line 347 of file sock.h.

struct sk_buff_head sk_error_queue

Definition at line 344 of file sock.h.

void(* sk_error_report)(struct sock *sk)

Definition at line 377 of file sock.h.

Definition at line 310 of file sock.h.

unsigned long sk_flags

Definition at line 320 of file sock.h.

int sk_forward_alloc

Definition at line 303 of file sock.h.

struct page_frag sk_frag

Definition at line 364 of file sock.h.

u16 sk_gso_max_segs

Definition at line 341 of file sock.h.

unsigned int sk_gso_max_size

Definition at line 340 of file sock.h.

int sk_gso_type

Definition at line 339 of file sock.h.

unsigned long sk_lingertime

Definition at line 343 of file sock.h.

socket_lock_t sk_lock

Definition at line 286 of file sock.h.

__u32 sk_mark

Definition at line 371 of file sock.h.

unsigned short sk_max_ack_backlog

Definition at line 350 of file sock.h.

unsigned int sk_no_check

Definition at line 329 of file sock.h.

atomic_t sk_omem_alloc

Definition at line 325 of file sock.h.

__s32 sk_peek_off

Definition at line 366 of file sock.h.

struct cred* sk_peer_cred

Definition at line 356 of file sock.h.

struct pid* sk_peer_pid

Definition at line 355 of file sock.h.

__u32 sk_priority

Definition at line 351 of file sock.h.

struct proto* sk_prot_creator

Definition at line 345 of file sock.h.

void* sk_protinfo

Definition at line 359 of file sock.h.

unsigned int sk_protocol

Definition at line 329 of file sock.h.

int sk_rcvbuf

Definition at line 308 of file sock.h.

int sk_rcvlowat

Definition at line 342 of file sock.h.

long sk_rcvtimeo

Definition at line 357 of file sock.h.

struct sk_buff_head sk_receive_queue

Definition at line 287 of file sock.h.

netdev_features_t sk_route_caps

Definition at line 337 of file sock.h.

netdev_features_t sk_route_nocaps

Definition at line 338 of file sock.h.

struct dst_entry* sk_rx_dst

Definition at line 321 of file sock.h.

struct sk_buff* sk_send_head

Definition at line 365 of file sock.h.

unsigned int sk_shutdown

Definition at line 329 of file sock.h.

int sk_sndbuf

Definition at line 326 of file sock.h.

long sk_sndtimeo

Definition at line 358 of file sock.h.

struct socket* sk_socket

Definition at line 362 of file sock.h.

ktime_t sk_stamp

Definition at line 361 of file sock.h.

void(* sk_state_change)(struct sock *sk)

Definition at line 374 of file sock.h.

struct timer_list sk_timer

Definition at line 360 of file sock.h.

unsigned int sk_type

Definition at line 329 of file sock.h.

void* sk_user_data

Definition at line 363 of file sock.h.

unsigned int sk_userlocks

Definition at line 329 of file sock.h.

atomic_t sk_wmem_alloc

Definition at line 324 of file sock.h.

int sk_wmem_queued

Definition at line 335 of file sock.h.

Definition at line 311 of file sock.h.

int sk_write_pending

Definition at line 367 of file sock.h.

struct sk_buff_head sk_write_queue

Definition at line 327 of file sock.h.

void(* sk_write_space)(struct sock *sk)

Definition at line 376 of file sock.h.

struct sk_buff* tail

Definition at line 300 of file sock.h.


The documentation for this struct was generated from the following file: