tcp.h File Reference

Go to the source code of this file.

Data Structures

struct  tcphdr
 TCP protocol header structure. More...
struct  _TCPPSEUDOHDR
 TCP pseudo 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. 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.
#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 struct tcphdr TCPHDR
 TCP protocol header type.
typedef struct _TCPPSEUDOHDR TCPPSEUDOHDR
 TCP pseudo header type.


Define Documentation

#define TH_FIN   0x01

Finishing transmission.

Definition at line 122 of file tcp.h.

Referenced by NutDumpTcpHeader(), and NutTcpOutput().

#define TH_SYN   0x02

Synchronizing sequence numbers.

Definition at line 123 of file tcp.h.

Referenced by NutDumpTcpHeader(), NutTcpOutput(), and NutTcpReject().

#define TH_RST   0x04

Reset connection.

Definition at line 124 of file tcp.h.

Referenced by NutDumpTcpHeader(), and NutTcpReject().

#define TH_PUSH   0x08

Push data to application level.

Definition at line 125 of file tcp.h.

Referenced by NutDumpTcpHeader(), and NutTcpOutput().

#define TH_ACK   0x10

Acknowledge field is valid.

Definition at line 126 of file tcp.h.

Referenced by NutDumpTcpHeader(), NutTcpOutput(), and NutTcpReject().

#define TH_URG   0x20

Urgent data present.

Definition at line 127 of file tcp.h.

Referenced by NutDumpTcpHeader().

#define TH_FLAGS   (TH_FIN | TH_SYN | TH_RST | TH_ACK | TH_URG)

TCP flag mask.

Definition at line 130 of file tcp.h.

#define TCPOPT_EOL   0

End of options.

Definition at line 163 of file tcp.h.

#define TCPOPT_NOP   1

Nothing.

Definition at line 164 of file tcp.h.

#define TCPOPT_MAXSEG   2

Maximum segment size.

Definition at line 165 of file tcp.h.

Referenced by NutTcpOutput().

#define TCPOLEN_MAXSEG   4

Maximum segment size length.

Definition at line 166 of file tcp.h.

Referenced by NutTcpOutput().

#define TCPOPT_WINDOW   3

Receive window.

Definition at line 167 of file tcp.h.

#define TCPOLEN_WINDOW   3

Receive window length.

Definition at line 168 of file tcp.h.

#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.

Definition at line 188 of file tcp.h.

Referenced by NutTcpCreateSocket().

#define TCP_WINSIZE   3216

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

Definition at line 196 of file tcp.h.

Referenced by NutTcpCreateSocket().

#define TCP_MAXWIN   65535

Largest value for (unscaled) window.

Definition at line 202 of file tcp.h.

#define TTCP_CLIENT_SND_WND   4096

Default send window for T/TCP client.

Definition at line 203 of file tcp.h.

#define TCP_MAX_WINSHIFT   14

Maximum window shift.

Definition at line 205 of file tcp.h.

#define TCP_MAXHLEN   (0xf<<2)

Maximum length of header in bytes.

Definition at line 207 of file tcp.h.

#define TCP_MAXOLEN   (TCP_MAXHLEN - sizeof(struct tcphdr))

Maximum space left for options.

Definition at line 208 of file tcp.h.

#define TCP_NODELAY   0x01

Don't delay send to coalesce segments.

Definition at line 213 of file tcp.h.

#define TCP_MAXSEG   0x02

Set maximum segment size.

Examples:
ftpd/ftpserv.c, and nutpiper/nutpiper.c.

Definition at line 214 of file tcp.h.

Referenced by FtpService(), NutFtpDataConnect(), NutTcpGetSockOpt(), and NutTcpSetSockOpt().

#define TCP_NOPUSH   0x04

Don't push last block of write.

Definition at line 215 of file tcp.h.

#define TCP_NOOPT   0x08

Don't use TCP options.

Definition at line 216 of file tcp.h.


Typedef Documentation

TCP protocol header type.

TCP pseudo header type.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/