Botan 3.0.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 76 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 79 of file tls_record.h.

81 :
82 m_needed(0),
83 m_sequence(sequence),
84 m_version(version),
85 m_type(type)
86 {}
Protocol_Version version() const
Definition: tls_record.h:97
Record_Type type() const
Definition: tls_record.h:114
uint64_t sequence() const
Definition: tls_record.h:103

◆ Record_Header() [2/2]

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

Definition at line 88 of file tls_record.h.

88 :
89 m_needed(needed),
90 m_sequence(0),
91 m_version(Protocol_Version()),
93 {}
size_t needed() const
Definition: tls_record.h:95

Member Function Documentation

◆ epoch()

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

Definition at line 109 of file tls_record.h.

110 {
111 return static_cast<uint16_t>(sequence() >> 48);
112 }

References sequence().

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

◆ needed()

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

Definition at line 95 of file tls_record.h.

95{ 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 103 of file tls_record.h.

104 {
105 BOTAN_ASSERT_NOMSG(m_needed == 0);
106 return m_sequence;
107 }
#define BOTAN_ASSERT_NOMSG(expr)
Definition: assert.h:67

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 114 of file tls_record.h.

115 {
116 BOTAN_ASSERT_NOMSG(m_needed == 0);
117 return m_type;
118 }

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 97 of file tls_record.h.

98 {
99 BOTAN_ASSERT_NOMSG(m_needed == 0);
100 return m_version;
101 }

References BOTAN_ASSERT_NOMSG.

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


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