Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
tcp.h File Reference
#include <linux/list.h>
#include <linux/tcp.h>
#include <linux/bug.h>
#include <linux/slab.h>
#include <linux/cache.h>
#include <linux/percpu.h>
#include <linux/skbuff.h>
#include <linux/dmaengine.h>
#include <linux/crypto.h>
#include <linux/cryptohash.h>
#include <linux/kref.h>
#include <net/inet_connection_sock.h>
#include <net/inet_timewait_sock.h>
#include <net/inet_hashtables.h>
#include <net/checksum.h>
#include <net/request_sock.h>
#include <net/sock.h>
#include <net/snmp.h>
#include <net/ip.h>
#include <net/tcp_states.h>
#include <net/inet_ecn.h>
#include <net/dst.h>
#include <linux/seq_file.h>
#include <linux/memcontrol.h>

Go to the source code of this file.

Data Structures

struct  tcp_skb_cb
 
struct  tcp_congestion_ops
 
union  tcp_md5_addr
 
struct  tcp_md5sig_key
 
struct  tcp_md5sig_info
 
struct  tcp4_pseudohdr
 
struct  tcp6_pseudohdr
 
union  tcp_md5sum_block
 
struct  tcp_md5sig_pool
 
struct  tcp_fastopen_request
 
struct  tcp_fastopen_context
 
struct  tcp_seq_afinfo
 
struct  tcp_iter_state
 
struct  tcp_sock_af_ops
 
struct  tcp_request_sock_ops
 
struct  tcp_cookie_values
 
struct  tcp_extend_values
 

Macros

#define FASTRETRANS_DEBUG   1
 
#define MAX_TCP_HEADER   (128 + MAX_HEADER)
 
#define MAX_TCP_OPTION_SPACE   40
 
#define MAX_TCP_WINDOW   32767U
 
#define TCP_DEFAULT_INIT_RCVWND   10
 
#define TCP_MIN_MSS   88U
 
#define TCP_BASE_MSS   512
 
#define TCP_FASTRETRANS_THRESH   3
 
#define TCP_MAX_REORDERING   127
 
#define TCP_MAX_QUICKACKS   16U
 
#define TCP_URG_VALID   0x0100
 
#define TCP_URG_NOTYET   0x0200
 
#define TCP_URG_READ   0x0400
 
#define TCP_RETR1
 
#define TCP_RETR2
 
#define TCP_SYN_RETRIES
 
#define TCP_SYNACK_RETRIES
 
#define TCP_TIMEWAIT_LEN
 
#define TCP_FIN_TIMEOUT   TCP_TIMEWAIT_LEN
 
#define TCP_DELACK_MAX   ((unsigned)(HZ/5)) /* maximal time to delay before sending an ACK */
 
#define TCP_DELACK_MIN   4U
 
#define TCP_ATO_MIN   4U
 
#define TCP_RTO_MAX   ((unsigned)(120*HZ))
 
#define TCP_RTO_MIN   ((unsigned)(HZ/5))
 
#define TCP_TIMEOUT_INIT   ((unsigned)(1*HZ)) /* RFC6298 2.1 initial RTO value */
 
#define TCP_TIMEOUT_FALLBACK
 
#define TCP_RESOURCE_PROBE_INTERVAL
 
#define TCP_KEEPALIVE_TIME   (120*60*HZ) /* two hours */
 
#define TCP_KEEPALIVE_PROBES   9 /* Max of 9 keepalive probes */
 
#define TCP_KEEPALIVE_INTVL   (75*HZ)
 
#define MAX_TCP_KEEPIDLE   32767
 
#define MAX_TCP_KEEPINTVL   32767
 
#define MAX_TCP_KEEPCNT   127
 
#define MAX_TCP_SYNCNT   127
 
#define TCP_SYNQ_INTERVAL   (HZ/5) /* Period of SYNACK timer */
 
#define TCP_PAWS_24DAYS   (60 * 60 * 24 * 24)
 
#define TCP_PAWS_MSL
 
#define TCP_PAWS_WINDOW
 
#define TCPOPT_NOP   1 /* Padding */
 
#define TCPOPT_EOL   0 /* End of options */
 
#define TCPOPT_MSS   2 /* Segment size negotiating */
 
#define TCPOPT_WINDOW   3 /* Window scaling */
 
#define TCPOPT_SACK_PERM   4 /* SACK Permitted */
 
#define TCPOPT_SACK   5 /* SACK Block */
 
#define TCPOPT_TIMESTAMP   8 /* Better RTT estimations/PAWS */
 
#define TCPOPT_MD5SIG   19 /* MD5 Signature (RFC2385) */
 
#define TCPOPT_COOKIE   253 /* Cookie extension (experimental) */
 
#define TCPOPT_EXP   254 /* Experimental */
 
#define TCPOPT_FASTOPEN_MAGIC   0xF989
 
#define TCPOLEN_MSS   4
 
#define TCPOLEN_WINDOW   3
 
#define TCPOLEN_SACK_PERM   2
 
#define TCPOLEN_TIMESTAMP   10
 
#define TCPOLEN_MD5SIG   18
 
#define TCPOLEN_EXP_FASTOPEN_BASE   4
 
#define TCPOLEN_COOKIE_BASE   2 /* Cookie-less header extension */
 
#define TCPOLEN_COOKIE_PAIR   3 /* Cookie pair header extension */
 
#define TCPOLEN_COOKIE_MIN   (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MIN)
 
#define TCPOLEN_COOKIE_MAX   (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MAX)
 
#define TCPOLEN_TSTAMP_ALIGNED   12
 
#define TCPOLEN_WSCALE_ALIGNED   4
 
#define TCPOLEN_SACKPERM_ALIGNED   4
 
#define TCPOLEN_SACK_BASE   2
 
#define TCPOLEN_SACK_BASE_ALIGNED   4
 
#define TCPOLEN_SACK_PERBLOCK   8
 
#define TCPOLEN_MD5SIG_ALIGNED   20
 
#define TCPOLEN_MSS_ALIGNED   4
 
#define TCP_NAGLE_OFF   1 /* Nagle's algo is disabled */
 
#define TCP_NAGLE_CORK   2 /* Socket is corked */
 
#define TCP_NAGLE_PUSH   4 /* Cork is overridden for already queued data */
 
#define TCP_THIN_LINEAR_RETRIES   6 /* After 6 linear retries, do exp. backoff */
 
#define TCP_INIT_CWND   10
 
#define TFO_CLIENT_ENABLE   1
 
#define TFO_SERVER_ENABLE   2
 
#define TFO_CLIENT_NO_COOKIE   4 /* Data in SYN w/o cookie option */
 
#define TFO_SERVER_COOKIE_NOT_CHKED   0x100
 
#define TFO_SERVER_COOKIE_NOT_REQD   0x200
 
#define TFO_SERVER_WO_SOCKOPT1   0x400
 
#define TFO_SERVER_WO_SOCKOPT2   0x800
 
#define TFO_SERVER_ALWAYS   0x1000
 
#define after(seq2, seq1)   before(seq1, seq2)
 
#define TCP_INC_STATS(net, field)   SNMP_INC_STATS((net)->mib.tcp_statistics, field)
 
#define TCP_INC_STATS_BH(net, field)   SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field)
 
#define TCP_DEC_STATS(net, field)   SNMP_DEC_STATS((net)->mib.tcp_statistics, field)
 
#define TCP_ADD_STATS_USER(net, field, val)   SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val)
 
#define TCP_ADD_STATS(net, field, val)   SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val)
 
#define TCP_ECN_OK   1
 
#define TCP_ECN_QUEUE_CWR   2
 
#define TCP_ECN_DEMAND_CWR   4
 
#define TCP_ECN_SEEN   8
 
#define tcp_time_stamp   ((__u32)(jiffies))
 
#define tcp_flag_byte(th)   (((u_int8_t *)th)[13])
 
