ReactOS  0.4.13-dev-92-gf251225
tcpcore.h File Reference
#include "tcpdef.h"
#include "linux.h"
Include dependency graph for tcpcore.h:

Go to the source code of this file.

Classes

struct  sk_buff_head
 
struct  skb_frag_struct
 
struct  skb_shared_info
 
struct  sk_buff
 
struct  sockaddr
 
struct  msghdr
 
struct  proto
 
struct  tcp_sack_block
 
struct  tcp_opt
 
struct  socket_lock_t
 
struct  sock
 
struct  dst_entry
 
struct  dst_ops
 
struct  tcp_ehash_bucket
 
struct  tcp_bind_bucket
 
struct  tcp_bind_hashbucket
 
struct  tcp_hashinfo
 
struct  tcp_tw_bucket
 
struct  or_calltable
 
struct  tcp_v4_open_req
 
struct  open_request
 
struct  tcp_func
 
struct  tcp_skb_cb
 
struct  tcp_listen_opt
 

Macros

#define HAVE_ALLOC_SKB   /* For the drivers to know */
 
#define HAVE_ALIGNABLE_SKB   /* Ditto 8) */
 
#define SLAB_SKB   /* Slabified skbuffs */
 
#define CHECKSUM_NONE   0
 
#define CHECKSUM_HW   1
 
#define CHECKSUM_UNNECESSARY   2
 
#define SKB_DATA_ALIGN(X)   (((X) + (SMP_CACHE_BYTES-1)) & ~(SMP_CACHE_BYTES-1))
 
#define SKB_MAX_ORDER(X, ORDER)   (((PAGE_SIZE<<(ORDER)) - (X) - sizeof(struct skb_shared_info))&~(SMP_CACHE_BYTES-1))
 
#define SKB_MAX_HEAD(X)   (SKB_MAX_ORDER((X),0))
 
#define SKB_MAX_ALLOC   (SKB_MAX_ORDER(0,2))
 
#define NET_CALLER(arg)   __builtin_return_address(0)
 
#define MAX_SKB_FRAGS   6
 
#define SK_WMEM_MAX   65535
 
#define SK_RMEM_MAX   65535
 
#define dev_kfree_skb(a)   kfree_skb(a)
 
#define skb_shinfo(SKB)   ((struct skb_shared_info *)((SKB)->end))
 
#define SKB_PAGE_ASSERT(skb)   do { if (skb_shinfo(skb)->nr_frags) out_of_line_bug(); } while (0)
 
#define SKB_FRAG_ASSERT(skb)   do { if (skb_shinfo(skb)->frag_list) out_of_line_bug(); } while (0)
 
#define SKB_LINEAR_ASSERT(skb)   do { if (skb_is_nonlinear(skb)) out_of_line_bug(); } while (0)
 
#define skb_queue_walk(queue, skb)
 
#define RT_CACHE_DEBUG   0
 
#define DST_GC_MIN   (1*HZ)
 
#define DST_GC_INC   (5*HZ)
 
#define DST_GC_MAX   (120*HZ)
 
#define DST_HOST   1
 
#define TCP_DEBUG   1
 
#define FASTRETRANS_DEBUG   1
 
#define TCP_LHTABLE_SIZE   32 /* Yes, really, this is all you need. */
 
#define tcp_ehash   (tcp_hashinfo.__tcp_ehash)
 
#define tcp_bhash   (tcp_hashinfo.__tcp_bhash)
 
#define tcp_ehash_size   (tcp_hashinfo.__tcp_ehash_size)
 
#define tcp_bhash_size   (tcp_hashinfo.__tcp_bhash_size)
 
#define tcp_listening_hash   (tcp_hashinfo.__tcp_listening_hash)
 
#define tcp_lhash_lock   (tcp_hashinfo.__tcp_lhash_lock)
 
#define tcp_lhash_users   (tcp_hashinfo.__tcp_lhash_users)
 
#define tcp_lhash_wait   (tcp_hashinfo.__tcp_lhash_wait)
 
#define tcp_portalloc_lock   (tcp_hashinfo.__tcp_portalloc_lock)
 
#define TCP_COMBINED_PORTS(__sport, __dport)   (((__u32)(__dport)<<16) | (__u32)(__sport))
 
#define TCP_V4_ADDR_COOKIE(__name, __saddr, __daddr)
 
#define TCP_IPV4_MATCH(__sk, __cookie, __saddr, __daddr, __ports, __dif)
 
#define TCP_IPV6_MATCH(__sk, __saddr, __daddr, __ports, __dif)
 
#define MAX_TCP_HEADER   (128 + MAX_HEADER)
 
#define MAX_TCP_WINDOW   32767U
 
#define TCP_MIN_MSS   88U
 
#define TCP_MIN_RCVMSS   536U
 
#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_ORPHAN_RETRIES
 
#define TCP_TIMEWAIT_LEN   (60*1000)
 
#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)(3*HZ)) /* RFC 1122 initial RTO value */
 
#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_TWKILL_SLOTS   8 /* Please keep this a power of 2. */
 
#define TCP_TWKILL_PERIOD   (TCP_TIMEWAIT_LEN/TCP_TWKILL_SLOTS)
 
#define TCP_SYNQ_INTERVAL   (HZ/5) /* Period of SYNACK timer */
 
#define TCP_SYNQ_HSIZE   512 /* Size of SYNACK hash table */
 
#define TCP_PAWS_24DAYS   (60 * 60 * 24 * 24)
 
#define TCP_PAWS_MSL
 
#define TCP_PAWS_WINDOW
 
#define TCP_TW_RECYCLE_SLOTS_LOG   5
 
#define TCP_TW_RECYCLE_SLOTS   (1<<TCP_TW_RECYCLE_SLOTS_LOG)
 
#define TCP_TW_RECYCLE_TICK   (0)
 
#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 TCPOLEN_MSS   4
 
#define TCPOLEN_WINDOW   3
 
#define TCPOLEN_SACK_PERM   2
 
#define TCPOLEN_TIMESTAMP   10
 
#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 TCP_TIME_RETRANS   1 /* Retransmit timer */
 
#define TCP_TIME_DACK   2 /* Delayed ack timer */
 
#define TCP_TIME_PROBE0   3 /* Zero window probe timer */
 
#define TCP_TIME_KEEPOPEN   4 /* Keepalive timer */
 
#define tcp_openreq_alloc()   kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC)
 
#define tcp_openreq_fastfree(req)   kmem_cache_free(tcp_openreq_cachep, req)
 
#define TCP_INET_FAMILY(fam)   1
 
#define tcp_time_stamp   ((__u32)(jiffies))
 
#define TCPCB_FLAG_FIN   0x01
 
#define TCPCB_FLAG_SYN   0x02
 
#define TCPCB_FLAG_RST   0x04
 
#define TCPCB_FLAG_PSH   0x08
 
#define TCPCB_FLAG_ACK   0x10
 
#define TCPCB_FLAG_URG   0x20
 
#define TCPCB_FLAG_ECE   0x40
 
#define TCPCB_FLAG_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 TCPCB_URG   0x20 /* Urgent pointer advenced here */
 
#define TCPCB_AT_TAIL   (TCPCB_URG)
 
#define TCP_SKB_CB(__skb)   ((struct tcp_skb_cb *)&((__skb)->cb[0]))
 
#define for_retrans_queue(skb, sk, tp)
 
#define TCP_MEM_QUANTUM   ((int)PAGE_SIZE)
 
#define TCP_CHECK_TIMER(sk)   do { } while (0)
 

Typedefs

typedef struct skb_frag_struct skb_frag_t
 
typedef struct sockaddr _sockaddr
 
typedef int(* sk_read_actor_t) (read_descriptor_t *, struct sk_buff *, unsigned int, size_t)
 

Enumerations

enum  tcp_ack_state_t { TCP_ACK_SCHED = 1, TCP_ACK_TIMER = 2, TCP_ACK_PUSHED = 4 }
 
enum  tcp_tw_status { TCP_TW_SUCCESS = 0, TCP_TW_RST = 1, TCP_TW_ACK = 2, TCP_TW_SYN = 3 }
 

Functions

void __kfree_skb (struct sk_buff *skb)
 
struct sk_buffalloc_skb (unsigned int size, int priority)
 
void kfree_skbmem (struct sk_buff *skb)
 
struct sk_buffskb_clone (struct sk_buff *skb, int priority)
 
struct sk_buffskb_copy (const struct sk_buff *skb, int priority)
 
struct sk_buffpskb_copy (struct sk_buff *skb, int gfp_mask)
 
int pskb_expand_head (struct sk_buff *skb, int nhead, int ntail, int gfp_mask)
 
struct sk_buffskb_realloc_headroom (struct sk_buff *skb, unsigned int headroom)
 
struct sk_buffskb_copy_expand (const struct sk_buff *skb, int newheadroom, int newtailroom, int priority)
 
void skb_over_panic (struct sk_buff *skb, int len, void *here)
 
void skb_under_panic (struct sk_buff *skb, int len, void *here)
 
static __inline int skb_queue_empty (struct sk_buff_head *list)
 
static __inline struct sk_buffskb_get (struct sk_buff *skb)
 
static __inline void kfree_skb (struct sk_buff *skb)
 
static __inline void kfree_skb_fast (struct sk_buff *skb)
 
static __inline int skb_cloned (struct sk_buff *skb)
 
static __inline int skb_shared (struct sk_buff *skb)
 
static __inline struct sk_buffskb_share_check (struct sk_buff *skb, int pri)
 
static __inline struct sk_buffskb_unshare (struct sk_buff *skb, int pri)
 
static __inline struct sk_buffskb_peek (struct sk_buff_head *list_)
 
static __inline struct sk_buffskb_peek_tail (struct sk_buff_head *list_)
 
static __inline __u32 skb_queue_len (struct sk_buff_head *list_)
 
static __inline void skb_queue_head_init (struct sk_buff_head *list)
 
static __inline void __skb_queue_head (struct sk_buff_head *list, struct sk_buff *newsk)
 
static __inline void skb_queue_head (struct sk_buff_head *list, struct sk_buff *newsk)
 
static __inline void __skb_queue_tail (struct sk_buff_head *list, struct sk_buff *newsk)
 
static __inline void skb_queue_tail (struct sk_buff_head *list, struct sk_buff *newsk)
 
static __inline struct sk_buff__skb_dequeue (struct sk_buff_head *list)
 
static __inline struct sk_buffskb_dequeue (struct sk_buff_head *list)
 
static __inline void __skb_insert (struct sk_buff *newsk, struct sk_buff *prev, struct sk_buff *next, struct sk_buff_head *list)
 
static __inline void skb_insert (struct sk_buff *old, struct sk_buff *newsk)
 
static __inline void __skb_append (struct sk_buff *old, struct sk_buff *newsk)
 
static __inline void skb_append (struct sk_buff *old, struct sk_buff *newsk)
 
static __inline void __skb_unlink (struct sk_buff *skb, struct sk_buff_head *list)
 
static __inline void skb_unlink (struct sk_buff *skb)
 
static __inline struct sk_buff__skb_dequeue_tail (struct sk_buff_head *list)
 
static __inline struct sk_buffskb_dequeue_tail (struct sk_buff_head *list)
 
static __inline int skb_is_nonlinear (const struct sk_buff *skb)
 
static __inline int skb_headlen (const struct sk_buff *skb)
 
static __inline unsigned char__skb_put (struct sk_buff *skb, unsigned int len)
 
static __inline unsigned charskb_put (struct sk_buff *skb, unsigned int len)
 
static __inline unsigned char__skb_push (struct sk_buff *skb, unsigned int len)
 
static __inline unsigned charskb_push (struct sk_buff *skb, unsigned int len)
 
static __inline char__skb_pull (struct sk_buff *skb, unsigned int len)
 
static __inline unsigned charskb_pull (struct sk_buff *skb, unsigned int len)
 
unsigned char__pskb_pull_tail (struct sk_buff *skb, int delta)
 
static __inline char__pskb_pull (struct sk_buff *skb, unsigned int len)
 
static __inline unsigned charpskb_pull (struct sk_buff *skb, unsigned int len)
 
static __inline int pskb_may_pull (struct sk_buff *skb, unsigned int len)
 
static __inline int skb_headroom (const struct sk_buff *skb)
 
static __inline int skb_tailroom (const struct sk_buff *skb)
 
static __inline void skb_reserve (struct sk_buff *skb, unsigned int len)
 
int ___pskb_trim (struct sk_buff *skb, unsigned int len, int realloc)
 
static __inline void __skb_trim (struct sk_buff *skb, unsigned int len)
 
static __inline void skb_trim (struct sk_buff *skb, unsigned int len)
 
static __inline int __pskb_trim (struct sk_buff *skb, unsigned int len)
 
static __inline int pskb_trim (struct sk_buff *skb, unsigned int len)
 
static __inline void skb_orphan (struct sk_buff *skb)
 
static __inline void skb_queue_purge (struct sk_buff_head *list)
 
static __inline void __skb_queue_purge (struct sk_buff_head *list)
 
static __inline struct sk_buff__dev_alloc_skb (unsigned int length, int gfp_mask)
 
static __inline struct sk_buffdev_alloc_skb (unsigned int length)
 
static __inline int skb_cow (struct sk_buff *skb, unsigned int headroom)
 
int skb_linearize (struct sk_buff *skb, int gfp)
 
static __inline voidkmap_skb_frag (const skb_frag_t *frag)
 
static __inline void kunmap_skb_frag (void *vaddr)
 
struct sk_buffskb_recv_datagram (struct sock *sk, unsigned flags, int noblock, int *err)
 
unsigned int datagram_poll (struct file *file, struct socket *sock, struct poll_table_struct *wait)
 
int skb_copy_datagram (const struct sk_buff *from, int offset, char *to, int size)
 
int skb_copy_datagram_iovec (const struct sk_buff *from, int offset, struct iovec *to, int size)
 
int skb_copy_and_csum_datagram (const struct sk_buff *skb, int offset, u8 *to, int len, unsigned int *csump)
 
int skb_copy_and_csum_datagram_iovec (const struct sk_buff *skb, int hlen, struct iovec *iov)
 
void skb_free_datagram (struct sock *sk, struct sk_buff *skb)
 
unsigned int skb_checksum (const struct sk_buff *skb, int offset, int len, unsigned int csum)
 
int skb_copy_bits (const struct sk_buff *skb, int offset, void *to, int len)
 
unsigned int skb_copy_and_csum_bits (const struct sk_buff *skb, int offset, u8 *to, int len, unsigned int csum)
 
void skb_copy_and_csum_dev (const struct sk_buff *skb, u8 *to)
 
void skb_init (void)
 
void skb_add_mtu (int mtu)
 
struct tcp_ehash_bucket __attribute__ ((__aligned__(8)))
 
struct tcp_bind_buckettcp_bucket_create (struct tcp_bind_hashbucket *head, unsigned short snum)
 
void tcp_bucket_unlock (struct sock *sk)
 
struct socktcp_v4_lookup_listener (u32 addr, unsigned short hnum, int dif)
 
static __inline int tcp_bhashfn (__u16 lport)
 
static __inline void tcp_tw_put (struct tcp_tw_bucket *tw)
 
void tcp_time_wait (struct sock *sk, int state, int timeo)
 
void tcp_timewait_kill (struct tcp_tw_bucket *tw)
 
void tcp_tw_schedule (struct tcp_tw_bucket *tw, int timeo)
 
void tcp_tw_deschedule (struct tcp_tw_bucket *tw)
 
static __inline int tcp_lhashfn (unsigned short num)
 
static __inline int tcp_sk_listen_hashfn (struct sock *sk)
 
static __inline void tcp_openreq_free (struct open_request *req)
 
__inline int before (__u32 seq1, __u32 seq2)
 
__inline int after (__u32 seq1, __u32 seq2)
 
__inline int between (__u32 seq1, __u32 seq2, __u32 seq3)
 
void tcp_put_port (struct sock *sk)
 
void __tcp_put_port (struct sock *sk)
 
void tcp_inherit_port (struct sock *sk, struct sock *child)
 
void tcp_v4_err (struct sk_buff *skb, u32)
 
void tcp_shutdown (struct sock *sk, int how)
 
int tcp_v4_rcv (struct sk_buff *skb)
 
int tcp_v4_remember_stamp (struct sock *sk)
 
int tcp_v4_tw_remember_stamp (struct tcp_tw_bucket *tw)
 
int tcp_sendmsg (struct sock *sk, struct msghdr *msg, int size)
 
ssize_t tcp_sendpage (struct socket *sock, struct page *page, int offset, size_t size, int flags)
 
int tcp_ioctl (struct sock *sk, int cmd, unsigned long arg)
 
int tcp_rcv_state_process (struct sock *sk, struct sk_buff *skb, struct tcphdr *th, unsigned len)
 
int tcp_rcv_established (struct sock *sk, struct sk_buff *skb, struct tcphdr *th, unsigned len)
 
static __inline void tcp_schedule_ack (struct tcp_opt *tp)
 
static __inline int tcp_ack_scheduled (struct tcp_opt *tp)
 
static __inline void tcp_dec_quickack_mode (struct tcp_opt *tp)
 
void tcp_enter_quickack_mode (struct tcp_opt *tp)
 
static __inline void tcp_delack_init (struct tcp_opt *tp)
 
