PcapPlusPlus
Next
|
#include <DoIpLayer.h>
Public Member Functions | |
virtual DoIpPayloadTypes | getPayloadType () const =0 |
std::string | getPayloadTypeAsStr () const |
DoIpProtocolVersion | getProtocolVersion () const |
std::string | getProtocolVersionAsStr () const |
void | setProtocolVersion (DoIpProtocolVersion version) |
void | setProtocolVersion (uint8_t rawVersion) |
uint8_t | getInvertProtocolVersion () const |
void | setInvertProtocolVersion (uint8_t iVersion) |
uint32_t | getPayloadLength () const |
void | setPayloadLength (uint32_t length) |
void | parseNextLayer () override |
parse UDS layer | |
size_t | getHeaderLen () const override |
std::string | toString () const override |
void | computeCalculateFields () override |
Each layer can compute field values automatically using this method. This is an abstract method. | |
OsiModelLayer | getOsiModelLayer () const override |
![]() | |
~Layer () override | |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const |
uint8_t * | getData () const |
size_t | getDataLen () const |
uint8_t * | getLayerPayload () const |
size_t | getLayerPayloadSize () const |
bool | isAllocatedToPacket () const |
void | copyData (uint8_t *toArr) const |
uint8_t * | getDataPtr (size_t offset=0) const override |
Static Public Member Functions | |
static DoIpLayer * | parseDoIpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
static bool | isDoIpPort (uint16_t port) |
static bool | isDataValid (uint8_t *data, size_t dataLen) |
Additional Inherited Members | |
![]() | |
template<typename T , typename... Args> | |
Layer * | constructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
template<typename T , typename TFallback , typename... Args> | |
Layer * | tryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
![]() | |
template<typename T > | |
static bool | canReinterpretAs (const uint8_t *data, size_t dataLen) |
Check if the data is large enough to reinterpret as a type. More... | |
Represents an DoIP protocol layer. Currently only IPv4 DoIP messages are supported
|
inlineoverridevirtual |
Implements pcpp::Layer.
Reimplemented in pcpp::DoIpDiagnosticMessage.
uint8_t pcpp::DoIpLayer::getInvertProtocolVersion | ( | ) | const |
Get the invert version of DOIP protocol
|
inlineoverridevirtual |
Implements pcpp::Layer.
uint32_t pcpp::DoIpLayer::getPayloadLength | ( | ) | const |
Get the doip payload length
|
pure virtual |
Get the doip payload type
Implemented in pcpp::DoIpDiagnosticMessageNack, pcpp::DoIpDiagnosticMessageAck, pcpp::DoIpDiagnosticMessage, pcpp::DoIpDiagnosticPowerModeResponse, pcpp::DoIpDiagnosticPowerModeRequest, pcpp::DoIpEntityStatusResponse, pcpp::DoIpEntityStatusRequest, pcpp::DoIpAliveCheckResponse, pcpp::DoIpAliveCheckRequest, pcpp::DoIpRoutingActivationResponse, pcpp::DoIpRoutingActivationRequest, pcpp::DoIpVehicleAnnouncementMessage, pcpp::DoIpVehicleIdentificationRequestWithVIN, pcpp::DoIpVehicleIdentificationRequestWithEID, pcpp::DoIpVehicleIdentificationRequest, and pcpp::DoIpGenericHeaderNack.
std::string pcpp::DoIpLayer::getPayloadTypeAsStr | ( | ) | const |
Get the doip payload type as string
DoIpProtocolVersion pcpp::DoIpLayer::getProtocolVersion | ( | ) | const |
Get the version of DOIP protocol
std::string pcpp::DoIpLayer::getProtocolVersionAsStr | ( | ) | const |
Get the version of DOIP protocol
|
static |
A static method that validates the input data
[in] | data | The pointer to the beginning of a byte stream of an DOIP layer |
[in] | dataLen | The length of the byte stream |
|
inlinestatic |
A static method that checks whether a port is considered as a DOIP port
[in] | port | The port number to check |
|
static |
A method that creates a DoIP layer from packet raw data
[in] | data | A pointer to the raw data |
[in] | dataLen | Size of the data in bytes |
[in] | prevLayer | A pointer to the previous layer |
[in] | packet | A pointer to the Packet instance where layer will be stored |
void pcpp::DoIpLayer::setInvertProtocolVersion | ( | uint8_t | iVersion | ) |
Set the invert protocol version of DOIP protocol
[in] | iVersion | the invert version of DOIP protocol to set |
void pcpp::DoIpLayer::setPayloadLength | ( | uint32_t | length | ) |
Set the doip payload length
[in] | length | the doip payload length to set |
void pcpp::DoIpLayer::setProtocolVersion | ( | DoIpProtocolVersion | version | ) |
Set the version of DOIP protocol
[in] | version | the version of DOIP protocol to set, restricted to existent doip version |
void pcpp::DoIpLayer::setProtocolVersion | ( | uint8_t | rawVersion | ) |
Additional setter for raw protocol version (for testing/fuzzing/debugging)
[in] | rawVersion | the raw version of DOIP protocol to set |
|
overridevirtual |
Implements pcpp::Layer.