tcp.h (9e9fd65d1fa51d919d54d731be0e66492b5b6c5a) tcp.h (46d3ceabd8d98ed0ad10f20c595ca784e34786c5)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Definitions for the TCP module.
7 *
8 * Version: @(#)tcp.h 1.0.5 05/23/93

--- 239 unchanged lines hidden (view full) ---

248extern int sysctl_tcp_base_mss;
249extern int sysctl_tcp_workaround_signed_windows;
250extern int sysctl_tcp_slow_start_after_idle;
251extern int sysctl_tcp_max_ssthresh;
252extern int sysctl_tcp_cookie_size;
253extern int sysctl_tcp_thin_linear_timeouts;
254extern int sysctl_tcp_thin_dupack;
255extern int sysctl_tcp_early_retrans;
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Definitions for the TCP module.
7 *
8 * Version: @(#)tcp.h 1.0.5 05/23/93

--- 239 unchanged lines hidden (view full) ---

248extern int sysctl_tcp_base_mss;
249extern int sysctl_tcp_workaround_signed_windows;
250extern int sysctl_tcp_slow_start_after_idle;
251extern int sysctl_tcp_max_ssthresh;
252extern int sysctl_tcp_cookie_size;
253extern int sysctl_tcp_thin_linear_timeouts;
254extern int sysctl_tcp_thin_dupack;
255extern int sysctl_tcp_early_retrans;
256extern int sysctl_tcp_limit_output_bytes;
256
257extern atomic_long_t tcp_memory_allocated;
258extern struct percpu_counter tcp_sockets_allocated;
259extern int tcp_memory_pressure;
260
261/*
262 * The next routines deal with comparing 32 bit unsigned ints
263 * and worry about wraparound (automatic with unsigned arithmetic).

--- 52 unchanged lines hidden (view full) ---

316#define TCP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.tcp_statistics, field)
317#define TCP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field)
318#define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field)
319#define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val)
320#define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val)
321
322extern void tcp_init_mem(struct net *net);
323
257
258extern atomic_long_t tcp_memory_allocated;
259extern struct percpu_counter tcp_sockets_allocated;
260extern int tcp_memory_pressure;
261
262/*
263 * The next routines deal with comparing 32 bit unsigned ints
264 * and worry about wraparound (automatic with unsigned arithmetic).

--- 52 unchanged lines hidden (view full) ---

317#define TCP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.tcp_statistics, field)
318#define TCP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field)
319#define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field)
320#define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val)
321#define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val)
322
323extern void tcp_init_mem(struct net *net);
324
325extern void tcp_tasklet_init(void);
326
324extern void tcp_v4_err(struct sk_buff *skb, u32);
325
326extern void tcp_shutdown (struct sock *sk, int how);
327
327extern void tcp_v4_err(struct sk_buff *skb, u32);
328
329extern void tcp_shutdown (struct sock *sk, int how);
330
331extern void tcp_v4_early_demux(struct sk_buff *skb);
328extern int tcp_v4_rcv(struct sk_buff *skb);
329
332extern int tcp_v4_rcv(struct sk_buff *skb);
333
330extern struct inet_peer *tcp_v4_get_peer(struct sock *sk, bool *release_it);
331extern void *tcp_v4_tw_get_peer(struct sock *sk);
334extern struct inet_peer *tcp_v4_get_peer(struct sock *sk);
332extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
333extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
334 size_t size);
335extern int tcp_sendpage(struct sock *sk, struct page *page, int offset,
336 size_t size, int flags);
335extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
336extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
337 size_t size);
338extern int tcp_sendpage(struct sock *sk, struct page *page, int offset,
339 size_t size, int flags);
340extern void tcp_release_cb(struct sock *sk);
337extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg);
338extern int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
339 const struct tcphdr *th, unsigned int len);
340extern int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
341 const struct tcphdr *th, unsigned int len);
342extern void tcp_rcv_space_adjust(struct sock *sk);
343extern void tcp_cleanup_rbuf(struct sock *sk, int copied);
344extern int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);

--- 38 unchanged lines hidden (view full) ---

383 struct request_sock **prev);
384extern int tcp_child_process(struct sock *parent, struct sock *child,
385 struct sk_buff *skb);
386extern bool tcp_use_frto(struct sock *sk);
387extern void tcp_enter_frto(struct sock *sk);
388extern void tcp_enter_loss(struct sock *sk, int how);
389extern void tcp_clear_retrans(struct tcp_sock *tp);
390extern void tcp_update_metrics(struct sock *sk);
341extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg);
342extern int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
343 const struct tcphdr *th, unsigned int len);
344extern int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
345 const struct tcphdr *th, unsigned int len);
346extern void tcp_rcv_space_adjust(struct sock *sk);
347extern void tcp_cleanup_rbuf(struct sock *sk, int copied);
348extern int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);

--- 38 unchanged lines hidden (view full) ---

387 struct request_sock **prev);
388extern int tcp_child_process(struct sock *parent, struct sock *child,
389 struct sk_buff *skb);
390extern bool tcp_use_frto(struct sock *sk);
391extern void tcp_enter_frto(struct sock *sk);
392extern void tcp_enter_loss(struct sock *sk, int how);
393extern void tcp_clear_retrans(struct tcp_sock *tp);
394extern void tcp_update_metrics(struct sock *sk);
395extern void tcp_init_metrics(struct sock *sk);
396extern void tcp_metrics_init(void);
397extern bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, bool paws_check);
398extern bool tcp_remember_stamp(struct sock *sk);
399extern bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw);
400extern void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst);
401extern void tcp_disable_fack(struct tcp_sock *tp);
391extern void tcp_close(struct sock *sk, long timeout);
392extern void tcp_init_sock(struct sock *sk);
393extern unsigned int tcp_poll(struct file * file, struct socket *sock,
394 struct poll_table_struct *wait);
395extern int tcp_getsockopt(struct sock *sk, int level, int optname,
396 char __user *optval, int __user *optlen);
397extern int tcp_setsockopt(struct sock *sk, int level, int optname,
398 char __user *optval, unsigned int optlen);

--- 152 unchanged lines hidden (view full) ---

551 inet_csk(sk)->icsk_rto = TCP_RTO_MAX;
552}
553
554static inline u32 __tcp_set_rto(const struct tcp_sock *tp)
555{
556 return (tp->srtt >> 3) + tp->rttvar;
557}
558
402extern void tcp_close(struct sock *sk, long timeout);
403extern void tcp_init_sock(struct sock *sk);
404extern unsigned int tcp_poll(struct file * file, struct socket *sock,
405 struct poll_table_struct *wait);
406extern int tcp_getsockopt(struct sock *sk, int level, int optname,
407 char __user *optval, int __user *optlen);
408extern int tcp_setsockopt(struct sock *sk, int level, int optname,
409 char __user *optval, unsigned int optlen);

--- 152 unchanged lines hidden (view full) ---

562 inet_csk(sk)->icsk_rto = TCP_RTO_MAX;
563}
564
565static inline u32 __tcp_set_rto(const struct tcp_sock *tp)
566{
567 return (tp->srtt >> 3) + tp->rttvar;
568}
569
570extern void tcp_set_rto(struct sock *sk);
571
559static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd)
560{
561 tp->pred_flags = htonl((tp->tcp_header_len << 26) |
562 ntohl(TCP_FLAG_ACK) |
563 snd_wnd);
564}
565
566static inline void tcp_fast_path_on(struct tcp_sock *tp)

--- 1047 unchanged lines hidden ---
572static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd)
573{
574 tp->pred_flags = htonl((tp->tcp_header_len << 26) |
575 ntohl(TCP_FLAG_ACK) |
576 snd_wnd);
577}
578
579static inline void tcp_fast_path_on(struct tcp_sock *tp)

--- 1047 unchanged lines hidden ---