static __inline void tcp_clear_options (struct tcp_opt *tp)
 
enum tcp_tw_status tcp_timewait_state_process (struct tcp_tw_bucket *tw, struct sk_buff *skb, struct tcphdr *th, unsigned len)
 
struct socktcp_check_req (struct sock *sk, struct sk_buff *skb, struct open_request *req, struct open_request **prev)
 
int tcp_child_process (struct sock *parent, struct sock *child, struct sk_buff *skb)
 
void tcp_enter_loss (struct sock *sk, int how)
 
void tcp_clear_retrans (struct tcp_opt *tp)
 
void tcp_update_metrics (struct sock *sk)
 
void tcp_close (struct sock *sk, long timeout)
 
struct socktcp_accept (struct sock *sk, int flags, int *err)
 
unsigned int tcp_poll (struct file *file, struct socket *sock, struct poll_table_struct *wait)
 
void tcp_write_space (struct sock *sk)
 
int tcp_getsockopt (struct sock *sk, int level, int optname, char *optval, int *optlen)
 
int tcp_setsockopt (struct sock *sk, int level, int optname, char *optval, int optlen)
 
void tcp_set_keepalive (struct sock *sk, int val)
 
int tcp_recvmsg (struct sock *sk, struct msghdr *msg, int len, int nonblock, int flags, int *addr_len)
 
int tcp_listen_start (struct sock *sk)
 
void tcp_parse_options (struct sk_buff *skb, struct tcp_opt *tp, int estab)
 
int tcp_v4_rebuild_header (struct sock *sk)
 
int tcp_v4_build_header (struct sock *sk, struct sk_buff *skb)
 
void tcp_v4_send_check (struct sock *sk, struct tcphdr *th, int len, 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 open_request *req, struct sk_buff *skb)
 
struct socktcp_v4_syn_recv_sock (struct sock *sk, struct sk_buff *skb, struct open_request *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 open_request *req)
 
int tcp_disconnect (struct sock *sk, int flags)
 
void tcp_unhash (struct sock *sk)
 
int tcp_v4_hash_connecting (struct sock *sk)
 
struct sockcookie_v4_check (struct sock *sk, struct sk_buff *skb, struct ip_options *opt)
 
__u32 cookie_v4_init_sequence (struct sock *sk, struct sk_buff *skb, __u16 *mss)
 
int tcp_write_xmit (struct sock *, int nonagle)
 
int tcp_retransmit_skb (struct sock *, struct sk_buff *)
 
void tcp_xmit_retransmit_queue (struct sock *)
 
void tcp_simple_retransmit (struct sock *)
 
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, int priority)
 
int tcp_send_synack (struct sock *)
 
int tcp_transmit_skb (struct sock *, struct sk_buff *)
 
void tcp_send_skb (struct sock *, struct sk_buff *, int force_queue, unsigned mss_now)
 
void tcp_push_one (struct sock *, unsigned mss_now)
 
void tcp_send_ack (struct sock *sk)
 
void tcp_send_delayed_ack (struct sock *sk)
 
void tcp_init_xmit_timers (struct sock *)
 
void tcp_clear_xmit_timers (struct sock *)
 
void tcp_delete_keepalive_timer (struct sock *)
 
void tcp_reset_keepalive_timer (struct sock *, unsigned long)
 
int tcp_sync_mss (struct sock *sk, u32 pmtu)
 
int tcp_read_sock (struct sock *sk, read_descriptor_t *desc, sk_read_actor_t recv_actor)
 
static __inline void tcp_clear_xmit_timer (struct sock *sk, int what)
 
static __inline void tcp_reset_xmit_timer (struct sock *sk, int what, unsigned long when)
 
static __inline unsigned int tcp_current_mss (struct sock *sk)
 
static __inline void tcp_initialize_rcv_mss (struct sock *sk)
 
static __inline void __tcp_fast_path_on (struct tcp_opt *tp, u32 snd_wnd)
 
static __inline void tcp_fast_path_on (struct tcp_opt *tp)
 
static __inline void tcp_fast_path_check (struct sock *sk, struct tcp_opt *tp)
 
static __inline u32 tcp_receive_window (struct tcp_opt *tp)
 
u32 __tcp_select_window (struct sock *sk)
 
static __inline int tcp_min_write_space (struct sock *sk)
 
static __inline int tcp_wspace (struct sock *sk)
 
static __inline unsigned int tcp_packets_in_flight (struct tcp_opt *tp)
 
static __inline __u32 tcp_recalc_ssthresh (struct tcp_opt *tp)
 
static __inline __u32 tcp_current_ssthresh (struct tcp_opt *tp)
 
static __inline void tcp_sync_left_out (struct tcp_opt *tp)
 
void tcp_cwnd_application_limited (struct sock *sk)
 
static __inline void tcp_cwnd_validate (struct sock *sk, struct tcp_opt *tp)
 
static __inline void __tcp_enter_cwr (struct tcp_opt *tp)
 
static __inline void tcp_enter_cwr (struct tcp_opt *tp)
 
__u32 tcp_init_cwnd (struct tcp_opt *tp)
 
static __inline __u32 tcp_max_burst (struct tcp_opt *tp)
 
static __inline__ int tcp_minshall_check (struct tcp_opt *tp)
 
static __inline void tcp_minshall_update (struct tcp_opt *tp, int mss, struct sk_buff *skb)
 
static __inline int tcp_nagle_check (struct tcp_opt *tp, struct sk_buff *skb, unsigned mss_now, int nonagle)
 
static __inline int tcp_snd_test (struct tcp_opt *tp, struct sk_buff *skb, unsigned cur_mss, int nonagle)
 
static __inline void tcp_check_probe_timer (struct sock *sk, struct tcp_opt *tp)
 
static __inline int tcp_skb_is_last (struct sock *sk, struct sk_buff *skb)
 
static __inline void __tcp_push_pending_frames (struct sock *sk, struct tcp_opt *tp, unsigned cur_mss, int nonagle)
 
static __inline void tcp_push_pending_frames (struct sock *sk, struct tcp_opt *tp)
 
static __inline int tcp_may_send_now (struct sock *sk, struct tcp_opt *tp)
 
static __inline void tcp_init_wl (struct tcp_opt *tp, u32 ack, u32 seq)
 
static __inline void tcp_update_wl (struct tcp_opt *tp, u32 ack, u32 seq)
 
void tcp_destroy_sock (struct sock *sk)
 
static __inline u16 tcp_v4_check (struct tcphdr *th, int len, unsigned long saddr, unsigned long daddr, unsigned long base)
 
static __inline int __tcp_checksum_complete (struct sk_buff *skb)
 
static __inline int tcp_checksum_complete (struct sk_buff *skb)
 
static __inline void tcp_prequeue_init (struct tcp_opt *tp)
 
static __inline int tcp_prequeue (struct sock *sk, struct sk_buff *skb)
 
static __inline void tcp_set_state (struct sock *sk, int state)
 
static __inline void tcp_done (struct sock *sk)
 
static __inline void tcp_sack_reset (struct tcp_opt *tp)
 
static __inline void tcp_build_and_update_options (__u32 *ptr, struct tcp_opt *tp, __u32 tstamp)
 
static __inline void tcp_syn_build_options (__u32 *ptr, int mss, int ts, int sack, int offer_wscale, int wscale, __u32 tstamp, __u32 ts_recent)
 
static __inline void tcp_select_initial_window (int __space, __u32 mss, __u32 *rcv_wnd, __u32 *window_clamp, int wscale_ok, __u8 *rcv_wscale)
 
static __inline int tcp_win_from_space (int space)
 
static __inline int tcp_space (struct sock *sk)
 
static __inline int tcp_full_space (struct sock *sk)
 
static __inline void tcp_acceptq_removed (struct sock *sk)
 
static __inline void tcp_acceptq_added (struct sock *sk)
 
static __inline int tcp_acceptq_is_full (struct sock *sk)
 
static __inline void tcp_acceptq_queue (struct sock *sk, struct open_request *req, struct sock *child)
 
static __inline void tcp_synq_removed (struct sock *sk, struct open_request *req)
 
static __inline void tcp_synq_added (struct sock *sk)
 
static __inline int tcp_synq_len (struct sock *sk)
 
static __inline int tcp_synq_young (struct sock *sk)
 
static __inline int tcp_synq_is_full (struct sock *sk)
 
static __inline void tcp_synq_unlink (struct tcp_opt *tp, struct open_request *req, struct open_request **prev)
 
static __inline void tcp_synq_drop (struct sock *sk, struct open_request *req, struct open_request **prev)
 
static __inline void tcp_openreq_init (struct open_request *req, struct tcp_opt *tp, struct sk_buff *skb)
 
static __inline void tcp_free_skb (struct sock *sk, struct sk_buff *skb)
 
static __inline void tcp_charge_skb (struct sock *sk, struct sk_buff *skb)
 
void __tcp_mem_reclaim (struct sock *sk)
 
int tcp_mem_schedule (struct sock *sk, int size, int kind)
 
static __inline void tcp_mem_reclaim (struct sock *sk)
 
static __inline void tcp_enter_memory_pressure (void)
 
static __inline void tcp_moderate_sndbuf (struct sock *sk)
 
static __inline struct sk_bufftcp_alloc_pskb (struct sock *sk, int size, int mem, int gfp)
 
static __inline struct sk_bufftcp_alloc_skb (struct sock *sk, int size, int gfp)
 
static __inline struct pagetcp_alloc_page (struct sock *sk)
 
static __inline void tcp_writequeue_purge (struct sock *sk)
 
void tcp_rfree (struct sk_buff *skb)
 
static __inline void tcp_set_owner_r (struct sk_buff *skb, struct sock *sk)
 
void tcp_listen_wlock (void)
 
static __inline void tcp_listen_lock (void)
 
static __inline void tcp_listen_unlock (void)
 
static __inline int keepalive_intvl_when (struct tcp_opt *tp)
 
static __inline int keepalive_time_when (struct tcp_opt *tp)
 
static __inline int tcp_fin_time (struct tcp_opt *tp)
 
static __inline int tcp_paws_check (struct tcp_opt *tp, int rst)
 

Variables

rwlock_t lock
 
struct sockchain
 
struct tcp_bind_bucket __attribute__
 
struct tcp_hashinfo tcp_hashinfo
 
kmem_cache_ttcp_bucket_cachep
 
int tcp_port_rover
 
kmem_cache_ttcp_timewait_cachep
 
atomic_t tcp_orphan_count
 
int tcp_tw_count
 
atomic_t tcp_memory_allocated
 
atomic_t tcp_sockets_allocated
 
int tcp_memory_pressure
 
kmem_cache_ttcp_openreq_cachep
 
struct proto tcp_prot
 
const char timer_bug_msg []
 

Macro Definition Documentation

◆ CHECKSUM_HW

#define CHECKSUM_HW   1

Definition at line 44 of file tcpcore.h.

◆ CHECKSUM_NONE

#define CHECKSUM_NONE   0

Definition at line 43 of file tcpcore.h.

◆ CHECKSUM_UNNECESSARY

#define CHECKSUM_UNNECESSARY   2

Definition at line 45 of file tcpcore.h.

◆ dev_kfree_skb

#define dev_kfree_skb (   a)    kfree_skb(a)

Definition at line 251 of file tcpcore.h.

◆ DST_GC_INC

#define DST_GC_INC   (5*HZ)

Definition at line 1667 of file tcpcore.h.

◆ DST_GC_MAX

#define DST_GC_MAX   (120*HZ)

Definition at line 1668 of file tcpcore.h.

◆ DST_GC_MIN

#define DST_GC_MIN   (1*HZ)

Definition at line 1666 of file tcpcore.h.

◆ DST_HOST

#define DST_HOST   1

Definition at line 1680 of file tcpcore.h.

◆ FASTRETRANS_DEBUG

#define FASTRETRANS_DEBUG   1

Definition at line 1816 of file tcpcore.h.

◆ for_retrans_queue

#define for_retrans_queue (   skb,
  sk,
  tp 
)
Value:
for (skb = (sk)->write_queue.next; \
(skb != (tp)->send_head) && \
(skb != (struct sk_buff *)&(sk)->write_queue); \
skb=skb->next)
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

Definition at line 2869 of file tcpcore.h.

◆ HAVE_ALIGNABLE_SKB

#define HAVE_ALIGNABLE_SKB   /* Ditto 8) */

Definition at line 40 of file tcpcore.h.

◆ HAVE_ALLOC_SKB

#define HAVE_ALLOC_SKB   /* For the drivers to know */

Definition at line 39 of file tcpcore.h.

◆ MAX_SKB_FRAGS

#define MAX_SKB_FRAGS   6

Definition at line 118 of file tcpcore.h.

◆ MAX_TCP_HEADER

#define MAX_TCP_HEADER   (128 + MAX_HEADER)

Definition at line 2069 of file tcpcore.h.

◆ MAX_TCP_KEEPCNT

#define MAX_TCP_KEEPCNT   127

Definition at line 2156 of file tcpcore.h.

◆ MAX_TCP_KEEPIDLE

#define MAX_TCP_KEEPIDLE   32767

Definition at line 2154 of file tcpcore.h.

◆ MAX_TCP_KEEPINTVL

#define MAX_TCP_KEEPINTVL   32767

Definition at line 2155 of file tcpcore.h.

◆ MAX_TCP_SYNCNT

#define MAX_TCP_SYNCNT   127

Definition at line 2157 of file tcpcore.h.

◆ MAX_TCP_WINDOW

#define MAX_TCP_WINDOW   32767U

Definition at line 2075 of file tcpcore.h.

◆ NET_CALLER

#define NET_CALLER (   arg)    __builtin_return_address(0)

Definition at line 93 of file tcpcore.h.

◆ RT_CACHE_DEBUG

#define RT_CACHE_DEBUG   0

Definition at line 1664 of file tcpcore.h.

◆ SK_RMEM_MAX

#define SK_RMEM_MAX   65535

Definition at line 231 of file tcpcore.h.

◆ SK_WMEM_MAX

#define SK_WMEM_MAX   65535

Definition at line 230 of file tcpcore.h.

◆ SKB_DATA_ALIGN

#define SKB_DATA_ALIGN (   X)    (((X) + (SMP_CACHE_BYTES-1)) & ~(SMP_CACHE_BYTES-1))

Definition at line 47 of file tcpcore.h.

◆ SKB_FRAG_ASSERT

#define SKB_FRAG_ASSERT (   skb)    do { if (skb_shinfo(skb)->frag_list) out_of_line_bug(); } while (0)

Definition at line 768 of file tcpcore.h.

◆ SKB_LINEAR_ASSERT

#define SKB_LINEAR_ASSERT (   skb)    do { if (skb_is_nonlinear(skb)) out_of_line_bug(); } while (0)

Definition at line 769 of file tcpcore.h.

◆ SKB_MAX_ALLOC

#define SKB_MAX_ALLOC   (SKB_MAX_ORDER(0,2))

Definition at line 50 of file tcpcore.h.

◆ SKB_MAX_HEAD

#define SKB_MAX_HEAD (   X)    (SKB_MAX_ORDER((X),0))

Definition at line 49 of file tcpcore.h.

◆ SKB_MAX_ORDER

#define SKB_MAX_ORDER (   X,
  ORDER 
)    (((PAGE_SIZE<<(ORDER)) - (X) - sizeof(struct skb_shared_info))&~(SMP_CACHE_BYTES-1))

Definition at line 48 of file tcpcore.h.

◆ SKB_PAGE_ASSERT

#define SKB_PAGE_ASSERT (   skb)    do { if (skb_shinfo(skb)->nr_frags) out_of_line_bug(); } while (0)

Definition at line 767 of file tcpcore.h.

◆ skb_queue_walk

#define skb_queue_walk (   queue,
  skb 
)
Value:
for (skb = (queue)->next; \
(skb != (struct sk_buff *)(queue)); \
skb=skb->next)
Definition: _queue.h:59
static unsigned __int64 next
Definition: rand_nt.c:6

Definition at line 1142 of file tcpcore.h.

◆ skb_shinfo

#define skb_shinfo (   SKB)    ((struct skb_shared_info *)((SKB)->end))

Definition at line 256 of file tcpcore.h.

◆ SLAB_SKB

#define SLAB_SKB   /* Slabified skbuffs */

Definition at line 41 of file tcpcore.h.

◆ TCP_ATO_MIN

#define TCP_ATO_MIN   4U

Definition at line 2140 of file tcpcore.h.

◆ tcp_bhash

#define tcp_bhash   (tcp_hashinfo.__tcp_bhash)

Definition at line 1926 of file tcpcore.h.

◆ tcp_bhash_size

#define tcp_bhash_size   (tcp_hashinfo.__tcp_bhash_size)

Definition at line 1928 of file tcpcore.h.

◆ TCP_CHECK_TIMER

#define TCP_CHECK_TIMER (   sk)    do { } while (0)

Definition at line 3849 of file tcpcore.h.

◆ TCP_COMBINED_PORTS

#define TCP_COMBINED_PORTS (   __sport,
  __dport 
)    (((__u32)(__dport)<<16) | (__u32)(__sport))

Definition at line 2018 of file tcpcore.h.

◆ TCP_DEBUG

#define TCP_DEBUG   1

Definition at line 1815 of file tcpcore.h.