#define TCPHDR_FIN   0x01
 
#define TCPHDR_SYN   0x02
 
#define TCPHDR_RST   0x04
 
#define TCPHDR_PSH   0x08
 
#define TCPHDR_ACK   0x10
 
#define TCPHDR_URG   0x20
 
#define TCPHDR_ECE   0x40
 
#define TCPHDR_CWR   0x80
 
#define TCPCB_SACKED_ACKED   0x01 /* SKB ACK'd by a SACK block */
 
#define TCPCB_SACKED_RETRANS   0x02 /* SKB retransmitted */
 
#define TCPCB_LOST   0x04 /* SKB is lost */
 
#define TCPCB_TAGBITS   0x07 /* All tag bits */
 
#define TCPCB_EVER_RETRANS   0x80 /* Ever retransmitted frame */
 
#define TCPCB_RETRANS   (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS)
 
#define TCP_SKB_CB(__skb)   ((struct tcp_skb_cb *)&((__skb)->cb[0]))
 
#define TCP_CA_NAME_MAX   16
 
#define TCP_CA_MAX   128
 
#define TCP_CA_BUF_MAX   (TCP_CA_NAME_MAX*TCP_CA_MAX)
 
#define TCP_CONG_NON_RESTRICTED   0x1
 
#define TCP_CONG_RTT_STAMP   0x2
 
#define TCP_INFINITE_SSTHRESH   0x7fffffff
 
#define tcp_verify_left_out(tp)   WARN_ON(tcp_left_out(tp) > tp->packets_out)
 
#define tcp_twsk_md5_key(twsk)   NULL
 
#define TCP_FASTOPEN_KEY_LENGTH   16
 
#define tcp_for_write_queue(skb, sk)   skb_queue_walk(&(sk)->sk_write_queue, skb)
 
#define tcp_for_write_queue_from(skb, sk)   skb_queue_walk_from(&(sk)->sk_write_queue, skb)
 
#define tcp_for_write_queue_from_safe(skb, tmp, sk)   skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp)
 
#define COOKIE_DIGEST_WORDS   (SHA_DIGEST_WORDS)
 
#define COOKIE_MESSAGE_WORDS   (SHA_MESSAGE_BYTES / 4)
 
#define COOKIE_WORKSPACE_WORDS   (COOKIE_DIGEST_WORDS + COOKIE_MESSAGE_WORDS)
 

Typedefs

typedef int(* sk_read_actor_t )(read_descriptor_t *, struct sk_buff *, unsigned int, size_t)
 

Enumerations

enum  tcp_tw_status { TCP_TW_SUCCESS = 0, TCP_TW_RST = 1, TCP_TW_ACK = 2, TCP_TW_SYN = 3 }
 
enum  tcp_ca_event {
  CA_EVENT_TX_START, CA_EVENT_CWND_RESTART, CA_EVENT_COMPLETE_CWR, CA_EVENT_FRTO,
  CA_EVENT_LOSS, CA_EVENT_FAST_ACK, CA_EVENT_SLOW_ACK
}
 
enum  tcp_seq_states { TCP_SEQ_STATE_LISTENING, TCP_SEQ_STATE_OPENREQ, TCP_SEQ_STATE_ESTABLISHED, TCP_SEQ_STATE_TIME_WAIT }
 

Functions

void tcp_time_wait (struct sock *sk, int state, int timeo)
 
bool tcp_check_oom (struct sock *sk, int shift)
 
void tcp_init_mem (struct net *net)
 
void tcp_tasklet_init (void)
 
void tcp_v4_err (struct sk_buff *skb, u32)
 
void tcp_shutdown (struct sock *sk, int how)
 
void tcp_v4_early_demux (struct sk_buff *skb)
 
int tcp_v4_rcv (struct sk_buff *skb)
 
struct inet_peertcp_v4_get_peer (struct sock *sk)
 
int tcp_v4_tw_remember_stamp (struct inet_timewait_sock *tw)
 
int tcp_sendmsg (struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t size)
 
int tcp_sendpage (struct sock *sk, struct page *page, int offset, size_t size, int flags)
 
void tcp_release_cb (struct sock *sk)
 
void tcp_write_timer_handler (struct sock *sk)
 
void tcp_delack_timer_handler (struct sock *sk)
 
int tcp_ioctl (struct sock *sk, int cmd, unsigned long arg)
 
int tcp_rcv_state_process (struct sock *sk, struct sk_buff *skb, const struct tcphdr *th, unsigned int len)
 
int tcp_rcv_established (struct sock *sk, struct sk_buff *skb, const struct tcphdr *th, unsigned int len)
 
void tcp_rcv_space_adjust (struct sock *sk)
 
void tcp_cleanup_rbuf (struct sock *sk, int copied)
 
int tcp_twsk_unique (struct sock *sk, struct sock *sktw, void *twp)
 
void tcp_twsk_destructor (struct sock *sk)
 
ssize_t tcp_splice_read (struct socket *sk, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags)
 
enum tcp_tw_status tcp_timewait_state_process (struct inet_timewait_sock *tw, struct sk_buff *skb, const struct tcphdr *th)
 
struct socktcp_check_req (struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct request_sock **prev, bool fastopen)
 
int tcp_child_process (struct sock *parent, struct sock *child, struct sk_buff *skb)
 
bool tcp_use_frto (struct sock *sk)
 
void tcp_enter_frto (struct sock *sk)
 
void tcp_enter_loss (struct sock *sk, int how)
 
void tcp_clear_retrans (struct tcp_sock *tp)
 
void tcp_update_metrics (struct sock *sk)
 
void tcp_init_metrics (struct sock *sk)
 
void tcp_metrics_init (void)
 
bool tcp_peer_is_proven (struct request_sock *req, struct dst_entry *dst, bool paws_check)
 
bool tcp_remember_stamp (struct sock *sk)
 
bool tcp_tw_remember_stamp (struct inet_timewait_sock *tw)
 
void tcp_fetch_timewait_stamp (struct sock *sk, struct dst_entry *dst)
 
void tcp_disable_fack (struct tcp_sock *tp)
 
void tcp_close (struct sock *sk, long timeout)
 
void tcp_init_sock (struct sock *sk)
 
unsigned int tcp_poll (struct file *file, struct socket *sock, struct poll_table_struct *wait)
 
int tcp_getsockopt (struct sock *sk, int level, int optname, char __user *optval, int __user *optlen)
 
int tcp_setsockopt (struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen)
 
int compat_tcp_getsockopt (struct sock *sk, int level, int optname, char __user *optval, int __user *optlen)
 
int compat_tcp_setsockopt (struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen)
 
void tcp_set_keepalive (struct sock *sk, int val)
 
void tcp_syn_ack_timeout (struct sock *sk, struct request_sock *req)
 
int tcp_recvmsg (struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int nonblock, int flags, int *addr_len)
 
void tcp_parse_options (const struct sk_buff *skb, struct tcp_options_received *opt_rx, const u8 **hvpp, int estab, struct tcp_fastopen_cookie *foc)
 
const u8tcp_parse_md5sig_option (const struct tcphdr *th)
 
void tcp_v4_send_check (struct sock *sk, struct sk_buff *skb)
 
int tcp_v4_conn_request (struct sock *sk, struct sk_buff *skb)
 
struct socktcp_create_openreq_child (struct sock *sk, struct request_sock *req, struct sk_buff *skb)
 
struct socktcp_v4_syn_recv_sock (struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst)
 
int tcp_v4_do_rcv (struct sock *sk, struct sk_buff *skb)
 
int tcp_v4_connect (struct sock *sk, struct sockaddr *uaddr, int addr_len)
 
int tcp_connect (struct sock *sk)
 
struct sk_bufftcp_make_synack (struct sock *sk, struct dst_entry *dst, struct request_sock *req, struct request_values *rvp, struct tcp_fastopen_cookie *foc)
 
