PcapPlusPlus  22.11
pcpp::SomeIpSdEntry Class Reference

#include <SomeIpSdLayer.h>

Classes

struct  someipsdhdrentry
 

Public Types

enum  EntryType : uint8_t {
  EntryType::FindService, EntryType::OfferService, EntryType::StopOfferService, EntryType::SubscribeEventgroup,
  EntryType::StopSubscribeEventgroup, EntryType::SubscribeEventgroupAck, EntryType::SubscribeEventgroupNack, EntryType::UnknownEntryType
}
 

Public Member Functions

 SomeIpSdEntry (EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL, uint32_t minorVersion)
 
 SomeIpSdEntry (EntryType type, uint16_t serviceID, uint16_t instanceID, uint8_t majorVersion, uint32_t TTL, uint8_t counter, uint16_t eventGroupID)
 
 SomeIpSdEntry (const SomeIpSdLayer *pSomeIpSdLayer, size_t offset)
 
 ~SomeIpSdEntry ()
 
uint8_t * getDataPtr () const
 
someipsdhdrentrygetSomeIpSdEntryHeader () const
 
EntryType getType () const
 
size_t getLength () const
 
uint32_t getNumOptions () const
 
uint16_t getServiceId () const
 
void setServiceId (uint16_t serviceId)
 
uint16_t getInstanceId () const
 
void setInstanceId (uint16_t instanceId)
 
uint8_t getMajorVersion () const
 
void setMajorVersion (uint8_t majorVersion)
 
uint32_t getTtl () const
 
void setTtl (uint32_t ttl)
 
uint32_t getMinorVersion () const
 
void setMinorVersion (uint32_t minorVersion)
 
uint8_t getCounter () const
 
void setCounter (uint8_t counter)
 
uint16_t getEventgroupId () const
 
void setEventgroupId (uint16_t eventgroupID)
 

Detailed Description

Implementation of the SOME/IP-SD Service Entry and Eventgroup Entry Type

Member Enumeration Documentation

◆ EntryType

enum pcpp::SomeIpSdEntry::EntryType : uint8_t
strong

Types of entries that can occur in SOME/IP-SD

Enumerator
FindService 

Find Service

OfferService 

Offer Service

StopOfferService 

Stop Offer Service

SubscribeEventgroup 

Subscribe Eventgroup

StopSubscribeEventgroup 

Stop Subscribe Eventgroup

SubscribeEventgroupAck 

Subscribe Eventgroup Acknowledgment

SubscribeEventgroupNack 

Subscribe Eventgroup Negative Acknowledgement

UnknownEntryType 

Unknown Entry Type

Constructor & Destructor Documentation

◆ SomeIpSdEntry() [1/3]

pcpp::SomeIpSdEntry::SomeIpSdEntry ( EntryType  type,
uint16_t  serviceID,
uint16_t  instanceID,
uint8_t  majorVersion,
uint32_t  TTL,
uint32_t  minorVersion 
)

Construct a new SOME/IP-SD Service Entry Type

Parameters
[in]typeType to create
[in]serviceIDServiceID to use
[in]instanceIDInstanceID to use
[in]majorVersionMajorVersion to use
[in]TTLTTL to use. Has to be 0 for all Stop* entry types
[in]minorVersionMinorVersion to use

◆ SomeIpSdEntry() [2/3]

pcpp::SomeIpSdEntry::SomeIpSdEntry ( EntryType  type,
uint16_t  serviceID,
uint16_t  instanceID,
uint8_t  majorVersion,
uint32_t  TTL,
uint8_t  counter,
uint16_t  eventGroupID 
)

Construct a new SOME/IP-SD Eventgroup Entry Type

Parameters
[in]typeType to create
[in]serviceIDServiceID to use
[in]instanceIDInstanceID to use
[in]majorVersionMajorVersion to use
[in]TTLTTL to use. Has to be 0 for all Stop* entry types
[in]counterCounter value to use
[in]eventGroupIDEventgroupId to use

