TCP_HEADER Structure

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
TCP_HEADER Structure
C
typedef struct {
  WORD SourcePort;
  WORD DestPort;
  DWORD SeqNumber;
  DWORD AckNumber;
  struct {
    unsigned char Reserved3 : 4;
    unsigned char Val : 4;
  } DataOffset;
  union {
    struct {
      unsigned char flagFIN : 1;
      unsigned char flagSYN : 1;
      unsigned char flagRST : 1;
      unsigned char flagPSH : 1;
      unsigned char flagACK : 1;
      unsigned char flagURG : 1;
      unsigned char Reserved2 : 2;
    } bits;
    BYTE byte;
  } Flags;
  WORD Window;
  WORD Checksum;
  WORD UrgentPointer;
} TCP_HEADER;
Description

TCP Header Data Structure

Members
Members 
Description 
WORD SourcePort; 
Local port number 
WORD DestPort; 
Remote port number 
DWORD SeqNumber; 
Local sequence number 
DWORD AckNumber; 
Acknowledging remote sequence number 
struct {
unsigned char Reserved3 : 4;
unsigned char Val : 4;
} DataOffset; 
Data offset flags nibble 
union {
struct {
unsigned char flagFIN : 1;
unsigned char flagSYN : 1;
unsigned char flagRST : 1;
unsigned char flagPSH : 1;
unsigned char flagACK : 1;
unsigned char flagURG : 1;
unsigned char Reserved2 : 2;
} bits;
BYTE byte;
} Flags; 
TCP Flags as defined in RFC 
WORD Window; 
Local free RX buffer window 
WORD Checksum; 
Data payload checksum 
WORD UrgentPointer; 
Urgent pointer 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.