1 #ifndef PACKETPP_SOMEIPSD_LAYER 2 #define PACKETPP_SOMEIPSD_LAYER 4 #include "EndianPortable.h" 118 uint8_t *m_ShadowData;
121 SomeIpSdOption() : m_DataContainer(
nullptr), m_Offset(0), m_ShadowData(
nullptr), m_DataLen(0) {}
124 : m_DataContainer(dataContainer), m_Offset(offset), m_ShadowData(
nullptr), m_DataLen(0) {}
180 uint16_t getPort()
const;
193 #pragma pack(push, 1) 197 uint32_t ipv4Address;
257 uint16_t getPort()
const;
270 #pragma pack(push, 1) 274 uint8_t ipv6Address[16];
312 std::string getConfigurationString()
const;
342 uint16_t getPriority()
const;
348 uint16_t getWeight()
const;
355 #pragma pack(push, 1) 389 StopSubscribeEventgroup,
391 SubscribeEventgroupAck,
393 SubscribeEventgroupNack,
402 #pragma pack(push, 1) 411 #if (BYTE_ORDER == LITTLE_ENDIAN) 444 SomeIpSdEntry(
EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL,
445 uint32_t minorVersion);
457 SomeIpSdEntry(
EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL,
458 uint8_t counter, uint16_t eventGroupID);
500 uint32_t getNumOptions()
const;
506 uint16_t getServiceId()
const;
512 void setServiceId(uint16_t serviceId);
518 uint16_t getInstanceId()
const;
524 void setInstanceId(uint16_t instanceId);
530 uint8_t getMajorVersion()
const;
536 void setMajorVersion(uint8_t majorVersion);
542 uint32_t getTtl()
const;
548 void setTtl(uint32_t ttl);
554 uint32_t getMinorVersion()
const;
560 void setMinorVersion(uint32_t minorVersion);
566 uint8_t getCounter()
const;
572 void setCounter(uint8_t counter);
578 uint16_t getEventgroupId()
const;
584 void setEventgroupId(uint16_t eventgroupID);
591 enum class TypeInternal : uint8_t
594 FindService_Internal = 0x00,
596 OfferService_Internal = 0x01,
598 SubscribeEventgroup_Internal = 0x06,
600 SubscribeEventgroupAck_Internal = 0x07,
606 uint8_t *m_ShadowData;
608 void initStdFields(
EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL);
613 static const uint32_t SOMEIPSD_HDR_ENTRY_MASK_TTL = 0x00FFFFFF;
626 typedef std::vector<EntryPtr> EntriesVec;
628 typedef std::vector<OptionPtr> OptionsVec;
650 SomeIpSdLayer(uint16_t serviceID, uint16_t methodID, uint16_t clientID, uint16_t sessionID,
651 uint8_t interfaceVersion,
MsgType type, uint8_t returnCode, uint8_t flags);
671 static bool isDataValid(
const uint8_t* data,
size_t dataLen);
677 uint8_t getFlags()
const;
683 void setFlags(uint8_t flags);
689 uint32_t getNumEntries()
const;
695 uint32_t getNumOptions()
const;
701 const EntriesVec getEntries()
const;
707 const OptionsVec getOptions()
const;
714 const OptionsVec getOptionsFromEntry(uint32_t index)
const;
731 bool addOptionTo(uint32_t indexEntry,
const SomeIpSdOption &option);
741 std::string toString()
const;
748 #pragma pack(push, 1) 762 uint32_t m_NumOptions;
764 uint32_t countOptions();
767 bool addOptionIndex(uint32_t indexEntry, uint32_t indexOffset);
770 static size_t getLenEntries(
const uint8_t* data);
771 size_t getLenEntries()
const;
772 size_t getLenOptions()
const;
773 void setLenEntries(uint32_t length);
774 void setLenOptions(uint32_t length);
The main namespace for the PcapPlusPlus lib.
Definition: SomeIpSdLayer.h:149
uint8_t type
Definition: SomeIpSdLayer.h:80
Definition: SomeIpSdLayer.h:213
uint8_t indexFirstOption
Definition: SomeIpSdLayer.h:408
uint32_t data
Definition: SomeIpSdLayer.h:431
~SomeIpSdLayer()
Definition: SomeIpSdLayer.h:656
uint16_t instanceID
Definition: SomeIpSdLayer.h:427
void computeCalculateFields()
Definition: SomeIpSdLayer.h:736
Definition: SomeIpSdLayer.h:29
uint16_t length
Definition: SomeIpSdLayer.h:78
Definition: SomeIpSdLayer.h:147
uint16_t serviceID
Definition: SomeIpSdLayer.h:425
uint32_t majorVersion_ttl
Definition: SomeIpSdLayer.h:429
Definition: SomeIpSdLayer.h:403
static bool isSomeIpSdPort(uint16_t port)
Definition: SomeIpSdLayer.h:663
Definition: SomeIpSdLayer.h:224
size_t getLength() const
Definition: SomeIpSdLayer.h:101
Definition: SomeIpSdLayer.h:228
Definition: SomeIpSdLayer.h:226
uint8_t reserved
Definition: SomeIpSdLayer.h:82
uint8_t * getDataPtr() const
OptionType getType() const
uint8_t type
Definition: SomeIpSdLayer.h:406
Definition: SomeIpLayer.h:65
Definition: SomeIpSdLayer.h:40
Definition: SomeIpSdLayer.h:370
Definition: SomeIpSdLayer.h:151
Definition: SomeIpSdLayer.h:319
IPv6OptionType
Definition: SomeIpSdLayer.h:221
EntryType getType() const
Definition: SomeIpSdLayer.h:488
Definition: IpAddress.h:42
Definition: IpAddress.h:192
IPv4OptionType
Definition: SomeIpSdLayer.h:144
uint8_t nrOpt2
Definition: SomeIpSdLayer.h:414
Definition: SomeIpLayer.h:20
virtual ~SomeIpSdOption()
SomeIpSdProtocolType
Definition: SomeIpSdLayer.h:26
MsgType
Definition: SomeIpLayer.h:26
someipsdhdroptionsbase * getSomeIpSdOptionHeader() const
Definition: SomeIpSdLayer.h:31
Definition: SomeIpSdLayer.h:620
OptionType
Definition: SomeIpSdLayer.h:48
size_t getLength() const
Definition: SomeIpSdLayer.h:494
Definition: SomeIpSdLayer.h:290
uint8_t indexSecondOption
Definition: SomeIpSdLayer.h:410
EntryType
Definition: SomeIpSdLayer.h:378
Definition: SomeIpSdLayer.h:75
Definition: SomeIpSdLayer.h:136