Botan 3.9.0
Crypto and TLS for C&
Botan::TLS::Record_Header Class Referencefinal

#include <tls_record.h>

Public Member Functions

uint16_t epoch () const
size_t needed () const
 Record_Header (size_t needed)
 Record_Header (uint64_t sequence, Protocol_Version version, Record_Type type)
uint64_t sequence () const
Record_Type type () const
Protocol_Version version () const

Detailed Description

Definition at line 70 of file tls_record.h.

Constructor & Destructor Documentation

◆ Record_Header() [1/2]

Botan::TLS::Record_Header::Record_Header ( uint64_t sequence,
Protocol_Version version,
Record_Type type )
inline

Definition at line 72 of file tls_record.h.

72 :
73 m_needed(0), m_sequence(sequence), m_version(version), m_type(type) {}
Protocol_Version version() const
Definition tls_record.h:79
Record_Type type() const
Definition tls_record.h:91
uint64_t sequence() const
Definition tls_record.h:84

References sequence(), type(), and version().

◆ Record_Header() [2/2]

Botan::TLS::Record_Header::Record_Header ( size_t needed)
inlineexplicit

Definition at line 75 of file tls_record.h.

75: m_needed(needed), m_sequence(0), m_type(Record_Type::Invalid) {}
size_t needed() const
Definition tls_record.h:77

References Botan::TLS::Invalid, and needed().

Member Function Documentation

◆ epoch()

uint16_t Botan::TLS::Record_Header::epoch ( ) const
inline

Definition at line 89 of file tls_record.h.

89{ return static_cast<uint16_t>(sequence() >> 48); }

References sequence().

Referenced by Botan::TLS::Channel_Impl_12::from_peer().

◆ needed()

size_t Botan::TLS::Record_Header::needed ( ) const
inline

Definition at line 77 of file tls_record.h.

77{ return m_needed; }

Referenced by Botan::TLS::Channel_Impl_12::from_peer(), and Record_Header().

◆ sequence()

uint64_t Botan::TLS::Record_Header::sequence ( ) const
inline

Definition at line 84 of file tls_record.h.

84 {
85 BOTAN_ASSERT_NOMSG(m_needed == 0);
86 return m_sequence;
87 }
#define BOTAN_ASSERT_NOMSG(expr)
Definition assert.h:75

References BOTAN_ASSERT_NOMSG.

Referenced by epoch(), Botan::TLS::Channel_Impl_12::from_peer(), and Record_Header().

◆ type()

Record_Type Botan::TLS::Record_Header::type ( ) const
inline

Definition at line 91 of file tls_record.h.

91 {
92 BOTAN_ASSERT_NOMSG(m_needed == 0);
93 return m_type;
94 }

References BOTAN_ASSERT_NOMSG.

Referenced by Botan::TLS::Channel_Impl_12::from_peer(), and Record_Header().

◆ version()

Protocol_Version Botan::TLS::Record_Header::version ( ) const
inline

Definition at line 79 of file tls_record.h.

79 {
80 BOTAN_ASSERT_NOMSG(m_needed == 0);
81 return m_version;
82 }

References BOTAN_ASSERT_NOMSG.

Referenced by Botan::TLS::Channel_Impl_12::from_peer(), and Record_Header().


The documentation for this class was generated from the following file: