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;
256 uint16_t getPort()
const;
269 #pragma pack(push, 1) 273 uint8_t ipv6Address[16];
310 std::string getConfigurationString()
const;
340 uint16_t getPriority()
const;
346 uint16_t getWeight()
const;
353 #pragma pack(push, 1) 387 StopSubscribeEventgroup,
389 SubscribeEventgroupAck,
391 SubscribeEventgroupNack,
400 #pragma pack(push, 1) 409 #if (BYTE_ORDER == LITTLE_ENDIAN) 442 SomeIpSdEntry(
EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL,
443 uint32_t minorVersion);
455 SomeIpSdEntry(
EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL,
456 uint8_t counter, uint16_t eventGroupID);
498 uint32_t getNumOptions()
const;
504 uint16_t getServiceId()
const;
510 void setServiceId(uint16_t serviceId);
516 uint16_t getInstanceId()
const;
522 void setInstanceId(uint16_t instanceId);
528 uint8_t getMajorVersion()
const;
534 void setMajorVersion(uint8_t majorVersion);
540 uint32_t getTtl()
const;
546 void setTtl(uint32_t ttl);
552 uint32_t getMinorVersion()
const;
558 void setMinorVersion(uint32_t minorVersion);
564 uint8_t getCounter()
const;
570 void setCounter(uint8_t counter);
576 uint16_t getEventgroupId()
const;
582 void setEventgroupId(uint16_t eventgroupID);
589 enum class TypeInternal : uint8_t
592 FindService_Internal = 0x00,
594 OfferService_Internal = 0x01,
596 SubscribeEventgroup_Internal = 0x06,
598 SubscribeEventgroupAck_Internal = 0x07,
604 uint8_t *m_ShadowData;
606 void initStdFields(
EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL);
611 static const uint32_t SOMEIPSD_HDR_ENTRY_MASK_TTL = 0x00FFFFFF;
624 typedef std::vector<EntryPtr> EntriesVec;
626 typedef std::vector<OptionPtr> OptionsVec;
648 SomeIpSdLayer(uint16_t serviceID, uint16_t methodID, uint16_t clientID, uint16_t sessionID,
649 uint8_t interfaceVersion,
MsgType type, uint8_t returnCode, uint8_t flags);
667 uint8_t getFlags()
const;
673 void setFlags(uint8_t flags);
679 uint32_t getNumEntries()
const;
685 uint32_t getNumOptions()
const;
691 const EntriesVec getEntries()
const;
697 const OptionsVec getOptions()
const;
704 const OptionsVec getOptionsFromEntry(uint32_t index)
const;
721 bool addOptionTo(uint32_t indexEntry,
const SomeIpSdOption &option);
731 std::string toString()
const;
738 #pragma pack(push, 1) 752 uint32_t m_NumOptions;
754 uint32_t countOptions();
757 bool addOptionIndex(uint32_t indexEntry, uint32_t indexOffset);
760 size_t getLenEntries()
const;
761 size_t getLenOptions()
const;
762 void setLenEntries(uint32_t length);
763 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:212
uint8_t indexFirstOption
Definition: SomeIpSdLayer.h:406
uint32_t data
Definition: SomeIpSdLayer.h:429
~SomeIpSdLayer()
Definition: SomeIpSdLayer.h:654
uint16_t instanceID
Definition: SomeIpSdLayer.h:425
void computeCalculateFields()
Definition: SomeIpSdLayer.h:726
Definition: SomeIpSdLayer.h:29
uint16_t length
Definition: SomeIpSdLayer.h:78
Definition: SomeIpSdLayer.h:147
uint16_t serviceID
Definition: SomeIpSdLayer.h:423
uint32_t majorVersion_ttl
Definition: SomeIpSdLayer.h:427
Definition: SomeIpSdLayer.h:401
static bool isSomeIpSdPort(uint16_t port)
Definition: SomeIpSdLayer.h:661
Definition: SomeIpSdLayer.h:223
size_t getLength() const
Definition: SomeIpSdLayer.h:101
Definition: SomeIpSdLayer.h:227
Definition: SomeIpSdLayer.h:225
uint8_t reserved
Definition: SomeIpSdLayer.h:82
uint8_t * getDataPtr() const
OptionType getType() const
uint8_t type
Definition: SomeIpSdLayer.h:404
Definition: SomeIpLayer.h:65
Definition: SomeIpSdLayer.h:40
Definition: SomeIpSdLayer.h:368
Definition: SomeIpSdLayer.h:151
Definition: SomeIpSdLayer.h:317
IPv6OptionType
Definition: SomeIpSdLayer.h:220
EntryType getType() const
Definition: SomeIpSdLayer.h:486
Definition: IpAddress.h:27
Definition: IpAddress.h:167
IPv4OptionType
Definition: SomeIpSdLayer.h:144
uint8_t nrOpt2
Definition: SomeIpSdLayer.h:412
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:618
OptionType
Definition: SomeIpSdLayer.h:48
size_t getLength() const
Definition: SomeIpSdLayer.h:492
Definition: SomeIpSdLayer.h:288
uint8_t indexSecondOption
Definition: SomeIpSdLayer.h:408
EntryType
Definition: SomeIpSdLayer.h:376
Definition: SomeIpSdLayer.h:75
Definition: SomeIpSdLayer.h:136