xref: /csrg-svn/sys/netinet/tcp.h (revision 4924)
1 /* tcp.h 1.17 81/11/18 */
2 
3 /*
4  * TCP header.
5  * Per RFC 793, September, 1981.
6  */
7 struct tcphdr {
8 	u_short	th_sport;		/* source port */
9 	u_short	th_dport;		/* destination port */
10 	seq_t	th_seq;			/* sequence number */
11 	seq_t	th_ackno;		/* acknowledgement number */
12 	u_char
13 		th_x2:4,		/* (unused) */
14 		th_off:4;		/* data offset */
15 	u_char	th_flags;
16 #define	TH_FIN	001
17 #define	TH_SYN	002
18 #define	TH_RST	004
19 #define	TH_EOL	010
20 #define	TH_ACK	020
21 #define	TH_URG	040
22 	u_short	th_win;			/* window */
23 	u_short	th_sum;			/* checksum */
24 	u_short	th_urp;			/* urgent pointer */
25 };
26