◆ TCP_DELACK_MAX

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

Definition at line 2134 of file tcpcore.h.

◆ TCP_DELACK_MIN

#define TCP_DELACK_MIN   4U

Definition at line 2139 of file tcpcore.h.

◆ tcp_ehash

#define tcp_ehash   (tcp_hashinfo.__tcp_ehash)

Definition at line 1925 of file tcpcore.h.

◆ tcp_ehash_size

#define tcp_ehash_size   (tcp_hashinfo.__tcp_ehash_size)

Definition at line 1927 of file tcpcore.h.

◆ TCP_FASTRETRANS_THRESH

#define TCP_FASTRETRANS_THRESH   3

Definition at line 2084 of file tcpcore.h.

◆ TCP_FIN_TIMEOUT

#define TCP_FIN_TIMEOUT   TCP_TIMEWAIT_LEN

Definition at line 2127 of file tcpcore.h.

◆ TCP_INET_FAMILY

#define TCP_INET_FAMILY (   fam)    1

Definition at line 2353 of file tcpcore.h.

◆ TCP_IPV4_MATCH

#define TCP_IPV4_MATCH (   __sk,
  __cookie,
  __saddr,
  __daddr,
  __ports,
  __dif 
)
Value:
(((__sk)->daddr == (__saddr)) && \
((__sk)->rcv_saddr == (__daddr)) && \
((*((__u32 *)&((__sk)->dport)))== (__ports)) && \
(!((__sk)->bound_dev_if) || ((__sk)->bound_dev_if == (__dif))))
unsigned int __u32
Definition: compat.h:90

Definition at line 2036 of file tcpcore.h.

◆ TCP_IPV6_MATCH

#define TCP_IPV6_MATCH (   __sk,
  __saddr,
  __daddr,
  __ports,
  __dif 
)
Value:
(((*((__u32 *)&((__sk)->dport)))== (__ports)) && \
((__sk)->family == AF_INET6) && \
!ipv6_addr_cmp(&(__sk)->net_pinfo.af_inet6.daddr, (__saddr)) && \
!ipv6_addr_cmp(&(__sk)->net_pinfo.af_inet6.rcv_saddr, (__daddr)) && \
(!((__sk)->bound_dev_if) || ((__sk)->bound_dev_if == (__dif))))
#define AF_INET6
Definition: winsock.h:369
unsigned int __u32
Definition: compat.h:90

Definition at line 2043 of file tcpcore.h.

◆ TCP_KEEPALIVE_INTVL

#define TCP_KEEPALIVE_INTVL   (75*HZ)

Definition at line 2152 of file tcpcore.h.

◆ TCP_KEEPALIVE_PROBES

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

Definition at line 2151 of file tcpcore.h.

◆ TCP_KEEPALIVE_TIME

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

Definition at line 2150 of file tcpcore.h.

◆ tcp_lhash_lock

#define tcp_lhash_lock   (tcp_hashinfo.__tcp_lhash_lock)

Definition at line 1930 of file tcpcore.h.

◆ tcp_lhash_users

#define tcp_lhash_users   (tcp_hashinfo.__tcp_lhash_users)

Definition at line 1931 of file tcpcore.h.

◆ tcp_lhash_wait

#define tcp_lhash_wait   (tcp_hashinfo.__tcp_lhash_wait)

Definition at line 1932 of file tcpcore.h.

◆ TCP_LHTABLE_SIZE

#define TCP_LHTABLE_SIZE   32 /* Yes, really, this is all you need. */

Definition at line 1842 of file tcpcore.h.

◆ tcp_listening_hash

#define tcp_listening_hash   (tcp_hashinfo.__tcp_listening_hash)

Definition at line 1929 of file tcpcore.h.

◆ TCP_MAX_QUICKACKS

#define TCP_MAX_QUICKACKS   16U

Definition at line 2090 of file tcpcore.h.

◆ TCP_MAX_REORDERING

#define TCP_MAX_REORDERING   127

Definition at line 2087 of file tcpcore.h.

◆ TCP_MEM_QUANTUM

#define TCP_MEM_QUANTUM   ((int)PAGE_SIZE)

Definition at line 3641 of file tcpcore.h.

◆ TCP_MIN_MSS

#define TCP_MIN_MSS   88U

Definition at line 2078 of file tcpcore.h.

◆ TCP_MIN_RCVMSS

#define TCP_MIN_RCVMSS   536U

Definition at line 2081 of file tcpcore.h.

◆ tcp_openreq_alloc

#define tcp_openreq_alloc ( )    kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC)

Definition at line 2341 of file tcpcore.h.

◆ tcp_openreq_fastfree

#define tcp_openreq_fastfree (   req)    kmem_cache_free(tcp_openreq_cachep, req)

Definition at line 2342 of file tcpcore.h.

◆ TCP_ORPHAN_RETRIES

#define TCP_ORPHAN_RETRIES
Value:
7 /* number of times to retry on an orphaned
* socket. 7 is ~50sec-16min.
*/

Definition at line 2118 of file tcpcore.h.

◆ TCP_PAWS_24DAYS

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

Definition at line 2166 of file tcpcore.h.

◆ TCP_PAWS_MSL

#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 2167 of file tcpcore.h.

◆ TCP_PAWS_WINDOW

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

Definition at line 2173 of file tcpcore.h.

◆ tcp_portalloc_lock

#define tcp_portalloc_lock   (tcp_hashinfo.__tcp_portalloc_lock)

Definition at line 1933 of file tcpcore.h.

◆ TCP_RESOURCE_PROBE_INTERVAL

#define TCP_RESOURCE_PROBE_INTERVAL
Value:
((unsigned)(HZ/2U)) /* Maximal interval between probes
* for local resources.
*/
#define U(x)
Definition: wordpad.c:44
#define HZ
Definition: hardware.c:32

Definition at line 2146 of file tcpcore.h.

◆ TCP_RETR1

#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 2097 of file tcpcore.h.

◆ TCP_RETR2

#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 2104 of file tcpcore.h.

◆ TCP_RTO_MAX

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

Definition at line 2142 of file tcpcore.h.

◆ TCP_RTO_MIN

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

Definition at line 2143 of file tcpcore.h.

◆ TCP_SKB_CB

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

Definition at line 2867 of file tcpcore.h.

◆ TCP_SYN_RETRIES

#define TCP_SYN_RETRIES
Value:
5 /* number of times to retry active opening a
* connection: ~180sec is RFC minimum */

Definition at line 2111 of file tcpcore.h.

◆ TCP_SYNACK_RETRIES

#define TCP_SYNACK_RETRIES
Value:
5 /* number of times to retry passive opening a
* connection: ~180sec is RFC minimum */

Definition at line 2114 of file tcpcore.h.

◆ TCP_SYNQ_HSIZE

#define TCP_SYNQ_HSIZE   512 /* Size of SYNACK hash table */

Definition at line 2164 of file tcpcore.h.

◆ TCP_SYNQ_INTERVAL

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

Definition at line 2163 of file tcpcore.h.

◆ TCP_TIME_DACK

#define TCP_TIME_DACK   2 /* Delayed ack timer */

Definition at line 2239 of file tcpcore.h.

◆ TCP_TIME_KEEPOPEN

#define TCP_TIME_KEEPOPEN   4 /* Keepalive timer */

Definition at line 2241 of file tcpcore.h.

◆ TCP_TIME_PROBE0

#define TCP_TIME_PROBE0   3 /* Zero window probe timer */

Definition at line 2240 of file tcpcore.h.

◆ TCP_TIME_RETRANS

#define TCP_TIME_RETRANS   1 /* Retransmit timer */

Definition at line 2238 of file tcpcore.h.

◆ tcp_time_stamp

#define tcp_time_stamp   ((__u32)(jiffies))

Definition at line 2815 of file tcpcore.h.

◆ TCP_TIMEOUT_INIT

#define TCP_TIMEOUT_INIT   ((unsigned)(3*HZ)) /* RFC 1122 initial RTO value */

Definition at line 2144 of file tcpcore.h.

◆ TCP_TIMEWAIT_LEN

#define TCP_TIMEWAIT_LEN   (60*1000)

Definition at line 2123 of file tcpcore.h.

◆ TCP_TW_RECYCLE_SLOTS

#define TCP_TW_RECYCLE_SLOTS   (1<<TCP_TW_RECYCLE_SLOTS_LOG)

Definition at line 2179 of file tcpcore.h.

◆ TCP_TW_RECYCLE_SLOTS_LOG

#define TCP_TW_RECYCLE_SLOTS_LOG   5

Definition at line 2178 of file tcpcore.h.

◆ TCP_TW_RECYCLE_TICK

#define TCP_TW_RECYCLE_TICK   (0)

Definition at line 2206 of file tcpcore.h.

◆ TCP_TWKILL_PERIOD

#define TCP_TWKILL_PERIOD   (TCP_TIMEWAIT_LEN/TCP_TWKILL_SLOTS)

Definition at line 2161 of file tcpcore.h.

◆ TCP_TWKILL_SLOTS

#define TCP_TWKILL_SLOTS   8 /* Please keep this a power of 2. */

Definition at line 2160 of file tcpcore.h.

◆ TCP_URG_NOTYET

#define TCP_URG_NOTYET   0x0200

Definition at line 2094 of file tcpcore.h.

◆ TCP_URG_READ

#define TCP_URG_READ   0x0400

Definition at line 2095 of file tcpcore.h.

◆ TCP_URG_VALID

#define TCP_URG_VALID   0x0100

Definition at line 2093 of file tcpcore.h.

◆ TCP_V4_ADDR_COOKIE

#define TCP_V4_ADDR_COOKIE (   __name,
  __saddr,
  __daddr 
)

Definition at line 2035 of file tcpcore.h.

◆ TCPCB_AT_TAIL

#define TCPCB_AT_TAIL   (TCPCB_URG)

Definition at line 2861 of file tcpcore.h.

◆ TCPCB_EVER_RETRANS

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

Definition at line 2856 of file tcpcore.h.

◆ TCPCB_FLAG_ACK

#define TCPCB_FLAG_ACK   0x10

Definition at line 2845 of file tcpcore.h.

◆ TCPCB_FLAG_CWR

#define TCPCB_FLAG_CWR   0x80

Definition at line 2848 of file tcpcore.h.

◆ TCPCB_FLAG_ECE

#define TCPCB_FLAG_ECE   0x40

Definition at line 2847 of file tcpcore.h.

◆ TCPCB_FLAG_FIN

#define TCPCB_FLAG_FIN   0x01

Definition at line 2841 of file tcpcore.h.

◆ TCPCB_FLAG_PSH

#define TCPCB_FLAG_PSH   0x08

Definition at line 2844 of file tcpcore.h.

◆ TCPCB_FLAG_RST

#define TCPCB_FLAG_RST   0x04

Definition at line 2843 of file tcpcore.h.

◆ TCPCB_FLAG_SYN

#define TCPCB_FLAG_SYN   0x02

Definition at line 2842 of file tcpcore.h.

◆ TCPCB_FLAG_URG

#define TCPCB_FLAG_URG   0x20

Definition at line 2846 of file tcpcore.h.

◆ TCPCB_LOST

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

Definition at line 2853 of file tcpcore.h.

◆ TCPCB_RETRANS

Definition at line 2857 of file tcpcore.h.

◆ TCPCB_SACKED_ACKED

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

Definition at line 2851 of file tcpcore.h.

◆ TCPCB_SACKED_RETRANS

#define TCPCB_SACKED_RETRANS   0x02 /* SKB retransmitted */

Definition at line 2852 of file tcpcore.h.

◆ TCPCB_TAGBITS

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

Definition at line 2854 of file tcpcore.h.

◆ TCPCB_URG

#define TCPCB_URG   0x20 /* Urgent pointer advenced here */

Definition at line 2859 of file tcpcore.h.

◆ TCPOLEN_MSS

#define TCPOLEN_MSS   4

Definition at line 2225 of file tcpcore.h.

◆ TCPOLEN_SACK_BASE

#define TCPOLEN_SACK_BASE   2

Definition at line 2234 of file tcpcore.h.

◆ TCPOLEN_SACK_BASE_ALIGNED

#define TCPOLEN_SACK_BASE_ALIGNED   4

Definition at line 2235 of file tcpcore.h.

◆ TCPOLEN_SACK_PERBLOCK

#define TCPOLEN_SACK_PERBLOCK   8

Definition at line 2236 of file tcpcore.h.

◆ TCPOLEN_SACK_PERM

#define TCPOLEN_SACK_PERM   2

Definition at line 2227 of file tcpcore.h.

◆ TCPOLEN_SACKPERM_ALIGNED

#define TCPOLEN_SACKPERM_ALIGNED   4

Definition at line 2233 of file tcpcore.h.

◆ TCPOLEN_TIMESTAMP

#define TCPOLEN_TIMESTAMP   10

Definition at line 2228 of file tcpcore.h.

◆ TCPOLEN_TSTAMP_ALIGNED

#define TCPOLEN_TSTAMP_ALIGNED   12

Definition at line 2231 of file tcpcore.h.

◆ TCPOLEN_WINDOW

#define TCPOLEN_WINDOW   3

Definition at line 2226 of file tcpcore.h.

◆ TCPOLEN_WSCALE_ALIGNED

#define TCPOLEN_WSCALE_ALIGNED   4

Definition at line 2232 of file tcpcore.h.

◆ TCPOPT_EOL

#define TCPOPT_EOL   0 /* End of options */

Definition at line 2214 of file tcpcore.h.

◆ TCPOPT_MSS

#define TCPOPT_MSS   2 /* Segment size negotiating */

Definition at line 2215 of file tcpcore.h.

◆ TCPOPT_NOP

#define TCPOPT_NOP   1 /* Padding */

Definition at line 2213 of file tcpcore.h.

◆ TCPOPT_SACK

#define TCPOPT_SACK   5 /* SACK Block */

Definition at line 2218 of file tcpcore.h.

◆ TCPOPT_SACK_PERM

#define TCPOPT_SACK_PERM   4 /* SACK Permitted */

Definition at line 2217 of file tcpcore.h.

◆ TCPOPT_TIMESTAMP

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

Definition at line 2219 of file tcpcore.h.

◆ TCPOPT_WINDOW

#define TCPOPT_WINDOW   3 /* Window scaling */

Definition at line 2216 of file tcpcore.h.

Typedef Documentation

◆ _sockaddr

◆ sk_read_actor_t

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

Definition at line 2639 of file tcpcore.h.

◆ skb_frag_t

Definition at line 120 of file tcpcore.h.

Enumeration Type Documentation

◆ tcp_ack_state_t

Enumerator
TCP_ACK_SCHED 
TCP_ACK_TIMER 
TCP_ACK_PUSHED 

Definition at line 2473 of file tcpcore.h.

2474 {
2475  TCP_ACK_SCHED = 1,
2476  TCP_ACK_TIMER = 2,
2477  TCP_ACK_PUSHED= 4
2478 };

◆ tcp_tw_status

Enumerator
TCP_TW_SUCCESS 
TCP_TW_RST 
TCP_TW_ACK 
TCP_TW_SYN 

Definition at line 2510 of file tcpcore.h.

2511 {
2512  TCP_TW_SUCCESS = 0,
2513  TCP_TW_RST = 1,
2514  TCP_TW_ACK = 2,
2515  TCP_TW_SYN = 3
2516 };

Function Documentation

◆ ___pskb_trim()

int ___pskb_trim ( struct sk_buff skb,
unsigned int  len,
int  realloc 
)

Referenced by __pskb_trim(), and __skb_trim().

◆ __attribute__()

struct tcp_ehash_bucket __attribute__ ( (__aligned__(8))  )

◆ __dev_alloc_skb()

static __inline struct sk_buff* __dev_alloc_skb ( unsigned int  length,
int  gfp_mask 
)
static

__dev_alloc_skb - allocate an skbuff for sending @length: length to allocate @gfp_mask: get_free_pages mask, passed to alloc_skb

Allocate a new &sk_buff and assign it a usage count of one. The buffer has unspecified headroom built in. Users should allocate the headroom they think they need without accounting for the built in space. The built in space is used for optimisations.

NULL is returned in there is no free memory.

Definition at line 1045 of file tcpcore.h.

1047 {
1048  struct sk_buff *skb;
1049 
1050  skb = alloc_skb(length+16, gfp_mask);
1051  if (skb)
1052  skb_reserve(skb,16);
1053  return skb;
1054 }
static __inline void skb_reserve(struct sk_buff *skb, unsigned int len)
Definition: tcpcore.h:927
struct sk_buff * alloc_skb(unsigned int size, int priority)
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579

Referenced by dev_alloc_skb().

◆ __kfree_skb()

void __kfree_skb ( struct sk_buff skb)

◆ __pskb_pull()

static __inline char* __pskb_pull ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 869 of file tcpcore.h.

870 {
871  if (len > skb_headlen(skb) &&
872  __pskb_pull_tail(skb, len-skb_headlen(skb)) == NULL)
873  return NULL;
874  skb->len -= len;
875  return skb->data += len;
876 }
static __inline int skb_headlen(const struct sk_buff *skb)
Definition: tcpcore.h:762
unsigned int len
Definition: tcpcore.h:188
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * __pskb_pull_tail(struct sk_buff *skb, int delta)
unsigned char * data
Definition: tcpcore.h:202

