1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
74
75
76
77
81
82
83
89
90
91
95
96
97
101
102
103
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
145
146
147
152
153
154
159
160
161
166
167
168
173
174
175
180
181
182
187
188
189
194
195
196
197
198
202
203
204
205
206
207
208
209
210
211
212
/* ... */
/* ... */
#ifndef LE_DEVICE_DB_H
#define LE_DEVICE_DB_H
#include "btstack_util.h"
#include "btstack_config.h"
#if defined __cplusplus
extern "C" {
#endif
/* ... */
/* ... */
void le_device_db_init(void);
/* ... */
void le_device_db_set_local_bd_addr(bd_addr_t bd_addr);
/* ... */
int le_device_db_add(int addr_type, bd_addr_t addr, sm_key_t irk);
/* ... */
int le_device_db_count(void);
/* ... */
int le_device_db_max_count(void);
/* ... */
void le_device_db_info(int index, int * addr_type, bd_addr_t addr, sm_key_t irk);
/* ... */
void le_device_db_encryption_set(int index, uint16_t ediv, uint8_t rand[8], sm_key_t ltk, int key_size, int authenticated, int authorized, int secure_connection);
/* ... */
void le_device_db_encryption_get(int index, uint16_t * ediv, uint8_t rand[8], sm_key_t ltk, int * key_size, int * authenticated, int * authorized, int * secure_connection);
#ifdef ENABLE_LE_SIGNED_WRITE
/* ... */
void le_device_db_local_csrk_set(int index, sm_key_t csrk);
/* ... */
void le_device_db_local_csrk_get(int index, sm_key_t csrk);
/* ... */
void le_device_db_remote_csrk_set(int index, sm_key_t csrk);
/* ... */
void le_device_db_remote_csrk_get(int index, sm_key_t csrk);
/* ... */
uint32_t le_device_db_remote_counter_get(int index);
/* ... */
void le_device_db_remote_counter_set(int index, uint32_t counter);
/* ... */
uint32_t le_device_db_local_counter_get(int index);
/* ... */
void le_device_db_local_counter_set(int index, uint32_t counter);
/* ... */
#endif
/* ... */
void le_device_db_remove(int index);
void le_device_db_dump(void);
#if defined __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif