Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

tcp.h File Reference

TCP protocol definitions. More...

#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  _TCPPSEUDOHDR
 TCP pseudo header structure. More...

struct  tcphdr
 TCP protocol header structure. More...


Defines

#define TH_FIN   0x01
 Finishing transmission.

#define TH_SYN   0x02
 Synchronizing sequence numbers.

#define TH_RST   0x04
 Reset connection.

#define TH_PUSH   0x08
 Push data to application level.

#define TH_ACK   0x10
 Acknowledge field is valid.

#define TH_URG   0x20
 Urgent data present.

#define TH_FLAGS   (TH_FIN | TH_SYN | TH_RST | TH_ACK | TH_URG)
 TCP flag mask.

#define TCPOPT_EOL   0
 End of options.

#define TCPOPT_NOP   1
 Nothing.

#define TCPOPT_MAXSEG   2
 Maximum segment size.

#define TCPOLEN_MAXSEG   4
 Maximum segment size length.

#define TCPOPT_WINDOW   3
 Receive window.

#define TCPOLEN_WINDOW   3
 Receive window length.

#define TCP_MSS   536
 Default maximum segment size.

#define TCP_WINSIZE   3216
 Default window size.

#define TCP_MAXWIN   65535
 Largest value for (unscaled) window.

#define TTCP_CLIENT_SND_WND   4096
 Default send window for T/TCP client.

#define TCP_MAX_WINSHIFT   14
 Maximum window shift.

#define TCP_MAXHLEN   (0xf<<2)
 Maximum length of header in bytes.

#define TCP_MAXOLEN   (TCP_MAXHLEN - sizeof(struct tcphdr))
 Maximum space left for options.

#define TCP_NODELAY   0x01
 Don't delay send to coalesce segments.

#define TCP_MAXSEG   0x02
 Set maximum segment size.

#define TCP_NOPUSH   0x04
 Don't push last block of write.

#define TCP_NOOPT   0x08
 Don't use TCP options.


Typedefs

typedef tcphdr TCPHDR
 TCP protocol header type.

typedef _TCPPSEUDOHDR TCPPSEUDOHDR
 TCP pseudo header type.


Detailed Description

TCP protocol definitions.


Define Documentation

#define TCP_MSS   536
 

Default maximum segment size.

The maximum size of an IP datagram, that will not become fragmented, is 576. The maximum IP datagram for Ethernet is 1500. Reduce this number by 40, 20 bytes TCP header and 20 bytes IP header.

#define TCP_WINSIZE   3216
 

Default window size.

It's recommended to set this 6 times the maximum segment size.


Generated on Thu Jan 30 22:30:55 2003 for EduNet by doxygen1.2.18