Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Namespaces | Enumerations | Functions
SMPTypes.hpp File Reference
#include <cstring>
#include <string>
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <mutex>
#include <jau/basic_types.hpp>
#include <jau/octets.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::SMPEncInfoMsg
 Vol 3, Part H: 3.6.2 Encryption Information message. 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::SMPException
 
class  direct_bt::SMPIdentAddrInfoMsg
 Vol 3, Part H: 3.6.5 Identity Address Information message. More...
 
class  direct_bt::SMPIdentInfoMsg
 Vol 3, Part H: 3.6.4 Identify Information message. More...
 
struct  direct_bt::SMPIdentityResolvingKey
 SMP Identity Resolving Key, used for platform agnostic persistence. More...
 
struct  direct_bt::SMPLinkKey
 Local SMP Link Key, used for platform agnostic persistence, mapping to platform specific MgmtLoadLinkKeyCmd and MgmtEvtNewLinkKey. More...
 
struct  direct_bt::SMPLongTermKey
 SMP Long Term Key, used for platform agnostic persistence. More...
 
class  direct_bt::SMPMasterIdentMsg
 Vol 3, Part H: 3.6.3 Master Identification message. More...
 
class  direct_bt::SMPOpcodeException
 
class  direct_bt::SMPPacketException
 
class  direct_bt::SMPPairConfirmMsg
 Vol 3, Part H: 3.5.3 Pairing Confirm message. More...
 
class  direct_bt::SMPPairDHKeyCheckMsg
 Vol 3, Part H: 3.5.7 Pairing DHKey Check message. More...
 
class  direct_bt::SMPPairFailedMsg
 Vol 3, Part H: 3.5.5 Pairing Failed message. More...
 
class  direct_bt::SMPPairingMsg
 Vol 3, Part H: 3.5.1 Pairing Request message. More...
 
class  direct_bt::SMPPairPubKeyMsg
 Vol 3, Part H: 3.5.6 Pairing Public Key message. More...
 
class  direct_bt::SMPPairRandMsg
 Vol 3, Part H: 3.5.4 Pairing Random message. More...
 
class  direct_bt::SMPPasskeyNotification
 Vol 3, Part H: 3.5.8 Passkey Entry: Keypress notification messages. 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::SMPSecurityReqMsg
 Vol 3, Part H: 3.6.7 Security Request message. More...
 
struct  direct_bt::SMPSignatureResolvingKey
 SMP Signature Resolving Key, used for platform agnostic persistence. More...
 
class  direct_bt::SMPSignInfoMsg
 Vol 3, Part H: 3.6.6 Signing Information message. More...
 
class  direct_bt::SMPValueException
 

Namespaces

namespace  direct_bt
 

Enumerations

enum class  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 class  direct_bt::SMPConstInt : int32_t
 
enum class  direct_bt::SMPConstU16 : uint16_t { direct_bt::SMPConstU16::SMP_TIMEOUT_MS = 30000 }
 
enum class  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 class  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...
 
enum class  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 class  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::PASSKEY_NOTIFY = 7 ,
  direct_bt::SMPPairingState::OOB_EXPECTED = 8 , direct_bt::SMPPairingState::KEY_DISTRIBUTION = 9 , direct_bt::SMPPairingState::COMPLETED = 10
}
 SMP Pairing Process state definition. More...
 

Functions

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 bool direct_bt::hasSMPIOCapabilityAnyIO (const SMPIOCapability ioc) noexcept
 
constexpr bool direct_bt::hasSMPIOCapabilityBinaryInput (const SMPIOCapability ioc) noexcept
 
constexpr bool direct_bt::hasSMPIOCapabilityFullInput (const SMPIOCapability ioc) noexcept
 
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::is_set (const SMPAuthReqs mask, const SMPAuthReqs bit) noexcept
 
constexpr bool direct_bt::is_set (const SMPKeyType mask, const SMPKeyType bit) noexcept
 
constexpr bool direct_bt::isSMPPairingActive (const SMPPairingState state) noexcept
 Returns true if the given SMPPairingState indicates an active 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 bool direct_bt::isSMPPairingUserInteraction (const SMPPairingState state) noexcept
 Returns true if the given SMPPairingState indicates expected user interaction, i.e. More...
 
constexpr uint8_t direct_bt::number (const SMPAuthReqs rhs) noexcept
 
constexpr int32_t direct_bt::number (const SMPConstInt rhs) noexcept
 
constexpr uint16_t direct_bt::number (const SMPConstU16 rhs) noexcept
 
constexpr uint8_t direct_bt::number (const SMPIOCapability rhs) noexcept
 
constexpr uint8_t direct_bt::number (const SMPKeyType rhs) noexcept
 
constexpr uint8_t direct_bt::number (const SMPOOBDataFlag rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPIdentityResolvingKey::Property lhs, const SMPIdentityResolvingKey::Property rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPLongTermKey::Property lhs, const SMPLongTermKey::Property rhs) noexcept
 
constexpr bool direct_bt::operator!= (const SMPSignatureResolvingKey::Property lhs, const SMPSignatureResolvingKey::Property rhs) noexcept
 
