* Copyright (c) 1982, 1986 Regents of the University of California.
* %sccs.include.redist.c%
* @(#)tcp.h 7.7 (Berkeley) %G%
* Definitions for byte order,
* according to byte significance from low address to high.
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax) */
#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */
#define BYTE_ORDER LITTLE_ENDIAN
#define BYTE_ORDER BIG_ENDIAN /* mc68000, tahoe, most others */
* Per RFC 793, September, 1981.
u_short th_sport
; /* source port */
u_short th_dport
; /* destination port */
tcp_seq th_seq
; /* sequence number */
tcp_seq th_ack
; /* acknowledgement number */
#if BYTE_ORDER == LITTLE_ENDIAN
u_char th_x2
:4, /* (unused) */
th_off
:4; /* data offset */
#if BYTE_ORDER == BIG_ENDIAN
u_char th_off
:4, /* data offset */
u_short th_win
; /* window */
u_short th_sum
; /* checksum */
u_short th_urp
; /* urgent pointer */
* Default maximum segment size for TCP.
* With an IP MSS of 576, this is 536,
* but 512 is probably more convenient.
* This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
#define TCP_MAXWIN 65535 /* largest value for window */
* User-settable options (used with setsockopt).
#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
#define TCP_MAXSEG 0x02 /* set maximum segment size */