Referenced by pskb_pull().

◆ __pskb_pull_tail()

unsigned char* __pskb_pull_tail ( struct sk_buff skb,
int  delta 
)

Referenced by __pskb_pull(), and pskb_may_pull().

◆ __pskb_trim()

static __inline int __pskb_trim ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 962 of file tcpcore.h.

963 {
964  if (!skb->data_len) {
965  skb->len = len;
966  skb->tail = skb->data+len;
967  return 0;
968  } else {
969  return ___pskb_trim(skb, len, 1);
970  }
971 }
int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc)
unsigned int len
Definition: tcpcore.h:188
unsigned int data_len
Definition: tcpcore.h:189
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * tail
Definition: tcpcore.h:203
unsigned char * data
Definition: tcpcore.h:202

Referenced by pskb_trim().

◆ __skb_append()

static __inline void __skb_append ( struct sk_buff old,
struct sk_buff newsk 
)
static

Definition at line 647 of file tcpcore.h.

648 {
649  __skb_insert(newsk, old, old->next, old->list);
650 }
static __inline void __skb_insert(struct sk_buff *newsk, struct sk_buff *prev, struct sk_buff *next, struct sk_buff_head *list)
Definition: tcpcore.h:612
struct sk_buff_head * list
Definition: tcpcore.h:144
struct sk_buff * next
Definition: tcpcore.h:141

Referenced by skb_append().

◆ __skb_dequeue()

static __inline struct sk_buff* __skb_dequeue ( struct sk_buff_head list)
static

__skb_dequeue - remove from the head of the queue @list: list to dequeue from

Remove the head of the list. This function does not take any locks so must be used with appropriate locks held only. The head item is returned or NULL if the list is empty.

Definition at line 568 of file tcpcore.h.

569 {
570  struct sk_buff *next, *prev, *result;
571 
572  prev = (struct sk_buff *) list;
573  next = prev->next;
574  result = NULL;
575  if (next != prev) {
576  result = next;
577  next = next->next;
578  list->qlen--;
579  next->prev = prev;
580  prev->next = next;
581  result->next = NULL;
582  result->prev = NULL;
583  result->list = NULL;
584  }
585  return result;
586 }
struct sk_buff * prev
Definition: tcpcore.h:142
smooth NULL
Definition: ftsmooth.c:416
Definition: _list.h:228
static unsigned __int64 next
Definition: rand_nt.c:6
GLuint64EXT * result
Definition: glext.h:11304

Referenced by __skb_queue_purge(), skb_dequeue(), tcp_prequeue(), and tcp_writequeue_purge().

◆ __skb_dequeue_tail()

static __inline struct sk_buff* __skb_dequeue_tail ( struct sk_buff_head list)
static

__skb_dequeue_tail - remove from the tail of the queue @list: list to dequeue from

Remove the tail of the list. This function does not take any locks so must be used with appropriate locks held only. The tail item is returned or NULL if the list is empty.

Definition at line 729 of file tcpcore.h.

730 {
731  struct sk_buff *skb = skb_peek_tail(list);
732  if (skb)
733  __skb_unlink(skb, list);
734  return skb;
735 }
static __inline struct sk_buff * skb_peek_tail(struct sk_buff_head *list_)
Definition: tcpcore.h:430
Definition: _list.h:228
static __inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
Definition: tcpcore.h:677

Referenced by skb_dequeue_tail().

◆ __skb_insert()

static __inline void __skb_insert ( struct sk_buff newsk,
struct sk_buff prev,
struct sk_buff next,
struct sk_buff_head list 
)
static

Definition at line 612 of file tcpcore.h.

615 {
616  newsk->next = next;
617  newsk->prev = prev;
618  next->prev = newsk;
619  prev->next = newsk;
620  newsk->list = list;
621  list->qlen++;
622 }
struct sk_buff * prev
Definition: tcpcore.h:142
struct sk_buff_head * list
Definition: tcpcore.h:144
Definition: _list.h:228
static unsigned __int64 next
Definition: rand_nt.c:6
#define list
Definition: rosglue.h:35
struct sk_buff * next
Definition: tcpcore.h:141

Referenced by __skb_append(), and skb_insert().

◆ __skb_pull()

static __inline char* __skb_pull ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 841 of file tcpcore.h.

842 {
843  skb->len-=len;
844  if (skb->len < skb->data_len)
845  out_of_line_bug();
846  return skb->data+=len;
847 }
unsigned int len
Definition: tcpcore.h:188
unsigned int data_len
Definition: tcpcore.h:189
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * data
Definition: tcpcore.h:202

Referenced by skb_pull().

◆ __skb_push()

static __inline unsigned char* __skb_push ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 810 of file tcpcore.h.

811 {
812  skb->data-=len;
813  skb->len+=len;
814  return skb->data;
815 }
unsigned int len
Definition: tcpcore.h:188
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * data
Definition: tcpcore.h:202

◆ __skb_put()

static __inline unsigned char* __skb_put ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 775 of file tcpcore.h.

776 {
777  unsigned char *tmp=skb->tail;
778  SKB_LINEAR_ASSERT(skb);
779  skb->tail+=len;
780  skb->len+=len;
781  return tmp;
782 }
unsigned int len
Definition: tcpcore.h:188
#define SKB_LINEAR_ASSERT(skb)
Definition: tcpcore.h:769
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * tail
Definition: tcpcore.h:203

◆ __skb_queue_head()

static __inline void __skb_queue_head ( struct sk_buff_head list,
struct sk_buff newsk 
)
static

__skb_queue_head - queue a buffer at the list head @list: list to use @newsk: buffer to queue

Queue a buffer at the start of a list. This function takes no locks and you must therefore hold required locks before calling it.

A buffer cannot be placed on two lists at the same time.

Definition at line 476 of file tcpcore.h.

477 {
478  struct sk_buff *prev, *next;
479 
480  newsk->list = list;
481  list->qlen++;
482  prev = (struct sk_buff *)list;
483  next = prev->next;
484  newsk->next = next;
485  newsk->prev = prev;
486  next->prev = newsk;
487  prev->next = newsk;
488 }
struct sk_buff * prev
Definition: tcpcore.h:142
struct sk_buff_head * list
Definition: tcpcore.h:144
Definition: _list.h:228
static unsigned __int64 next
Definition: rand_nt.c:6
#define list
Definition: rosglue.h:35
struct sk_buff * next
Definition: tcpcore.h:141

Referenced by skb_queue_head().

◆ __skb_queue_purge()

static __inline void __skb_queue_purge ( struct sk_buff_head list)
static

__skb_purge - empty a list @list: list to empty

Delete all buffers on an &sk_buff list. Each buffer is removed from the list and one reference dropped. This function does not take the list lock and the caller must hold the relevant locks to use it.

Definition at line 1025 of file tcpcore.h.

1026 {
1027  struct sk_buff *skb;
1028  while ((skb=__skb_dequeue(list))!=NULL)
1029  kfree_skb(skb);
1030 }
static __inline void kfree_skb(struct sk_buff *skb)
Definition: tcpcore.h:297
smooth NULL
Definition: ftsmooth.c:416
Definition: _list.h:228
static __inline struct sk_buff * __skb_dequeue(struct sk_buff_head *list)
Definition: tcpcore.h:568

◆ __skb_queue_tail()

static __inline void __skb_queue_tail ( struct sk_buff_head list,
struct sk_buff newsk 
)
static

__skb_queue_tail - queue a buffer at the list tail @list: list to use @newsk: buffer to queue

Queue a buffer at the end of a list. This function takes no locks and you must therefore hold required locks before calling it.

A buffer cannot be placed on two lists at the same time.

Definition at line 524 of file tcpcore.h.

525 {
526  struct sk_buff *prev, *next;
527 
528  newsk->list = list;
529  list->qlen++;
530  next = (struct sk_buff *)list;
531  prev = next->prev;
532  newsk->next = next;
533  newsk->prev = prev;
534  next->prev = newsk;
535  prev->next = newsk;
536 }
struct sk_buff * prev
Definition: tcpcore.h:142
struct sk_buff_head * list
Definition: tcpcore.h:144
Definition: _list.h:228
static unsigned __int64 next
Definition: rand_nt.c:6
#define list
Definition: rosglue.h:35
struct sk_buff * next
Definition: tcpcore.h:141

Referenced by skb_queue_tail(), and tcp_prequeue().

◆ __skb_trim()

static __inline void __skb_trim ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 935 of file tcpcore.h.

936 {
937  if (!skb->data_len) {
938  skb->len = len;
939  skb->tail = skb->data+len;
940  } else {
941  ___pskb_trim(skb, len, 0);
942  }
943 }
int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc)
unsigned int len
Definition: tcpcore.h:188
unsigned int data_len
Definition: tcpcore.h:189
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * tail
Definition: tcpcore.h:203
unsigned char * data
Definition: tcpcore.h:202

Referenced by skb_trim().

◆ __skb_unlink()

static __inline void __skb_unlink ( struct sk_buff skb,
struct sk_buff_head list 
)
static

Definition at line 677 of file tcpcore.h.

678 {
679  struct sk_buff * next, * prev;
680 
681  list->qlen--;
682  next = skb->next;
683  prev = skb->prev;
684  skb->next = NULL;
685  skb->prev = NULL;
686  skb->list = NULL;
687  next->prev = prev;
688  prev->next = next;
689 }
struct sk_buff * prev
Definition: tcpcore.h:142
struct sk_buff_head * list
Definition: tcpcore.h:144
smooth NULL
Definition: ftsmooth.c:416
Definition: _list.h:228
static unsigned __int64 next
Definition: rand_nt.c:6
struct sk_buff * next
Definition: tcpcore.h:141

Referenced by __skb_dequeue_tail(), and skb_unlink().

◆ __tcp_checksum_complete()

static __inline int __tcp_checksum_complete ( struct sk_buff skb)
static

Definition at line 3197 of file tcpcore.h.

3198 {
3199 #if 0
3200  return (unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum));
3201 #else
3202  return 0;
3203 #endif
3204 }
unsigned int skb_checksum(const struct sk_buff *skb, int offset, int len, unsigned int csum)
unsigned int len
Definition: tcpcore.h:188
unsigned int csum
Definition: tcpcore.h:190

Referenced by tcp_checksum_complete().

◆ __tcp_enter_cwr()

static __inline void __tcp_enter_cwr ( struct tcp_opt tp)
static

Definition at line 2988 of file tcpcore.h.

2989 {
2990 #if 0
2991  tp->undo_marker = 0;
2992  tp->snd_ssthresh = tcp_recalc_ssthresh(tp);
2993  tp->snd_cwnd = min(tp->snd_cwnd,
2994  tcp_packets_in_flight(tp) + 1U);
2995  tp->snd_cwnd_cnt = 0;
2996  tp->high_seq = tp->snd_nxt;
2997  tp->snd_cwnd_stamp = tcp_time_stamp;
2998  TCP_ECN_queue_cwr(tp);
2999 #endif
3000 }
#define tcp_time_stamp
Definition: tcpcore.h:2815
#define U(x)
Definition: wordpad.c:44
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
static __inline unsigned int tcp_packets_in_flight(struct tcp_opt *tp)
Definition: tcpcore.h:2915
#define min(a, b)
Definition: monoChain.cc:55
static __inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp)
Definition: tcpcore.h:2929

Referenced by tcp_enter_cwr().

◆ __tcp_fast_path_on()

static __inline void __tcp_fast_path_on ( struct tcp_opt tp,
u32  snd_wnd 
)
static

Definition at line 2759 of file tcpcore.h.

2760 {
2761 #if 0
2762  tp->pred_flags = htonl((tp->tcp_header_len << 26) |
2763  ntohl(TCP_FLAG_ACK) |
2764  snd_wnd);
2765 #endif
2766 }
#define htonl(x)
Definition: module.h:212
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
#define ntohl(x)
Definition: module.h:203

Referenced by tcp_fast_path_on().

◆ __tcp_mem_reclaim()

void __tcp_mem_reclaim ( struct sock sk)

Referenced by tcp_mem_reclaim().

◆ __tcp_push_pending_frames()

static __inline void __tcp_push_pending_frames ( struct sock sk,
struct tcp_opt tp,
unsigned  cur_mss,
int  nonagle 
)
static

Definition at line 3126 of file tcpcore.h.

3130 {
3131 #if 0
3132  struct sk_buff *skb = tp->send_head;
3133 
3134  if (skb) {
3135  if (!tcp_skb_is_last(sk, skb))
3136  nonagle = 1;
3137  if (!tcp_snd_test(tp, skb, cur_mss, nonagle) ||
3138  tcp_write_xmit(sk, nonagle))
3140  }
3142 #endif
3143 }
int tcp_write_xmit(struct sock *, int nonagle)
static __inline int tcp_skb_is_last(struct sock *sk, struct sk_buff *skb)
Definition: tcpcore.h:3113
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
static __inline void tcp_check_probe_timer(struct sock *sk, struct tcp_opt *tp)
Definition: tcpcore.h:3105
struct sock * sk
Definition: tcpcore.h:145
static __inline int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, unsigned cur_mss, int nonagle)
Definition: tcpcore.h:3067
static __inline void tcp_cwnd_validate(struct sock *sk, struct tcp_opt *tp)
Definition: tcpcore.h:2969

Referenced by tcp_push_pending_frames().

◆ __tcp_put_port()

void __tcp_put_port ( struct sock sk)

◆ __tcp_select_window()

u32 __tcp_select_window ( struct sock sk)

◆ after()

◆ alloc_skb()

struct sk_buff* alloc_skb ( unsigned int  size,
int  priority 
)

Referenced by __dev_alloc_skb(), and tcp_alloc_pskb().

◆ before()

◆ between()

__inline int between ( __u32  seq1,
__u32  seq2,
__u32  seq3 
)

Definition at line 2426 of file tcpcore.h.

2427 {
2428  return seq3 - seq2 >= seq1 - seq2;
2429 }

◆ cookie_v4_check()

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

◆ cookie_v4_init_sequence()

__u32 cookie_v4_init_sequence ( struct sock sk,
struct sk_buff skb,
__u16 mss 
)

◆ datagram_poll()

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

◆ dev_alloc_skb()

static __inline struct sk_buff* dev_alloc_skb ( unsigned int  length)
static

dev_alloc_skb - allocate an skbuff for sending @length: length to allocate

Allocate a new &sk_buff and assign it a usage count of one. The buffer has unspecified headroom built in. Users should allocate the headroom they think they need without accounting for the built in space. The built in space is used for optimisations.

NULL is returned in there is no free memory. Although this function allocates memory it can be called from an interrupt.

Definition at line 1069 of file tcpcore.h.

1070 {
1071 #if 0
1073 #else
1074  return NULL;
1075 #endif
1076 }
#define GFP_ATOMIC
Definition: module.h:655
smooth NULL
Definition: ftsmooth.c:416
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
static __inline struct sk_buff * __dev_alloc_skb(unsigned int length, int gfp_mask)
Definition: tcpcore.h:1045

◆ keepalive_intvl_when()

static __inline int keepalive_intvl_when ( struct tcp_opt tp)
static

Definition at line 3789 of file tcpcore.h.