int tcp_disconnect (struct sock *sk, int flags)
 
void tcp_connect_init (struct sock *sk)
 
void tcp_finish_connect (struct sock *sk, struct sk_buff *skb)
 
int tcp_send_rcvq (struct sock *sk, struct msghdr *msg, size_t size)
 
void inet_sk_rx_dst_set (struct sock *sk, const struct sk_buff *skb)
 
struct sockcookie_v4_check (struct sock *sk, struct sk_buff *skb, struct ip_options *opt)
 
__u32 cookie_init_timestamp (struct request_sock *req)
 
bool cookie_check_timestamp (struct tcp_options_received *opt, bool *)
 
struct sockcookie_v6_check (struct sock *sk, struct sk_buff *skb)
 
void __tcp_push_pending_frames (struct sock *sk, unsigned int cur_mss, int nonagle)
 
bool tcp_may_send_now (struct sock *sk)
 
int __tcp_retransmit_skb (struct sock *, struct sk_buff *)
 
int tcp_retransmit_skb (struct sock *, struct sk_buff *)
 
void tcp_retransmit_timer (struct sock *sk)
 
void tcp_xmit_retransmit_queue (struct sock *)
 
void tcp_simple_retransmit (struct sock *)
 
int tcp_trim_head (struct sock *, struct sk_buff *, u32)
 
int tcp_fragment (struct sock *, struct sk_buff *, u32, unsigned int)
 
void tcp_send_probe0 (struct sock *)
 
void tcp_send_partial (struct sock *)
 
int tcp_write_wakeup (struct sock *)
 
void tcp_send_fin (struct sock *sk)
 
void tcp_send_active_reset (struct sock *sk, gfp_t priority)
 
int tcp_send_synack (struct sock *)
 
bool tcp_syn_flood_action (struct sock *sk, const struct sk_buff *skb, const char *proto)
 
void tcp_push_one (struct sock *, unsigned int mss_now)
 
void tcp_send_ack (struct sock *sk)
 
void tcp_send_delayed_ack (struct sock *sk)
 
void tcp_cwnd_application_limited (struct sock *sk)
 
void tcp_resume_early_retransmit (struct sock *sk)
 
void tcp_rearm_rto (struct sock *sk)
 
void tcp_reset (struct sock *sk)
 
void tcp_init_xmit_timers (struct sock *)
 
unsigned int tcp_sync_mss (struct sock *sk, u32 pmtu)
 
unsigned int tcp_current_mss (struct sock *sk)
 
void tcp_get_info (const struct sock *, struct tcp_info *)
 
int tcp_read_sock (struct sock *sk, read_descriptor_t *desc, sk_read_actor_t recv_actor)
 
void tcp_initialize_rcv_mss (struct sock *sk)
 
int tcp_mtu_to_mss (struct sock *sk, int pmtu)
 
int tcp_mss_to_mtu (struct sock *sk, int mss)
 
void tcp_mtup_init (struct sock *sk)
 
void tcp_valid_rtt_meas (struct sock *sk, u32 seq_rtt)
 
void tcp_init_buffer_space (struct sock *sk)
 
void tcp_set_rto (struct sock *sk)
 
u32 __tcp_select_window (struct sock *sk)
 
void tcp_send_window_probe (struct sock *sk)
 
int tcp_register_congestion_control (struct tcp_congestion_ops *type)
 
void tcp_unregister_congestion_control (struct tcp_congestion_ops *type)
 
void tcp_init_congestion_control (struct sock *sk)
 
void tcp_cleanup_congestion_control (struct sock *sk)
 
int tcp_set_default_congestion_control (const char *name)
 
void tcp_get_default_congestion_control (char *name)
 
void tcp_get_available_congestion_control (char *buf, size_t len)
 
void tcp_get_allowed_congestion_control (char *buf, size_t len)
 
int tcp_set_allowed_congestion_control (char *allowed)
 
int tcp_set_congestion_control (struct sock *sk, const char *name)
 
void tcp_slow_start (struct tcp_sock *tp)
 
void tcp_cong_avoid_ai (struct tcp_sock *tp, u32 w)
 
u32 tcp_reno_ssthresh (struct sock *sk)
 
void tcp_reno_cong_avoid (struct sock *sk, u32 ack, u32 in_flight)
 
u32 tcp_reno_min_cwnd (const struct sock *sk)
 
void tcp_enter_cwr (struct sock *sk, const int set_ssthresh)
 
__u32 tcp_init_cwnd (const struct tcp_sock *tp, const struct dst_entry *dst)
 
bool tcp_is_cwnd_limited (const struct sock *sk, u32 in_flight)
 
void tcp_set_state (struct sock *sk, int state)
 
void tcp_done (struct sock *sk)
 
void tcp_select_initial_window (int __space, __u32 mss, __u32 *rcv_wnd, __u32 *window_clamp, int wscale_ok, __u8 *rcv_wscale, __u32 init_rcv_wnd)
 
void tcp_enter_memory_pressure (struct sock *sk)
 
int tcp_v4_md5_hash_skb (char *md5_hash, struct tcp_md5sig_key *key, const struct sock *sk, const struct request_sock *req, const struct sk_buff *skb)
 
int tcp_md5_do_add (struct sock *sk, const union tcp_md5_addr *addr, int family, const u8 *newkey, u8 newkeylen, gfp_t gfp)
 
int tcp_md5_do_del (struct sock *sk, const union tcp_md5_addr *addr, int family)
 
struct tcp_md5sig_keytcp_v4_md5_lookup (struct sock *sk, struct sock *addr_sk)
 
struct tcp_md5sig_pool __percputcp_alloc_md5sig_pool (struct sock *)
 
void tcp_free_md5sig_pool (void)
 
struct tcp_md5sig_pooltcp_get_md5sig_pool (void)
 
void tcp_put_md5sig_pool (void)
 
int tcp_md5_hash_header (struct tcp_md5sig_pool *, const struct tcphdr *)
 
int tcp_md5_hash_skb_data (struct tcp_md5sig_pool *, const struct sk_buff *, unsigned int header_len)
 
int tcp_md5_hash_key (struct tcp_md5sig_pool *hp, const struct tcp_md5sig_key *key)
 
void tcp_fastopen_cache_get (struct sock *sk, u16 *mss, struct tcp_fastopen_cookie *cookie, int *syn_loss, unsigned long *last_syn_loss)
 
void tcp_fastopen_cache_set (struct sock *sk, u16 mss, struct tcp_fastopen_cookie *cookie, bool syn_lost)
 
void tcp_free_fastopen_req (struct tcp_sock *tp)
 
int tcp_fastopen_reset_cipher (void *key, unsigned int len)
 
void tcp_fastopen_cookie_gen (__be32 addr, struct tcp_fastopen_cookie *foc)
 
int tcp_seq_open (struct inode *inode, struct file *file)
 
int tcp_proc_register (struct net *net, struct tcp_seq_afinfo *afinfo)
 
void tcp_proc_unregister (struct net *net, struct tcp_seq_afinfo *afinfo)
 
void tcp_v4_destroy_sock (struct sock *sk)
 
int tcp_v4_gso_send_check (struct sk_buff *skb)
 
struct sk_bufftcp_tso_segment (struct sk_buff *skb, netdev_features_t features)
 
struct sk_buff ** tcp_gro_receive (struct sk_buff **head, struct sk_buff *skb)
 
struct sk_buff ** tcp4_gro_receive (struct sk_buff **head, struct sk_buff *skb)
 
int tcp_gro_complete (struct sk_buff *skb)
 
int tcp4_gro_complete (struct sk_buff *skb)
 
int tcp_cookie_generator (u32 *bakery)
 
void tcp_v4_init (void)
 
void tcp_init (void)
 

Variables

struct inet_hashinfo tcp_hashinfo
 
struct percpu_counter tcp_orphan_count
 
