Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Protected Member Functions | List of all members
direct_bt::MgmtEvtHCILELTKReq Class Reference

BT Core Spec v5.2: Vol 4, Part E HCI: 7.7.65.5 LE Long Term Key Request event. More...

#include <MgmtTypes.hpp>

Inheritance diagram for direct_bt::MgmtEvtHCILELTKReq:
Collaboration diagram for direct_bt::MgmtEvtHCILELTKReq:

Public Member Functions

 MgmtEvtHCILELTKReq (const uint16_t dev_id, const BDAddressAndType &addressAndType, const uint64_t rand, const uint16_t ediv)
 
const EUI48getAddress () const noexcept
 
BDAddressType getAddressType () const noexcept
 
const uint8_t * getData () const noexcept override
 
jau::nsize_t getDataOffset () const noexcept override
 
jau::nsize_t getDataSize () const noexcept override
 
constexpr uint16_t getEDIV () const noexcept
 Returns the 16-bit EDIV value (2 octets) being distributed. More...
 
constexpr uint64_t getRand () const noexcept
 Returns the 64-bit Rand value (8 octets) being distributed. More...
 
SMPLongTermKey toSMPLongTermKey (const bool isSC, const bool isAuth) const noexcept
 Convert this instance into its platform agnostic SMPLongTermKey type, invalid without LTK. More...
 
- Public Member Functions inherited from direct_bt::MgmtEvent
 MgmtEvent (const Opcode opc, const uint16_t dev_id, const uint16_t param_size, const uint8_t *param)
 
 MgmtEvent (const Opcode opc, const uint16_t dev_id, const uint16_t param_size=0)
 
 MgmtEvent (const uint8_t *buffer, const jau::nsize_t buffer_len, const jau::nsize_t exp_param_size)
 Persistent memory, w/ ownership . More...
 
 ~MgmtEvent () noexcept override=default
 
virtual const uint8_t * getData () const noexcept
 
virtual jau::nsize_t getDataOffset () const noexcept
 
virtual jau::nsize_t getDataSize () const noexcept
 
Opcode getOpcode () const noexcept
 
jau::nsize_t getTotalSize () const noexcept
 
std::string toString () const noexcept override
 
virtual bool validate (const MgmtCommand &req) const noexcept
 
- Public Member Functions inherited from direct_bt::MgmtMsg
 MgmtMsg (const uint16_t opc, const uint16_t dev_id, const uint16_t param_size)
 
 MgmtMsg (const uint8_t *buffer, const jau::nsize_t buffer_len)
 
virtual ~MgmtMsg ()=default
 
uint16_t getDevID () const noexcept
 
uint16_t getIntOpcode () const noexcept
 
uint16_t getParamSize () const noexcept
 
jau::TROOctetsgetPDU () noexcept
 Return the underlying octets read only. More...
 
uint64_t getTimestamp () const noexcept
 
jau::nsize_t getTotalSize () const noexcept
 
virtual std::string toString () const noexcept=0
 

Protected Member Functions

std::string baseString () const noexcept override
 
- Protected Member Functions inherited from direct_bt::MgmtEvent
std::string baseString () const noexcept override
 
std::string valueString () const noexcept override
 
virtual std::string baseString () const noexcept
 
virtual std::string valueString () const noexcept=0
 

Additional Inherited Members

- Public Types inherited from direct_bt::MgmtEvent
enum class  Opcode : uint16_t {
  INVALID = 0x0000 , CMD_COMPLETE = 0x0001 , CMD_STATUS = 0x0002 , CONTROLLER_ERROR = 0x0003 ,
  INDEX_ADDED = 0x0004 , INDEX_REMOVED = 0x0005 , NEW_SETTINGS = 0x0006 , CLASS_OF_DEV_CHANGED = 0x0007 ,
  LOCAL_NAME_CHANGED = 0x0008 , NEW_LINK_KEY = 0x0009 , NEW_LONG_TERM_KEY = 0x000A , DEVICE_CONNECTED = 0x000B ,
  DEVICE_DISCONNECTED = 0x000C , CONNECT_FAILED = 0x000D , PIN_CODE_REQUEST = 0x000E , USER_CONFIRM_REQUEST = 0x000F ,
  USER_PASSKEY_REQUEST = 0x0010 , AUTH_FAILED = 0x0011 , DEVICE_FOUND = 0x0012 , DISCOVERING = 0x0013 ,
  DEVICE_BLOCKED = 0x0014 , DEVICE_UNBLOCKED = 0x0015 , DEVICE_UNPAIRED = 0x0016 , PASSKEY_NOTIFY = 0x0017 ,
  NEW_IRK = 0x0018 , NEW_CSRK = 0x0019 , DEVICE_WHITELIST_ADDED = 0x001A , DEVICE_WHITELIST_REMOVED = 0x001B ,
  NEW_CONN_PARAM = 0x001C , UNCONF_INDEX_ADDED = 0x001D , UNCONF_INDEX_REMOVED = 0x001E , NEW_CONFIG_OPTIONS = 0x001F ,
  EXT_INDEX_ADDED = 0x0020 , EXT_INDEX_REMOVED = 0x0021 , LOCAL_OOB_DATA_UPDATED = 0x0022 , ADVERTISING_ADDED = 0x0023 ,
  ADVERTISING_REMOVED = 0x0024 , EXT_INFO_CHANGED = 0x0025 , PHY_CONFIGURATION_CHANGED = 0x0026 , EXP_FEATURE_CHANGED = 0x0027 ,
  DEVICE_FLAGS_CHANGED = 0x002a , ADV_MONITOR_ADDED = 0x002b , ADV_MONITOR_REMOVED = 0x002c , PAIR_DEVICE_COMPLETE = 0x002d ,
  HCI_ENC_CHANGED = 0x002e , HCI_ENC_KEY_REFRESH_COMPLETE = 0x002f , HCI_LE_REMOTE_FEATURES = 0x0030 , HCI_LE_PHY_UPDATE_COMPLETE = 0x0031 ,
  HCI_LE_LTK_REQUEST = 0x0032 , HCI_LE_LTK_REPLY_ACK = 0x0033 , HCI_LE_LTK_REPLY_REJ = 0x0034 , HCI_LE_ENABLE_ENC = 0x0035 ,
  MGMT_EVENT_TYPE_COUNT = 0x0036
}
 
