Botan 3.4.0
Crypto and TLS for C&
Public Member Functions | List of all members
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:80
Record_Type type() const
Definition tls_record.h:92
uint64_t sequence() const
Definition tls_record.h:85

◆ Record_Header() [2/2]

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

Definition at line 75 of file tls_record.h.

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

Member Function Documentation

◆ epoch()

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

Definition at line 90 of file tls_record.h.

90{ 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 78 of file tls_record.h.

78{ return m_needed; }

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

◆ sequence()

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

Definition at line 85 of file tls_record.h.

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

References BOTAN_ASSERT_NOMSG.

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

◆ type()

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

Definition at line 92 of file tls_record.h.

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

References BOTAN_ASSERT_NOMSG.

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

◆ version()

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

Definition at line 80 of file tls_record.h.

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

References BOTAN_ASSERT_NOMSG.

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


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