4 #include <unordered_set>
112 SomeIpLayer(uint16_t serviceID, uint16_t methodID, uint16_t clientID, uint16_t sessionID,
113 uint8_t interfaceVersion,
MsgType type, uint8_t returnCode,
const uint8_t*
const data =
nullptr,
317 return m_Data + getSomeIpHeaderLen();
366 static const uint8_t SOMEIP_PROTOCOL_VERSION = 1;
367 virtual size_t getSomeIpHeaderLen()
const
369 return sizeof(someiphdr);
373 static std::unordered_set<uint16_t> m_SomeIpPorts;
387 #pragma pack(push, 1)
421 SomeIpTpLayer(uint16_t serviceID, uint16_t methodID, uint16_t clientID, uint16_t sessionID,
422 uint8_t interfaceVersion,
MsgType type, uint8_t returnCode, uint32_t offset,
423 bool moreSegmentsFlag,
const uint8_t*
const data =
nullptr,
size_t dataLen = 0);
477 static const uint32_t SOMEIP_TP_MORE_FLAG_MASK = 0x01;
478 static const uint32_t SOMEIP_TP_OFFSET_MASK = 0xFFFFFFF0;
480 size_t getSomeIpHeaderLen()
const
485 static uint8_t setTpFlag(uint8_t messageType);
Definition: SomeIpLayer.h:20
void setRequestID(uint32_t requestID)
size_t getPduPayloadSize() const
Definition: SomeIpLayer.h:323
OsiModelLayer getOsiModelLayer() const
Definition: SomeIpLayer.h:356
void setClientID(uint16_t clientID)
void setMessageType(MsgType type)
void setProtocolVersion(uint8_t version)
uint8_t getReturnCode() const
static void removeSomeIpPort(uint16_t port)
virtual void computeCalculateFields()
Definition: SomeIpLayer.h:340
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)
void setMessageID(uint32_t messageID)
virtual std::string toString() const
uint16_t getMethodID() const
void setServiceID(uint16_t serviceID)
static bool isSomeIpPort(uint16_t port)
void setMethodID(uint16_t methodID)
someiphdr * getSomeIpHeader() const
Definition: SomeIpLayer.h:138
void setReturnCode(uint8_t returnCode)
SomeIpLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SomeIpLayer.h:94
MsgType
Definition: SomeIpLayer.h:26
uint32_t getLengthField() const
uint32_t getMessageID() const
uint8_t getInterfaceVersion() const
uint16_t getServiceID() const
uint32_t getRequestID() const
uint8_t getMessageTypeAsInt() const
void setMessageType(uint8_t type)
~SomeIpLayer()
Definition: SomeIpLayer.h:119
uint8_t getProtocolVersion() const
SomeIpLayer::MsgType getMessageType() const
uint8_t * getPduPayload() const
Definition: SomeIpLayer.h:315
static void addSomeIpPort(uint16_t port)
void setSessionID(uint16_t sessionID)
void setInterfaceVersion(uint8_t version)
void setPayloadLength(uint32_t payloadLength)
uint16_t getClientID() const
uint16_t getSessionID() const
static void removeAllSomeIpPorts()
size_t getHeaderLen() const
Definition: SomeIpLayer.h:332
static Layer * parseSomeIpLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SomeIpLayer.h:381
std::string toString() const
bool getMoreSegmentsFlag() const
SomeIpTpLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SomeIpLayer.h:403
void computeCalculateFields()
someiptphdr * getSomeIpTpHeader() const
Definition: SomeIpLayer.h:436
void setMoreSegmentsFlag(bool flag)
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)
uint32_t getOffset() const
~SomeIpTpLayer()
Definition: SomeIpLayer.h:428
void setOffset(uint32_t offset)
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:354
@ OsiModelApplicationLayer
Definition: ProtocolType.h:368
const ProtocolType SomeIP
Definition: ProtocolType.h:293
Definition: SomeIpLayer.h:65
uint8_t returnCode
Definition: SomeIpLayer.h:83
uint8_t protocolVersion
Definition: SomeIpLayer.h:77
uint32_t length
Definition: SomeIpLayer.h:71
uint16_t sessionID
Definition: SomeIpLayer.h:75
uint16_t clientID
Definition: SomeIpLayer.h:73
uint8_t msgType
Definition: SomeIpLayer.h:81
uint16_t serviceID
Definition: SomeIpLayer.h:67
uint16_t methodID
Definition: SomeIpLayer.h:69
uint8_t interfaceVersion
Definition: SomeIpLayer.h:79
Definition: SomeIpLayer.h:389
uint32_t offsetAndFlag
Definition: SomeIpLayer.h:392