constexpr SMPAuthReqs direct_bt::operator& (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr SMPIdentityResolvingKey::Property direct_bt::operator& (const SMPIdentityResolvingKey::Property lhs, const SMPIdentityResolvingKey::Property rhs) noexcept
 
constexpr SMPKeyType direct_bt::operator& (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr SMPLongTermKey::Property direct_bt::operator& (const SMPLongTermKey::Property lhs, const SMPLongTermKey::Property rhs) noexcept
 
constexpr SMPSignatureResolvingKey::Property direct_bt::operator& (const SMPSignatureResolvingKey::Property lhs, const SMPSignatureResolvingKey::Property rhs) noexcept
 
constexpr SMPIdentityResolvingKey::Property & direct_bt::operator&= (SMPIdentityResolvingKey::Property &store, const SMPIdentityResolvingKey::Property &rhs) noexcept
 
constexpr SMPKeyType & direct_bt::operator&= (SMPKeyType &store, const SMPKeyType &rhs) noexcept
 
constexpr SMPLongTermKey::Property & direct_bt::operator&= (SMPLongTermKey::Property &store, const SMPLongTermKey::Property &rhs) noexcept
 
constexpr SMPSignatureResolvingKey::Property & direct_bt::operator&= (SMPSignatureResolvingKey::Property &store, const SMPSignatureResolvingKey::Property &rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPIdentityResolvingKey::Property lhs, const SMPIdentityResolvingKey::Property rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPLongTermKey::Property lhs, const SMPLongTermKey::Property rhs) noexcept
 
constexpr bool direct_bt::operator== (const SMPSignatureResolvingKey::Property lhs, const SMPSignatureResolvingKey::Property rhs) noexcept
 
constexpr SMPAuthReqs direct_bt::operator^ (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr SMPIdentityResolvingKey::Property direct_bt::operator^ (const SMPIdentityResolvingKey::Property lhs, const SMPIdentityResolvingKey::Property rhs) noexcept
 
constexpr SMPKeyType direct_bt::operator^ (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr SMPLongTermKey::Property direct_bt::operator^ (const SMPLongTermKey::Property lhs, const SMPLongTermKey::Property rhs) noexcept
 
constexpr SMPSignatureResolvingKey::Property direct_bt::operator^ (const SMPSignatureResolvingKey::Property lhs, const SMPSignatureResolvingKey::Property rhs) noexcept
 
constexpr SMPIdentityResolvingKey::Property & direct_bt::operator^= (SMPIdentityResolvingKey::Property &store, const SMPIdentityResolvingKey::Property &rhs) noexcept
 
constexpr SMPKeyType & direct_bt::operator^= (SMPKeyType &store, const SMPKeyType &rhs) noexcept
 
constexpr SMPLongTermKey::Property & direct_bt::operator^= (SMPLongTermKey::Property &store, const SMPLongTermKey::Property &rhs) noexcept
 
constexpr SMPSignatureResolvingKey::Property & direct_bt::operator^= (SMPSignatureResolvingKey::Property &store, const SMPSignatureResolvingKey::Property &rhs) noexcept
 
constexpr SMPAuthReqs direct_bt::operator| (const SMPAuthReqs lhs, const SMPAuthReqs rhs) noexcept
 
constexpr SMPIdentityResolvingKey::Property direct_bt::operator| (const SMPIdentityResolvingKey::Property lhs, const SMPIdentityResolvingKey::Property rhs) noexcept
 
constexpr SMPKeyType direct_bt::operator| (const SMPKeyType lhs, const SMPKeyType rhs) noexcept
 
constexpr SMPLongTermKey::Property direct_bt::operator| (const SMPLongTermKey::Property lhs, const SMPLongTermKey::Property rhs) noexcept
 
constexpr SMPSignatureResolvingKey::Property direct_bt::operator| (const SMPSignatureResolvingKey::Property lhs, const SMPSignatureResolvingKey::Property rhs) noexcept
 
constexpr SMPIdentityResolvingKey::Property & direct_bt::operator|= (SMPIdentityResolvingKey::Property &store, const SMPIdentityResolvingKey::Property &rhs) noexcept
 
constexpr SMPKeyType & direct_bt::operator|= (SMPKeyType &store, const SMPKeyType &rhs) noexcept
 
constexpr SMPLongTermKey::Property & direct_bt::operator|= (SMPLongTermKey::Property &store, const SMPLongTermKey::Property &rhs) noexcept
 
constexpr SMPSignatureResolvingKey::Property & direct_bt::operator|= (SMPSignatureResolvingKey::Property &store, const SMPSignatureResolvingKey::Property &rhs) noexcept
 
constexpr SMPLongTermKey::Property direct_bt::operator~ (const SMPLongTermKey::Property rhs) noexcept
 
constexpr SMPIOCapability direct_bt::to_SMPIOCapability (const uint8_t v) noexcept
 
std::string direct_bt::to_string (const SMPAuthReqs mask) noexcept
 
std::string direct_bt::to_String (const SMPIdentityResolvingKey &csrk) noexcept
 
std::string direct_bt::to_string (const SMPIOCapability ioc) noexcept
 
std::string direct_bt::to_string (const SMPKeyType mask) noexcept
 
std::string direct_bt::to_String (const SMPLongTermKey &ltk) noexcept
 
std::string direct_bt::to_string (const SMPOOBDataFlag v) noexcept
 
std::string direct_bt::to_string (const SMPPairingState state) noexcept
 
std::string direct_bt::to_String (const SMPPDUMsg &m) noexcept
 
std::string direct_bt::to_String (const SMPSignatureResolvingKey &csrk) noexcept
 
std::string direct_bt::toPassKeyString (const std::uint32_t passKey) noexcept
 Returns given passKey ranging [0..999999] as a canonical string, e.g. More...