EtherRaw
|
Support for TCP Packet Headers. More...
#include <EtherRaw.h>
Public Types | |
enum | TCPCode { URG = 0x20, ACK = 0x10, PSH = 0x08, RST = 0x04, SYN = 0x02, FIN = 0x01 } |
Masks for code bits returned by code() |
Public Member Functions | |
uint16_t | sourcePort () const |
uint16_t | destPort () const |
uint32_t | sequence () const |
uint32_t | acknowledgement () const |
uint8_t | headerlen () const |
uint8_t | code () const |
uint16_t | window () const |
uint16_t | checksum () const |
uint16_t | urgent () const |
uint8_t * | payload () |
size_t | printTo (Print &p) const |
Support for TCP Packet Headers.
This class allows easy access to the contents of a TCP Packet in on-the-wire format.
uint32_t PacketTCP::acknowledgement | ( | ) | const |
Access the TCP acknowledgement number
Referenced by printTo().
uint16_t PacketTCP::checksum | ( | ) | const |
uint8_t PacketTCP::code | ( | ) | const |
Access the packet code bits
uint16_t PacketTCP::destPort | ( | ) | const |
Access the destination port number
Referenced by printTo().
uint8_t PacketTCP::headerlen | ( | ) | const |
uint8_t * PacketTCP::payload | ( | ) |
size_t PacketTCP::printTo | ( | Print & | p | ) | const |
Print. Prints an ASCII formatted version of the header to a Printable such as Serial.
References acknowledgement(), checksum(), destPort(), sequence(), sourcePort(), urgent(), and window().
uint32_t PacketTCP::sequence | ( | ) | const |
Access the TCP sequence number
Referenced by printTo().
uint16_t PacketTCP::sourcePort | ( | ) | const |
Access the source port number
Referenced by printTo().
uint16_t PacketTCP::urgent | ( | ) | const |
Access the TCP urgent pointer
Referenced by printTo().
uint16_t PacketTCP::window | ( | ) | const |