Annotation of 42BSD/sys/netinet/tcp_var.h, revision 1.1.1.1

1.1       root        1: /*     tcp_var.h       6.1     83/07/29        */
                      2: 
                      3: /*
                      4:  * Kernel variables for tcp.
                      5:  */
                      6: 
                      7: /*
                      8:  * Tcp control block, one per tcp; fields:
                      9:  */
                     10: struct tcpcb {
                     11:        struct  tcpiphdr *seg_next;     /* sequencing queue */
                     12:        struct  tcpiphdr *seg_prev;
                     13:        short   t_state;                /* state of this connection */
                     14:        short   t_timer[TCPT_NTIMERS];  /* tcp timers */
                     15:        short   t_rxtshift;             /* log(2) of rexmt exp. backoff */
                     16:        struct  mbuf *t_tcpopt;         /* tcp options */
                     17:        struct  mbuf *t_ipopt;          /* ip options */
                     18:        short   t_maxseg;               /* maximum segment size */
                     19:        char    t_force;                /* 1 if forcing out a byte */
                     20:        u_char  t_flags;
                     21: #define        TF_ACKNOW       0x01                    /* ack peer immediately */
                     22: #define        TF_DELACK       0x02                    /* ack, but try to delay it */
                     23: #define        TF_DONTKEEP     0x04                    /* don't use keep-alives */
                     24: #define        TF_NOOPT        0x08                    /* don't use tcp options */
                     25:        struct  tcpiphdr *t_template;   /* skeletal packet for transmit */
                     26:        struct  inpcb *t_inpcb;         /* back pointer to internet pcb */
                     27: /*
                     28:  * The following fields are used as in the protocol specification.
                     29:  * See RFC783, Dec. 1981, page 21.
                     30:  */
                     31: /* send sequence variables */
                     32:        tcp_seq snd_una;                /* send unacknowledged */
                     33:        tcp_seq snd_nxt;                /* send next */
                     34:        tcp_seq snd_up;                 /* send urgent pointer */
                     35:        tcp_seq snd_wl1;                /* window update seg seq number */
                     36:        tcp_seq snd_wl2;                /* window update seg ack number */
                     37:        tcp_seq iss;                    /* initial send sequence number */
                     38:        u_short snd_wnd;                /* send window */
                     39: /* receive sequence variables */
                     40:        short   rcv_wnd;                /* receive window */
                     41:        tcp_seq rcv_nxt;                /* receive next */
                     42:        tcp_seq rcv_up;                 /* receive urgent pointer */
                     43:        tcp_seq irs;                    /* initial receive sequence number */
                     44: /*
                     45:  * Additional variables for this implementation.
                     46:  */
                     47: /* receive variables */
                     48:        tcp_seq rcv_adv;                /* advertised window */
                     49: /* retransmit variables */
                     50:        tcp_seq snd_max;                /* highest sequence number sent
                     51:                                           used to recognize retransmits */
                     52: /* transmit timing stuff */
                     53:        short   t_idle;                 /* inactivity time */
                     54:        short   t_rtt;                  /* round trip time */
                     55:        tcp_seq t_rtseq;                /* sequence number being timed */
                     56:        float   t_srtt;                 /* smoothed round-trip time */
                     57: /* out-of-band data */
                     58:        char    t_oobflags;             /* have some */
                     59:        char    t_iobc;                 /* input character */
                     60: #define        TCPOOB_HAVEDATA 0x01
                     61: };
                     62: 
                     63: #define        intotcpcb(ip)   ((struct tcpcb *)(ip)->inp_ppcb)
                     64: #define        sototcpcb(so)   (intotcpcb(sotoinpcb(so)))
                     65: 
                     66: struct tcpstat {
                     67:        int     tcps_badsum;
                     68:        int     tcps_badoff;
                     69:        int     tcps_hdrops;
                     70:        int     tcps_badsegs;
                     71:        int     tcps_unack;
                     72: };
                     73: 
                     74: #ifdef KERNEL
                     75: struct inpcb tcb;              /* head of queue of active tcpcb's */
                     76: struct tcpstat tcpstat;        /* tcp statistics */
                     77: struct tcpiphdr *tcp_template();
                     78: struct tcpcb *tcp_close(), *tcp_drop();
                     79: struct tcpcb *tcp_timers(), *tcp_disconnect(), *tcp_usrclosed();
                     80: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.