EtherRaw
|
Support for UDP Packet Headers. More...
#include <EtherRaw.h>
Public Member Functions | |
uint16_t | sourcePort () const |
uint16_t | destPort () const |
uint16_t | length () const |
uint16_t | checksum () const |
uint8_t * | payload () |
uint16_t | payload_length () |
size_t | printTo (Print &p) const |
Support for UDP Packet Headers.
This class allows easy access to the contents of a UDP Packet in on-the-wire format.
uint16_t PacketUDP::checksum | ( | ) | const |
uint16_t PacketUDP::destPort | ( | ) | const |
Access the destination port number
Referenced by printTo().
uint16_t PacketUDP::length | ( | ) | const |
Access the packet length.
Referenced by payload_length(), and printTo().
uint8_t * PacketUDP::payload | ( | ) |
Access the packet payload
uint16_t PacketUDP::payload_length | ( | ) |
size_t PacketUDP::printTo | ( | Print & | p | ) | const |
Print. Prints an ASCII formatted version of the header to a Printable such as Serial.
References checksum(), destPort(), length(), and sourcePort().
uint16_t PacketUDP::sourcePort | ( | ) | const |
Access the source port number
Referenced by printTo().