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 */

Defined struct's

Defined macros

TCPOPT_MAXSEG defined in line 37; used 1 times
TCPOPT_NOP defined in line 36; used 1 times
TCP_MAXSEG defined in line 54; never used
TCP_NODELAY defined in line 53; never used
TH_ACK defined in line 28; used 9 times
TH_FIN defined in line 24; used 14 times
TH_RST defined in line 26; used 8 times
TH_SYN defined in line 25; used 9 times

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1405
Valid CSS Valid XHTML 1.0 Strict