Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Classes | Namespaces | Enumerations | Functions
SMPTypes.hpp File Reference
#include <cstring>
#include <string>
#include <cstdint>
#include <algorithm>
#include <mutex>
#include <jau/basic_types.hpp>
#include "OctetTypes.hpp"
#include "BTTypes0.hpp"
Include dependency graph for SMPTypes.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  direct_bt::SMPException
 
class  direct_bt::SMPPacketException
 
class  direct_bt::SMPOpcodeException
 
class  direct_bt::SMPValueException
 
struct  direct_bt::SMPLongTermKeyInfo
 SMP Long Term Key Info, used for platform agnostic persistence. More...
 
struct  direct_bt::SMPSignatureResolvingKeyInfo
 SMP Signature Resolving Key Info, used for platform agnostic persistence. More...
 
class  direct_bt::SMPPDUMsg
 Handles the Security Manager Protocol (SMP) using Protocol Data Unit (PDU) encoded messages over L2CAP channel. More...
 
class  direct_bt::SMPEncKeyByteStream
 Tag type to group all SMP messages covering encryption keys, treated as byte stream (all of them). More...
 
class  direct_bt::SMPPairingMsg
 Vol 3, Part H: 3.5.1 Pairing Request message. More...
 
class  direct_bt::SMPPairConfirmMsg
 Vol 3, Part H: 3.5.3 Pairing Confirm message. More...
 
class  direct_bt::SMPPairRandMsg
 Vol 3, Part H: 3.5.4 Pairing Random message. More...
 
class  direct_bt::SMPPairFailedMsg
 Vol 3, Part H: 3.5.5 Pairing Failed message. More...
 
class  direct_bt::SMPPairPubKeyMsg
 Vol 3, Part H: 3.5.6 Pairing Public Key message. More...
 
class  direct_bt::SMPPairDHKeyCheckMsg
 Vol 3, Part H: 3.5.7 Pairing DHKey Check message. More...
 
class  direct_bt::SMPPasskeyNotification
 Vol 3, Part H: 3.5.8 Passkey Entry: Keypress notification messages. More...
 
class  direct_bt::SMPEncInfoMsg
 Vol 3, Part H: 3.6.2 Encryption Information message. More...
 
class  direct_bt::SMPMasterIdentMsg
 Vol 3, Part H: 3.6.3 Master Identification message. More...
 
class  direct_bt::SMPIdentInfoMsg
 Vol 3, Part H: 3.6.4 Identify Information message. More...
 
class  direct_bt::SMPIdentAddrInfoMsg
 Vol 3, Part H: 3.6.5 Identity Address Information message. More...
 
class  direct_bt::SMPSignInfoMsg
 Vol 3, Part H: 3.6.6 Signing Information message. More...
 
class  direct_bt::SMPSecurityReqMsg
 Vol 3, Part H: 3.6.7 Security Request message. More...
 

Namespaces

 direct_bt
 

Enumerations

enum  direct_bt::SMPConstInt : int32_t
 
enum  direct_bt::SMPConstU16 : uint16_t { direct_bt::SMPConstU16::SMP_TIMEOUT_MS = 30000 }
 
enum  direct_bt::SMPPairingState : uint8_t {
  direct_bt::SMPPairingState::NONE = 0, direct_bt::SMPPairingState::FAILED = 1, direct_bt::SMPPairingState::REQUESTED_BY_RESPONDER = 2, direct_bt::SMPPairingState::FEATURE_EXCHANGE_STARTED = 3,
  direct_bt::SMPPairingState::FEATURE_EXCHANGE_COMPLETED = 4, direct_bt::SMPPairingState::PASSKEY_EXPECTED = 5, direct_bt::SMPPairingState::NUMERIC_COMPARE_EXPECTED = 6, direct_bt::SMPPairingState::OOB_EXPECTED = 7,
  direct_bt::SMPPairingState::KEY_DISTRIBUTION = 8, direct_bt::SMPPairingState::COMPLETED = 9
}
 SMP Pairing Process state definition. More...
 
enum  direct_bt::SMPIOCapability : uint8_t {
  direct_bt::SMPIOCapability::DISPLAY_ONLY = 0x00, direct_bt::SMPIOCapability::DISPLAY_YES_NO = 0x01, direct_bt::SMPIOCapability::KEYBOARD_ONLY = 0x02, direct_bt::SMPIOCapability::NO_INPUT_NO_OUTPUT = 0x03,
  direct_bt::SMPIOCapability::KEYBOARD_DISPLAY = 0x04, direct_bt::SMPIOCapability::UNSET = 0xFF
}
 Vol 3, Part H, 2.3.2 IO capabilities. More...
 
