Please wait until the page is fully downloaded and then press the "Expand" button or the blue line numbers.

0099000 /*
0099001 server/ip/gen/tcp_hdr.h
0099002 */
0099003 
0099004 #ifndef __SERVER__IP__GEN__TCP_HDR_H__
0099005 #define __SERVER__IP__GEN__TCP_HDR_H__
0099006 
0099007 typedef struct tcp_hdr
0099008 {
0099009          tcpport_t th_srcport;
0099010          tcpport_t th_dstport;
0099011          u32_t th_seq_nr;
0099012          u32_t th_ack_nr;
0099013          u8_t th_data_off;
0099014          u8_t th_flags;
0099015          u16_t th_window;
0099016          u16_t th_chksum;
0099017          u16_t th_urgptr;
0099018 } tcp_hdr_t;
0099019 
0099020 #define TH_DO_MASK       0xf0
0099021 
0099022 #define TH_FLAGS_MASK       0x3f
0099023 #define THF_FIN              0x1
0099024 #define THF_SYN              0x2
0099025 #define THF_RST              0x4
0099026 #define THF_PSH              0x8
0099027 #define THF_ACK              0x10
0099028 #define THF_URG              0x20
0099029 
0099030 typedef struct tcp_hdropt
0099031 {
0099032          int tho_opt_siz;
0099033          u8_t tho_data[TCP_MAX_HDR_SIZE-TCP_MIN_HDR_SIZE];
0099034 } tcp_hdropt_t;
0099035 
0099036 #define TCP_OPT_EOL       0
0099037 #define TCP_OPT_NOP       1
0099038 #define TCP_OPT_MSS       2
0099039 
0099040 #endif /* __SERVER__IP__GEN__TCP_HDR_H__ */
0099041 
0099042 /*
0099043  * $PchId: tcp_hdr.h,v 1.3 1995/11/17 22:18:13 philip Exp $
0099044  */