3790 {
3791 #if 0
3792  return tp->keepalive_intvl ? : sysctl_tcp_keepalive_intvl;
3793 #else
3794  return 0;
3795 #endif
3796 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

◆ keepalive_time_when()

static __inline int keepalive_time_when ( struct tcp_opt tp)
static

Definition at line 3798 of file tcpcore.h.

3799 {
3800 #if 0
3801  return tp->keepalive_time ? : sysctl_tcp_keepalive_time;
3802 #else
3803  return 0;
3804 #endif
3805 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

◆ kfree_skb()

static __inline void kfree_skb ( struct sk_buff skb)
static

kfree_skb - free an sk_buff @skb: buffer to free

Drop a reference to the buffer and free it if the usage count has hit zero.

Definition at line 297 of file tcpcore.h.

298 {
299  if (atomic_read(&skb->users) == 1 || atomic_dec_and_test(&skb->users))
300  __kfree_skb(skb);
301 }
atomic_t users
Definition: tcpcore.h:196
#define atomic_read(v)
Definition: atomic.h:23
static int atomic_dec_and_test(atomic_t volatile *v)
Definition: atomic.h:121
void __kfree_skb(struct sk_buff *skb)

Referenced by __skb_queue_purge(), skb_queue_purge(), skb_share_check(), and skb_unshare().

◆ kfree_skb_fast()

static __inline void kfree_skb_fast ( struct sk_buff skb)
static

Definition at line 304 of file tcpcore.h.

305 {
306  if (atomic_read(&skb->users) == 1 || atomic_dec_and_test(&skb->users))
307  kfree_skbmem(skb);
308 }
atomic_t users
Definition: tcpcore.h:196
#define atomic_read(v)
Definition: atomic.h:23
void kfree_skbmem(struct sk_buff *skb)
static int atomic_dec_and_test(atomic_t volatile *v)
Definition: atomic.h:121

◆ kfree_skbmem()

void kfree_skbmem ( struct sk_buff skb)

Referenced by kfree_skb_fast().

◆ kmap_skb_frag()

static __inline void* kmap_skb_frag ( const skb_frag_t frag)
static

Definition at line 1117 of file tcpcore.h.

1118 {
1119 #if 0
1120 #ifdef CONFIG_HIGHMEM
1121  if (in_irq())
1122  out_of_line_bug();
1123 
1124  local_bh_disable();
1125 #endif
1126  return kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ);
1127 #else
1128  return NULL;
1129 #endif
1130 }
smooth NULL
Definition: ftsmooth.c:416
struct page * page
Definition: tcpcore.h:124

◆ kunmap_skb_frag()

static __inline void kunmap_skb_frag ( void vaddr)
static

Definition at line 1132 of file tcpcore.h.

1133 {
1134 #if 0
1135  kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
1136 #ifdef CONFIG_HIGHMEM
1137  local_bh_enable();
1138 #endif
1139 #endif
1140 }

◆ pskb_copy()

struct sk_buff* pskb_copy ( struct sk_buff skb,
int  gfp_mask 
)

◆ pskb_expand_head()

int pskb_expand_head ( struct sk_buff skb,
int  nhead,
int  ntail,
int  gfp_mask 
)

Referenced by skb_cow().

◆ pskb_may_pull()

static __inline int pskb_may_pull ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 885 of file tcpcore.h.

886 {
887  if (len <= skb_headlen(skb))
888  return 1;
889  if (len > skb->len)
890  return 0;
891  return (__pskb_pull_tail(skb, len-skb_headlen(skb)) != NULL);
892 }
static __inline int skb_headlen(const struct sk_buff *skb)
Definition: tcpcore.h:762
unsigned int len
Definition: tcpcore.h:188
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * __pskb_pull_tail(struct sk_buff *skb, int delta)

◆ pskb_pull()

static __inline unsigned char* pskb_pull ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 878 of file tcpcore.h.

879 {
880  if (len > skb->len)
881  return NULL;
882  return __pskb_pull(skb,len);
883 }
unsigned int len
Definition: tcpcore.h:188
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722
static __inline char * __pskb_pull(struct sk_buff *skb, unsigned int len)
Definition: tcpcore.h:869

◆ pskb_trim()

static __inline int pskb_trim ( struct sk_buff skb,
unsigned int  len 
)
static

Definition at line 973 of file tcpcore.h.

974 {
975  if (len < skb->len)
976  return __pskb_trim(skb, len);
977  return 0;
978 }
static __inline int __pskb_trim(struct sk_buff *skb, unsigned int len)
Definition: tcpcore.h:962
GLenum GLsizei len
Definition: glext.h:6722

◆ skb_add_mtu()

void skb_add_mtu ( int  mtu)

◆ skb_append()

static __inline void skb_append ( struct sk_buff old,
struct sk_buff newsk 
)
static

skb_append - append a buffer @old: buffer to insert after @newsk: buffer to insert

Place a packet after a given packet in a list. The list locks are taken and this function is atomic with respect to other list locked calls. A buffer cannot be placed on two lists at the same time.

Definition at line 663 of file tcpcore.h.

664 {
665  unsigned long flags;
666 
667  spin_lock_irqsave(&old->list->lock, flags);
668  __skb_append(old, newsk);
669  spin_unlock_irqrestore(&old->list->lock, flags);
670 }
struct sk_buff_head * list
Definition: tcpcore.h:144
static __inline void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
Definition: tcpcore.h:647
GLbitfield flags
Definition: glext.h:7161
#define spin_lock_irqsave(sl, flags)
Definition: module.h:306
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:307

◆ skb_checksum()

unsigned int skb_checksum ( const struct sk_buff skb,
int  offset,
int  len,
unsigned int  csum 
)

Referenced by __tcp_checksum_complete().

◆ skb_clone()

struct sk_buff* skb_clone ( struct sk_buff skb,
int  priority 
)

Referenced by skb_share_check().

◆ skb_cloned()

static __inline int skb_cloned ( struct sk_buff skb)
static

skb_cloned - is the buffer a clone @skb: buffer to check

Returns true if the buffer was generated with skb_clone() and is one of multiple shared copies of the buffer. Cloned buffers are shared data so must not be written to under normal circumstances.

Definition at line 319 of file tcpcore.h.

320 {
321  return skb->cloned && atomic_read(&skb_shinfo(skb)->dataref) != 1;
322 }
#define atomic_read(v)
Definition: atomic.h:23
#define skb_shinfo(SKB)
Definition: tcpcore.h:256
unsigned char cloned
Definition: tcpcore.h:191

Referenced by skb_cow(), and skb_unshare().

◆ skb_copy()

struct sk_buff* skb_copy ( const struct sk_buff skb,
int  priority 
)

Referenced by skb_unshare().

◆ skb_copy_and_csum_bits()

unsigned int skb_copy_and_csum_bits ( const struct sk_buff skb,
int  offset,
u8 to,
int  len,
unsigned int  csum 
)

◆ skb_copy_and_csum_datagram()

int skb_copy_and_csum_datagram ( const struct sk_buff skb,
int  offset,
u8 to,
int  len,
unsigned int csump 
)

◆ skb_copy_and_csum_datagram_iovec()

int skb_copy_and_csum_datagram_iovec ( const struct sk_buff skb,
int  hlen,
struct iovec iov 
)

◆ skb_copy_and_csum_dev()

void skb_copy_and_csum_dev ( const struct sk_buff skb,
u8 to 
)

◆ skb_copy_bits()

int skb_copy_bits ( const struct sk_buff skb,
int  offset,
void to,
int  len 
)

◆ skb_copy_datagram()

int skb_copy_datagram ( const struct sk_buff from,
int  offset,
char to,
int  size 
)

◆ skb_copy_datagram_iovec()

int skb_copy_datagram_iovec ( const struct sk_buff from,
int  offset,
struct iovec to,
int  size 
)

◆ skb_copy_expand()

struct sk_buff* skb_copy_expand ( const struct sk_buff skb,
int  newheadroom,
int  newtailroom,
int  priority 
)

◆ skb_cow()

static __inline int skb_cow ( struct sk_buff skb,
unsigned int  headroom 
)
static

skb_cow - copy header of skb when it is required @skb: buffer to cow @headroom: needed headroom

If the skb passed lacks sufficient headroom or its data part is shared, data is reallocated. If reallocation fails, an error is returned and original skb is not changed.

The result is skb with writable area skb->head...skb->tail and at least @headroom of space at head.

Definition at line 1092 of file tcpcore.h.

1093 {
1094 #if 0
1095  int delta = (headroom > 16 ? headroom : 16) - skb_headroom(skb);
1096 
1097  if (delta < 0)
1098  delta = 0;
1099 
1100  if (delta || skb_cloned(skb))
1101  return pskb_expand_head(skb, (delta+15)&~15, 0, GFP_ATOMIC);
1102  return 0;
1103 #else
1104  return 0;
1105 #endif
1106 }
static __inline int skb_headroom(const struct sk_buff *skb)
Definition: tcpcore.h:901
#define GFP_ATOMIC
Definition: module.h:655
static __inline int skb_cloned(struct sk_buff *skb)
Definition: tcpcore.h:319
int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, int gfp_mask)

◆ skb_dequeue()

static __inline struct sk_buff* skb_dequeue ( struct sk_buff_head list)
static

skb_dequeue - remove from the head of the queue @list: list to dequeue from

Remove the head of the list. The list lock is taken so the function may be used safely with other locking list functions. The head item is returned or NULL if the list is empty.

Definition at line 597 of file tcpcore.h.

598 {
599  unsigned long flags;
600  struct sk_buff *result;
601 
602  spin_lock_irqsave(&list->lock, flags);
605  return result;
606 }
GLbitfield flags
Definition: glext.h:7161
Definition: _list.h:228
static __inline struct sk_buff * __skb_dequeue(struct sk_buff_head *list)
Definition: tcpcore.h:568
#define spin_lock_irqsave(sl, flags)
Definition: module.h:306
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:307
GLuint64EXT * result
Definition: glext.h:11304

Referenced by skb_queue_purge().

◆ skb_dequeue_tail()

static __inline struct sk_buff* skb_dequeue_tail ( struct sk_buff_head list)
static

skb_dequeue - remove from the head of the queue @list: list to dequeue from

Remove the head of the list. The list lock is taken so the function may be used safely with other locking list functions. The tail item is returned or NULL if the list is empty.

Definition at line 746 of file tcpcore.h.

747 {
748  unsigned long flags;
749  struct sk_buff *result;
750 
751  spin_lock_irqsave(&list->lock, flags);
754  return result;
755 }
GLbitfield flags
Definition: glext.h:7161
Definition: _list.h:228
#define spin_lock_irqsave(sl, flags)
Definition: module.h:306
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:307
static __inline struct sk_buff * __skb_dequeue_tail(struct sk_buff_head *list)
Definition: tcpcore.h:729
GLuint64EXT * result
Definition: glext.h:11304

◆ skb_free_datagram()

void skb_free_datagram ( struct sock sk,
struct sk_buff skb 
)

◆ skb_get()

static __inline struct sk_buff* skb_get ( struct sk_buff skb)
static

skb_get - reference buffer @skb: buffer to reference

Makes another reference to a socket buffer and returns a pointer to the buffer.

Definition at line 278 of file tcpcore.h.

279 {
280  atomic_inc(&skb->users);
281  return skb;
282 }
atomic_t users
Definition: tcpcore.h:196
static void atomic_inc(atomic_t volatile *v)
Definition: atomic.h:95

◆ skb_headlen()

static __inline int skb_headlen ( const struct sk_buff skb)
static

Definition at line 762 of file tcpcore.h.

763 {
764  return skb->len - skb->data_len;
765 }
unsigned int len
Definition: tcpcore.h:188
unsigned int data_len
Definition: tcpcore.h:189

Referenced by __pskb_pull(), and pskb_may_pull().

◆ skb_headroom()

static __inline int skb_headroom ( const struct sk_buff skb)
static

skb_headroom - bytes at buffer head @skb: buffer to check

Return the number of bytes of free space at the head of an &sk_buff.

Definition at line 901 of file tcpcore.h.

902 {
903  return skb->data-skb->head;
904 }
unsigned char * head
Definition: tcpcore.h:201
unsigned char * data
Definition: tcpcore.h:202

Referenced by skb_cow().

◆ skb_init()

void skb_init ( void  )

◆ skb_insert()

static __inline void skb_insert ( struct sk_buff old,
struct sk_buff newsk 
)
static

skb_insert - insert a buffer @old: buffer to insert before @newsk: buffer to insert

Place a packet before a given packet in a list. The list locks are taken and this function is atomic with respect to other list locked calls A buffer cannot be placed on two lists at the same time.

Definition at line 634 of file tcpcore.h.

635 {
636  unsigned long flags;
637 
638  spin_lock_irqsave(&old->list->lock, flags);
639  __skb_insert(newsk, old->prev, old, old->list);
640  spin_unlock_irqrestore(&old->list->lock, flags);
641 }
struct sk_buff * prev
Definition: tcpcore.h:142
static __inline void __skb_insert(struct sk_buff *newsk, struct sk_buff *prev, struct sk_buff *next, struct sk_buff_head *list)
Definition: tcpcore.h:612
struct sk_buff_head * list
Definition: tcpcore.h:144
GLbitfield flags
Definition: glext.h:7161
#define spin_lock_irqsave(sl, flags)
Definition: module.h:306
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:307

◆ skb_is_nonlinear()

static __inline int skb_is_nonlinear ( const struct sk_buff skb)
static

Definition at line 757 of file tcpcore.h.

758 {
759  return skb->data_len;
760 }
unsigned int data_len
Definition: tcpcore.h:189

Referenced by skb_tailroom().

◆ skb_linearize()

int skb_linearize ( struct sk_buff skb,
int  gfp 
)

skb_linearize - convert paged skb to linear one @skb: buffer to linarize @gfp: allocation mode

If there is no free memory -ENOMEM is returned, otherwise zero is returned and the old skb data released.

◆ skb_orphan()

static __inline void skb_orphan ( struct sk_buff skb)
static

skb_orphan - orphan a buffer @skb: buffer to orphan

If a buffer currently has an owner then we call the owner's destructor function and make the @skb unowned. The buffer continues to exist but is no longer charged to its former owner.

Definition at line 990 of file tcpcore.h.

991 {
992  if (skb->destructor)
993  skb->destructor(skb);
994  skb->destructor = NULL;
995  skb->sk = NULL;
996 }
smooth NULL
Definition: ftsmooth.c:416
struct sock * sk
Definition: tcpcore.h:145
void(* destructor)(struct sk_buff *)
Definition: tcpcore.h:206

◆ skb_over_panic()

void skb_over_panic ( struct sk_buff skb,
int  len,
void here 
)

Referenced by skb_put().

◆ skb_peek()

static __inline struct sk_buff* skb_peek ( struct sk_buff_head list_)
static

skb_peek @list_: list to peek at

Peek an &sk_buff. Unlike most other operations you MUST be careful with this one. A peek leaves the buffer on the list and someone else may run off with it. You must hold the appropriate locks or have a private queue to do this.

Returns NULL for an empty list or a pointer to the head element. The reference count is not incremented and the reference is therefore volatile. Use with caution.

Definition at line 408 of file tcpcore.h.

409 {
410  struct sk_buff *list = ((struct sk_buff *)list_)->next;
411  if (list == (struct sk_buff *)list_)
412  list = NULL;
413  return list;
414 }
smooth NULL
Definition: ftsmooth.c:416
struct list * next
Definition: list.h:38
Definition: _list.h:228
#define list
Definition: rosglue.h:35

◆ skb_peek_tail()

static __inline struct sk_buff* skb_peek_tail ( struct sk_buff_head list_)
static

skb_peek_tail @list_: list to peek at

Peek an &sk_buff. Unlike most other operations you MUST be careful with this one. A peek leaves the buffer on the list and someone else may run off with it. You must hold the appropriate locks or have a private queue to do this.

Returns NULL for an empty list or a pointer to the tail element. The reference count is not incremented and the reference is therefore volatile. Use with caution.

Definition at line 430 of file tcpcore.h.

431 {
432  struct sk_buff *list = ((struct sk_buff *)list_)->prev;
433  if (list == (struct sk_buff *)list_)
434  list = NULL;
435  return list;
436 }
struct list * prev
Definition: list.h:39
smooth NULL
Definition: ftsmooth.c:416
Definition: _list.h:228
#define list
Definition: rosglue.h:35

Referenced by __skb_dequeue_tail().

◆ skb_pull()

static __inline unsigned char* skb_pull ( struct sk_buff skb,
unsigned int  len 
)
static

skb_pull - remove data from the start of a buffer @skb: buffer to use @len: amount of data to remove

This function removes data from the start of a buffer, returning the memory to the headroom. A pointer to the next data in the buffer is returned. Once the data has been pulled future pushes will overwrite the old data.

Definition at line 860 of file tcpcore.h.

861 {
862  if (len > skb->len)
863  return NULL;
864  return __skb_pull(skb,len);
865 }
unsigned int len
Definition: tcpcore.h:188
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722
static __inline char * __skb_pull(struct sk_buff *skb, unsigned int len)
Definition: tcpcore.h:841

◆ skb_push()

static __inline unsigned char* skb_push ( struct sk_buff skb,
unsigned int  len 
)
static

skb_push - add data to the start of a buffer @skb: buffer to use @len: amount of data to add

This function extends the used data area of the buffer at the buffer start. If this would exceed the total buffer headroom the kernel will panic. A pointer to the first byte of the extra data is returned.

Definition at line 827 of file tcpcore.h.

828 {
829 #if 0
830  skb->data-=len;
831  skb->len+=len;
832  if(skb->data<skb->head) {
833  skb_under_panic(skb, len, current_text_addr());
834  }
835  return skb->data;
836 #else
837  return NULL;
838 #endif
839 }
unsigned char * head
Definition: tcpcore.h:201
unsigned int len
Definition: tcpcore.h:188
smooth NULL
Definition: ftsmooth.c:416
void skb_under_panic(struct sk_buff *skb, int len, void *here)
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * data
Definition: tcpcore.h:202

◆ skb_put()

static __inline unsigned char* skb_put ( struct sk_buff skb,
unsigned int  len 
)
static

skb_put - add data to a buffer @skb: buffer to use @len: amount of data to add

This function extends the used data area of the buffer. If this would exceed the total buffer size the kernel will panic. A pointer to the first byte of the extra data is returned.

Definition at line 794 of file tcpcore.h.

795 {
796 #if 0
797  unsigned char *tmp=skb->tail;
798  SKB_LINEAR_ASSERT(skb);
799  skb->tail+=len;
800  skb->len+=len;
801  if(skb->tail>skb->end) {
802  skb_over_panic(skb, len, current_text_addr());
803  }
804  return tmp;
805 #else
806 return NULL;
807 #endif
808 }
unsigned int len
Definition: tcpcore.h:188
smooth NULL
Definition: ftsmooth.c:416
#define SKB_LINEAR_ASSERT(skb)
Definition: tcpcore.h:769
unsigned char * end
Definition: tcpcore.h:204
GLenum GLsizei len
Definition: glext.h:6722
void skb_over_panic(struct sk_buff *skb, int len, void *here)
unsigned char * tail
Definition: tcpcore.h:203

◆ skb_queue_empty()

static __inline int skb_queue_empty ( struct sk_buff_head list)
static

skb_queue_empty - check if a queue is empty @list: queue head

Returns true if the queue is empty, false otherwise.

