Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
tcp.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/skbuff.h>
#include <linux/scatterlist.h>
#include <linux/splice.h>
#include <linux/net.h>
#include <linux/socket.h>
#include <linux/random.h>
#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <linux/swap.h>
#include <linux/cache.h>
#include <linux/err.h>
#include <linux/crypto.h>
#include <linux/time.h>
#include <linux/slab.h>
#include <net/icmp.h>
#include <net/inet_common.h>
#include <net/tcp.h>
#include <net/xfrm.h>
#include <net/ip.h>
#include <net/netdma.h>
#include <net/sock.h>
#include <asm/uaccess.h>
#include <asm/ioctls.h>

Go to the source code of this file.

Data Structures

struct  tcp_splice_state
 
struct  tcp_cookie_secret
 

Macros

#define pr_fmt(fmt)   "TCP: " fmt
 
#define TCP_SECRET_1MSL   (HZ * TCP_PAWS_MSL)
 
#define TCP_SECRET_2MSL   (HZ * TCP_PAWS_MSL * 2)
 
#define TCP_SECRET_LIFE   (HZ * 600)
 

Functions

 EXPORT_SYMBOL_GPL (tcp_orphan_count)
 
 EXPORT_SYMBOL (sysctl_tcp_rmem)
 
 EXPORT_SYMBOL (sysctl_tcp_wmem)
 
 EXPORT_SYMBOL (tcp_memory_allocated)
 
 EXPORT_SYMBOL (tcp_sockets_allocated)
 
 EXPORT_SYMBOL (tcp_memory_pressure)
 
void tcp_enter_memory_pressure (struct sock *sk)
 
 EXPORT_SYMBOL (tcp_enter_memory_pressure)
 
void tcp_init_sock (struct sock *sk)
 
 EXPORT_SYMBOL (tcp_init_sock)
 
unsigned int tcp_poll (struct file *file, struct socket *sock, poll_table *wait)
 
 EXPORT_SYMBOL (tcp_poll)
 
int tcp_ioctl (struct sock *sk, int cmd, unsigned long arg)
 
 EXPORT_SYMBOL (tcp_ioctl)
 
ssize_t tcp_splice_read (struct socket *sock, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags)
 
 EXPORT_SYMBOL (tcp_splice_read)
 
struct sk_buffsk_stream_alloc_skb (struct sock *sk, int size, gfp_t gfp)
 
int tcp_sendpage (struct sock *sk, struct page *page, int offset, size_t size, int flags)
 
 EXPORT_SYMBOL (tcp_sendpage)
 
void tcp_free_fastopen_req (struct tcp_sock *tp)
 
int tcp_sendmsg (struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t size)
 
 EXPORT_SYMBOL (tcp_sendmsg)
 
void tcp_cleanup_rbuf (struct sock *sk, int copied)
 
int tcp_read_sock (struct sock *sk, read_descriptor_t *desc, sk_read_actor_t recv_actor)
 
 EXPORT_SYMBOL (tcp_read_sock)
 
int tcp_recvmsg (struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int nonblock, int flags, int *addr_len)
 
 EXPORT_SYMBOL (tcp_recvmsg)
 
void tcp_set_state (struct sock *sk, int state)
 
 EXPORT_SYMBOL_GPL (tcp_set_state)
 
void tcp_shutdown (struct sock *sk, int how)
 
 EXPORT_SYMBOL (tcp_shutdown)
 
bool tcp_check_oom (struct sock *sk, int shift)
 
void tcp_close (struct sock *sk, long timeout)
 
 EXPORT_SYMBOL (tcp_close)
 
int tcp_disconnect (struct sock *sk, int flags)
 
 EXPORT_SYMBOL (tcp_disconnect)
 
void tcp_sock_destruct (struct sock *sk)
 
int tcp_setsockopt (struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen)
 
 EXPORT_SYMBOL (tcp_setsockopt)
 
void tcp_get_info (const struct sock *sk, struct tcp_info *info)
 
 EXPORT_SYMBOL_GPL (tcp_get_info)
 
int tcp_getsockopt (struct sock *sk, int level, int optname, char __user *optval, int __user *optlen)
 
 EXPORT_SYMBOL (tcp_getsockopt)
 
struct sk_bufftcp_tso_segment (struct sk_buff *skb, netdev_features_t features)
 
 EXPORT_SYMBOL (tcp_tso_segment)
 
struct sk_buff ** tcp_gro_receive (struct sk_buff **head, struct sk_buff *skb)
 
 EXPORT_SYMBOL (tcp_gro_receive)
 
int tcp_gro_complete (struct sk_buff *skb)
 
 EXPORT_SYMBOL (tcp_gro_complete)
 
int tcp_cookie_generator (u32 *bakery)
 
 EXPORT_SYMBOL (tcp_cookie_generator)
 
void tcp_done (struct sock *sk)
 
 EXPORT_SYMBOL_GPL (tcp_done)
 
 __setup ("thash_entries=", set_thash_entries)
 
void tcp_init_mem (struct net *net)
 
void __init tcp_init (void)
 

Variables

int sysctl_tcp_fin_timeout __read_mostly = TCP_FIN_TIMEOUT
 
struct percpu_counter tcp_orphan_count
 
atomic_long_t tcp_memory_allocated
 
struct percpu_counter tcp_sockets_allocated
 
struct tcp_congestion_ops tcp_reno
 

Macro Definition Documentation

#define pr_fmt (   fmt)    "TCP: " fmt

Definition at line 248 of file tcp.c.

#define TCP_SECRET_1MSL   (HZ * TCP_PAWS_MSL)

Definition at line 3420 of file tcp.c.

#define TCP_SECRET_2MSL   (HZ * TCP_PAWS_MSL * 2)

Definition at line 3421 of file tcp.c.

#define TCP_SECRET_LIFE   (HZ * 600)

Definition at line 3422 of file tcp.c.

Function Documentation

__setup ( )
EXPORT_SYMBOL ( sysctl_tcp_rmem  )
EXPORT_SYMBOL ( sysctl_tcp_wmem  )
EXPORT_SYMBOL ( tcp_memory_allocated  )
EXPORT_SYMBOL ( tcp_sockets_allocated  )
EXPORT_SYMBOL ( tcp_memory_pressure  )
EXPORT_SYMBOL ( tcp_enter_memory_pressure  )
EXPORT_SYMBOL ( tcp_init_sock  )
EXPORT_SYMBOL ( tcp_poll  )
EXPORT_SYMBOL ( tcp_ioctl  )
EXPORT_SYMBOL ( tcp_splice_read  )
EXPORT_SYMBOL ( tcp_sendpage  )
EXPORT_SYMBOL ( tcp_sendmsg  )
EXPORT_SYMBOL ( tcp_read_sock  )
EXPORT_SYMBOL ( tcp_recvmsg  )
EXPORT_SYMBOL ( tcp_shutdown  )
EXPORT_SYMBOL ( tcp_close  )
EXPORT_SYMBOL ( tcp_disconnect  )
EXPORT_SYMBOL ( tcp_setsockopt  )
EXPORT_SYMBOL ( tcp_getsockopt  )
EXPORT_SYMBOL ( tcp_tso_segment  )
EXPORT_SYMBOL ( tcp_gro_receive  )
EXPORT_SYMBOL ( tcp_gro_complete  )
EXPORT_SYMBOL ( tcp_cookie_generator  )
EXPORT_SYMBOL_GPL ( tcp_orphan_count  )
EXPORT_SYMBOL_GPL ( tcp_set_state  )
EXPORT_SYMBOL_GPL ( tcp_get_info  )
EXPORT_SYMBOL_GPL ( tcp_done  )
struct sk_buff* sk_stream_alloc_skb ( struct sock sk,
int  size,
gfp_t  gfp 
)
read

Definition at line 760 of file tcp.c.

