Class UDPPacket
Defined in File PacketUtils.h
Inheritance Relationships
Base Type
public ska::pst::recv::PacketBuffer
(Class PacketBuffer)
Class Documentation
-
class UDPPacket : public ska::pst::recv::PacketBuffer
UDP Packet Interface to raw data stored in memory.
Public Functions
-
UDPPacket(char *ptr, size_t size)
Construct a new UDPPacket object from an existing address and size.
- Parameters
ptr – memory address of the packet
size – length of the packet
-
inline uint16_t source_port() const
Return the source UDP port in the packet header.
- Returns
uint16_t source UDP port
-
inline uint16_t destination_port() const
Return the destination UDP port in the packet header.
- Returns
uint16_t destination UDP port
-
inline uint16_t length() const
Return the length in the packet header.
- Returns
uint16_t packet length
-
inline uint16_t checksum() const
Return the UDP checksum of the packet header.
- Returns
uint16_t UDP checksum
-
PacketBuffer payload() const
Return the UDP packet payload as a PacketBuffer.
- Returns
PacketBuffer UDP packet payload
-
UDPPacket(char *ptr, size_t size)