PcapPlusPlus
Next
|
Represents a DoIP Alive Check Response message. More...
#include <DoIpLayer.h>
Public Member Functions | |
DoIpAliveCheckResponse (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
Constructs the layer from raw DoIP packet data. More... | |
DoIpAliveCheckResponse (uint16_t sourceAddress) | |
Constructs the message using the specified source address. More... | |
uint16_t | getSourceAddress () const |
Gets the source address. More... | |
void | setSourceAddress (uint16_t address) |
Sets the source address. More... | |
std::string | getSummary () const |
Returns a human-readable summary of the message. | |
DoIpPayloadTypes | getPayloadType () const override |
Returns the DoIP payload type. More... | |
![]() | |
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 bool | isDataLenValid (size_t dataLen) |
Checks if the Alive Check Response data length is valid. More... | |
![]() | |
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 a DoIP Alive Check Response message.
The Alive Check Response is used to confirm that an entity is still active in the network. It contains the source address of the responder.
pcpp::DoIpAliveCheckResponse::DoIpAliveCheckResponse | ( | uint8_t * | data, |
size_t | dataLen, | ||
Layer * | prevLayer, | ||
Packet * | packet | ||
) |
Constructs the layer from raw DoIP packet data.
[in] | data | Pointer to the raw data buffer. |
[in] | dataLen | Size of the data buffer in bytes. |
[in] | prevLayer | Pointer to the previous protocol layer. |
[in] | packet | Pointer to the parent packet. |
|
explicit |
Constructs the message using the specified source address.
[in] | sourceAddress | The source address of the responder. |
|
inlineoverridevirtual |
Returns the DoIP payload type.
Implements pcpp::DoIpLayer.
uint16_t pcpp::DoIpAliveCheckResponse::getSourceAddress | ( | ) | const |
Gets the source address.
|
inlinestatic |
Checks if the Alive Check Response data length is valid.
[in] | dataLen | Length of the data buffer. |
void pcpp::DoIpAliveCheckResponse::setSourceAddress | ( | uint16_t | address | ) |
Sets the source address.
[in] | address | The new source address. |