bool tcp_check_oom ( struct sock sk,
int  shift 
)

Definition at line 2032 of file tcp.c.

void tcp_cleanup_rbuf ( struct sock sk,
int  copied 
)

Definition at line 1321 of file tcp.c.

void tcp_close ( struct sock sk,
long  timeout 
)

Definition at line 2046 of file tcp.c.

int tcp_cookie_generator ( u32 bakery)

Definition at line 3446 of file tcp.c.

int tcp_disconnect ( struct sock sk,
int  flags 
)

Definition at line 2227 of file tcp.c.

void tcp_done ( struct sock sk)

Definition at line 3515 of file tcp.c.

void tcp_enter_memory_pressure ( struct sock sk)

Definition at line 321 of file tcp.c.

void tcp_free_fastopen_req ( struct tcp_sock tp)

Definition at line 989 of file tcp.c.

void tcp_get_info ( const struct sock sk,
struct tcp_info info 
)

Definition at line 2736 of file tcp.c.

int tcp_getsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
int __user optlen 
)

Definition at line 2961 of file tcp.c.

int tcp_gro_complete ( struct sk_buff skb)

Definition at line 3170 of file tcp.c.

struct sk_buff** tcp_gro_receive ( struct sk_buff **  head,
struct sk_buff skb 
)
read

Definition at line 3074 of file tcp.c.

void __init tcp_init ( void  )

Definition at line 3563 of file tcp.c.

void tcp_init_mem ( struct net net)

Definition at line 3554 of file tcp.c.

void tcp_init_sock ( struct sock sk)

Definition at line 372 of file tcp.c.

int tcp_ioctl ( struct sock sk,
int  cmd,
unsigned long  arg 
)

Definition at line 535 of file tcp.c.

unsigned int tcp_poll ( struct file file,
struct socket sock,
poll_table wait 
)

Definition at line 440 of file tcp.c.

int tcp_read_sock ( struct sock sk,
read_descriptor_t desc,
sk_read_actor_t  recv_actor 
)

Definition at line 1458 of file tcp.c.

int tcp_recvmsg ( struct kiocb iocb,
struct sock sk,
struct msghdr msg,
size_t  len,
int  nonblock,
int  flags,
int addr_len 
)

Definition at line 1532 of file tcp.c.

int tcp_sendmsg ( struct kiocb iocb,
struct sock sk,
struct msghdr msg,
size_t  size 
)

Definition at line 1021 of file tcp.c.

int tcp_sendpage ( struct sock sk,
struct page page,
int  offset,
size_t  size,
int  flags 
)

Definition at line 949 of file tcp.c.

void tcp_set_state ( struct sock sk,
int  state 
)

Definition at line 1939 of file tcp.c.

int tcp_setsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
unsigned int  optlen 
)

Definition at line 2711 of file tcp.c.

void tcp_shutdown ( struct sock sk,
int  how 
)

Definition at line 2012 of file tcp.c.

void tcp_sock_destruct ( struct sock sk)

Definition at line 2294 of file tcp.c.

ssize_t tcp_splice_read ( struct socket sock,
loff_t *  ppos,
struct pipe_inode_info pipe,
size_t  len,
unsigned int  flags 
)

tcp_splice_read - splice data from TCP socket to a pipe : socket to splice from : position (not valid) : pipe to splice to : number of bytes to splice : splice modifier flags

Description: Will read pages from given socket and fill them into a pipe.

Definition at line 676 of file tcp.c.

struct sk_buff* tcp_tso_segment ( struct sk_buff skb,
netdev_features_t  features 
)
read

Definition at line 2985 of file tcp.c.

Variable Documentation

Definition at line 283 of file tcp.c.

atomic_long_t tcp_memory_allocated

Definition at line 294 of file tcp.c.

struct percpu_counter tcp_orphan_count

Definition at line 285 of file tcp.c.

Definition at line 407 of file tcp_cong.c.

struct percpu_counter tcp_sockets_allocated

Definition at line 300 of file tcp.c.