struct inet_timewait_death_row tcp_death_row
 
int sysctl_tcp_timestamps
 
int sysctl_tcp_window_scaling
 
int sysctl_tcp_sack
 
int sysctl_tcp_fin_timeout
 
int sysctl_tcp_keepalive_time
 
int sysctl_tcp_keepalive_probes
 
int sysctl_tcp_keepalive_intvl
 
int sysctl_tcp_syn_retries
 
int sysctl_tcp_synack_retries
 
int sysctl_tcp_retries1
 
int sysctl_tcp_retries2
 
int sysctl_tcp_orphan_retries
 
int sysctl_tcp_syncookies
 
int sysctl_tcp_fastopen
 
int sysctl_tcp_retrans_collapse
 
int sysctl_tcp_stdurg
 
int sysctl_tcp_rfc1337
 
int sysctl_tcp_abort_on_overflow
 
int sysctl_tcp_max_orphans
 
int sysctl_tcp_fack
 
int sysctl_tcp_reordering
 
int sysctl_tcp_ecn
 
int sysctl_tcp_dsack
 
int sysctl_tcp_wmem [3]
 
int sysctl_tcp_rmem [3]
 
int sysctl_tcp_app_win
 
int sysctl_tcp_adv_win_scale
 
int sysctl_tcp_tw_reuse
 
int sysctl_tcp_frto
 
int sysctl_tcp_frto_response
 
int sysctl_tcp_low_latency
 
int sysctl_tcp_dma_copybreak
 
int sysctl_tcp_nometrics_save
 
int sysctl_tcp_moderate_rcvbuf
 
int sysctl_tcp_tso_win_divisor
 
int sysctl_tcp_abc
 
int sysctl_tcp_mtu_probing
 
int sysctl_tcp_base_mss
 
int sysctl_tcp_workaround_signed_windows
 
int sysctl_tcp_slow_start_after_idle
 
int sysctl_tcp_max_ssthresh
 
int sysctl_tcp_cookie_size
 
int sysctl_tcp_thin_linear_timeouts
 
int sysctl_tcp_thin_dupack
 
int sysctl_tcp_early_retrans
 
int sysctl_tcp_limit_output_bytes
 
int sysctl_tcp_challenge_ack_limit
 
atomic_long_t tcp_memory_allocated
 
struct percpu_counter tcp_sockets_allocated
 
int tcp_memory_pressure
 
struct proto tcp_prot
 
__u32 syncookie_secret [2][16-4+SHA_DIGEST_WORDS]
 
struct tcp_congestion_ops tcp_init_congestion_ops
 
struct tcp_congestion_ops tcp_reno
 
struct tcp_fastopen_context __rcutcp_fastopen_ctx
 
struct request_sock_ops tcp_request_sock_ops
 
struct request_sock_ops tcp6_request_sock_ops
 

Macro Definition Documentation

#define after (   seq2,
  seq1 
)    before(seq1, seq2)

Definition at line 271 of file tcp.h.

#define COOKIE_DIGEST_WORDS   (SHA_DIGEST_WORDS)

Definition at line 1594 of file tcp.h.

#define COOKIE_MESSAGE_WORDS   (SHA_MESSAGE_BYTES / 4)

Definition at line 1595 of file tcp.h.

#define COOKIE_WORKSPACE_WORDS   (COOKIE_DIGEST_WORDS + COOKIE_MESSAGE_WORDS)

Definition at line 1596 of file tcp.h.

#define FASTRETRANS_DEBUG   1

Definition at line 21 of file tcp.h.

#define MAX_TCP_HEADER   (128 + MAX_HEADER)

Definition at line 55 of file tcp.h.

#define MAX_TCP_KEEPCNT   127

Definition at line 124 of file tcp.h.

#define MAX_TCP_KEEPIDLE   32767

Definition at line 122 of file tcp.h.

#define MAX_TCP_KEEPINTVL   32767

Definition at line 123 of file tcp.h.

#define MAX_TCP_OPTION_SPACE   40

Definition at line 56 of file tcp.h.

#define MAX_TCP_SYNCNT   127

Definition at line 125 of file tcp.h.

#define MAX_TCP_WINDOW   32767U

Definition at line 62 of file tcp.h.

#define TCP_ADD_STATS (   net,
  field,
  val 
)    SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val)

Definition at line 321 of file tcp.h.

#define TCP_ADD_STATS_USER (   net,
  field,
  val 
)    SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val)

Definition at line 320 of file tcp.h.

#define TCP_ATO_MIN   4U

Definition at line 109 of file tcp.h.

#define TCP_BASE_MSS   512

Definition at line 71 of file tcp.h.

#define TCP_CA_BUF_MAX   (TCP_CA_NAME_MAX*TCP_CA_MAX)

Definition at line 733 of file tcp.h.

#define TCP_CA_MAX   128

Definition at line 732 of file tcp.h.

#define TCP_CA_NAME_MAX   16

Definition at line 731 of file tcp.h.

#define TCP_CONG_NON_RESTRICTED   0x1

Definition at line 735 of file tcp.h.

#define TCP_CONG_RTT_STAMP   0x2

Definition at line 736 of file tcp.h.

#define TCP_DEC_STATS (   net,
  field 
)    SNMP_DEC_STATS((net)->mib.tcp_statistics, field)

Definition at line 319 of file tcp.h.

#define TCP_DEFAULT_INIT_RCVWND   10

Definition at line 65 of file tcp.h.

#define TCP_DELACK_MAX   ((unsigned)(HZ/5)) /* maximal time to delay before sending an ACK */

Definition at line 103 of file tcp.h.

#define TCP_DELACK_MIN   4U

Definition at line 108 of file tcp.h.

#define TCP_ECN_DEMAND_CWR   4

Definition at line 373 of file tcp.h.

#define TCP_ECN_OK   1

Definition at line 371 of file tcp.h.

#define TCP_ECN_QUEUE_CWR   2

Definition at line 372 of file tcp.h.

#define TCP_ECN_SEEN   8

Definition at line 374 of file tcp.h.

#define TCP_FASTOPEN_KEY_LENGTH   16

Definition at line 1324 of file tcp.h.

#define TCP_FASTRETRANS_THRESH   3

Definition at line 74 of file tcp.h.

#define TCP_FIN_TIMEOUT   TCP_TIMEWAIT_LEN

Definition at line 96 of file tcp.h.

#define tcp_flag_byte (   th)    (((u_int8_t *)th)[13])

Definition at line 643 of file tcp.h.

#define tcp_for_write_queue (   skb,
  sk 
)    skb_queue_walk(&(sk)->sk_write_queue, skb)

Definition at line 1366 of file tcp.h.

#define tcp_for_write_queue_from (   skb,
  sk 
)    skb_queue_walk_from(&(sk)->sk_write_queue, skb)

Definition at line 1369 of file tcp.h.

#define tcp_for_write_queue_from_safe (   skb,
  tmp,
  sk 
)    skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp)

Definition at line 1372 of file tcp.h.

#define TCP_INC_STATS (   net,
  field 
)    SNMP_INC_STATS((net)->mib.tcp_statistics, field)

Definition at line 317 of file tcp.h.

#define TCP_INC_STATS_BH (   net,
  field 
)    SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field)

Definition at line 318 of file tcp.h.

#define TCP_INFINITE_SSTHRESH   0x7fffffff

Definition at line 872 of file tcp.h.

#define TCP_INIT_CWND   10

Definition at line 185 of file tcp.h.

#define TCP_KEEPALIVE_INTVL   (75*HZ)

Definition at line 120 of file tcp.h.

#define TCP_KEEPALIVE_PROBES   9 /* Max of 9 keepalive probes */

Definition at line 119 of file tcp.h.

#define TCP_KEEPALIVE_TIME   (120*60*HZ) /* two hours */

Definition at line 118 of file tcp.h.

#define TCP_MAX_QUICKACKS   16U

