PcapPlusPlus  Next
pcpp::Asn1GenericRecord Class Reference

#include <Asn1Codec.h>

Inheritance diagram for pcpp::Asn1GenericRecord:
pcpp::Asn1Record

Public Member Functions

 Asn1GenericRecord (Asn1TagClass tagClass, bool isConstructed, uint8_t tagType, const uint8_t *value, size_t valueLen)
 
 Asn1GenericRecord (Asn1TagClass tagClass, bool isConstructed, uint8_t tagType, const std::string &value)
 
const uint8_t * getValue ()
 
- 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 generic ASN.1 record, either of an unknown type or of a known type that doesn't have a dedicated parser yet

Constructor & Destructor Documentation

◆ Asn1GenericRecord() [1/2]

pcpp::Asn1GenericRecord::Asn1GenericRecord ( Asn1TagClass  tagClass,
bool  isConstructed,
uint8_t  tagType,
const uint8_t *  value,
size_t  valueLen 
)

A constructor to create a generic record

Parameters
tagClassThe record tag class
isConstructedA flag to indicate if the record is constructed or primitive
tagTypeThe record tag type value
valueA byte array of the tag value
valueLenThe length of the value byte array

◆ Asn1GenericRecord() [2/2]

pcpp::Asn1GenericRecord::Asn1GenericRecord ( Asn1TagClass  tagClass,
bool  isConstructed,
uint8_t  tagType,
const std::string &  value 
)

A constructor to create a generic record

Parameters
tagClassThe record tag class
isConstructedA flag to indicate if the record is constructed or primitive
tagTypeThe record tag type value
valueA string representing the tag value

Member Function Documentation

◆ getValue()

const uint8_t* pcpp::Asn1GenericRecord::getValue ( )
inline
Returns
A pointer to the tag value