enum  direct_bt::SMPOOBDataFlag : uint8_t { direct_bt::SMPOOBDataFlag::OOB_AUTH_DATA_NOT_PRESENT = 0x00, direct_bt::SMPOOBDataFlag::OOB_AUTH_DATA_REMOTE_PRESENT = 0x01 }
 Vol 3, Part H, 2.3.3 OOB authentication data. More...
 
enum  direct_bt::SMPAuthReqs : uint8_t {
  direct_bt::SMPAuthReqs::NONE = 0, direct_bt::SMPAuthReqs::BONDING = 0b00000001, direct_bt::SMPAuthReqs::BONDING_RFU = 0b00000010, direct_bt::SMPAuthReqs::MITM = 0b00000100,
  direct_bt::SMPAuthReqs::SECURE_CONNECTIONS = 0b00001000, direct_bt::SMPAuthReqs::KEYPRESS = 0b00010000, direct_bt::SMPAuthReqs::CT2_H7_FUNC_SUPPORT = 0b00100000, direct_bt::SMPAuthReqs::RFU_1 = 0b01000000,
  direct_bt::SMPAuthReqs::RFU_2 = 0b10000000
}
 SMP Authentication Requirements Bits, denotes specific bits or whole protocol uint8_t bit-mask. More...
 
enum  direct_bt::SMPKeyType : uint8_t {
  direct_bt::SMPKeyType::NONE = 0, direct_bt::SMPKeyType::ENC_KEY = 0b00000001, direct_bt::SMPKeyType::ID_KEY = 0b00000010, direct_bt::SMPKeyType::SIGN_KEY = 0b00000100,
  direct_bt::SMPKeyType::LINK_KEY = 0b00001000, direct_bt::SMPKeyType::RFU_1 = 0b00010000, direct_bt::SMPKeyType::RFU_2 = 0b00100000, direct_bt::SMPKeyType::RFU_3 = 0b01000000,
  direct_bt::SMPKeyType::RFU_4 = 0b10000000
}
 SMP Key Type for Distribution, indicates keys distributed in the Transport Specific Key Distribution phase. More...
 

Functions

constexpr int32_t direct_bt::number (const SMPConstInt rhs) noexcept
 
constexpr uint16_t direct_bt::number (const SMPConstU16 rhs) noexcept
 
std::string direct_bt::to_string (const SMPPairingState state) noexcept
 
constexpr bool direct_bt::isSMPPairingActive (const SMPPairingState state) noexcept
 Returns true if the given SMPPairingState indicated an active pairing process, i.e. More...
 
constexpr bool direct_bt::hasSMPPairingFinished (const SMPPairingState state) noexcept
 Returns true if the given SMPPairingState indicates a finished pairing process, i.e. More...
 
constexpr bool direct_bt::isSMPPairingAllowingInput (const SMPPairingState state, const SMPPairingState inputSpec) noexcept
 Returns true if the given SMPPairingState indicates a pairing process waiting for user input, i.e. More...
 
constexpr SMPIOCapability direct_bt::to_SMPIOCapability (const uint8_t v) noexcept
 
constexpr uint8_t direct_bt::number (const SMPIOCapability rhs) noexcept
 
std::string direct_bt::to_string (const SMPIOCapability ioc) noexcept
 
constexpr bool direct_bt::hasSMPIOCapabilityBinaryInput (const SMPIOCapability ioc) noexcept
 
constexpr bool direct_bt::hasSMPIOCapabilityFullInput (const SMPIOCapability ioc) noexcept
 
constexpr uint8_t direct_bt::number (const SMPOOBDataFlag rhs) noexcept
 
std::string direct_bt::to_string (const SMPOOBDataFlag v) noexcept
 