Definition at line 80 of file tcp.h.

#define TCP_MAX_REORDERING   127

Definition at line 77 of file tcp.h.

#define TCP_MIN_MSS   88U

Definition at line 68 of file tcp.h.

#define TCP_NAGLE_CORK   2 /* Socket is corked */

Definition at line 178 of file tcp.h.

#define TCP_NAGLE_OFF   1 /* Nagle's algo is disabled */

Definition at line 177 of file tcp.h.

#define TCP_NAGLE_PUSH   4 /* Cork is overridden for already queued data */

Definition at line 179 of file tcp.h.

#define TCP_PAWS_24DAYS   (60 * 60 * 24 * 24)

Definition at line 129 of file tcp.h.

#define TCP_PAWS_MSL
Value:
60 /* Per-host timestamps are invalidated
* after this time. It should be equal
* (or greater than) TCP_TIMEWAIT_LEN
* to provide reliability equal to one
* provided by timewait state.
*/

Definition at line 130 of file tcp.h.

#define TCP_PAWS_WINDOW
Value:
1 /* Replay window for per-host
* timestamps. It must be less than
* minimal timewait lifetime.
*/

Definition at line 131 of file tcp.h.

#define TCP_RESOURCE_PROBE_INTERVAL
Value:
((unsigned)(HZ/2U)) /* Maximal interval between probes
* for local resources.
*/

Definition at line 116 of file tcp.h.

#define TCP_RETR1
Value:
3 /*
* This is how many retries it does before it
* tries to figure out if the gateway is
* down. Minimal RFC value is 3; it corresponds
* to ~3sec-8min depending on RTO.
*/

Definition at line 87 of file tcp.h.

#define TCP_RETR2
Value:
15 /*
* This should take at least
* 90 minutes to time out.
* RFC1122 says that the limit is 100 sec.
* 15 is ~13-30min depending on RTO.
*/

Definition at line 89 of file tcp.h.

#define TCP_RTO_MAX   ((unsigned)(120*HZ))

Definition at line 111 of file tcp.h.

#define TCP_RTO_MIN   ((unsigned)(HZ/5))

Definition at line 112 of file tcp.h.

#define TCP_SKB_CB (   __skb)    ((struct tcp_skb_cb *)&((__skb)->cb[0]))

Definition at line 685 of file tcp.h.

#define TCP_SYN_RETRIES
Value:
6 /* This is how many retries are done
* when active opening a connection.
* RFC1122 says the minimum retry MUST
* be at least 180secs. Nevertheless
* this value is corresponding to
* 63secs of retransmission with the
* current initial RTO.
*/

Definition at line 91 of file tcp.h.

#define TCP_SYNACK_RETRIES
Value:
5 /* This is how may retries are done
* when passive opening a connection.
* This is corresponding to 31secs of
* retransmission with the current
* initial RTO.
*/

Definition at line 93 of file tcp.h.

#define TCP_SYNQ_INTERVAL   (HZ/5) /* Period of SYNACK timer */

Definition at line 127 of file tcp.h.

#define TCP_THIN_LINEAR_RETRIES   6 /* After 6 linear retries, do exp. backoff */

Definition at line 182 of file tcp.h.

#define tcp_time_stamp   ((__u32)(jiffies))

Definition at line 641 of file tcp.h.

#define TCP_TIMEOUT_FALLBACK
Value:
((unsigned)(3*HZ)) /* RFC 1122 initial RTO value, now
* used as a fallback RTO for the
* initial data transmission if no
* valid RTT sample has been acquired,
* most likely due to retrans in 3WHS.
*/

Definition at line 114 of file tcp.h.

#define TCP_TIMEOUT_INIT   ((unsigned)(1*HZ)) /* RFC6298 2.1 initial RTO value */

Definition at line 113 of file tcp.h.

#define TCP_TIMEWAIT_LEN
Value:
(60*HZ) /* how long to wait to destroy TIME-WAIT
* state, about 60 seconds */

Definition at line 95 of file tcp.h.

#define tcp_twsk_md5_key (   twsk)    NULL

Definition at line 1290 of file tcp.h.

#define TCP_URG_NOTYET   0x0200

Definition at line 84 of file tcp.h.

#define TCP_URG_READ   0x0400

Definition at line 85 of file tcp.h.

#define TCP_URG_VALID   0x0100

Definition at line 83 of file tcp.h.

#define tcp_verify_left_out (   tp)    WARN_ON(tcp_left_out(tp) > tp->packets_out)

Definition at line 902 of file tcp.h.

#define TCPCB_EVER_RETRANS   0x80 /* Ever retransmitted frame */

Definition at line 677 of file tcp.h.

#define TCPCB_LOST   0x04 /* SKB is lost */

Definition at line 675 of file tcp.h.

#define TCPCB_RETRANS   (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS)

Definition at line 678 of file tcp.h.

#define TCPCB_SACKED_ACKED   0x01 /* SKB ACK'd by a SACK block */

Definition at line 673 of file tcp.h.

#define TCPCB_SACKED_RETRANS   0x02 /* SKB retransmitted */

Definition at line 674 of file tcp.h.

#define TCPCB_TAGBITS   0x07 /* All tag bits */

Definition at line 676 of file tcp.h.

#define TCPHDR_ACK   0x10

Definition at line 649 of file tcp.h.

#define TCPHDR_CWR   0x80

Definition at line 652 of file tcp.h.

#define TCPHDR_ECE   0x40

Definition at line 651 of file tcp.h.

#define TCPHDR_FIN   0x01

Definition at line 645 of file tcp.h.

#define TCPHDR_PSH   0x08

Definition at line 648 of file tcp.h.

#define TCPHDR_RST   0x04

Definition at line 647 of file tcp.h.

#define TCPHDR_SYN   0x02

Definition at line 646 of file tcp.h.

#define TCPHDR_URG   0x20

Definition at line 650 of file tcp.h.

#define TCPOLEN_COOKIE_BASE   2 /* Cookie-less header extension */

Definition at line 161 of file tcp.h.

#define TCPOLEN_COOKIE_MAX   (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MAX)

Definition at line 164 of file tcp.h.

#define TCPOLEN_COOKIE_MIN   (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MIN)

Definition at line 163 of file tcp.h.

#define TCPOLEN_COOKIE_PAIR   3 /* Cookie pair header extension */

Definition at line 162 of file tcp.h.

#define TCPOLEN_EXP_FASTOPEN_BASE   4

Definition at line 160 of file tcp.h.

#define TCPOLEN_MD5SIG   18

Definition at line 159 of file tcp.h.

#define TCPOLEN_MD5SIG_ALIGNED   20

Definition at line 173 of file tcp.h.

#define TCPOLEN_MSS   4

Definition at line 155 of file tcp.h.

#define TCPOLEN_MSS_ALIGNED   4

Definition at line 174 of file tcp.h.

#define TCPOLEN_SACK_BASE   2

Definition at line 170 of file tcp.h.

#define TCPOLEN_SACK_BASE_ALIGNED   4

Definition at line 171 of file tcp.h.

#define TCPOLEN_SACK_PERBLOCK   8

Definition at line 172 of file tcp.h.

#define TCPOLEN_SACK_PERM   2

Definition at line 157 of file tcp.h.

#define TCPOLEN_SACKPERM_ALIGNED   4

Definition at line 169 of file tcp.h.

#define TCPOLEN_TIMESTAMP   10

Definition at line 158 of file tcp.h.

#define TCPOLEN_TSTAMP_ALIGNED   12

Definition at line 167 of file tcp.h.

#define TCPOLEN_WINDOW   3

Definition at line 156 of file tcp.h.

#define TCPOLEN_WSCALE_ALIGNED   4

Definition at line 168 of file tcp.h.

#define TCPOPT_COOKIE   253 /* Cookie extension (experimental) */

Definition at line 144 of file tcp.h.

#define TCPOPT_EOL   0 /* End of options */

