1 /* tcp.h 1.18 81/11/24 */ 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 0x01 17 #define TH_SYN 0x02 18 #define TH_RST 0x04 19 #define TH_PUSH 0x08 20 #define TH_ACK 0x10 21 #define TH_URG 0x20 22 u_short th_win; /* window */ 23 u_short th_sum; /* checksum */ 24 u_short th_urp; /* urgent pointer */ 25 }; 26