tcb

mac2022-06-30  119

struct tcb { short tcb_state; /* TCP state */ short tcb_ostate; /* output state */ short tcb_type; /* TCP type (SERVER, CLIENT) */ int tcb_mutex; /* tcb mutual exclusion */ short tcb_code; /* TCP code for next packet */ short tcb_flags; /* various TCB state flags */ short tcb_error; /* return error for user side */ IPaddr tcb_rip; /* remote IP address */ u_short tcb_rport; /* remote TCP port */ IPaddr tcb_lip; /* local IP address */ u_short tcb_lport; /* local TCP port */ struct netif *tcb_pni; /* pointer to our interface */ tcpseq tcb_suna; /* send unacked */ tcpseq tcb_snext; /* send next */ tcpseq tcb_slast; /* sequence of FIN, if TCBF_SNDFIN */ u_long tcb_swindow; /* send window size (octets) */ tcpseq tcb_lwseq; /* sequence of last window update */ tcpseq tcb_lwack; /* ack seq of last window update */ u_int tcb_cwnd; /* congestion window size (octets) */ u_int tcb_ssthresh; /* slow start threshold (octets) */ u_int tcb_smss; /* send max segment size (octets) */ tcpseq tcb_iss; /* initial send sequence */ int tcb_srt; /* smoothed Round Trip Time */ int tcb_rtde; /* Round Trip deviation estimator */ int tcb_persist; /* persist timeout value */ int tcb_keep; /* keepalive timeout value */ int tcb_rexmt; /* retransmit timeout value */ int tcb_rexmtcount; /* number of rexmts sent */ tcpseq tcb_rnext; /* receive next */ tcpseq tcb_rupseq; /* receive urgent pointer */ tcpseq tcb_supseq; /* send urgent pointer */ int tcb_lqsize; /* listen queue size (SERVERs) */ int tcb_listenq; /* listen queue port (SERVERs) */ struct tcb *tcb_pptcb; /* pointer to parent TCB (for ACCEPT) */ int tcb_ocsem; /* open/close semaphore */ int tcb_dvnum; /* TCP slave pseudo device number */ int tcb_ssema; /* send semaphore */ u_char *tcb_sndbuf; /* send buffer */ u_int tcb_sbstart; /* start of valid data */ u_int tcb_sbcount; /* data character count */ u_int tcb_sbsize; /* send buffer size (bytes) */ int tcb_rsema; /* receive semaphore */ u_char *tcb_rcvbuf; /* receive buffer (circular) */ u_int tcb_rbstart; /* start of valid data */ u_int tcb_rbcount; /* data character count */ u_int tcb_rbsize; /* receive buffer size (bytes) */ u_int tcb_rmss; /* receive max segment size */ tcpseq tcb_cwin; /* seq of currently advertised window */ int tcb_rsegq; /* segment fragment queue */ tcpseq tcb_finseq; /* FIN sequence number, or 0 */ tcpseq tcb_pushseq; /* PUSH sequence number, or 0 */ };

接收数据长度

u_int tcb_rbcount; /* data character count */

接收缓冲区大小

u_int tcb_rbsize; /* receive buffer size (bytes) */

记录了当前窗口可接收的最大报文段序号

tcpseq tcb_cwin; /* seq of currently advertised window */

下一个报文的序号

tcpseq tcb_rnext; /* receive next */
最新回复(0)