- Static Public Member Functions inherited from direct_bt::MgmtEvent
static MgmtEvent::Opcode getOpcode (const uint8_t *buffer)
 
static std::string getOpcodeString (const Opcode opc) noexcept
 
static std::unique_ptr< MgmtEventgetSpecialized (const uint8_t *buffer, jau::nsize_t const buffer_size) noexcept
 Return a newly created specialized instance pointer to base class. More...
 
static constexpr uint16_t number (const Opcode rhs) noexcept
 
- Static Public Member Functions inherited from direct_bt::MgmtMsg
template<class T >
static T * clone (const T &source) noexcept
 Clone template for convenience, based on derived class's copy-constructor. More...
 
static uint16_t getDevID (const uint8_t *data)
 
static uint16_t getIntOpcode (const uint8_t *buffer)
 
- Static Protected Member Functions inherited from direct_bt::MgmtEvent
static void checkOpcode (const Opcode has, const Opcode exp)
 
static void checkOpcode (const Opcode has, const Opcode min, const Opcode max)
 
- Protected Attributes inherited from direct_bt::MgmtMsg
jau::POctets pdu
 
uint64_t ts_creation
 

Detailed Description

BT Core Spec v5.2: Vol 4, Part E HCI: 7.7.65.5 LE Long Term Key Request event.

This event indicates that the peer device being BTRole::Master, attempts to encrypt or re-encrypt the link and is requesting the LTK from the Host.

This event shall only be generated when the local device’s role is BTRole::Slave (responder, adapter in peripheral mode).

Rand and Ediv belong to the local device having role BTRole::Slave (responder).

Rand and Ediv matches the LTK from SMP messaging in SC mode only!

This is a Direct_BT extension for HCI.

Definition at line 2549 of file MgmtTypes.hpp.

Constructor & Destructor Documentation

◆ MgmtEvtHCILELTKReq()

direct_bt::MgmtEvtHCILELTKReq::MgmtEvtHCILELTKReq ( const uint16_t  dev_id,
const BDAddressAndType addressAndType,
const uint64_t  rand,
const uint16_t  ediv 
)
inline

Definition at line 2559 of file MgmtTypes.hpp.

Member Function Documentation

◆ baseString()

std::string direct_bt::MgmtEvtHCILELTKReq::baseString ( ) const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from direct_bt::MgmtEvent.

Definition at line 2552 of file MgmtTypes.hpp.

◆ getAddress()

const EUI48 & direct_bt::MgmtEvtHCILELTKReq::getAddress ( ) const
inlinenoexcept

Definition at line 2568 of file MgmtTypes.hpp.

◆ getAddressType()

BDAddressType direct_bt::MgmtEvtHCILELTKReq::getAddressType ( ) const
inlinenoexcept

Definition at line 2569 of file MgmtTypes.hpp.

◆ getRand()

constexpr uint64_t direct_bt::MgmtEvtHCILELTKReq::getRand ( ) const
inlineconstexprnoexcept

Returns the 64-bit Rand value (8 octets) being distributed.

See Vol 3, Part H, 2.4.2.3 SM - Generation of CSRK - LE legacy pairing - generation of LTK, EDIV and Rand.

Definition at line 2577 of file MgmtTypes.hpp.

◆ getEDIV()

constexpr uint16_t direct_bt::MgmtEvtHCILELTKReq::getEDIV ( ) const
inlineconstexprnoexcept

Returns the 16-bit EDIV value (2 octets) being distributed.

See Vol 3, Part H, 2.4.2.3 SM - Generation of CSRK - LE legacy pairing - generation of LTK, EDIV and Rand.

Definition at line 2585 of file MgmtTypes.hpp.

◆ getDataOffset()

jau::nsize_t direct_bt::MgmtEvtHCILELTKReq::getDataOffset ( ) const
inlineoverridevirtualnoexcept

Reimplemented from direct_bt::MgmtEvent.

Definition at line 2587 of file MgmtTypes.hpp.

◆ getDataSize()

jau::nsize_t direct_bt::MgmtEvtHCILELTKReq::getDataSize ( ) const
inlineoverridevirtualnoexcept

Reimplemented from direct_bt::MgmtEvent.

Definition at line 2588 of file MgmtTypes.hpp.

◆ getData()

const uint8_t * direct_bt::MgmtEvtHCILELTKReq::getData ( ) const
inlineoverridevirtualnoexcept

Reimplemented from direct_bt::MgmtEvent.

Definition at line 2589 of file MgmtTypes.hpp.

◆ toSMPLongTermKey()

SMPLongTermKey direct_bt::MgmtEvtHCILELTKReq::toSMPLongTermKey ( const bool  isSC,
const bool  isAuth 
) const
inlinenoexcept

Convert this instance into its platform agnostic SMPLongTermKey type, invalid without LTK.

LTK shall be completed via MgmtEvtHCILELTKReplyAckCmd.

Local device’s role is BTRole::Slave, responder.

Definition at line 2599 of file MgmtTypes.hpp.


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