friendev EtherDune TCP/IP library
Public Attributes | List of all members
TCPHeader Struct Reference

TCP Header data structure. More...

#include <inet.h>

Public Attributes

nint16_t sourcePort
 identifies the sending port More...
 
nint16_t destinationPort
 identifies the receiving port More...
 
nint32_t sequenceNumber
 has a dual role: If the SYN flag is set(1), then this is the initial sequence number.The sequence number of the actual first data byte and the acknowledged number in the corresponding ACK are then this sequence number plus 1. More...
 
nint32_t acknowledgementNumber
 if the ACK flag is set then the value of this field is the next sequence number that the receiver is expecting. More...
 
union {
   struct {
      uint8_t   NS: 1
 ECN-nonce concealment protection (experimental: see RFC 3540). More...
 
      uint8_t   reserved: 3
 Reserved for future use. More...
 
      uint8_t   headerLength: 4
 
      TCPFlags   flags
 TCP Flags. More...
 
   } 
 
   uint16_t   allFlags
 byte-wise access to all flags. More...
 
}; 
 
nint16_t windowSize
 The size of the receive window, which specifies the number of window size units (by default, bytes) (beyond the sequence number in the acknowledgment field) that the sender of this segment is currently willing to receive. More...
 
nint16_t checksum
 The 16-bit checksum field is used for error-checking of the header and data. More...
 
nint16_t urgentPointer
 if the URG flag is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte More...
 

Detailed Description

TCP Header data structure.

Definition at line 353 of file inet.h.

Member Data Documentation

union { ... }
nint32_t TCPHeader::acknowledgementNumber

if the ACK flag is set then the value of this field is the next sequence number that the receiver is expecting.

This acknowledges receipt of all prior bytes (if any). The first ACK sent by each end acknowledges the other end's initial sequence number itself, but no data.

Definition at line 358 of file inet.h.

uint16_t TCPHeader::allFlags

byte-wise access to all flags.

Definition at line 369 of file inet.h.

nint16_t TCPHeader::checksum

The 16-bit checksum field is used for error-checking of the header and data.

Definition at line 373 of file inet.h.

nint16_t TCPHeader::destinationPort

identifies the receiving port

Definition at line 356 of file inet.h.

TCPFlags TCPHeader::flags

TCP Flags.

see TCPFlags struct for more information

Definition at line 367 of file inet.h.

uint8_t TCPHeader::headerLength

Definition at line 366 of file inet.h.

uint8_t TCPHeader::NS

ECN-nonce concealment protection (experimental: see RFC 3540).

Definition at line 364 of file inet.h.

uint8_t TCPHeader::reserved

Reserved for future use.

Definition at line 365 of file inet.h.

nint32_t TCPHeader::sequenceNumber

has a dual role: If the SYN flag is set(1), then this is the initial sequence number.The sequence number of the actual first data byte and the acknowledged number in the corresponding ACK are then this sequence number plus 1.

If the SYN flag is clear(0), then this is the accumulated sequence number of the first data byte of this segment for the current session.

Definition at line 357 of file inet.h.

nint16_t TCPHeader::sourcePort

identifies the sending port

Definition at line 355 of file inet.h.

nint16_t TCPHeader::urgentPointer

if the URG flag is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte

Definition at line 374 of file inet.h.

nint16_t TCPHeader::windowSize

The size of the receive window, which specifies the number of window size units (by default, bytes) (beyond the sequence number in the acknowledgment field) that the sender of this segment is currently willing to receive.

Definition at line 372 of file inet.h.


The documentation for this struct was generated from the following file: