1*5085Swnj /* tcp.h 1.19 81/11/26 */ 24573Swnj 3*5085Swnj typedef u_long tcp_seq; 44573Swnj /* 54899Swnj * TCP header. 64924Swnj * Per RFC 793, September, 1981. 74573Swnj */ 84899Swnj struct tcphdr { 94899Swnj u_short th_sport; /* source port */ 104899Swnj u_short th_dport; /* destination port */ 11*5085Swnj tcp_seq th_seq; /* sequence number */ 12*5085Swnj tcp_seq th_ack; /* acknowledgement number */ 134573Swnj u_char 144899Swnj th_x2:4, /* (unused) */ 154899Swnj th_off:4; /* data offset */ 164575Swnj u_char th_flags; 175065Swnj #define TH_FIN 0x01 185065Swnj #define TH_SYN 0x02 195065Swnj #define TH_RST 0x04 205065Swnj #define TH_PUSH 0x08 215065Swnj #define TH_ACK 0x10 225065Swnj #define TH_URG 0x20 234899Swnj u_short th_win; /* window */ 244899Swnj u_short th_sum; /* checksum */ 254899Swnj u_short th_urp; /* urgent pointer */ 264499Swnj }; 27