Definition at line 137 of file tcp.h.

#define TCPOPT_EXP   254 /* Experimental */

Definition at line 145 of file tcp.h.

#define TCPOPT_FASTOPEN_MAGIC   0xF989

Definition at line 149 of file tcp.h.

#define TCPOPT_MD5SIG   19 /* MD5 Signature (RFC2385) */

Definition at line 143 of file tcp.h.

#define TCPOPT_MSS   2 /* Segment size negotiating */

Definition at line 138 of file tcp.h.

#define TCPOPT_NOP   1 /* Padding */

Definition at line 136 of file tcp.h.

#define TCPOPT_SACK   5 /* SACK Block */

Definition at line 141 of file tcp.h.

#define TCPOPT_SACK_PERM   4 /* SACK Permitted */

Definition at line 140 of file tcp.h.

#define TCPOPT_TIMESTAMP   8 /* Better RTT estimations/PAWS */

Definition at line 142 of file tcp.h.

#define TCPOPT_WINDOW   3 /* Window scaling */

Definition at line 139 of file tcp.h.

#define TFO_CLIENT_ENABLE   1

Definition at line 188 of file tcp.h.

#define TFO_CLIENT_NO_COOKIE   4 /* Data in SYN w/o cookie option */

Definition at line 190 of file tcp.h.

#define TFO_SERVER_ALWAYS   0x1000

Definition at line 205 of file tcp.h.

#define TFO_SERVER_COOKIE_NOT_CHKED   0x100

Definition at line 193 of file tcp.h.

#define TFO_SERVER_COOKIE_NOT_REQD   0x200

Definition at line 195 of file tcp.h.

#define TFO_SERVER_ENABLE   2

Definition at line 189 of file tcp.h.

#define TFO_SERVER_WO_SOCKOPT1   0x400

Definition at line 200 of file tcp.h.

#define TFO_SERVER_WO_SOCKOPT2   0x800

Definition at line 201 of file tcp.h.

Typedef Documentation

typedef int(* sk_read_actor_t)(read_descriptor_t *, struct sk_buff *, unsigned int, size_t)

Definition at line 554 of file tcp.h.

Enumeration Type Documentation

Enumerator:
CA_EVENT_TX_START 
CA_EVENT_CWND_RESTART 
CA_EVENT_COMPLETE_CWR 
CA_EVENT_FRTO 
CA_EVENT_LOSS 
CA_EVENT_FAST_ACK 
CA_EVENT_SLOW_ACK 

Definition at line 718 of file tcp.h.

Enumerator:
TCP_SEQ_STATE_LISTENING 
TCP_SEQ_STATE_OPENREQ 
TCP_SEQ_STATE_ESTABLISHED 
TCP_SEQ_STATE_TIME_WAIT 

Definition at line 1515 of file tcp.h.

Enumerator:
TCP_TW_SUCCESS 
TCP_TW_RST 
TCP_TW_ACK 
TCP_TW_SYN 

Definition at line 376 of file tcp.h.

Function Documentation

void __tcp_push_pending_frames ( struct sock sk,
unsigned int  cur_mss,
int  nonagle 
)

Definition at line 2058 of file tcp_output.c.

int __tcp_retransmit_skb ( struct sock ,
struct sk_buff  
)

Definition at line 2312 of file tcp_output.c.

u32 __tcp_select_window ( struct sock sk)

Definition at line 2137 of file tcp_output.c.

int compat_tcp_getsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
int __user optlen 
)
int compat_tcp_setsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
unsigned int  optlen 
)
bool cookie_check_timestamp ( struct tcp_options_received opt,
bool  
)

Definition at line 235 of file syncookies.c.

__u32 cookie_init_timestamp ( struct request_sock req)

Definition at line 67 of file syncookies.c.

struct sock* cookie_v4_check ( struct sock sk,
struct sk_buff skb,
struct ip_options opt 
)
read

Definition at line 265 of file syncookies.c.

struct sock* cookie_v6_check ( struct sock sk,
struct sk_buff skb 
)
read

Definition at line 149 of file syncookies.c.

void inet_sk_rx_dst_set ( struct sock sk,
const struct sk_buff skb 
)

Definition at line 2113 of file tcp_ipv4.c.

int tcp4_gro_complete ( struct sk_buff skb)

Definition at line 2839 of file tcp_ipv4.c.

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

Definition at line 2805 of file tcp_ipv4.c.

struct tcp_md5sig_pool __percpu* tcp_alloc_md5sig_pool ( struct sock )
read
bool tcp_check_oom ( struct sock sk,
int  shift 
)

Definition at line 2032 of file tcp.c.

struct sock* tcp_check_req ( struct sock sk,
struct sk_buff skb,
struct request_sock req,
struct request_sock **  prev,
bool  fastopen 
)
read

Definition at line 532 of file tcp_minisocks.c.

int tcp_child_process ( struct sock parent,
struct sock child,
struct sk_buff skb 
)

Definition at line 770 of file tcp_minisocks.c.

void tcp_cleanup_congestion_control ( struct sock sk)

Definition at line 103 of file tcp_cong.c.

void tcp_cleanup_rbuf ( struct sock sk,
int  copied 
)

Definition at line 1321 of file tcp.c.

void tcp_clear_retrans ( struct tcp_sock tp)

Definition at line 2032 of file tcp_input.c.

void tcp_close ( struct sock sk,
long  timeout 
)

Definition at line 2046 of file tcp.c.

void tcp_cong_avoid_ai ( struct tcp_sock tp,
u32  w 
)

Definition at line 345 of file tcp_cong.c.

int tcp_connect ( struct sock sk)

Definition at line 2987 of file tcp_output.c.

void tcp_connect_init ( struct sock sk)

Definition at line 2816 of file tcp_output.c.

int tcp_cookie_generator ( u32 bakery)

Definition at line 3446 of file tcp.c.

struct sock* tcp_create_openreq_child ( struct sock sk,
struct request_sock req,
struct sk_buff skb 
)
read

Definition at line 380 of file tcp_minisocks.c.

unsigned int tcp_current_mss ( struct sock sk)

Definition at line 1474 of file tcp_output.c.

void tcp_cwnd_application_limited ( struct sock sk)

Definition at line 4935 of file tcp_input.c.

void tcp_delack_timer_handler ( struct sock sk)

Definition at line 197 of file tcp_timer.c.

void tcp_disable_fack ( struct tcp_sock tp)

Definition at line 750 of file tcp_input.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_cwr ( struct sock sk,
const int  set_ssthresh 
)

Definition at line 2735 of file tcp_input.c.

void tcp_enter_frto ( struct sock sk)

Definition at line 1887 of file tcp_input.c.

void tcp_enter_loss ( struct sock sk,
int  how 
)

Definition at line 2044 of file tcp_input.c.

void tcp_enter_memory_pressure ( struct sock sk)

Definition at line 321 of file tcp.c.

void tcp_fastopen_cache_get ( struct sock sk,
u16 mss,
struct tcp_fastopen_cookie cookie,
int syn_loss,
unsigned long last_syn_loss 
)

Definition at line 638 of file tcp_metrics.c.

void tcp_fastopen_cache_set ( struct sock sk,
u16  mss,
struct tcp_fastopen_cookie cookie,
bool  syn_lost 
)

Definition at line 662 of file tcp_metrics.c.

void tcp_fastopen_cookie_gen ( __be32  addr,
struct tcp_fastopen_cookie foc 
)

Definition at line 67 of file tcp_fastopen.c.

int tcp_fastopen_reset_cipher ( void key,
unsigned int  len 
)

Definition at line 25 of file tcp_fastopen.c.

void tcp_fetch_timewait_stamp ( struct sock sk,
struct dst_entry dst 
)

Definition at line 562 of file tcp_metrics.c.

void tcp_finish_connect ( struct sock sk,
struct sk_buff skb 
)