◆ SomeIpSdEntry() [3/3]

pcpp::SomeIpSdEntry::SomeIpSdEntry ( const SomeIpSdLayer pSomeIpSdLayer,
size_t  offset 
)

Construct a new SomeIpSdEntry object from existing data

Parameters
[in]pSomeIpSdLayerLayer that this entry is created for
[in]offsetOffset for pSomeIpSdLayer

◆ ~SomeIpSdEntry()

pcpp::SomeIpSdEntry::~SomeIpSdEntry ( )

Destroy the SomeIpSd Entry object and delete allocated data if it has been allocated by a constructor

Member Function Documentation

◆ getCounter()

uint8_t pcpp::SomeIpSdEntry::getCounter ( ) const

Get the counter value

Returns
uint32_t

◆ getDataPtr()

uint8_t* pcpp::SomeIpSdEntry::getDataPtr ( ) const

Get the internal data of the SOME/IP-SD Entry

Returns
uint8_t*

◆ getEventgroupId()

uint16_t pcpp::SomeIpSdEntry::getEventgroupId ( ) const

Get the eventgroup id

Returns
uint32_t

◆ getInstanceId()

uint16_t pcpp::SomeIpSdEntry::getInstanceId ( ) const

Get the Instance Id in host endianness

Returns
uint16_t

◆ getLength()

size_t pcpp::SomeIpSdEntry::getLength ( ) const
inline

Get the Length of the SomeIpSd Entry

Returns
size_t

◆ getMajorVersion()

uint8_t pcpp::SomeIpSdEntry::getMajorVersion ( ) const

Get the Major version field in host endianness

Returns
uint16_t

◆ getMinorVersion()

uint32_t pcpp::SomeIpSdEntry::getMinorVersion ( ) const

Get the minor version

Returns
uint32_t

◆ getNumOptions()

uint32_t pcpp::SomeIpSdEntry::getNumOptions ( ) const

Get the number of Options of this Entry

Returns
uint32_t

◆ getServiceId()

uint16_t pcpp::SomeIpSdEntry::getServiceId ( ) const

Get the Service Id in host endianness

Returns
uint16_t

◆ getSomeIpSdEntryHeader()

someipsdhdrentry* pcpp::SomeIpSdEntry::getSomeIpSdEntryHeader ( ) const

Get a pointer to the SOME/IP-SD Entry header

Returns
someipsdhdrentry*

◆ getTtl()

uint32_t pcpp::SomeIpSdEntry::getTtl ( ) const

Get the Ttl field

Returns
uint32_t

◆ getType()

EntryType pcpp::SomeIpSdEntry::getType ( ) const
inline

Get the Entry Type

Returns
EntryType

◆ setCounter()

void pcpp::SomeIpSdEntry::setCounter ( uint8_t  counter)

Set the counter value

Parameters
[in]counter

◆ setEventgroupId()

void pcpp::SomeIpSdEntry::setEventgroupId ( uint16_t  eventgroupID)

Set the eventgroup id

Parameters
[in]eventgroupID

◆ setInstanceId()

void pcpp::SomeIpSdEntry::setInstanceId ( uint16_t  instanceId)

Set the Instance Id

Parameters
[in]instanceId

◆ setMajorVersion()

void pcpp::SomeIpSdEntry::setMajorVersion ( uint8_t  majorVersion)

Set the Major Version

Parameters
[in]majorVersion

◆ setMinorVersion()

void pcpp::SomeIpSdEntry::setMinorVersion ( uint32_t  minorVersion)

Set the minor version

Parameters
[in]minorVersion

◆ setServiceId()

void pcpp::SomeIpSdEntry::setServiceId ( uint16_t  serviceId)

Set the Service Id

Parameters
[in]serviceId

◆ setTtl()

void pcpp::SomeIpSdEntry::setTtl ( uint32_t  ttl)

Set the Ttl field

Parameters
[in]ttl