Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
#include <cstring>
#include <string>
#include <memory>
#include <cstdint>
#include <vector>
#include <cstdio>
#include <jau/debug.hpp>
#include "SMPTypes.hpp"
#include "SMPCrypto.hpp"
Go to the source code of this file.
Macros | |
#define | APPEND_BITSTR(U, V, M) append_bitstr(out, M, U::V, #V, comma); |
#define | CASE_TO_STRING_IOCAP(V) case SMPIOCapability::V: return #V; |
#define | CASE_TO_STRING_OPCODE(V) case Opcode::V: return #V; |
#define | CASE_TO_STRING_PAIRSTATE(V) case SMPPairingState::V: return #V; |
#define | CASE_TO_STRING_TYPECODE(V) case TypeCode::V: return #V; |
#define | CSRKPROP_ENUM(X, M) |
#define | IOCAP_ENUM(X) |
#define | IRKPROP_ENUM(X, M) |
#define | KEYDISTFMT_ENUM(X, M) |
#define | LTKPROP_ENUM(X, M) |
#define | OPCODE_ENUM(X) |
#define | PAIRSTATE_ENUM(X) |
#define | PM_JUST__WORKS PairingMode::JUST_WORKS |
Mapping SMPIOCapability from initiator and responder to PairingMode. More... | |
#define | PM_NUMCOMP_ANY PairingMode::NUMERIC_COMPARE_ini |
#define | PM_NUMCOMP_INI PairingMode::NUMERIC_COMPARE_ini |
#define | PM_NUMCOMP_RES PairingMode::NUMERIC_COMPARE_res |
#define | PM_PASSKEY_ALL PairingMode::PASSKEY_ENTRY_ini |
#define | PM_PASSKEY_INI PairingMode::PASSKEY_ENTRY_ini |
#define | PM_PASSKEY_RES PairingMode::PASSKEY_ENTRY_res |
#define | SMP_LINKKEYTYPE_ENUM(X) |
#define | SMP_LINKKEYTYPE_TO_STRING(V) case SMPLinkKey::KeyType::V: return #V; |
#define | TYPECODE_ENUM(X) |
Functions | |
template<typename T > | |
static void | append_bitstr (std::string &out, T mask, T bit, const std::string &bitstr, bool &comma) |
Variables | |
static const PairingMode | legacy_pairing [5][5] |
static const PairingMode | seccon_pairing [5][5] |
#define APPEND_BITSTR | ( | U, | |
V, | |||
M | |||
) | append_bitstr(out, M, U::V, #V, comma); |
Definition at line 47 of file SMPTypes.cpp.
#define PAIRSTATE_ENUM | ( | X | ) |
Definition at line 49 of file SMPTypes.cpp.
#define CASE_TO_STRING_PAIRSTATE | ( | V | ) | case SMPPairingState::V: return #V; |
Definition at line 62 of file SMPTypes.cpp.
#define IOCAP_ENUM | ( | X | ) |
Definition at line 80 of file SMPTypes.cpp.
#define CASE_TO_STRING_IOCAP | ( | V | ) | case SMPIOCapability::V: return #V; |
Definition at line 88 of file SMPTypes.cpp.
#define PM_JUST__WORKS PairingMode::JUST_WORKS |
Mapping SMPIOCapability from initiator and responder to PairingMode.
Notable, the following is deduced from BT Core Spec v5.2: Vol 3, Part H (SM): 2.3.5.1 Selecting key generation method Table 2.8 and differs a little from BlueZ smp.c implementation.
Index values, using SMPIOCapabilities as follows: DISPLAY_ONLY = 0x00, DISPLAY_YES_NO = 0x01, KEYBOARD_ONLY = 0x02, NO_INPUT_NO_OUTPUT = 0x03, KEYBOARD_DISPLAY = 0x04
Definition at line 218 of file SMPTypes.cpp.
#define PM_PASSKEY_INI PairingMode::PASSKEY_ENTRY_ini |
Definition at line 219 of file SMPTypes.cpp.
#define PM_PASSKEY_RES PairingMode::PASSKEY_ENTRY_res |
Definition at line 220 of file SMPTypes.cpp.
#define PM_PASSKEY_ALL PairingMode::PASSKEY_ENTRY_ini |
Definition at line 221 of file SMPTypes.cpp.
#define PM_NUMCOMP_INI PairingMode::NUMERIC_COMPARE_ini |
Definition at line 222 of file SMPTypes.cpp.
#define PM_NUMCOMP_RES PairingMode::NUMERIC_COMPARE_res |
Definition at line 223 of file SMPTypes.cpp.
#define PM_NUMCOMP_ANY PairingMode::NUMERIC_COMPARE_ini |
Definition at line 224 of file SMPTypes.cpp.
#define KEYDISTFMT_ENUM | ( | X, | |
M | |||
) |
Definition at line 263 of file SMPTypes.cpp.
#define LTKPROP_ENUM | ( | X, | |
M | |||
) |
Definition at line 281 of file SMPTypes.cpp.
#define IRKPROP_ENUM | ( | X, | |
M | |||
) |
Definition at line 298 of file SMPTypes.cpp.
#define CSRKPROP_ENUM | ( | X, | |
M | |||
) |
Definition at line 322 of file SMPTypes.cpp.
#define SMP_LINKKEYTYPE_ENUM | ( | X | ) |
Definition at line 338 of file SMPTypes.cpp.
#define SMP_LINKKEYTYPE_TO_STRING | ( | V | ) | case SMPLinkKey::KeyType::V: return #V; |
Definition at line 350 of file SMPTypes.cpp.
#define OPCODE_ENUM | ( | X | ) |
Definition at line 360 of file SMPTypes.cpp.
#define CASE_TO_STRING_OPCODE | ( | V | ) | case Opcode::V: return #V; |
Definition at line 377 of file SMPTypes.cpp.
#define TYPECODE_ENUM | ( | X | ) |
Definition at line 409 of file SMPTypes.cpp.
#define CASE_TO_STRING_TYPECODE | ( | V | ) | case TypeCode::V: return #V; |
Definition at line 416 of file SMPTypes.cpp.
|
static |
Definition at line 41 of file SMPTypes.cpp.
|
static |
Definition at line 226 of file SMPTypes.cpp.
|
static |
Definition at line 234 of file SMPTypes.cpp.