summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2003-02-19 22:32:43 +0000
committerjlemon <jlemon@FreeBSD.org>2003-02-19 22:32:43 +0000
commita8bc02dcb257f24a8246bb1c31abe58bf12ebd04 (patch)
tree6317b858b0555a797efb2e5b5bd4c2eebbdc0d10 /sys/netinet/tcp_var.h
parent79a1ebfa6f53d733dc4775c2031ff3d16e53b75c (diff)
downloadFreeBSD-src-a8bc02dcb257f24a8246bb1c31abe58bf12ebd04.zip
FreeBSD-src-a8bc02dcb257f24a8246bb1c31abe58bf12ebd04.tar.gz
Add a TCP TIMEWAIT state which uses less space than a fullblown TCP
control block. Allow the socket and tcpcb structures to be freed earlier than inpcb. Update code to understand an inp w/o a socket. Reviewed by: hsu, silby, jayanth Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 137b042..e4a07f8 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -235,6 +235,20 @@ struct syncache_head {
TAILQ_HEAD(, syncache) sch_bucket;
u_int sch_length;
};
+
+struct tcptw {
+ struct inpcb *tw_inpcb; /* XXX back pointer to internet pcb */
+ tcp_seq snd_nxt;
+ tcp_seq rcv_nxt;
+ tcp_cc cc_recv;
+ tcp_cc cc_send;
+ u_short last_win; /* cached window value */
+ u_short tw_so_options; /* copy of so_options */
+ struct ucred *tw_cred; /* user credentials */
+ u_long t_recent;
+ u_long t_starttime;
+ struct callout *tt_2msl; /* 2*msl TIME_WAIT timer */
+};
/*
* The TAO cache entry which is stored in the protocol family specific
@@ -254,6 +268,7 @@ struct rmxp_tao {
#define rmx_taop(r) ((struct rmxp_tao *)(r).rmx_filler)
#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)
+#define intotw(ip) ((struct tcptw *)(ip)->inp_ppcb)
#define sototcpcb(so) (intotcpcb(sotoinpcb(so)))
/*
@@ -448,6 +463,8 @@ extern int ss_fltsz_local;
void tcp_canceltimers(struct tcpcb *);
struct tcpcb *
tcp_close(struct tcpcb *);
+void tcp_twstart(struct tcpcb *);
+void tcp_twclose(struct tcptw *);
void tcp_ctlinput(int, struct sockaddr *, void *);
int tcp_ctloutput(struct socket *, struct sockopt *);
struct tcpcb *
@@ -471,6 +488,7 @@ struct inpcb *
tcp_quench(struct inpcb *, int);
void tcp_respond(struct tcpcb *, void *,
struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int);
+int tcp_twrespond(struct tcptw *, int);
struct rtentry *
tcp_rtlookup(struct in_conninfo *);
void tcp_setpersist(struct tcpcb *);
OpenPOWER on IntegriCloud