Botan 2.19.1
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 80 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 83 of file tls_record.h.

85 :
86 m_needed(0),
87 m_sequence(sequence),
88 m_version(version),
89 m_type(type)
90 {}
Protocol_Version version() const
Definition: tls_record.h:101
Record_Type type() const
Definition: tls_record.h:118
uint64_t sequence() const
Definition: tls_record.h:107

◆ Record_Header() [2/2]

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

Definition at line 92 of file tls_record.h.

92 :
93 m_needed(needed),
94 m_sequence(0),
95 m_version(Protocol_Version()),
96 m_type(NO_RECORD)
97 {}
size_t needed() const
Definition: tls_record.h:99

Member Function Documentation

◆ epoch()

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

Definition at line 113 of file tls_record.h.

114 {
115 return static_cast<uint16_t>(sequence() >> 48);
116 }

References sequence().

Referenced by Botan::TLS::Channel::received_data().

◆ needed()

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

Definition at line 99 of file tls_record.h.

99{ return m_needed; }

Referenced by Botan::TLS::Channel::received_data().

◆ sequence()

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

Definition at line 107 of file tls_record.h.

108 {
109 BOTAN_ASSERT_NOMSG(m_needed == 0);
110 return m_sequence;
111 }
#define BOTAN_ASSERT_NOMSG(expr)
Definition: assert.h:68

References BOTAN_ASSERT_NOMSG.

Referenced by epoch(), and Botan::TLS::Channel::received_data().

◆ type()

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

Definition at line 118 of file tls_record.h.

119 {
120 BOTAN_ASSERT_NOMSG(m_needed == 0);
121 return m_type;
122 }

References BOTAN_ASSERT_NOMSG.

Referenced by Botan::TLS::Channel::received_data().

◆ version()

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

Definition at line 101 of file tls_record.h.

102 {
103 BOTAN_ASSERT_NOMSG(m_needed == 0);
104 return m_version;
105 }

References BOTAN_ASSERT_NOMSG.

Referenced by Botan::TLS::Channel::received_data().


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