PcapPlusPlus
24.09
|
#include <SomeIpLayer.h>
Classes | |
struct | someiptphdr |
Public Member Functions | |
SomeIpTpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
SomeIpTpLayer (uint16_t serviceID, uint16_t methodID, uint16_t clientID, uint16_t sessionID, uint8_t interfaceVersion, MsgType type, uint8_t returnCode, uint32_t offset, bool moreSegmentsFlag, const uint8_t *const data=nullptr, size_t dataLen=0) | |
~SomeIpTpLayer () | |
someiptphdr * | getSomeIpTpHeader () const |
uint32_t | getOffset () const |
void | setOffset (uint32_t offset) |
bool | getMoreSegmentsFlag () const |
void | setMoreSegmentsFlag (bool flag) |
void | computeCalculateFields () |
std::string | toString () const |
Public Member Functions inherited from pcpp::SomeIpLayer | |
SomeIpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
SomeIpLayer (uint16_t serviceID, uint16_t methodID, uint16_t clientID, uint16_t sessionID, uint8_t interfaceVersion, MsgType type, uint8_t returnCode, const uint8_t *const data=nullptr, size_t dataLen=0) | |
~SomeIpLayer () | |
someiphdr * | getSomeIpHeader () const |
uint32_t | getMessageID () const |
void | setMessageID (uint32_t messageID) |
uint16_t | getServiceID () const |
void | setServiceID (uint16_t serviceID) |
uint16_t | getMethodID () const |
void | setMethodID (uint16_t methodID) |
uint32_t | getLengthField () const |
uint32_t | getRequestID () const |
void | setRequestID (uint32_t requestID) |
uint16_t | getSessionID () const |
void | setSessionID (uint16_t sessionID) |
uint16_t | getClientID () const |
void | setClientID (uint16_t clientID) |
uint8_t | getProtocolVersion () const |
void | setProtocolVersion (uint8_t version) |
uint8_t | getInterfaceVersion () const |
void | setInterfaceVersion (uint8_t version) |
uint8_t | getMessageTypeAsInt () const |
SomeIpLayer::MsgType | getMessageType () const |
void | setMessageType (MsgType type) |
void | setMessageType (uint8_t type) |
uint8_t | getReturnCode () const |
void | setReturnCode (uint8_t returnCode) |
void | setPayloadLength (uint32_t payloadLength) |
uint8_t * | getPduPayload () const |
size_t | getPduPayloadSize () const |
size_t | getHeaderLen () const |
void | parseNextLayer () |
OsiModelLayer | getOsiModelLayer () const |
Public Member Functions inherited from pcpp::Layer | |
virtual | ~Layer () |
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 |
Additional Inherited Members | |
Public Types inherited from pcpp::SomeIpLayer | |
enum class | MsgType : uint8_t { REQUEST = 0x00 , REQUEST_ACK = 0x40 , REQUEST_NO_RETURN = 0x01 , REQUEST_NO_RETURN_ACK = 0x41 , NOTIFICATION = 0x02 , NOTIFICATION_ACK = 0x42 , RESPONSE = 0x80 , RESPONSE_ACK = 0xC0 , ERRORS = 0x81 , ERROR_ACK = 0xC1 , TP_REQUEST = 0x20 , TP_REQUEST_NO_RETURN = 0x21 , TP_NOTIFICATION = 0x22 , TP_RESPONSE = 0xa0 , TP_ERROR = 0xa1 } |
Static Public Member Functions inherited from pcpp::SomeIpLayer | |
static Layer * | parseSomeIpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
static bool | isSomeIpPort (uint16_t port) |
static void | addSomeIpPort (uint16_t port) |
static void | removeSomeIpPort (uint16_t port) |
static void | removeAllSomeIpPorts () |
Represents an SOME/IP Transport Protocol Layer
|
inline |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data (will be casted to someiptphdr) |
[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 in |
pcpp::SomeIpTpLayer::SomeIpTpLayer | ( | uint16_t | serviceID, |
uint16_t | methodID, | ||
uint16_t | clientID, | ||
uint16_t | sessionID, | ||
uint8_t | interfaceVersion, | ||
MsgType | type, | ||
uint8_t | returnCode, | ||
uint32_t | offset, | ||
bool | moreSegmentsFlag, | ||
const uint8_t *const | data = nullptr , |
||
size_t | dataLen = 0 |
||
) |
A constructor that creates empty layer and sets values
[in] | serviceID | Service ID |
[in] | methodID | Method ID |
[in] | clientID | Client ID |
[in] | sessionID | Session ID |
[in] | interfaceVersion | Interface Version |
[in] | type | Type of the message |
[in] | returnCode | Return Code |
[in] | offset | Offset indicating the data offset in increments of 16 bytes |
[in] | moreSegmentsFlag | Flag indicating whether more SOME/IP-TP Packets will follow |
[in] | data | A pointer to the raw data |
[in] | dataLen | Size of the data in bytes |
|
inline |
Destroy the layer object
|
virtual |
Sets the message type in this layer with enabling the TP flag
Reimplemented from pcpp::SomeIpLayer.
bool pcpp::SomeIpTpLayer::getMoreSegmentsFlag | ( | ) | const |
Get the More Segments Flag
uint32_t pcpp::SomeIpTpLayer::getOffset | ( | ) | const |
Get the Offset. Offset is returned in multiple of 16 bytes.
|
inline |
Get a pointer to the basic SOME/IP-TP header. Notice this points directly to the data, so every change will change the actual packet data
void pcpp::SomeIpTpLayer::setMoreSegmentsFlag | ( | bool | flag | ) |
Set the More Segments Flag
[in] | flag | True if the More Segments Flag shall be set, false for resetting |
void pcpp::SomeIpTpLayer::setOffset | ( | uint32_t | offset | ) |
Set the Offset. Already has to be in multiples of 16 bytes. If 32 bytes have already been transmitted, the offset has to be set to 2.
[in] | offset | Offset to set. Already has to be in multiples of 16 bytes. |
|
virtual |
Reimplemented from pcpp::SomeIpLayer.