|
PcapPlusPlus
|
#include <UdpLayer.h>
Public Member Functions | |
| UdpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
| UdpLayer (uint16_t portSrc, uint16_t portDst) | |
| udphdr * | getUdpHeader () |
| uint16_t | calculateChecksum (bool writeResultToPacket) |
| void | parseNextLayer () |
| size_t | getHeaderLen () |
| void | computeCalculateFields () |
| std::string | toString () |
| OsiModelLayer | getOsiModelLayer () |
Public Member Functions inherited from pcpp::Layer | |
| virtual | ~Layer () |
| Layer * | getNextLayer () |
| Layer * | getPrevLayer () |
| ProtocolType | getProtocol () |
| uint8_t * | getData () |
| size_t | getDataLen () |
| uint8_t * | getLayerPayload () |
| size_t | getLayerPayloadSize () |
| bool | isAllocatedToPacket () |
| void | copyData (uint8_t *toArr) |
| uint8_t * | getDataPtr (size_t offset=0) |
Represents an UDP (User Datagram Protocol) protocol layer
| pcpp::UdpLayer::UdpLayer | ( | uint16_t | portSrc, |
| uint16_t | portDst | ||
| ) |
A constructor that allocates a new UDP header with source and destination ports
| [in] | portSrc | Source UDP port address |
| [in] | portDst | Destination UDP port |
| uint16_t pcpp::UdpLayer::calculateChecksum | ( | bool | writeResultToPacket | ) |
Calculate the checksum from header and data and possibly write the result to udphdr::headerChecksum
| [in] | writeResultToPacket | If set to true then checksum result will be written to udphdr::headerChecksum |
|
virtual |
Calculate udphdr::headerChecksum field
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inline |
Get a pointer to the UDP header. Notice this points directly to the data, so every change will change the actual packet data
|
virtual |
Currently identifies the following next layers: DnsLayer, DhcpLayer, VxlanLayer, SipRequestLayer, SipResponseLayer, RadiusLayer. Otherwise sets PayloadLayer
Implements pcpp::Layer.
|
virtual |
Implements pcpp::Layer.