tcp_var.h (195654) | tcp_var.h (195699) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95 | 1/*- 2 * Copyright (c) 1982, 1986, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95 |
30 * $FreeBSD: head/sys/netinet/tcp_var.h 195654 2009-07-13 11:51:02Z lstewart $ | 30 * $FreeBSD: head/sys/netinet/tcp_var.h 195699 2009-07-14 22:48:30Z rwatson $ |
31 */ 32 33#ifndef _NETINET_TCP_VAR_H_ 34#define _NETINET_TCP_VAR_H_ 35 36#include <netinet/tcp.h> 37 | 31 */ 32 33#ifndef _NETINET_TCP_VAR_H_ 34#define _NETINET_TCP_VAR_H_ 35 36#include <netinet/tcp.h> 37 |
38struct vnet; | 38#ifdef _KERNEL 39#include <net/vnet.h> |
39 40/* 41 * Kernel variables for tcp. 42 */ | 40 41/* 42 * Kernel variables for tcp. 43 */ |
43#ifdef VIMAGE_GLOBALS 44extern int tcp_do_rfc1323; 45#endif | 44VNET_DECLARE(int, tcp_do_rfc1323); 45VNET_DECLARE(int, tcp_reass_qsize); 46VNET_DECLARE(struct uma_zone *, tcp_reass_zone); 47#define V_tcp_do_rfc1323 VNET_GET(tcp_do_rfc1323) 48#define V_tcp_reass_qsize VNET_GET(tcp_reass_qsize) 49#define V_tcp_reass_zone VNET_GET(tcp_reass_zone) |
46 | 50 |
51#endif /* _KERNEL */ 52 |
|
47/* TCP segment queue entry */ 48struct tseg_qent { 49 LIST_ENTRY(tseg_qent) tqe_q; 50 int tqe_len; /* TCP segment data length */ 51 struct tcphdr *tqe_th; /* a pointer to tcp header */ 52 struct mbuf *tqe_m; /* mbuf contains packet */ 53}; 54LIST_HEAD(tsegqe_head, tseg_qent); | 53/* TCP segment queue entry */ 54struct tseg_qent { 55 LIST_ENTRY(tseg_qent) tqe_q; 56 int tqe_len; /* TCP segment data length */ 57 struct tcphdr *tqe_th; /* a pointer to tcp header */ 58 struct mbuf *tqe_m; /* mbuf contains packet */ 59}; 60LIST_HEAD(tsegqe_head, tseg_qent); |
55#ifdef VIMAGE_GLOBALS 56extern int tcp_reass_qsize; 57#endif 58extern struct uma_zone *tcp_reass_zone; | |
59 60struct sackblk { 61 tcp_seq start; /* start seq no. of sack block */ 62 tcp_seq end; /* end seq no. */ 63}; 64 65struct sackhole { 66 tcp_seq start; /* start seq no. of hole */ --- 466 unchanged lines hidden (view full) --- 533#ifdef SYSCTL_DECL 534SYSCTL_DECL(_net_inet_tcp); 535SYSCTL_DECL(_net_inet_tcp_sack); 536MALLOC_DECLARE(M_TCPLOG); 537#endif 538 539extern int tcp_log_in_vain; 540 | 61 62struct sackblk { 63 tcp_seq start; /* start seq no. of sack block */ 64 tcp_seq end; /* end seq no. */ 65}; 66 67struct sackhole { 68 tcp_seq start; /* start seq no. of hole */ --- 466 unchanged lines hidden (view full) --- 535#ifdef SYSCTL_DECL 536SYSCTL_DECL(_net_inet_tcp); 537SYSCTL_DECL(_net_inet_tcp_sack); 538MALLOC_DECLARE(M_TCPLOG); 539#endif 540 541extern int tcp_log_in_vain; 542 |
541#ifdef VIMAGE_GLOBALS 542extern struct inpcbhead tcb; /* head of queue of active tcpcb's */ 543extern struct inpcbinfo tcbinfo; 544extern struct tcpstat tcpstat; /* tcp statistics */ 545extern int tcp_mssdflt; /* XXX */ 546extern int tcp_minmss; 547extern int tcp_delack_enabled; 548extern int tcp_do_newreno; 549extern int path_mtu_discovery; 550extern int ss_fltsz; 551extern int ss_fltsz_local; | 543VNET_DECLARE(struct inpcbhead, tcb); /* queue of active tcpcb's */ 544VNET_DECLARE(struct inpcbinfo, tcbinfo); 545VNET_DECLARE(struct tcpstat, tcpstat); /* tcp statistics */ 546VNET_DECLARE(int, tcp_mssdflt); /* XXX */ 547VNET_DECLARE(int, tcp_minmss); 548VNET_DECLARE(int, tcp_delack_enabled); 549VNET_DECLARE(int, tcp_do_newreno); 550VNET_DECLARE(int, path_mtu_discovery); 551VNET_DECLARE(int, ss_fltsz); 552VNET_DECLARE(int, ss_fltsz_local); |
552 | 553 |
553extern int blackhole; 554extern int drop_synfin; 555extern int tcp_do_rfc3042; 556extern int tcp_do_rfc3390; 557extern int tcp_insecure_rst; 558extern int tcp_do_autorcvbuf; 559extern int tcp_autorcvbuf_inc; 560extern int tcp_autorcvbuf_max; 561extern int tcp_do_rfc3465; 562extern int tcp_abc_l_var; | 554#define V_tcb VNET_GET(tcb) 555#define V_tcbinfo VNET_GET(tcbinfo) 556#define V_tcpstat VNET_GET(tcpstat) 557#define V_tcp_mssdflt VNET_GET(tcp_mssdflt) 558#define V_tcp_minmss VNET_GET(tcp_minmss) 559#define V_tcp_delack_enabled VNET_GET(tcp_delack_enabled) 560#define V_tcp_do_newreno VNET_GET(tcp_do_newreno) 561#define V_path_mtu_discovery VNET_GET(path_mtu_discovery) 562#define V_ss_fltsz VNET_GET(ss_fltsz) 563#define V_ss_fltsz_local VNET_GET(ss_fltsz_local) |
563 | 564 |
564extern int tcp_do_tso; 565extern int tcp_do_autosndbuf; 566extern int tcp_autosndbuf_inc; 567extern int tcp_autosndbuf_max; | 565VNET_DECLARE(int, blackhole); 566VNET_DECLARE(int, drop_synfin); 567VNET_DECLARE(int, tcp_do_rfc3042); 568VNET_DECLARE(int, tcp_do_rfc3390); 569VNET_DECLARE(int, tcp_insecure_rst); 570VNET_DECLARE(int, tcp_do_autorcvbuf); 571VNET_DECLARE(int, tcp_autorcvbuf_inc); 572VNET_DECLARE(int, tcp_autorcvbuf_max); 573VNET_DECLARE(int, tcp_do_rfc3465); 574VNET_DECLARE(int, tcp_abc_l_var); |
568 | 575 |
569extern int nolocaltimewait; | 576#define V_blackhole VNET_GET(blackhole) 577#define V_drop_synfin VNET_GET(drop_synfin) 578#define V_tcp_do_rfc3042 VNET_GET(tcp_do_rfc3042) 579#define V_tcp_do_rfc3390 VNET_GET(tcp_do_rfc3390) 580#define V_tcp_insecure_rst VNET_GET(tcp_insecure_rst) 581#define V_tcp_do_autorcvbuf VNET_GET(tcp_do_autorcvbuf) 582#define V_tcp_autorcvbuf_inc VNET_GET(tcp_autorcvbuf_inc) 583#define V_tcp_autorcvbuf_max VNET_GET(tcp_autorcvbuf_max) 584#define V_tcp_do_rfc3465 VNET_GET(tcp_do_rfc3465) 585#define V_tcp_abc_l_var VNET_GET(tcp_abc_l_var) |
570 | 586 |
571extern int tcp_do_sack; /* SACK enabled/disabled */ 572extern int tcp_sack_maxholes; 573extern int tcp_sack_globalmaxholes; 574extern int tcp_sack_globalholes; 575extern int tcp_sc_rst_sock_fail; /* RST on sock alloc failure */ 576extern int tcp_do_ecn; /* TCP ECN enabled/disabled */ 577extern int tcp_ecn_maxretries; 578#endif /* VIMAGE_GLOBALS */ | 587VNET_DECLARE(int, tcp_do_tso); 588VNET_DECLARE(int, tcp_do_autosndbuf); 589VNET_DECLARE(int, tcp_autosndbuf_inc); 590VNET_DECLARE(int, tcp_autosndbuf_max); |
579 | 591 |
592#define V_tcp_do_tso VNET_GET(tcp_do_tso) 593#define V_tcp_do_autosndbuf VNET_GET(tcp_do_autosndbuf) 594#define V_tcp_autosndbuf_inc VNET_GET(tcp_autosndbuf_inc) 595#define V_tcp_autosndbuf_max VNET_GET(tcp_autosndbuf_max) 596 597VNET_DECLARE(int, nolocaltimewait); 598 599#define V_nolocaltimewait VNET_GET(nolocaltimewait) 600 601VNET_DECLARE(int, tcp_do_sack); /* SACK enabled/disabled */ 602VNET_DECLARE(int, tcp_sack_maxholes); 603VNET_DECLARE(int, tcp_sack_globalmaxholes); 604VNET_DECLARE(int, tcp_sack_globalholes); 605VNET_DECLARE(int, tcp_sc_rst_sock_fail); /* RST on sock alloc failure */ 606VNET_DECLARE(int, tcp_do_ecn); /* TCP ECN enabled/disabled */ 607VNET_DECLARE(int, tcp_ecn_maxretries); 608 609#define V_tcp_do_sack VNET_GET(tcp_do_sack) 610#define V_tcp_sack_maxholes VNET_GET(tcp_sack_maxholes) 611#define V_tcp_sack_globalmaxholes VNET_GET(tcp_sack_globalmaxholes) 612#define V_tcp_sack_globalholes VNET_GET(tcp_sack_globalholes) 613#define V_tcp_sc_rst_sock_fail VNET_GET(tcp_sc_rst_sock_fail) 614#define V_tcp_do_ecn VNET_GET(tcp_do_ecn) 615#define V_tcp_ecn_maxretries VNET_GET(tcp_ecn_maxretries) 616 |
|
580int tcp_addoptions(struct tcpopt *, u_char *); 581struct tcpcb * 582 tcp_close(struct tcpcb *); 583void tcp_discardcb(struct tcpcb *); 584void tcp_twstart(struct tcpcb *); 585#if 0 586int tcp_twrecycleable(struct tcptw *tw); 587#endif --- 81 unchanged lines hidden --- | 617int tcp_addoptions(struct tcpopt *, u_char *); 618struct tcpcb * 619 tcp_close(struct tcpcb *); 620void tcp_discardcb(struct tcpcb *); 621void tcp_twstart(struct tcpcb *); 622#if 0 623int tcp_twrecycleable(struct tcptw *tw); 624#endif --- 81 unchanged lines hidden --- |