Definition at line 5576 of file tcp_input.c.

int tcp_fragment ( struct sock ,
struct sk_buff ,
u32  ,
unsigned  int 
)

Definition at line 1201 of file tcp_output.c.

void tcp_free_fastopen_req ( struct tcp_sock tp)

Definition at line 989 of file tcp.c.

void tcp_free_md5sig_pool ( void  )
void tcp_get_allowed_congestion_control ( char buf,
size_t  len 
)

Definition at line 178 of file tcp_cong.c.

void tcp_get_available_congestion_control ( char buf,
size_t  len 
)

Definition at line 149 of file tcp_cong.c.

void tcp_get_default_congestion_control ( char name)

Definition at line 165 of file tcp_cong.c.

void tcp_get_info ( const struct sock ,
struct tcp_info  
)

Definition at line 2736 of file tcp.c.

struct tcp_md5sig_pool* tcp_get_md5sig_pool ( void  )
read
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 tcp_init ( void  )

Definition at line 3563 of file tcp.c.

void tcp_init_buffer_space ( struct sock sk)

Definition at line 381 of file tcp_input.c.

void tcp_init_congestion_control ( struct sock sk)

Definition at line 79 of file tcp_cong.c.

__u32 tcp_init_cwnd ( const struct tcp_sock tp,
const struct dst_entry dst 
)

Definition at line 737 of file tcp_input.c.

void tcp_init_mem ( struct net net)

Definition at line 3554 of file tcp.c.

void tcp_init_metrics ( struct sock sk)

Definition at line 438 of file tcp_metrics.c.

void tcp_init_sock ( struct sock sk)

Definition at line 372 of file tcp.c.

void tcp_init_xmit_timers ( struct sock )

Definition at line 642 of file tcp_timer.c.

void tcp_initialize_rcv_mss ( struct sock sk)

Definition at line 440 of file tcp_input.c.

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

Definition at line 535 of file tcp.c.

bool tcp_is_cwnd_limited ( const struct sock sk,
u32  in_flight 
)

Definition at line 283 of file tcp_cong.c.

struct sk_buff* tcp_make_synack ( struct sock sk,
struct dst_entry dst,
struct request_sock req,
struct request_values rvp,
struct tcp_fastopen_cookie foc 
)
read

tcp_make_synack - Prepare a SYN-ACK. sk: listener socket dst: dst entry attached to the SYNACK req: request_sock pointer rvp: request_values pointer

Allocate one skb and build a SYNACK packet. is consumed : Caller should not use it again.

Definition at line 2677 of file tcp_output.c.

bool tcp_may_send_now ( struct sock sk)

Definition at line 1681 of file tcp_output.c.

int tcp_md5_do_add ( struct sock sk,
const union tcp_md5_addr addr,
int  family,
const u8 newkey,
u8  newkeylen,
gfp_t  gfp 
)
int tcp_md5_do_del ( struct sock sk,
const union tcp_md5_addr addr,
int  family 
)
int tcp_md5_hash_header ( struct tcp_md5sig_pool ,
const struct tcphdr  
)
int tcp_md5_hash_key ( struct tcp_md5sig_pool hp,
const struct tcp_md5sig_key key 
)
int tcp_md5_hash_skb_data ( struct tcp_md5sig_pool ,
const struct sk_buff ,
unsigned int  header_len 
)
void tcp_metrics_init ( void  )

Definition at line 1072 of file tcp_metrics.c.

int tcp_mss_to_mtu ( struct sock sk,
int  mss 
)

Definition at line 1392 of file tcp_output.c.

int tcp_mtu_to_mss ( struct sock sk,
int  pmtu 
)

Definition at line 1355 of file tcp_output.c.

void tcp_mtup_init ( struct sock sk)

Definition at line 1414 of file tcp_output.c.

const u8* tcp_parse_md5sig_option ( const struct tcphdr th)
void tcp_parse_options ( const struct sk_buff skb,
struct tcp_options_received opt_rx,
const u8 **  hvpp,
int  estab,
struct tcp_fastopen_cookie foc 
)

Definition at line 3706 of file tcp_input.c.

bool tcp_peer_is_proven ( struct request_sock req,
struct dst_entry dst,
bool  paws_check 
)

Definition at line 533 of file tcp_metrics.c.

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

Definition at line 440 of file tcp.c.

int tcp_proc_register ( struct net net,
struct tcp_seq_afinfo afinfo 
)
void tcp_proc_unregister ( struct net net,
struct tcp_seq_afinfo afinfo 
)
void tcp_push_one ( struct sock ,
unsigned int  mss_now 
)

Definition at line 2076 of file tcp_output.c.

void tcp_put_md5sig_pool ( void  )
int tcp_rcv_established ( struct sock sk,
struct sk_buff skb,
const struct tcphdr th,
unsigned int  len 
)

Definition at line 5360 of file tcp_input.c.

void tcp_rcv_space_adjust ( struct sock sk)

Definition at line 527 of file tcp_input.c.

int tcp_rcv_state_process ( struct sock sk,
struct sk_buff skb,
const struct tcphdr th,
unsigned int  len 
)

Definition at line 5911 of file tcp_input.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.

void tcp_rearm_rto ( struct sock sk)

Definition at line 3089 of file tcp_input.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_register_congestion_control ( struct tcp_congestion_ops type)

Definition at line 40 of file tcp_cong.c.

void tcp_release_cb ( struct sock sk)

tcp_release_cb - tcp release_sock() callback : socket

called from release_sock() to perform protocol dependent actions before socket release.

Definition at line 906 of file tcp_output.c.

bool tcp_remember_stamp ( struct sock sk)

Definition at line 585 of file tcp_metrics.c.

void tcp_reno_cong_avoid ( struct sock sk,
u32  ack,
u32  in_flight 
)

Definition at line 364 of file tcp_cong.c.

u32 tcp_reno_min_cwnd ( const struct sock sk)

Definition at line 400 of file tcp_cong.c.

u32 tcp_reno_ssthresh ( struct sock sk)

Definition at line 392 of file tcp_cong.c.

void tcp_reset ( struct sock sk)

Definition at line 4010 of file tcp_input.c.

void tcp_resume_early_retransmit ( struct sock sk)

Definition at line 3123 of file tcp_input.c.

int tcp_retransmit_skb ( struct sock ,
struct sk_buff  
)

Definition at line 2396 of file tcp_output.c.

void tcp_retransmit_timer ( struct sock sk)

Definition at line 340 of file tcp_timer.c.

void tcp_select_initial_window ( int  __space,
__u32  mss,
__u32 rcv_wnd,
__u32 window_clamp,
int  wscale_ok,
__u8 rcv_wscale,
__u32  init_rcv_wnd 
)

Definition at line 195 of file tcp_output.c.

void tcp_send_ack ( struct sock sk)

Definition at line 3084 of file tcp_output.c.

void tcp_send_active_reset ( struct sock sk,
gfp_t  priority 
)

Definition at line 2608 of file tcp_output.c.

void tcp_send_delayed_ack ( struct sock sk)

Definition at line 3031 of file tcp_output.c.

void tcp_send_fin ( struct sock sk)

Definition at line 2567 of file tcp_output.c.

void tcp_send_partial ( struct sock )
void tcp_send_probe0 ( struct sock )

Definition at line 3202 of file tcp_output.c.

int tcp_send_rcvq ( struct sock sk,
struct msghdr msg,
size_t  size 
)

Definition at line 4526 of file tcp_input.c.

int tcp_send_synack ( struct sock )

Definition at line 2637 of file tcp_output.c.

void tcp_send_window_probe ( struct sock sk)

Definition at line 3146 of file tcp_output.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.

int tcp_seq_open ( struct inode inode,
struct file file 
)
int tcp_set_allowed_congestion_control ( char allowed)

Definition at line 197 of file tcp_cong.c.

int tcp_set_congestion_control ( struct sock sk,
const char name 
)