Definition at line 265 of file tcpcore.h.

266 {
267  return (list->next == (struct sk_buff *) list);
268 }
struct list * next
Definition: list.h:38
Definition: _list.h:228

◆ skb_queue_head()

static __inline void skb_queue_head ( struct sk_buff_head list,
struct sk_buff newsk 
)
static

skb_queue_head - queue a buffer at the list head @list: list to use @newsk: buffer to queue

Queue a buffer at the start of the list. This function takes the list lock and can be used safely with other locking &sk_buff functions safely.

A buffer cannot be placed on two lists at the same time.

Definition at line 503 of file tcpcore.h.

504 {
505  unsigned long flags;
506 
507  spin_lock_irqsave(&list->lock, flags);
508  __skb_queue_head(list, newsk);
510 }
GLbitfield flags
Definition: glext.h:7161
Definition: _list.h:228
#define spin_lock_irqsave(sl, flags)
Definition: module.h:306
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:307
static __inline void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
Definition: tcpcore.h:476

◆ skb_queue_head_init()

static __inline void skb_queue_head_init ( struct sk_buff_head list)
static

Definition at line 450 of file tcpcore.h.

451 {
452  spin_lock_init(&list->lock);
453  list->prev = (struct sk_buff *)list;
454  list->next = (struct sk_buff *)list;
455  list->qlen = 0;
456 }
struct list * prev
Definition: list.h:39
struct list * next
Definition: list.h:38
Definition: _list.h:228
#define spin_lock_init(sl)
Definition: module.h:303

Referenced by tcp_prequeue_init().

◆ skb_queue_len()

static __inline __u32 skb_queue_len ( struct sk_buff_head list_)
static

skb_queue_len - get queue length @list_: list to measure

Return the length of an &sk_buff queue.

Definition at line 445 of file tcpcore.h.

446 {
447  return(list_->qlen);
448 }
__u32 qlen
Definition: tcpcore.h:112

Referenced by tcp_fast_path_check(), and tcp_prequeue().

◆ skb_queue_purge()

static __inline void skb_queue_purge ( struct sk_buff_head list)
static

skb_purge - empty a list @list: list to empty

Delete all buffers on an &sk_buff list. Each buffer is removed from the list and one reference dropped. This function takes the list lock and is atomic with respect to other list locking functions.

Definition at line 1008 of file tcpcore.h.

1009 {
1010  struct sk_buff *skb;
1011  while ((skb=skb_dequeue(list))!=NULL)
1012  kfree_skb(skb);
1013 }
static __inline void kfree_skb(struct sk_buff *skb)
Definition: tcpcore.h:297
smooth NULL
Definition: ftsmooth.c:416
Definition: _list.h:228
static __inline struct sk_buff * skb_dequeue(struct sk_buff_head *list)
Definition: tcpcore.h:597

◆ skb_queue_tail()

static __inline void skb_queue_tail ( struct sk_buff_head list,
struct sk_buff newsk 
)
static

skb_queue_tail - queue a buffer at the list tail @list: list to use @newsk: buffer to queue

Queue a buffer at the tail of the list. This function takes the list lock and can be used safely with other locking &sk_buff functions safely.

A buffer cannot be placed on two lists at the same time.

Definition at line 550 of file tcpcore.h.

551 {
552  unsigned long flags;
553 
554  spin_lock_irqsave(&list->lock, flags);
555  __skb_queue_tail(list, newsk);
557 }
static __inline void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
Definition: tcpcore.h:524
GLbitfield flags
Definition: glext.h:7161
Definition: _list.h:228
#define spin_lock_irqsave(sl, flags)
Definition: module.h:306
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:307

◆ skb_realloc_headroom()

struct sk_buff* skb_realloc_headroom ( struct sk_buff skb,
unsigned int  headroom 
)

◆ skb_recv_datagram()

struct sk_buff* skb_recv_datagram ( struct sock sk,
unsigned  flags,
int  noblock,
int err 
)

◆ skb_reserve()

static __inline void skb_reserve ( struct sk_buff skb,
unsigned int  len 
)
static

skb_reserve - adjust headroom @skb: buffer to alter @len: bytes to move

Increase the headroom of an empty &sk_buff by reducing the tail room. This is only allowed for an empty buffer.

Definition at line 927 of file tcpcore.h.

928 {
929  skb->data+=len;
930  skb->tail+=len;
931 }
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * tail
Definition: tcpcore.h:203
unsigned char * data
Definition: tcpcore.h:202

Referenced by __dev_alloc_skb(), and tcp_alloc_pskb().

◆ skb_share_check()

static __inline struct sk_buff* skb_share_check ( struct sk_buff skb,
int  pri 
)
static

skb_share_check - check if buffer is shared and if so clone it @skb: buffer to check @pri: priority for memory allocation

If the buffer is shared the buffer is cloned and the old copy drops a reference. A new clone with a single reference is returned. If the buffer is not shared the original buffer is returned. When being called from interrupt status or with spinlocks held pri must be GFP_ATOMIC.

NULL is returned on a memory allocation failure.

Definition at line 351 of file tcpcore.h.

352 {
353  if (skb_shared(skb)) {
354  struct sk_buff *nskb;
355  nskb = skb_clone(skb, pri);
356  kfree_skb(skb);
357  return nskb;
358  }
359  return skb;
360 }
static __inline void kfree_skb(struct sk_buff *skb)
Definition: tcpcore.h:297
static __inline int skb_shared(struct sk_buff *skb)
Definition: tcpcore.h:332
struct sk_buff * skb_clone(struct sk_buff *skb, int priority)

◆ skb_shared()

static __inline int skb_shared ( struct sk_buff skb)
static

skb_shared - is the buffer shared @skb: buffer to check

Returns true if more than one person has a reference to this buffer.

Definition at line 332 of file tcpcore.h.

333 {
334  return (atomic_read(&skb->users) != 1);
335 }
atomic_t users
Definition: tcpcore.h:196
#define atomic_read(v)
Definition: atomic.h:23

Referenced by skb_share_check().

◆ skb_tailroom()

static __inline int skb_tailroom ( const struct sk_buff skb)
static

skb_tailroom - bytes at buffer end @skb: buffer to check

Return the number of bytes of free space at the tail of an sk_buff

Definition at line 913 of file tcpcore.h.

914 {
915  return skb_is_nonlinear(skb) ? 0 : skb->end-skb->tail;
916 }
static __inline int skb_is_nonlinear(const struct sk_buff *skb)
Definition: tcpcore.h:757
unsigned char * end
Definition: tcpcore.h:204
unsigned char * tail
Definition: tcpcore.h:203

◆ skb_trim()

static __inline void skb_trim ( struct sk_buff skb,
unsigned int  len 
)
static

skb_trim - remove end from a buffer @skb: buffer to alter @len: new length

Cut the length of a buffer down by removing data from the tail. If the buffer is already under the length specified it is not modified.

Definition at line 954 of file tcpcore.h.

955 {
956  if (skb->len > len) {
957  __skb_trim(skb, len);
958  }
959 }
unsigned int len
Definition: tcpcore.h:188
GLenum GLsizei len
Definition: glext.h:6722
static __inline void __skb_trim(struct sk_buff *skb, unsigned int len)
Definition: tcpcore.h:935

◆ skb_under_panic()

void skb_under_panic ( struct sk_buff skb,
int  len,
void here 
)

Referenced by skb_push().

◆ skb_unlink()

static __inline void skb_unlink ( struct sk_buff skb)
static

skb_unlink - remove a buffer from a list @skb: buffer to remove

Place a packet after a given packet in a list. The list locks are taken and this function is atomic with respect to other list locked calls

Works even without knowing the list it is sitting on, which can be handy at times. It also means that THE LIST MUST EXIST when you unlink. Thus a list must have its contents unlinked before it is destroyed.

Definition at line 704 of file tcpcore.h.

705 {
706  struct sk_buff_head *list = skb->list;
707 
708  if(list) {
709  unsigned long flags;
710 
711  spin_lock_irqsave(&list->lock, flags);
712  if(skb->list == list)
713  __skb_unlink(skb, skb->list);
715  }
716 }
struct sk_buff_head * list
Definition: tcpcore.h:144
GLbitfield flags
Definition: glext.h:7161
Definition: _list.h:228
#define spin_lock_irqsave(sl, flags)
Definition: module.h:306
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:307
static __inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
Definition: tcpcore.h:677

◆ skb_unshare()

static __inline struct sk_buff* skb_unshare ( struct sk_buff skb,
int  pri 
)
static

skb_unshare - make a copy of a shared buffer @skb: buffer to check @pri: priority for memory allocation

If the socket buffer is a clone then this function creates a new copy of the data, drops a reference count on the old copy and returns the new copy with the reference count at 1. If the buffer is not a clone the original buffer is returned. When called with a spinlock held or from interrupt state @pri must be GFP_ATOMIC

NULL is returned on a memory allocation failure.

Definition at line 384 of file tcpcore.h.

385 {
386  struct sk_buff *nskb;
387  if(!skb_cloned(skb))
388  return skb;
389  nskb=skb_copy(skb, pri);
390  kfree_skb(skb); /* Free our shared copy */
391  return nskb;
392 }
static __inline void kfree_skb(struct sk_buff *skb)
Definition: tcpcore.h:297
struct sk_buff * skb_copy(const struct sk_buff *skb, int priority)
static __inline int skb_cloned(struct sk_buff *skb)
Definition: tcpcore.h:319

◆ tcp_accept()

struct sock* tcp_accept ( struct sock sk,
int  flags,
int err 
)

Referenced by LibTCPListenCallback().

◆ tcp_acceptq_added()

static __inline void tcp_acceptq_added ( struct sock sk)
static

Definition at line 3507 of file tcpcore.h.

3508 {
3509 #if 0
3510  sk->ack_backlog++;
3511 #endif
3512 }
struct sock * sk
Definition: tcpcore.h:145

Referenced by tcp_acceptq_queue().

◆ tcp_acceptq_is_full()

static __inline int tcp_acceptq_is_full ( struct sock sk)
static

Definition at line 3514 of file tcpcore.h.

3515 {
3516 #if 0
3517  return sk->ack_backlog > sk->max_ack_backlog;
3518 #else
3519  return 0;
3520 #endif
3521 }
struct sock * sk
Definition: tcpcore.h:145

◆ tcp_acceptq_queue()

static __inline void tcp_acceptq_queue ( struct sock sk,
struct open_request req,
struct sock child 
)
static

Definition at line 3523 of file tcpcore.h.

