PcapPlusPlus  24.09
pcpp::Asn1ConstructedRecord Class Reference

#include <Asn1Codec.h>

Inheritance diagram for pcpp::Asn1ConstructedRecord:
pcpp::Asn1Record pcpp::Asn1SequenceRecord pcpp::Asn1SetRecord

Public Member Functions

 Asn1ConstructedRecord (Asn1TagClass tagClass, uint8_t tagType, const std::vector< Asn1Record * > &subRecords)
 
 Asn1ConstructedRecord (Asn1TagClass tagClass, uint8_t tagType, const PointerVector< Asn1Record > &subRecords)
 
PointerVector< Asn1Record > & getSubRecords ()
 
- Public Member Functions inherited from pcpp::Asn1Record
std::vector< uint8_t > encode ()
 
Asn1TagClass getTagClass () const
 
bool isConstructed () const
 
Asn1UniversalTagType getUniversalTagType () const
 
uint8_t getTagType () const
 
size_t getValueLength () const
 
size_t getTotalLength () const
 
std::string toString ()
 
template<class Asn1RecordType >
Asn1RecordType * castAs ()
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::Asn1Record
static std::unique_ptr< Asn1Recorddecode (const uint8_t *data, size_t dataLen, bool lazy=true)
 

Detailed Description

Represents a constructed ASN.1 record, which is a record that has sub-records

Constructor & Destructor Documentation

◆ Asn1ConstructedRecord() [1/2]

pcpp::Asn1ConstructedRecord::Asn1ConstructedRecord ( Asn1TagClass  tagClass,
uint8_t  tagType,
const std::vector< Asn1Record * > &  subRecords 
)
explicit

A constructor to create a constructed record

Parameters
tagClassThe record tag class
tagTypeThe record tag type value
subRecordsA list of sub-records to assign as the record value

◆ Asn1ConstructedRecord() [2/2]

pcpp::Asn1ConstructedRecord::Asn1ConstructedRecord ( Asn1TagClass  tagClass,
uint8_t  tagType,
const PointerVector< Asn1Record > &  subRecords 
)
explicit

A constructor to create a constructed record

Parameters
tagClassThe record tag class
tagTypeThe record tag type value
subRecordsA PointerVector of sub-records to assign as the record value

Member Function Documentation

◆ getSubRecords()

PointerVector<Asn1Record>& pcpp::Asn1ConstructedRecord::getSubRecords ( )
inline
Returns
A reference to the list of sub-records. It's important to note that any modifications made to this list will directly affect the internal structure