Annotation of 43BSD/sys/netinet/tcp.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1982, 1986 Regents of the University of California.
                      3:  * All rights reserved.  The Berkeley software License Agreement
                      4:  * specifies the terms and conditions for redistribution.
                      5:  *
                      6:  *     @(#)tcp.h       7.1 (Berkeley) 6/5/86
                      7:  */
                      8: 
                      9: typedef        u_long  tcp_seq;
                     10: /*
                     11:  * TCP header.
                     12:  * Per RFC 793, September, 1981.
                     13:  */
                     14: struct tcphdr {
                     15:        u_short th_sport;               /* source port */
                     16:        u_short th_dport;               /* destination port */
                     17:        tcp_seq th_seq;                 /* sequence number */
                     18:        tcp_seq th_ack;                 /* acknowledgement number */
                     19: #ifdef vax
                     20:        u_char  th_x2:4,                /* (unused) */
                     21:                th_off:4;               /* data offset */
                     22: #endif
                     23:        u_char  th_flags;
                     24: #define        TH_FIN  0x01
                     25: #define        TH_SYN  0x02
                     26: #define        TH_RST  0x04
                     27: #define        TH_PUSH 0x08
                     28: #define        TH_ACK  0x10
                     29: #define        TH_URG  0x20
                     30:        u_short th_win;                 /* window */
                     31:        u_short th_sum;                 /* checksum */
                     32:        u_short th_urp;                 /* urgent pointer */
                     33: };
                     34: 
                     35: #define        TCPOPT_EOL      0
                     36: #define        TCPOPT_NOP      1
                     37: #define        TCPOPT_MAXSEG   2
                     38: 
                     39: /*
                     40:  * Default maximum segment size for TCP.
                     41:  * With an IP MSS of 576, this is 536,
                     42:  * but 512 is probably more convenient.
                     43:  */
                     44: #ifdef lint
                     45: #define        TCP_MSS 536
                     46: #else
                     47: #define        TCP_MSS MIN(512, IP_MSS - sizeof (struct tcpiphdr))
                     48: #endif
                     49: 
                     50: /*
                     51:  * User-settable options (used with setsockopt).
                     52:  */
                     53: #define        TCP_NODELAY     0x01    /* don't delay send to coalesce packets */
                     54: #define        TCP_MAXSEG      0x02    /* set maximum segment size */

unix.superglobalmegacorp.com

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