- t_x2:4, /* (unused) */
- t_off:4; /* data offset */
- u_char
- t_fin:1, /* fin flag */
- t_syn:1, /* syn flag */
- t_rst:1, /* reset flag */
- t_eol:1, /* eol flag */
- t_ack:1, /* ack flag */
- t_urg:1, /* urgent flag */
- t_x3:2; /* (unused) */
- u_short t_win; /* window */
- u_short t_sum; /* checksum */
- u_short t_urp; /* urgent pointer */
-};
-
-/*
- * Tcp control block.
- */
-struct tcb {
- struct th *t_rcv_next; /* first el on rcv queue */
- struct th *t_rcv_prev; /* last el on rcv queue */
- struct tcb *t_tcb_next; /* next tcb */
- struct tcb *t_tcb_prev; /* next tcb */
- struct ucb *t_ucb; /* ucb */
- struct mbuf *t_rcv_unack; /* unacked message queue */
- seq_t iss; /* initial send seq # */
- seq_t irs; /* initial recv seq # */
- seq_t rcv_urp; /* rcv urgent pointer */
- seq_t rcv_nxt; /* next seq # to rcv */
- seq_t rcv_end; /* rcv eol pointer */
- seq_t snd_off; /* seq # of first datum in send buf */
- seq_t seq_fin; /* seq # of FIN sent */
- seq_t snd_end; /* send eol pointer */
- seq_t snd_urp; /* snd urgent pointer */
- seq_t snd_lst; /* seq # of last sent datum */
- seq_t snd_nxt; /* seq # of next datum to send */
- seq_t snd_una; /* seq # of first unacked datum */
- seq_t snd_wl; /* seq # of last sent window */
- seq_t snd_hi; /* highest seq # sent */
- seq_t snd_wnd; /* send window max */
- seq_t t_rexmt_val; /* val saved in rexmt timer */
- seq_t t_rtl_val; /* val saved in rexmt too long timer */
- seq_t t_xmt_val; /* seq # sent when xmt timer started */
-
- /* various flags and state variables */
-
- u_short
- ack_due:1, /* must we send ACK */
- cancelled:1, /* retransmit timer cancelled */
- dropped_txt:1, /* dropped incoming data */
- fin_rcvd:1, /* FIN received */
- force_one:1, /* force sending of one byte */
- new_window:1, /* received new window size */
- rexmt:1, /* this msg is a retransmission */
- snd_fin:1, /* FIN should be sent */
- snd_rst:1, /* RST should be sent */
- snd_urg:1, /* urgent data to send */
- syn_acked:1, /* SYN has been ACKed */
- syn_rcvd:1, /* SYN has been received */
- usr_closed:1, /* user has closed connection */
- waited_2_ml:1, /* wait time for FIN ACK is up */
- net_keep:1, /* don't free this net input */
- usr_abort:1; /* user has closed and does not expect
- to receive any more data */
- u_short t_lport; /* local port */
- u_short t_fport; /* foreign port */
- u_char t_state; /* state of this connection */
- u_char t_xmtime; /* current rexmt time */
-
- /* timers */
-
- u_char t_init; /* initialization too long */
- u_char t_rexmt; /* retransmission */
- u_char t_rexmttl; /* retransmit too long */
- u_char t_persist; /* retransmit persistance */
- u_char t_finack; /* fin acknowledged */
- u_char t_xmt; /* round trip transmission time */