1 /* tcp.h 1.19 81/11/26 */ 2 3 typedef u_long tcp_seq; 4 /* 5 * TCP header. 6 * Per RFC 793, September, 1981. 7 */ 8 struct tcphdr { 9 u_short th_sport; /* source port */ 10 u_short th_dport; /* destination port */ 11 tcp_seq th_seq; /* sequence number */ 12 tcp_seq th_ack; /* acknowledgement number */ 13 u_char 14 th_x2:4, /* (unused) */ 15 th_off:4; /* data offset */ 16 u_char th_flags; 17 #define TH_FIN 0x01 18 #define TH_SYN 0x02 19 #define TH_RST 0x04 20 #define TH_PUSH 0x08 21 #define TH_ACK 0x10 22 #define TH_URG 0x20 23 u_short th_win; /* window */ 24 u_short th_sum; /* checksum */ 25 u_short th_urp; /* urgent pointer */ 26 }; 27