Definition at line 237 of file tcp_cong.c.

int tcp_set_default_congestion_control ( const char name)

Definition at line 113 of file tcp_cong.c.

void tcp_set_keepalive ( struct sock sk,
int  val 
)

Definition at line 545 of file tcp_timer.c.

void tcp_set_rto ( struct sock sk)

Definition at line 710 of file tcp_input.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_simple_retransmit ( struct sock )

Definition at line 2814 of file tcp_input.c.

void tcp_slow_start ( struct tcp_sock tp)

Definition at line 308 of file tcp_cong.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.

void tcp_syn_ack_timeout ( struct sock sk,
struct request_sock req 
)

Definition at line 539 of file tcp_timer.c.

bool tcp_syn_flood_action ( struct sock sk,
const struct sk_buff skb,
const char proto 
)

Definition at line 897 of file tcp_ipv4.c.

unsigned int tcp_sync_mss ( struct sock sk,
u32  pmtu 
)

Definition at line 1449 of file tcp_output.c.

void tcp_tasklet_init ( void  )

Definition at line 937 of file tcp_output.c.

void tcp_time_wait ( struct sock sk,
int  state,
int  timeo 
)

Definition at line 266 of file tcp_minisocks.c.

enum tcp_tw_status tcp_timewait_state_process ( struct inet_timewait_sock tw,
struct sk_buff skb,
const struct tcphdr th 
)

Definition at line 92 of file tcp_minisocks.c.

int tcp_trim_head ( struct sock ,
struct sk_buff ,
u32   
)

Definition at line 1332 of file tcp_output.c.

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

Definition at line 2985 of file tcp.c.

bool tcp_tw_remember_stamp ( struct inet_timewait_sock tw)

Definition at line 611 of file tcp_metrics.c.

void tcp_twsk_destructor ( struct sock sk)

Definition at line 355 of file tcp_minisocks.c.

int tcp_twsk_unique ( struct sock sk,
struct sock sktw,
void twp 
)

Definition at line 109 of file tcp_ipv4.c.

void tcp_unregister_congestion_control ( struct tcp_congestion_ops type)

Definition at line 70 of file tcp_cong.c.

void tcp_update_metrics ( struct sock sk)

Definition at line 317 of file tcp_metrics.c.

bool tcp_use_frto ( struct sock sk)

Definition at line 1839 of file tcp_input.c.

int tcp_v4_conn_request ( struct sock sk,
struct sk_buff skb 
)

Definition at line 1473 of file tcp_ipv4.c.

int tcp_v4_connect ( struct sock sk,
struct sockaddr uaddr,
int  addr_len 
)

Definition at line 150 of file tcp_ipv4.c.

void tcp_v4_destroy_sock ( struct sock sk)

Definition at line 2169 of file tcp_ipv4.c.

int tcp_v4_do_rcv ( struct sock sk,
struct sk_buff skb 
)

Definition at line 1846 of file tcp_ipv4.c.

void tcp_v4_early_demux ( struct sk_buff skb)

Definition at line 1920 of file tcp_ipv4.c.

void tcp_v4_err ( struct sk_buff skb,
u32   
)

Definition at line 344 of file tcp_ipv4.c.

struct inet_peer* tcp_v4_get_peer ( struct sock sk)
read
int tcp_v4_gso_send_check ( struct sk_buff skb)

Definition at line 585 of file tcp_ipv4.c.

void tcp_v4_init ( void  )

Definition at line 2919 of file tcp_ipv4.c.

int tcp_v4_md5_hash_skb ( char md5_hash,
struct tcp_md5sig_key key,
const struct sock sk,
const struct request_sock req,
const struct sk_buff skb 
)
struct tcp_md5sig_key* tcp_v4_md5_lookup ( struct sock sk,
struct sock addr_sk 
)
read
int tcp_v4_rcv ( struct sk_buff skb)

Definition at line 1962 of file tcp_ipv4.c.

void tcp_v4_send_check ( struct sock sk,
struct sk_buff skb 
)

Definition at line 577 of file tcp_ipv4.c.

struct sock* tcp_v4_syn_recv_sock ( struct sock sk,
struct sk_buff skb,
struct request_sock req,
struct dst_entry dst 
)
read

Definition at line 1686 of file tcp_ipv4.c.

int tcp_v4_tw_remember_stamp ( struct inet_timewait_sock tw)
void tcp_valid_rtt_meas ( struct sock sk,
u32  seq_rtt 
)

Definition at line 3018 of file tcp_input.c.

void tcp_write_timer_handler ( struct sock sk)

Definition at line 484 of file tcp_timer.c.

int tcp_write_wakeup ( struct sock )

Definition at line 3156 of file tcp_output.c.

void tcp_xmit_retransmit_queue ( struct sock )

Definition at line 2469 of file tcp_output.c.

Variable Documentation

__u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]

Definition at line 28 of file syncookies.c.

int sysctl_tcp_abc
int sysctl_tcp_abort_on_overflow
int sysctl_tcp_adv_win_scale
int sysctl_tcp_app_win
int sysctl_tcp_base_mss
int sysctl_tcp_challenge_ack_limit

Definition at line 92 of file tcp_input.c.

int sysctl_tcp_cookie_size
int sysctl_tcp_dma_copybreak

Definition at line 36 of file user_dma.c.

int sysctl_tcp_dsack
int sysctl_tcp_early_retrans
int sysctl_tcp_ecn
int sysctl_tcp_fack
int sysctl_tcp_fastopen
int sysctl_tcp_fin_timeout
int sysctl_tcp_frto
int sysctl_tcp_frto_response
int sysctl_tcp_keepalive_intvl
int sysctl_tcp_keepalive_probes
int sysctl_tcp_keepalive_time
int sysctl_tcp_limit_output_bytes
int sysctl_tcp_low_latency
int sysctl_tcp_max_orphans
int sysctl_tcp_max_ssthresh

Definition at line 18 of file tcp_cong.c.

int sysctl_tcp_moderate_rcvbuf
int sysctl_tcp_mtu_probing
int sysctl_tcp_nometrics_save
int sysctl_tcp_orphan_retries
int sysctl_tcp_reordering
int sysctl_tcp_retrans_collapse
int sysctl_tcp_retries1
int sysctl_tcp_retries2
int sysctl_tcp_rfc1337
int sysctl_tcp_rmem

Definition at line 289 of file tcp.c.

int sysctl_tcp_sack
int sysctl_tcp_slow_start_after_idle
int sysctl_tcp_stdurg
int sysctl_tcp_syn_retries
int sysctl_tcp_synack_retries
int sysctl_tcp_syncookies
int sysctl_tcp_thin_dupack
int sysctl_tcp_thin_linear_timeouts
int sysctl_tcp_timestamps
int sysctl_tcp_tso_win_divisor
int sysctl_tcp_tw_reuse
int sysctl_tcp_window_scaling
int sysctl_tcp_wmem

Definition at line 288 of file tcp.c.

int sysctl_tcp_workaround_signed_windows
struct request_sock_ops tcp6_request_sock_ops

Definition at line 35 of file tcp_minisocks.c.

struct tcp_fastopen_context __rcu* tcp_fastopen_ctx

Definition at line 13 of file tcp_fastopen.c.

struct inet_hashinfo tcp_hashinfo

Definition at line 98 of file tcp_ipv4.c.

struct tcp_congestion_ops tcp_init_congestion_ops

Definition at line 420 of file tcp_cong.c.

atomic_long_t tcp_memory_allocated

Definition at line 294 of file tcp.c.

int tcp_memory_pressure
struct percpu_counter tcp_orphan_count

Definition at line 285 of file tcp.c.

struct proto tcp_prot

Definition at line 2851 of file tcp_ipv4.c.

Definition at line 407 of file tcp_cong.c.

struct percpu_counter tcp_sockets_allocated

Definition at line 300 of file tcp.c.