3525 {
3526 #if 0
3527  struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
3528 
3529  req->sk = child;
3530  tcp_acceptq_added(sk);
3531 
3532  if (!tp->accept_queue_tail) {
3533  tp->accept_queue = req;
3534  } else {
3535  tp->accept_queue_tail->dl_next = req;
3536  }
3537  tp->accept_queue_tail = req;
3538  req->dl_next = NULL;
3539 #endif
3540 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
struct tcp_opt af_tcp
Definition: tcpcore.h:1543
static HWND child
Definition: cursoricon.c:298
struct open_request * dl_next
Definition: tcpcore.h:2309
smooth NULL
Definition: ftsmooth.c:416
struct sock * sk
Definition: tcpcore.h:2329
static __inline void tcp_acceptq_added(struct sock *sk)
Definition: tcpcore.h:3507
union sock::@974 tp_pinfo

◆ tcp_acceptq_removed()

static __inline void tcp_acceptq_removed ( struct sock sk)
static

Definition at line 3500 of file tcpcore.h.

3501 {
3502 #if 0
3503  sk->ack_backlog--;
3504 #endif
3505 }
unsigned short ack_backlog
Definition: tcpcore.h:1560

◆ tcp_ack_scheduled()

static __inline int tcp_ack_scheduled ( struct tcp_opt tp)
static

Definition at line 2485 of file tcpcore.h.

2486 {
2487  return tp->ack.pending&TCP_ACK_SCHED;
2488 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

Referenced by tcp_prequeue().

◆ tcp_alloc_page()

static __inline struct page* tcp_alloc_page ( struct sock sk)
static

Definition at line 3724 of file tcpcore.h.

3725 {
3726 #if 0
3727  if (sk->forward_alloc >= (int)PAGE_SIZE ||
3728  tcp_mem_schedule(sk, PAGE_SIZE, 0)) {
3729  struct page *page = alloc_pages(sk->allocation, 0);
3730  if (page)
3731  return page;
3732  }
3734  tcp_moderate_sndbuf(sk);
3735  return NULL;
3736 #else
3737  return NULL;
3738 #endif
3739 }
unsigned int allocation
Definition: tcpcore.h:1492
smooth NULL
Definition: ftsmooth.c:416
int forward_alloc
Definition: tcpcore.h:1490
Definition: module.h:566
int tcp_mem_schedule(struct sock *sk, int size, int kind)
#define PAGE_SIZE
Definition: env_spec_w32.h:49
static __inline void tcp_enter_memory_pressure(void)
Definition: tcpcore.h:3672
static __inline void tcp_moderate_sndbuf(struct sock *sk)
Definition: tcpcore.h:3682

◆ tcp_alloc_pskb()

static __inline struct sk_buff* tcp_alloc_pskb ( struct sock sk,
int  size,
int  mem,
int  gfp 
)
static

Definition at line 3692 of file tcpcore.h.

3693 {
3694 #if 0
3695  struct sk_buff *skb = alloc_skb(size+MAX_TCP_HEADER, gfp);
3696 
3697  if (skb) {
3698  skb->truesize += mem;
3699  if (sk->forward_alloc >= (int)skb->truesize ||
3700  tcp_mem_schedule(sk, skb->truesize, 0)) {
3702  return skb;
3703  }
3704  __kfree_skb(skb);
3705  } else {
3708  }
3709  return NULL;
3710 #else
3711  return NULL;
3712 #endif
3713 }
unsigned int truesize
Definition: tcpcore.h:199
static __inline void skb_reserve(struct sk_buff *skb, unsigned int len)
Definition: tcpcore.h:927
smooth NULL
Definition: ftsmooth.c:416
struct sock * sk
Definition: tcpcore.h:145
struct sk_buff * alloc_skb(unsigned int size, int priority)
GLsizeiptr size
Definition: glext.h:5919
int tcp_mem_schedule(struct sock *sk, int size, int kind)
#define MAX_TCP_HEADER
Definition: tcpcore.h:2069
void __kfree_skb(struct sk_buff *skb)
static __inline void tcp_enter_memory_pressure(void)
Definition: tcpcore.h:3672
static __inline void tcp_moderate_sndbuf(struct sock *sk)
Definition: tcpcore.h:3682
Definition: mem.c:156

Referenced by tcp_alloc_skb().

◆ tcp_alloc_skb()

static __inline struct sk_buff* tcp_alloc_skb ( struct sock sk,
int  size,
int  gfp 
)
static

Definition at line 3715 of file tcpcore.h.

3716 {
3717 #if 0
3718  return tcp_alloc_pskb(sk, size, 0, gfp);
3719 #else
3720  return NULL;
3721 #endif
3722 }
smooth NULL
Definition: ftsmooth.c:416
struct sock * sk
Definition: tcpcore.h:145
GLsizeiptr size
Definition: glext.h:5919
static __inline struct sk_buff * tcp_alloc_pskb(struct sock *sk, int size, int mem, int gfp)
Definition: tcpcore.h:3692

◆ tcp_bhashfn()

static __inline int tcp_bhashfn ( __u16  lport)
static

Definition at line 1943 of file tcpcore.h.

1944 {
1945  return (lport & (tcp_bhash_size - 1));
1946 }
#define tcp_bhash_size
Definition: tcpcore.h:1928

◆ tcp_bucket_create()

struct tcp_bind_bucket* tcp_bucket_create ( struct tcp_bind_hashbucket head,
unsigned short  snum 
)

◆ tcp_bucket_unlock()

void tcp_bucket_unlock ( struct sock sk)

◆ tcp_build_and_update_options()

static __inline void tcp_build_and_update_options ( __u32 ptr,
struct tcp_opt tp,
__u32  tstamp 
)
static

Definition at line 3336 of file tcpcore.h.

3337 {
3338 #if 0
3339  if (tp->tstamp_ok) {
3340  *ptr++ = __constant_htonl((TCPOPT_NOP << 24) |
3341  (TCPOPT_NOP << 16) |
3342  (TCPOPT_TIMESTAMP << 8) |
3344  *ptr++ = htonl(tstamp);
3345  *ptr++ = htonl(tp->ts_recent);
3346  }
3347  if (tp->eff_sacks) {
3348  struct tcp_sack_block *sp = tp->dsack ? tp->duplicate_sack : tp->selective_acks;
3349  int this_sack;
3350 
3351  *ptr++ = __constant_htonl((TCPOPT_NOP << 24) |
3352  (TCPOPT_NOP << 16) |
3353  (TCPOPT_SACK << 8) |
3355  (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK)));
3356  for(this_sack = 0; this_sack < tp->eff_sacks; this_sack++) {
3357  *ptr++ = htonl(sp[this_sack].start_seq);
3358  *ptr++ = htonl(sp[this_sack].end_seq);
3359  }
3360  if (tp->dsack) {
3361  tp->dsack = 0;
3362  tp->eff_sacks--;
3363  }
3364  }
3365 #endif
3366 }
#define htonl(x)
Definition: module.h:212
#define TCPOPT_SACK
Definition: tcpcore.h:2218
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
#define TCPOLEN_SACK_BASE
Definition: tcpcore.h:2234
static PVOID ptr
Definition: dispmode.c:27
#define TCPOLEN_SACK_PERBLOCK
Definition: tcpcore.h:2236
__u32 end_seq
Definition: tcpcore.h:1263
#define TCPOPT_TIMESTAMP
Definition: tcpcore.h:2219
#define TCPOLEN_TIMESTAMP
Definition: tcpcore.h:2228
__u32 start_seq
Definition: tcpcore.h:1262
#define __constant_htonl(x)
Definition: module.h:90
#define TCPOPT_NOP
Definition: tcpcore.h:2213
static const WCHAR sp[]
Definition: suminfo.c:288

◆ tcp_charge_skb()

static __inline void tcp_charge_skb ( struct sock sk,
struct sk_buff skb 
)
static

Definition at line 3653 of file tcpcore.h.

3654 {
3655 #if 0
3656  sk->wmem_queued += skb->truesize;
3657  sk->forward_alloc -= skb->truesize;
3658 #endif
3659 }
unsigned int truesize
Definition: tcpcore.h:199
int forward_alloc
Definition: tcpcore.h:1490
int wmem_queued
Definition: tcpcore.h:1489

◆ tcp_check_probe_timer()

static __inline void tcp_check_probe_timer ( struct sock sk,
struct tcp_opt tp 
)
static

Definition at line 3105 of file tcpcore.h.

3106 {
3107 #if 0
3108  if (!tp->packets_out && !tp->pending)
3110 #endif
3111 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
static __inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long when)
Definition: tcpcore.h:2680
#define TCP_TIME_PROBE0
Definition: tcpcore.h:2240

Referenced by __tcp_push_pending_frames().

◆ tcp_check_req()

struct sock* tcp_check_req ( struct sock sk,
struct sk_buff skb,
struct open_request req,
struct open_request **  prev 
)

◆ tcp_checksum_complete()

static __inline int tcp_checksum_complete ( struct sk_buff skb)
static

Definition at line 3206 of file tcpcore.h.

3207 {
3208 #if 0
3209  return skb->ip_summed != CHECKSUM_UNNECESSARY &&
3211 #else
3212  return 0;
3213 #endif
3214 }
static __inline int __tcp_checksum_complete(struct sk_buff *skb)
Definition: tcpcore.h:3197
#define CHECKSUM_UNNECESSARY
Definition: tcpcore.h:45
unsigned char ip_summed
Definition: tcpcore.h:191

◆ tcp_child_process()

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

◆ tcp_clear_options()

static __inline void tcp_clear_options ( struct tcp_opt tp)
static

Definition at line 2505 of file tcpcore.h.

2506 {
2507  tp->tstamp_ok = tp->sack_ok = tp->wscale_ok = tp->snd_wscale = 0;
2508 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

◆ tcp_clear_retrans()

void tcp_clear_retrans ( struct tcp_opt tp)

◆ tcp_clear_xmit_timer()

static __inline void tcp_clear_xmit_timer ( struct sock sk,
int  what 
)
static

Definition at line 2644 of file tcpcore.h.

2645 {
2646 #if 0
2647  struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
2648 
2649  switch (what) {
2650  case TCP_TIME_RETRANS:
2651  case TCP_TIME_PROBE0:
2652  tp->pending = 0;
2653 
2654 #ifdef TCP_CLEAR_TIMERS
2655  if (timer_pending(&tp->retransmit_timer) &&
2656  del_timer(&tp->retransmit_timer))
2657  __sock_put(sk);
2658 #endif
2659  break;
2660  case TCP_TIME_DACK:
2661  tp->ack.blocked = 0;
2662  tp->ack.pending = 0;
2663 
2664 #ifdef TCP_CLEAR_TIMERS
2665  if (timer_pending(&tp->delack_timer) &&
2666  del_timer(&tp->delack_timer))
2667  __sock_put(sk);
2668 #endif
2669  break;
2670  default:
2672  return;
2673  };
2674 #endif
2675 }
const char timer_bug_msg[]
#define TCP_TIME_RETRANS
Definition: tcpcore.h:2238
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
struct tcp_opt af_tcp
Definition: tcpcore.h:1543
#define TCP_TIME_DACK
Definition: tcpcore.h:2239
#define TCP_TIME_PROBE0
Definition: tcpcore.h:2240
asmlinkage int printk(const char *fmt,...)
Definition: output.c:76
union sock::@974 tp_pinfo

◆ tcp_clear_xmit_timers()

void tcp_clear_xmit_timers ( struct sock )

Referenced by tcp_done().

◆ tcp_close()

void tcp_close ( struct sock sk,
long  timeout 
)

Referenced by LibTCPCloseCallback().

◆ tcp_connect()

int tcp_connect ( struct sock sk)

◆ tcp_create_openreq_child()

struct sock* tcp_create_openreq_child ( struct sock sk,
struct open_request req,
struct sk_buff skb 
)

◆ tcp_current_mss()

static __inline unsigned int tcp_current_mss ( struct sock sk)
static

Definition at line 2718 of file tcpcore.h.

2719 {
2720 #if 0
2721  struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
2722  struct dst_entry *dst = __sk_dst_get(sk);
2723  int mss_now = tp->mss_cache;
2724 
2725  if (dst && dst->pmtu != tp->pmtu_cookie)
2726  mss_now = tcp_sync_mss(sk, dst->pmtu);
2727 
2728  if (tp->eff_sacks)
2729  mss_now -= (TCPOLEN_SACK_BASE_ALIGNED +
2730  (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK));
2731  return mss_now;
2732 #else
2733  return 0;
2734 #endif
2735 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
struct tcp_opt af_tcp
Definition: tcpcore.h:1543
#define TCPOLEN_SACK_PERBLOCK
Definition: tcpcore.h:2236
#define TCPOLEN_SACK_BASE_ALIGNED
Definition: tcpcore.h:2235
GLenum GLenum dst
Definition: glext.h:6340
int tcp_sync_mss(struct sock *sk, u32 pmtu)
union sock::@974 tp_pinfo
Definition: tcpcore.h:1672

Referenced by tcp_may_send_now(), and tcp_push_pending_frames().

◆ tcp_current_ssthresh()

static __inline __u32 tcp_current_ssthresh ( struct tcp_opt tp)
static

Definition at line 2942 of file tcpcore.h.

2943 {
2944 #if 0
2945  if ((1<<tp->ca_state)&(TCPF_CA_CWR|TCPF_CA_Recovery))
2946  return tp->snd_ssthresh;
2947  else
2948  return max(tp->snd_ssthresh,
2949  ((tp->snd_cwnd >> 1) +
2950  (tp->snd_cwnd >> 2)));
2951 #else
2952  return 0;
2953 #endif
2954 }
#define max(a, b)
Definition: svc.c:63
#define TCPF_CA_Recovery
Definition: tcpdef.h:144
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
#define TCPF_CA_CWR
Definition: tcpdef.h:142

◆ tcp_cwnd_application_limited()

void tcp_cwnd_application_limited ( struct sock sk)

Referenced by tcp_cwnd_validate().

◆ tcp_cwnd_validate()

static __inline void tcp_cwnd_validate ( struct sock sk,
struct tcp_opt tp 
)
static

Definition at line 2969 of file tcpcore.h.

2970 {
2971 #if 0
2972  if (tp->packets_out >= tp->snd_cwnd) {
2973  /* Network is feed fully. */
2974  tp->snd_cwnd_used = 0;
2975  tp->snd_cwnd_stamp = tcp_time_stamp;
2976  } else {
2977  /* Network starves. */
2978  if (tp->packets_out > tp->snd_cwnd_used)
2979  tp->snd_cwnd_used = tp->packets_out;
2980 
2981  if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= tp->rto)
2983  }
2984 #endif
2985 }
#define tcp_time_stamp
Definition: tcpcore.h:2815
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
void tcp_cwnd_application_limited(struct sock *sk)
__s32 s32
Definition: types.h:34

Referenced by __tcp_push_pending_frames().

◆ tcp_dec_quickack_mode()

static __inline void tcp_dec_quickack_mode ( struct tcp_opt tp)
static

Definition at line 2490 of file tcpcore.h.

2491 {
2492  if (tp->ack.quick && --tp->ack.quick == 0) {
2493  /* Leaving quickack mode we deflate ATO. */
2494  tp->ack.ato = TCP_ATO_MIN;
2495  }
2496 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
#define TCP_ATO_MIN
Definition: tcpcore.h:2140

◆ tcp_delack_init()

static __inline void tcp_delack_init ( struct tcp_opt tp)
static

Definition at line 2500 of file tcpcore.h.

2501 {
2502  memset(&tp->ack, 0, sizeof(tp->ack));
2503 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
#define memset(x, y, z)
Definition: compat.h:39

◆ tcp_delete_keepalive_timer()

void tcp_delete_keepalive_timer ( struct sock )

Referenced by tcp_synq_removed().

◆ tcp_destroy_sock()

void tcp_destroy_sock ( struct sock sk)

Referenced by tcp_done().

◆ tcp_disconnect()

int tcp_disconnect ( struct sock sk,
int  flags 
)

◆ tcp_done()

static __inline void tcp_done ( struct sock sk)
static

Definition at line 3312 of file tcpcore.h.

3313 {
3314 #if 0
3315  tcp_set_state(sk, TCP_CLOSE);
3317 
3318  sk->shutdown = SHUTDOWN_MASK;
3319 
3320  if (!sk->dead)
3321  sk->state_change(sk);
3322  else
3323  tcp_destroy_sock(sk);
3324 #endif
3325 }
static __inline void tcp_set_state(struct sock *sk, int state)
Definition: tcpcore.h:3280
void tcp_destroy_sock(struct sock *sk)
volatile char dead
Definition: tcpcore.h:1499
void(* state_change)(struct sock *sk)
Definition: tcpcore.h:1639
void tcp_clear_xmit_timers(struct sock *)
unsigned char shutdown
Definition: tcpcore.h:1475

◆ tcp_enter_cwr()

static __inline void tcp_enter_cwr ( struct tcp_opt tp)
static

Definition at line 3002 of file tcpcore.h.

3003 {
3004 #if 0
3005  tp->prior_ssthresh = 0;
3006  if (tp->ca_state < TCP_CA_CWR) {
3008  tp->ca_state = TCP_CA_CWR;
3009  }
3010 #endif
3011 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
static __inline void __tcp_enter_cwr(struct tcp_opt *tp)
Definition: tcpcore.h:2988

◆ tcp_enter_loss()

void tcp_enter_loss ( struct sock sk,
int  how 
)

◆ tcp_enter_memory_pressure()

static __inline void tcp_enter_memory_pressure ( void  )
static

Definition at line 3672 of file tcpcore.h.

3673 {
3674 #if 0
3675  if (!tcp_memory_pressure) {
3676  NET_INC_STATS(TCPMemoryPressures);
3677  tcp_memory_pressure = 1;
3678  }
3679 #endif
3680 }
int tcp_memory_pressure

Referenced by tcp_alloc_page(), and tcp_alloc_pskb().

◆ tcp_enter_quickack_mode()

void tcp_enter_quickack_mode ( struct tcp_opt tp)

◆ tcp_fast_path_check()

static __inline void tcp_fast_path_check ( struct sock sk,
struct tcp_opt tp 
)
static

Definition at line 2775 of file tcpcore.h.

2776 {
2777 #if 0
2778  if (skb_queue_len(&tp->out_of_order_queue) == 0 &&
2779  tp->rcv_wnd &&
2780  atomic_read(&sk->rmem_alloc) < sk->rcvbuf &&
2781  !tp->urg_data)
2783 #endif
2784 }
atomic_t rmem_alloc
Definition: tcpcore.h:1484
#define atomic_read(v)
Definition: atomic.h:23
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
int rcvbuf
Definition: tcpcore.h:1479
static __inline void tcp_fast_path_on(struct tcp_opt *tp)
Definition: tcpcore.h:2768
static __inline __u32 skb_queue_len(struct sk_buff_head *list_)
Definition: tcpcore.h:445

◆ tcp_fast_path_on()

static __inline void tcp_fast_path_on ( struct tcp_opt tp)
static

Definition at line 2768 of file tcpcore.h.

2769 {
2770 #if 0
2771  __tcp_fast_path_on(tp, tp->snd_wnd>>tp->snd_wscale);
2772 #endif
2773 }
static __inline void __tcp_fast_path_on(struct tcp_opt *tp, u32 snd_wnd)
Definition: tcpcore.h:2759
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

Referenced by tcp_fast_path_check().

◆ tcp_fin_time()

static __inline int tcp_fin_time ( struct tcp_opt tp)
static

Definition at line 3807 of file tcpcore.h.

3808 {
3809 #if 0
3810  int fin_timeout = tp->linger2 ? : sysctl_tcp_fin_timeout;
3811 
3812  if (fin_timeout < (tp->rto<<2) - (tp->rto>>1))
3813  fin_timeout = (tp->rto<<2) - (tp->rto>>1);
3814 
3815  return fin_timeout;
3816 #else
3817  return 0;
3818 #endif
3819 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

◆ tcp_free_skb()

static __inline void tcp_free_skb ( struct sock sk,
struct sk_buff skb 
)
static

Definition at line 3643 of file tcpcore.h.

3644 {
3645 #if 0
3646  sk->tp_pinfo.af_tcp.queue_shrunk = 1;
3647  sk->wmem_queued -= skb->truesize;
3648  sk->forward_alloc += skb->truesize;
3649  __kfree_skb(skb);
3650 #endif
3651 }
unsigned int truesize
Definition: tcpcore.h:199
struct tcp_opt af_tcp
Definition: tcpcore.h:1543
int forward_alloc
Definition: tcpcore.h:1490
int wmem_queued
Definition: tcpcore.h:1489
void __kfree_skb(struct sk_buff *skb)
union sock::@974 tp_pinfo

Referenced by tcp_writequeue_purge().

◆ tcp_full_space()

static __inline int tcp_full_space ( struct sock sk)
static

Definition at line 3491 of file tcpcore.h.

3492 {
3493 #if 0
3494  return tcp_win_from_space(sk->rcvbuf);
3495 #else
3496  return 0;
3497 #endif
3498 }
int rcvbuf
Definition: tcpcore.h:1479
static __inline int tcp_win_from_space(int space)
Definition: tcpcore.h:3470

◆ tcp_getsockopt()

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

◆ tcp_inherit_port()

void tcp_inherit_port ( struct sock sk,
struct sock child 
)

◆ tcp_init_cwnd()

__u32 tcp_init_cwnd ( struct tcp_opt tp)

◆ tcp_init_wl()

static __inline void tcp_init_wl ( struct tcp_opt tp,
u32  ack,
u32  seq 
)
static

Definition at line 3166 of file tcpcore.h.

3167 {
3168 #if 0
3169  tp->snd_wl1 = seq;
3170 #endif
3171 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

◆ tcp_init_xmit_timers()

void tcp_init_xmit_timers ( struct sock )

◆ tcp_initialize_rcv_mss()

static __inline void tcp_initialize_rcv_mss ( struct sock sk)
static

Definition at line 2745 of file tcpcore.h.

2746 {
2747 #if 0
2748  struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
2749  unsigned int hint = min(tp->advmss, tp->mss_cache);
2750 
2751  hint = min(hint, tp->rcv_wnd/2);
2753  hint = max(hint, TCP_MIN_MSS);
2754 
2755  tp->ack.rcv_mss = hint;
2756 #endif
2757 }
#define max(a, b)
Definition: svc.c:63
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
struct tcp_opt af_tcp
Definition: tcpcore.h:1543
#define TCP_MIN_MSS
Definition: tcpcore.h:2078
DWORD hint
Definition: vfdcmd.c:88
#define TCP_MIN_RCVMSS
Definition: tcpcore.h:2081
#define min(a, b)
Definition: monoChain.cc:55
union sock::@974 tp_pinfo

◆ tcp_ioctl()

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

◆ tcp_lhashfn()

static __inline int tcp_lhashfn ( unsigned short  num)
static

Definition at line 2051 of file tcpcore.h.

2052 {
2053 #if 0
2054  return num & (TCP_LHTABLE_SIZE - 1);
2055 #else
2056  return 0;
2057 #endif
2058 }
#define TCP_LHTABLE_SIZE
Definition: tcpcore.h:1842
GLuint GLuint num
Definition: glext.h:9618

Referenced by tcp_sk_listen_hashfn().

◆ tcp_listen_lock()

static __inline void tcp_listen_lock ( void  )
static

Definition at line 3771 of file tcpcore.h.

3772 {
3773 #if 0
3774  /* read_lock synchronizes to candidates to writers */
3775  read_lock(&tcp_lhash_lock);
3777  read_unlock(&tcp_lhash_lock);
3778 #endif
3779 }
#define tcp_lhash_users
Definition: tcpcore.h:1931
#define tcp_lhash_lock
Definition: tcpcore.h:1930
static void atomic_inc(atomic_t volatile *v)
Definition: atomic.h:95

◆ tcp_listen_start()

int tcp_listen_start ( struct sock sk)

◆ tcp_listen_unlock()

static __inline void tcp_listen_unlock ( void  )
static

Definition at line 3781 of file tcpcore.h.

3782 {
3783 #if 0
3786 #endif
3787 }
#define tcp_lhash_users
Definition: tcpcore.h:1931
int wake_up(wait_queue_head_t *queue)
Definition: linux.c:279
static int atomic_dec_and_test(atomic_t volatile *v)
Definition: atomic.h:121
#define tcp_lhash_wait
Definition: tcpcore.h:1932

◆ tcp_listen_wlock()

void tcp_listen_wlock ( void  )

◆ tcp_make_synack()

struct sk_buff* tcp_make_synack ( struct sock sk,
struct dst_entry dst,
struct open_request req 
)

◆ tcp_max_burst()

static __inline __u32 tcp_max_burst ( struct tcp_opt tp)
static

Definition at line 3018 of file tcpcore.h.

3019 {
3020  return 3;
3021 }

◆ tcp_may_send_now()

static __inline int tcp_may_send_now ( struct sock sk,
struct tcp_opt tp 
)
static

Definition at line 3153 of file tcpcore.h.

3154 {
3155 #if 0
3156  struct sk_buff *skb = tp->send_head;
3157 
3158  return (skb &&
3160  tcp_skb_is_last(sk, skb) ? 1 : tp->nonagle));
3161 #else
3162  return 0;
3163 #endif
3164 }
static __inline int tcp_skb_is_last(struct sock *sk, struct sk_buff *skb)
Definition: tcpcore.h:3113
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
struct sock * sk
Definition: tcpcore.h:145
static __inline int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, unsigned cur_mss, int nonagle)
Definition: tcpcore.h:3067
static __inline unsigned int tcp_current_mss(struct sock *sk)
Definition: tcpcore.h:2718

◆ tcp_mem_reclaim()

static __inline void tcp_mem_reclaim ( struct sock sk)
static

Definition at line 3664 of file tcpcore.h.

3665 {
3666 #if 0
3667  if (sk->forward_alloc >= TCP_MEM_QUANTUM)
3669 #endif
3670 }
struct sock * sk
Definition: tcpcore.h:145
void __tcp_mem_reclaim(struct sock *sk)
#define TCP_MEM_QUANTUM
Definition: tcpcore.h:3641

Referenced by tcp_writequeue_purge().

◆ tcp_mem_schedule()

int tcp_mem_schedule ( struct sock sk,
int  size,
int  kind 
)

Referenced by tcp_alloc_page(), and tcp_alloc_pskb().

◆ tcp_min_write_space()

static __inline int tcp_min_write_space ( struct sock sk)
static

Definition at line 2882 of file tcpcore.h.

2883 {
2884 #if 0
2885  return sk->wmem_queued/2;
2886 #else
2887 return 0;
2888 #endif
2889 }
struct sock * sk
Definition: tcpcore.h:145

◆ tcp_minshall_check()

static __inline__ int tcp_minshall_check ( struct tcp_opt tp)
static

Definition at line 3023 of file tcpcore.h.

3024 {
3025 #if 0
3026  return after(tp->snd_sml,tp->snd_una) &&
3027  !after(tp->snd_sml, tp->snd_nxt);
3028 #else
3029  return 0;
3030 #endif
3031 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
__inline int after(__u32 seq1, __u32 seq2)
Definition: tcpcore.h:2419

Referenced by tcp_nagle_check().

◆ tcp_minshall_update()

static __inline void tcp_minshall_update ( struct tcp_opt tp,
int  mss,
struct sk_buff skb 
)
static

Definition at line 3033 of file tcpcore.h.

3034 {
3035 #if 0
3036  if (skb->len < mss)
3037  tp->snd_sml = TCP_SKB_CB(skb)->end_seq;
3038 #endif
3039 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
unsigned int len
Definition: tcpcore.h:188
#define TCP_SKB_CB(__skb)
Definition: tcpcore.h:2867

◆ tcp_moderate_sndbuf()

static __inline void tcp_moderate_sndbuf ( struct sock sk)
static

Definition at line 3682 of file tcpcore.h.

3683 {
3684 #if 0
3685  if (!(sk->userlocks&SOCK_SNDBUF_LOCK)) {
3686  sk->sndbuf = min(sk->sndbuf, sk->wmem_queued/2);
3687  sk->sndbuf = max(sk->sndbuf, SOCK_MIN_SNDBUF);
3688  }
3689 #endif
3690 }
#define max(a, b)
Definition: svc.c:63
struct sock * sk
Definition: tcpcore.h:145
#define min(a, b)
Definition: monoChain.cc:55

Referenced by tcp_alloc_page(), and tcp_alloc_pskb().

◆ tcp_nagle_check()

static __inline int tcp_nagle_check ( struct tcp_opt tp,
struct sk_buff skb,
unsigned  mss_now,
int  nonagle 
)
static

Definition at line 3050 of file tcpcore.h.

3051 {
3052 #if 0
3053  return (skb->len < mss_now &&
3054  !(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) &&
3055  (nonagle == 2 ||
3056  (!nonagle &&
3057  tp->packets_out &&
3058  tcp_minshall_check(tp))));
3059 #else
3060  return 0;
3061 #endif
3062 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
static __inline__ int tcp_minshall_check(struct tcp_opt *tp)
Definition: tcpcore.h:3023
unsigned int len
Definition: tcpcore.h:188
#define TCPCB_FLAG_FIN
Definition: tcpcore.h:2841
#define TCP_SKB_CB(__skb)
Definition: tcpcore.h:2867
GLbitfield flags
Definition: glext.h:7161

Referenced by tcp_snd_test().

◆ tcp_openreq_free()

static __inline void tcp_openreq_free ( struct open_request req)
static

Definition at line 2344 of file tcpcore.h.

2345 {
2346  req->class->destructor(req);
2347  tcp_openreq_fastfree(req);
2348 }
#define tcp_openreq_fastfree(req)
Definition: tcpcore.h:2342
struct or_calltable * class
Definition: tcpcore.h:2328

Referenced by tcp_synq_drop().

◆ tcp_openreq_init()

static __inline void tcp_openreq_init ( struct open_request req,
struct tcp_opt tp,
struct sk_buff skb 
)
static

Definition at line 3622 of file tcpcore.h.

3625 {
3626 #if 0
3627  req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */
3628  req->rcv_isn = TCP_SKB_CB(skb)->seq;
3629  req->mss = tp->mss_clamp;
3630  req->ts_recent = tp->saw_tstamp ? tp->rcv_tsval : 0;
3631  req->tstamp_ok = tp->tstamp_ok;
3632  req->sack_ok = tp->sack_ok;
3633  req->snd_wscale = tp->snd_wscale;
3634  req->wscale_ok = tp->wscale_ok;
3635  req->acked = 0;
3636  req->ecn_ok = 0;
3637  req->rmt_port = skb->h.th->source;
3638 #endif
3639 }
__u16 acked
Definition: tcpcore.h:2316
__u16 sack_ok
Definition: tcpcore.h:2316
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
__u32 ts_recent
Definition: tcpcore.h:2326
__u16 wscale_ok
Definition: tcpcore.h:2316
union sk_buff::@967 h
__u16 ecn_ok
Definition: tcpcore.h:2316
#define TCP_SKB_CB(__skb)
Definition: tcpcore.h:2867
__u32 rcv_wnd
Definition: tcpcore.h:2325
__u32 rcv_isn
Definition: tcpcore.h:2310
struct tcphdr * th
Definition: tcpcore.h:152
__u16 snd_wscale
Definition: tcpcore.h:2316
__u16 tstamp_ok
Definition: tcpcore.h:2316
__u16 mss
Definition: tcpcore.h:2313
__u16 rmt_port
Definition: tcpcore.h:2312

◆ tcp_packets_in_flight()

static __inline unsigned int tcp_packets_in_flight ( struct tcp_opt tp)
static

Definition at line 2915 of file tcpcore.h.

2916 {
2917 #if 0
2918  return tp->packets_out - tp->left_out + tp->retrans_out;
2919 #else
2920  return 0;
2921 #endif
2922 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

Referenced by __tcp_enter_cwr(), and tcp_snd_test().

◆ tcp_parse_options()

void tcp_parse_options ( struct sk_buff skb,
struct tcp_opt tp,
int  estab 
)

◆ tcp_paws_check()

static __inline int tcp_paws_check ( struct tcp_opt tp,
int  rst 
)
static

Definition at line 3821 of file tcpcore.h.

3822 {
3823 #if 0
3824  if ((s32)(tp->rcv_tsval - tp->ts_recent) >= 0)
3825  return 0;
3826  if (xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_24DAYS)
3827  return 0;
3828 
3829  /* RST segments are not recommended to carry timestamp,
3830  and, if they do, it is recommended to ignore PAWS because
3831  "their cleanup function should take precedence over timestamps."
3832  Certainly, it is mistake. It is necessary to understand the reasons
3833  of this constraint to relax it: if peer reboots, clock may go
3834  out-of-sync and half-open connections will not be reset.
3835  Actually, the problem would be not existing if all
3836  the implementations followed draft about maintaining clock
3837  via reboots. Linux-2.2 DOES NOT!
3838 
3839  However, we can relax time bounds for RST segments to MSL.
3840  */
3841  if (rst && xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_MSL)
3842  return 0;
3843  return 1;
3844 #else
3845  return 0;
3846 #endif
3847 }
#define TCP_PAWS_MSL
Definition: tcpcore.h:2167
#define TCP_PAWS_24DAYS
Definition: tcpcore.h:2166
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
__s32 s32
Definition: types.h:34

◆ tcp_poll()

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

◆ tcp_prequeue()

static __inline int tcp_prequeue ( struct sock sk,
struct sk_buff skb 
)
static

Definition at line 3236 of file tcpcore.h.

3237 {
3238 #if 0
3239  struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
3240 
3241  if (tp->ucopy.task) {
3242  __skb_queue_tail(&tp->ucopy.prequeue, skb);
3243  tp->ucopy.memory += skb->truesize;
3244  if (tp->ucopy.memory > sk->rcvbuf) {
3245  struct sk_buff *skb1;
3246 
3247  if (sk->lock.users)
3248  out_of_line_bug();
3249 
3250  while ((skb1 = __skb_dequeue(&tp->ucopy.prequeue)) != NULL) {
3251  sk->backlog_rcv(sk, skb1);
3252  NET_INC_STATS_BH(TCPPrequeueDropped);
3253  }
3254 
3255  tp->ucopy.memory = 0;
3256  } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) {
3257  wake_up_interruptible(sk->sleep);
3258  if (!tcp_ack_scheduled(tp))
3260  }
3261  return 1;
3262  }
3263  return 0;
3264 #else
3265  return 0;
3266 #endif
3267 }
unsigned int truesize
Definition: tcpcore.h:199
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
int rcvbuf
Definition: tcpcore.h:1479
struct tcp_opt af_tcp
Definition: tcpcore.h:1543
static __inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long when)
Definition: tcpcore.h:2680
#define TCP_RTO_MIN
Definition: tcpcore.h:2143
#define TCP_TIME_DACK
Definition: tcpcore.h:2239
static __inline void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
Definition: tcpcore.h:524
smooth NULL
Definition: ftsmooth.c:416
struct sock * sk
Definition: tcpcore.h:145
static __inline int tcp_ack_scheduled(struct tcp_opt *tp)
Definition: tcpcore.h:2485
static __inline struct sk_buff * __skb_dequeue(struct sk_buff_head *list)
Definition: tcpcore.h:568
static __inline __u32 skb_queue_len(struct sk_buff_head *list_)
Definition: tcpcore.h:445
union sock::@974 tp_pinfo

◆ tcp_prequeue_init()

static __inline void tcp_prequeue_init ( struct tcp_opt tp)
static

Definition at line 3218 of file tcpcore.h.

3219 {
3220 #if 0
3221  tp->ucopy.task = NULL;
3222  tp->ucopy.len = 0;
3223  tp->ucopy.memory = 0;
3224  skb_queue_head_init(&tp->ucopy.prequeue);
3225 #endif
3226 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
smooth NULL
Definition: ftsmooth.c:416
static __inline void skb_queue_head_init(struct sk_buff_head *list)
Definition: tcpcore.h:450

◆ tcp_push_one()

void tcp_push_one ( struct sock ,
unsigned  mss_now 
)

◆ tcp_push_pending_frames()

static __inline void tcp_push_pending_frames ( struct sock sk,
struct tcp_opt tp 
)
static

Definition at line 3145 of file tcpcore.h.

3147 {
3148 #if 0
3150 #endif
3151 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
struct sock * sk
Definition: tcpcore.h:145
static __inline void __tcp_push_pending_frames(struct sock *sk, struct tcp_opt *tp, unsigned cur_mss, int nonagle)
Definition: tcpcore.h:3126
static __inline unsigned int tcp_current_mss(struct sock *sk)
Definition: tcpcore.h:2718

◆ tcp_put_port()

void tcp_put_port ( struct sock sk)

Referenced by tcp_set_state().

◆ tcp_rcv_established()

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

◆ tcp_rcv_state_process()

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

◆ tcp_read_sock()

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

◆ tcp_recalc_ssthresh()

static __inline __u32 tcp_recalc_ssthresh ( struct tcp_opt tp)
static

Definition at line 2929 of file tcpcore.h.

2930 {
2931 #if 0
2932  return max(tp->snd_cwnd >> 1U, 2U);
2933 #else
2934  return 0;
2935 #endif
2936 }
#define max(a, b)
Definition: svc.c:63
#define U(x)
Definition: wordpad.c:44
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

Referenced by __tcp_enter_cwr().

◆ tcp_receive_window()

static __inline u32 tcp_receive_window ( struct tcp_opt tp)
static

Definition at line 2790 of file tcpcore.h.

2791 {
2792 #if 0
2793  s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt;
2794 
2795  if (win < 0)
2796  win = 0;
2797  return (u32) win;
2798 #else
2799  return 0;
2800 #endif
2801 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
ULONG32 u32
Definition: btrfs.h:14
__s32 s32
Definition: types.h:34
static real win[4][36]

◆ tcp_recvmsg()

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

◆ tcp_reset_keepalive_timer()

void tcp_reset_keepalive_timer ( struct sock ,
unsigned long   
)

Referenced by tcp_synq_added().

◆ tcp_reset_xmit_timer()

static __inline void tcp_reset_xmit_timer ( struct sock sk,
int  what,
unsigned long  when 
)
static

Definition at line 2680 of file tcpcore.h.

2681 {
2682 #if 0
2683  struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
2684 
2685  if (when > TCP_RTO_MAX) {
2686 #ifdef TCP_DEBUG
2687  printk(KERN_DEBUG "reset_xmit_timer sk=%p %d when=0x%lx, caller=%p\n", sk, what, when, current_text_addr());
2688 #endif
2689  when = TCP_RTO_MAX;
2690  }
2691 
2692  switch (what) {
2693  case TCP_TIME_RETRANS:
2694  case TCP_TIME_PROBE0:
2695  tp->pending = what;
2696  tp->timeout = jiffies+when;
2697  if (!mod_timer(&tp->retransmit_timer, tp->timeout))
2698  sock_hold(sk);
2699  break;
2700 
2701  case TCP_TIME_DACK:
2702  tp->ack.pending |= TCP_ACK_TIMER;
2703  tp->ack.timeout = jiffies+when;
2704  if (!mod_timer(&tp->delack_timer, tp->ack.timeout))
2705  sock_hold(sk);
2706  break;
2707 
2708  default:
2709  printk(KERN_DEBUG "bug: unknown timer value\n");
2710  };
2711 #endif
2712 }
#define TCP_TIME_RETRANS
Definition: tcpcore.h:2238
#define jiffies
Definition: module.h:1075
#define TCP_RTO_MAX
Definition: tcpcore.h:2142
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645
struct tcp_opt af_tcp
Definition: tcpcore.h:1543
#define TCP_TIME_DACK
Definition: tcpcore.h:2239
#define TCP_TIME_PROBE0
Definition: tcpcore.h:2240
asmlinkage int printk(const char *fmt,...)
Definition: output.c:76
union sock::@974 tp_pinfo
#define KERN_DEBUG
Definition: module.h:227

Referenced by tcp_check_probe_timer(), and tcp_prequeue().

◆ tcp_retransmit_skb()

int tcp_retransmit_skb ( struct sock ,
struct sk_buff  
)

◆ tcp_rfree()

void tcp_rfree ( struct sk_buff skb)

Referenced by tcp_set_owner_r().

◆ tcp_sack_reset()

static __inline void tcp_sack_reset ( struct tcp_opt tp)
static

Definition at line 3327 of file tcpcore.h.

3328 {
3329 #if 0
3330  tp->dsack = 0;
3331  tp->eff_sacks = 0;
3332  tp->num_sacks = 0;
3333 #endif
3334 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

◆ tcp_schedule_ack()

static __inline void tcp_schedule_ack ( struct tcp_opt tp)
static

Definition at line 2480 of file tcpcore.h.

2481 {
2482  tp->ack.pending |= TCP_ACK_SCHED;
2483 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2645

◆ tcp_select_initial_window()

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

Definition at line 3415 of file tcpcore.h.

3420 {
3421 #if 0
3422  unsigned int space = (__space < 0 ? 0 : __space);
3423 
3424  /* If no clamp set the clamp to the max possible scaled window */
3425  if (*