constexpr SMPAuthReqs direct_bt::operator^ (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr SMPAuthReqs direct_bt::operator| (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr SMPAuthReqs direct_bt::operator& (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr uint8_t direct_bt::number (const SMPAuthReqs rhs) noexcept
 
constexpr bool direct_bt::isSMPAuthReqBitSet (const SMPAuthReqs mask, const SMPAuthReqs bit) noexcept
 
std::string direct_bt::to_string (const SMPAuthReqs mask) noexcept
 
PairingMode direct_bt::getPairingMode (const bool use_sc, const SMPAuthReqs authReqs_ini, const SMPIOCapability ioCap_ini, const SMPOOBDataFlag oobFlag_ini, const SMPAuthReqs authReqs_res, const SMPIOCapability ioCap_res, const SMPOOBDataFlag oobFlag_res) noexcept
 Returns the PairingMode derived from both devices' sets of SMPAuthReqs, SMPIOCapability and SMPOOBDataFlag. More...
 
PairingMode direct_bt::getPairingMode (const bool use_sc, const SMPIOCapability ioCap_ini, const SMPIOCapability ioCap_res) noexcept
 Returns the PairingMode derived from both devices' SMPIOCapability. More...
 
constexpr SMPKeyType direct_bt::operator^ (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr SMPKeyType & direct_bt::operator^= (SMPKeyType &store, const SMPKeyType &rhs) noexcept
 
constexpr SMPKeyType direct_bt::operator| (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr SMPKeyType & direct_bt::operator|= (SMPKeyType &store, const SMPKeyType &rhs) noexcept
 
constexpr SMPKeyType direct_bt::operator& (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr SMPKeyType & direct_bt::operator&= (SMPKeyType &store, const SMPKeyType &rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr uint8_t direct_bt::number (const SMPKeyType rhs) noexcept
 
constexpr bool direct_bt::isKeyDistBitSet (const SMPKeyType mask, const SMPKeyType bit) noexcept
 
std::string direct_bt::to_string (const SMPKeyType mask) noexcept
 
constexpr SMPLongTermKeyInfo::Property direct_bt::operator^ (const SMPLongTermKeyInfo::Property lhs, const SMPLongTermKeyInfo::Property rhs) noexcept
 
constexpr SMPLongTermKeyInfo::Property & direct_bt::operator^= (SMPLongTermKeyInfo::Property &store, const SMPLongTermKeyInfo::Property &rhs) noexcept
 
constexpr SMPLongTermKeyInfo::Property direct_bt::operator| (const SMPLongTermKeyInfo::Property lhs, const SMPLongTermKeyInfo::Property rhs) noexcept
 
constexpr SMPLongTermKeyInfo::Property & direct_bt::operator|= (SMPLongTermKeyInfo::Property &store, const SMPLongTermKeyInfo::Property &rhs) noexcept
 
constexpr SMPLongTermKeyInfo::Property direct_bt::operator& (const SMPLongTermKeyInfo::Property lhs, const SMPLongTermKeyInfo::Property rhs) noexcept
 
constexpr SMPLongTermKeyInfo::Property & direct_bt::operator&= (SMPLongTermKeyInfo::Property &store, const SMPLongTermKeyInfo::Property &rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPLongTermKeyInfo::Property lhs, const SMPLongTermKeyInfo::Property rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPLongTermKeyInfo::Property lhs, const SMPLongTermKeyInfo::Property rhs) noexcept
 
std::string direct_bt::to_String (const SMPLongTermKeyInfo &ltk) noexcept
 
constexpr SMPSignatureResolvingKeyInfo::Property direct_bt::operator^ (const SMPSignatureResolvingKeyInfo::Property lhs, const SMPSignatureResolvingKeyInfo::Property rhs) noexcept
 
constexpr SMPSignatureResolvingKeyInfo::Property & direct_bt::operator^= (SMPSignatureResolvingKeyInfo::Property &store, const SMPSignatureResolvingKeyInfo::Property &rhs) noexcept
 
constexpr SMPSignatureResolvingKeyInfo::Property direct_bt::operator| (const SMPSignatureResolvingKeyInfo::Property lhs, const SMPSignatureResolvingKeyInfo::Property rhs) noexcept
 
constexpr SMPSignatureResolvingKeyInfo::Property & direct_bt::operator|= (SMPSignatureResolvingKeyInfo::Property &store, const SMPSignatureResolvingKeyInfo::Property &rhs) noexcept
 
constexpr SMPSignatureResolvingKeyInfo::Property direct_bt::operator& (const SMPSignatureResolvingKeyInfo::Property lhs, const SMPSignatureResolvingKeyInfo::Property rhs) noexcept
 
constexpr SMPSignatureResolvingKeyInfo::Property & direct_bt::operator&= (SMPSignatureResolvingKeyInfo::Property &store, const SMPSignatureResolvingKeyInfo::Property &rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPSignatureResolvingKeyInfo::Property lhs, const SMPSignatureResolvingKeyInfo::Property rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPSignatureResolvingKeyInfo::Property lhs, const SMPSignatureResolvingKeyInfo::Property rhs) noexcept
 
std::string direct_bt::to_String (const SMPSignatureResolvingKeyInfo &csrk) noexcept
 
std::string direct_bt::to_String (const SMPPDUMsg &m) noexcept