source: trunk/minix/include/net/gen/tcp_hdr.h@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.0 KB
Line 
1/*
2server/ip/gen/tcp_hdr.h
3*/
4
5#ifndef __SERVER__IP__GEN__TCP_HDR_H__
6#define __SERVER__IP__GEN__TCP_HDR_H__
7
8typedef struct tcp_hdr
9{
10 tcpport_t th_srcport;
11 tcpport_t th_dstport;
12 u32_t th_seq_nr;
13 u32_t th_ack_nr;
14 u8_t th_data_off;
15 u8_t th_flags;
16 u16_t th_window;
17 u16_t th_chksum;
18 u16_t th_urgptr;
19} tcp_hdr_t;
20
21#define TH_DO_MASK 0xf0
22
23#define TH_FLAGS_MASK 0x3f
24#define THF_FIN 0x1
25#define THF_SYN 0x2
26#define THF_RST 0x4
27#define THF_PSH 0x8
28#define THF_ACK 0x10
29#define THF_URG 0x20
30
31typedef struct tcp_hdropt
32{
33 int tho_opt_siz;
34 u8_t tho_data[TCP_MAX_HDR_SIZE-TCP_MIN_HDR_SIZE];
35} tcp_hdropt_t;
36
37#define TCP_OPT_EOL 0
38#define TCP_OPT_NOP 1
39#define TCP_OPT_MSS 2
40#define TCP_OPT_WSOPT 3 /* RFC-1323, window scale option */
41#define TCP_OPT_SACKOK 4 /* RFC-2018, SACK permitted */
42#define TCP_OPT_TS 8 /* RFC-1323, Timestamps option */
43#define TCP_OPT_CCNEW 12 /* RFC-1644, new connection count */
44
45#endif /* __SERVER__IP__GEN__TCP_HDR_H__ */
46
47/*
48 * $PchId: tcp_hdr.h,v 1.4 2002/06/10 07:12:22 philip Exp $
49 */
Note: See TracBrowser for help on using the repository browser.