OSDN Git Service

Encapsulate tBTM_CB::enc_rand, ediv, key_size
authorChris Manton <cmanton@google.com>
Sun, 20 Sep 2020 16:13:26 +0000 (09:13 -0700)
committerChris Manton <cmanton@google.com>
Sat, 3 Oct 2020 20:43:39 +0000 (13:43 -0700)
Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I7e5962356b64b52011e370deb03b53a2ca4b42ad

stack/btm/btm_int_types.h

index e24823d..49da0c2 100644 (file)
@@ -211,10 +211,15 @@ typedef struct {
                                         const Octet16& stk);
   uint16_t enc_handle;
 
- public:
+  friend void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
+                                  uint16_t ediv);
   BT_OCTET8 enc_rand; /* received rand value from LTK request*/
+
   uint16_t ediv;      /* received ediv value from LTK request */
+
   uint8_t key_size;
+
+ public:
   tBTM_BLE_VSC_CB cmn_ble_vsc_cb;
 
   /* Packet types supported by the local device */