ble_gatt_client
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
hci_lib.h
Go to the documentation of this file.
1 /*
2  *
3  * BlueZ - Bluetooth protocol stack for Linux
4  *
5  * Copyright (C) 2000-2001 Qualcomm Incorporated
6  * Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
7  * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 #ifndef __HCI_LIB_H
27 #define __HCI_LIB_H
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct hci_request {
34  uint16_t ogf;
35  uint16_t ocf;
36  int event;
37  void *cparam;
38  int clen;
39  void *rparam;
40  int rlen;
41 };
42 
43 struct hci_version {
44  uint16_t manufacturer;
45  uint8_t hci_ver;
46  uint16_t hci_rev;
47  uint8_t lmp_ver;
48  uint16_t lmp_subver;
49 };
50 
51 int hci_open_dev(int dev_id);
52 int hci_close_dev(int dd);
53 int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void *param);
54 int hci_send_req(int dd, struct hci_request *req, int timeout);
55 
56 int hci_create_connection(int dd, const bdaddr_t *bdaddr, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to);
57 int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to);
58 
59 int hci_inquiry(int dev_id, int len, int num_rsp, const uint8_t *lap, inquiry_info **ii, long flags);
60 int hci_devinfo(int dev_id, struct hci_dev_info *di);
61 int hci_devba(int dev_id, bdaddr_t *bdaddr);
62 int hci_devid(const char *str);
63 
64 int hci_read_local_name(int dd, int len, char *name, int to);
65 int hci_write_local_name(int dd, const char *name, int to);
66 int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to);
67 int hci_read_remote_name_with_clock_offset(int dd, const bdaddr_t *bdaddr, uint8_t pscan_rep_mode, uint16_t clkoffset, int len, char *name, int to);
68 int hci_read_remote_name_cancel(int dd, const bdaddr_t *bdaddr, int to);
69 int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to);
70 int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to);
71 int hci_read_remote_ext_features(int dd, uint16_t handle, uint8_t page, uint8_t *max_page, uint8_t *features, int to);
72 int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to);
73 int hci_read_local_version(int dd, struct hci_version *ver, int to);
74 int hci_read_local_commands(int dd, uint8_t *commands, int to);
75 int hci_read_local_features(int dd, uint8_t *features, int to);
76 int hci_read_local_ext_features(int dd, uint8_t page, uint8_t *max_page, uint8_t *features, int to);
77 int hci_read_bd_addr(int dd, bdaddr_t *bdaddr, int to);
78 int hci_read_class_of_dev(int dd, uint8_t *cls, int to);
79 int hci_write_class_of_dev(int dd, uint32_t cls, int to);
80 int hci_read_voice_setting(int dd, uint16_t *vs, int to);
81 int hci_write_voice_setting(int dd, uint16_t vs, int to);
82 int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to);
83 int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to);
84 int hci_read_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t all, int to);
85 int hci_write_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t *key, int to);
86 int hci_delete_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t all, int to);
87 int hci_authenticate_link(int dd, uint16_t handle, int to);
88 int hci_encrypt_link(int dd, uint16_t handle, uint8_t encrypt, int to);
89 int hci_change_link_key(int dd, uint16_t handle, int to);
90 int hci_switch_role(int dd, bdaddr_t *bdaddr, uint8_t role, int to);
91 int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to);
92 int hci_exit_park_mode(int dd, uint16_t handle, int to);
93 int hci_read_inquiry_scan_type(int dd, uint8_t *type, int to);
94 int hci_write_inquiry_scan_type(int dd, uint8_t type, int to);
95 int hci_read_inquiry_mode(int dd, uint8_t *mode, int to);
96 int hci_write_inquiry_mode(int dd, uint8_t mode, int to);
97 int hci_read_afh_mode(int dd, uint8_t *mode, int to);
98 int hci_write_afh_mode(int dd, uint8_t mode, int to);
99 int hci_read_ext_inquiry_response(int dd, uint8_t *fec, uint8_t *data, int to);
100 int hci_write_ext_inquiry_response(int dd, uint8_t fec, uint8_t *data, int to);
101 int hci_read_simple_pairing_mode(int dd, uint8_t *mode, int to);
102 int hci_write_simple_pairing_mode(int dd, uint8_t mode, int to);
103 int hci_read_local_oob_data(int dd, uint8_t *hash, uint8_t *randomizer, int to);
104 int hci_read_inq_response_tx_power_level(int dd, int8_t *level, int to);
105 int hci_read_inquiry_transmit_power_level(int dd, int8_t *level, int to);
106 int hci_write_inquiry_transmit_power_level(int dd, int8_t level, int to);
107 int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, int8_t *level, int to);
108 int hci_read_link_policy(int dd, uint16_t handle, uint16_t *policy, int to);
109 int hci_write_link_policy(int dd, uint16_t handle, uint16_t policy, int to);
110 int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to);
111 int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to);
112 int hci_set_afh_classification(int dd, uint8_t *map, int to);
113 int hci_read_link_quality(int dd, uint16_t handle, uint8_t *link_quality, int to);
114 int hci_read_rssi(int dd, uint16_t handle, int8_t *rssi, int to);
115 int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to);
116 int hci_read_clock(int dd, uint16_t handle, uint8_t which, uint32_t *clock, uint16_t *accuracy, int to);
117 
118 int hci_le_set_scan_enable(int dev_id, uint8_t enable, uint8_t filter_dup, int to);
119 int hci_le_set_scan_parameters(int dev_id, uint8_t type, uint16_t interval,
120  uint16_t window, uint8_t own_type,
121  uint8_t filter, int to);
122 int hci_le_set_advertise_enable(int dev_id, uint8_t enable, int to);
123 int hci_le_create_conn(int dd, uint16_t interval, uint16_t window,
124  uint8_t initiator_filter, uint8_t peer_bdaddr_type,
125  bdaddr_t peer_bdaddr, uint8_t own_bdaddr_type,
126  uint16_t min_interval, uint16_t max_interval,
127  uint16_t latency, uint16_t supervision_timeout,
128  uint16_t min_ce_length, uint16_t max_ce_length,
129  uint16_t *handle, int to);
130 int hci_le_conn_update(int dd, uint16_t handle, uint16_t min_interval,
131  uint16_t max_interval, uint16_t latency,
132  uint16_t supervision_timeout, int to);
133 int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
134 int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
135 int hci_le_read_white_list_size(int dd, uint8_t *size, int to);
136 int hci_le_clear_white_list(int dd, int to);
137 int hci_le_add_resolving_list(int dd, const bdaddr_t *bdaddr, uint8_t type,
138  uint8_t *peer_irk, uint8_t *local_irk, int to);
139 int hci_le_rm_resolving_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
140 int hci_le_clear_resolving_list(int dd, int to);
141 int hci_le_read_resolving_list_size(int dd, uint8_t *size, int to);
142 int hci_le_set_address_resolution_enable(int dev_id, uint8_t enable, int to);
143 int hci_le_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to);
144 
145 int hci_for_each_dev(int flag, int(*func)(int dd, int dev_id, long arg), long arg);
146 int hci_get_route(bdaddr_t *bdaddr);
147 
148 char *hci_bustostr(int bus);
149 char *hci_typetostr(int type);
150 char *hci_dtypetostr(int type);
151 char *hci_dflagstostr(uint32_t flags);
152 char *hci_ptypetostr(unsigned int ptype);
153 int hci_strtoptype(char *str, unsigned int *val);
154 char *hci_scoptypetostr(unsigned int ptype);
155 int hci_strtoscoptype(char *str, unsigned int *val);
156 char *hci_lptostr(unsigned int ptype);
157 int hci_strtolp(char *str, unsigned int *val);
158 char *hci_lmtostr(unsigned int ptype);
159 int hci_strtolm(char *str, unsigned int *val);
160 
161 char *hci_cmdtostr(unsigned int cmd);
162 char *hci_commandstostr(uint8_t *commands, char *pref, int width);
163 
164 char *hci_vertostr(unsigned int ver);
165 int hci_strtover(char *str, unsigned int *ver);
166 char *lmp_vertostr(unsigned int ver);
167 int lmp_strtover(char *str, unsigned int *ver);
168 char *pal_vertostr(unsigned int ver);
169 int pal_strtover(char *str, unsigned int *ver);
170 
171 char *lmp_featurestostr(uint8_t *features, char *pref, int width);
172 
173 static inline void hci_set_bit(int nr, void *addr)
174 {
175  *((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31));
176 }
177 
178 static inline void hci_clear_bit(int nr, void *addr)
179 {
180  *((uint32_t *) addr + (nr >> 5)) &= ~(1 << (nr & 31));
181 }
182 
183 static inline int hci_test_bit(int nr, void *addr)
184 {
185  return *((uint32_t *) addr + (nr >> 5)) & (1 << (nr & 31));
186 }
187 
188 /* HCI filter tools */
189 static inline void hci_filter_clear(struct hci_filter *f)
190 {
191  memset(f, 0, sizeof(*f));
192 }
193 static inline void hci_filter_set_ptype(int t, struct hci_filter *f)
194 {
195  hci_set_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask);
196 }
197 static inline void hci_filter_clear_ptype(int t, struct hci_filter *f)
198 {
199  hci_clear_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask);
200 }
201 static inline int hci_filter_test_ptype(int t, struct hci_filter *f)
202 {
203  return hci_test_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask);
204 }
205 static inline void hci_filter_all_ptypes(struct hci_filter *f)
206 {
207  memset((void *) &f->type_mask, 0xff, sizeof(f->type_mask));
208 }
209 static inline void hci_filter_set_event(int e, struct hci_filter *f)
210 {
212 }
213 static inline void hci_filter_clear_event(int e, struct hci_filter *f)
214 {
216 }
217 static inline int hci_filter_test_event(int e, struct hci_filter *f)
218 {
219  return hci_test_bit((e & HCI_FLT_EVENT_BITS), &f->event_mask);
220 }
221 static inline void hci_filter_all_events(struct hci_filter *f)
222 {
223  memset((void *) f->event_mask, 0xff, sizeof(f->event_mask));
224 }
225 static inline void hci_filter_set_opcode(int opcode, struct hci_filter *f)
226 {
227  f->opcode = opcode;
228 }
229 static inline void hci_filter_clear_opcode(struct hci_filter *f)
230 {
231  f->opcode = 0;
232 }
233 static inline int hci_filter_test_opcode(int opcode, struct hci_filter *f)
234 {
235  return (f->opcode == opcode);
236 }
237 
238 #ifdef __cplusplus
239 }
240 #endif
241 
242 #endif /* __HCI_LIB_H */
int hci_le_add_resolving_list(int dd, const bdaddr_t *bdaddr, uint8_t type, uint8_t *peer_irk, uint8_t *local_irk, int to)
Definition: hci.c:1764
char * lmp_vertostr(unsigned int ver)
Definition: hci.c:820
int hci_read_link_policy(int dd, uint16_t handle, uint16_t *policy, int to)
Definition: hci.c:3413
int hci_read_simple_pairing_mode(int dd, uint8_t *mode, int to)
Definition: hci.c:3191
command_func_t func
int hci_devid(const char *str)
Definition: hci.c:1130
enum att_op_type type
Definition: att.c:141
static void hci_set_bit(int nr, void *addr)
Definition: hci_lib.h:173
int hci_read_inquiry_scan_type(int dd, uint8_t *type, int to)
Definition: hci.c:2918
int hci_le_read_resolving_list_size(int dd, uint8_t *size, int to)
Definition: hci.c:1873
uint16_t hci_rev
Definition: hci_lib.h:46
int hci_exit_park_mode(int dd, uint16_t handle, int to)
Definition: hci.c:2881
int hci_read_local_commands(int dd, uint8_t *commands, int to)
Definition: hci.c:2302
static int hci_filter_test_ptype(int t, struct hci_filter *f)
Definition: hci_lib.h:201
char * pal_vertostr(unsigned int ver)
Definition: hci.c:848
int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, int8_t *level, int to)
Definition: hci.c:3373
int hci_le_set_scan_enable(int dev_id, uint8_t enable, uint8_t filter_dup, int to)
Definition: hci.c:3744
int rlen
Definition: hci_lib.h:40
int clen
Definition: hci_lib.h:38
char * hci_bustostr(int bus)
Definition: hci.c:189
int hci_get_route(bdaddr_t *bdaddr)
Definition: hci.c:1111
void * rparam
Definition: hci_lib.h:39
int hci_read_ext_inquiry_response(int dd, uint8_t *fec, uint8_t *data, int to)
Definition: hci.c:3120
int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to)
Definition: hci.c:2097
int hci_write_class_of_dev(int dd, uint32_t cls, int to)
Definition: hci.c:2476
int hci_read_rssi(int dd, uint16_t handle, int8_t *rssi, int to)
Definition: hci.c:3630
int hci_devba(int dev_id, bdaddr_t *bdaddr)
Definition: hci.c:1182
static void hci_filter_clear_opcode(struct hci_filter *f)
Definition: hci_lib.h:229
char * hci_commandstostr(uint8_t *commands, char *pref, int width)
Definition: hci.c:735
int lmp_strtover(char *str, unsigned int *ver)
Definition: hci.c:832
uint16_t ocf
Definition: hci_lib.h:35
int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to)
Definition: hci.c:2555
int hci_read_afh_mode(int dd, uint8_t *mode, int to)
Definition: hci.c:3052
static void hci_filter_all_ptypes(struct hci_filter *f)
Definition: hci_lib.h:205
uint16_t opcode
Definition: hci.h:2355
int hci_write_inquiry_mode(int dd, uint8_t mode, int to)
Definition: hci.c:3016
int hci_set_afh_classification(int dd, uint8_t *map, int to)
Definition: hci.c:3558
int hci_write_inquiry_scan_type(int dd, uint8_t type, int to)
Definition: hci.c:2949
int hci_read_voice_setting(int dd, uint16_t *vs, int to)
Definition: hci.c:2500
static void hci_filter_all_events(struct hci_filter *f)
Definition: hci_lib.h:221
int hci_authenticate_link(int dd, uint16_t handle, int to)
Definition: hci.c:2696
int hci_read_clock(int dd, uint16_t handle, uint8_t which, uint32_t *clock, uint16_t *accuracy, int to)
Definition: hci.c:3703
int hci_strtolp(char *str, unsigned int *val)
Definition: hci.c:391
int hci_close_dev(int dd)
Definition: hci.c:1326
uint16_t lmp_subver
Definition: hci_lib.h:48
char * hci_scoptypetostr(unsigned int ptype)
Definition: hci.c:346
int hci_read_local_ext_features(int dd, uint8_t page, uint8_t *max_page, uint8_t *features, int to)
Definition: hci.c:2370
int hci_read_inq_response_tx_power_level(int dd, int8_t *level, int to)
Definition: hci.c:3291
int hci_le_clear_resolving_list(int dd, int to)
Definition: hci.c:1843
int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to)
Definition: hci.c:2588
int hci_le_create_conn(int dd, uint16_t interval, uint16_t window, uint8_t initiator_filter, uint8_t peer_bdaddr_type, bdaddr_t peer_bdaddr, uint8_t own_bdaddr_type, uint16_t min_interval, uint16_t max_interval, uint16_t latency, uint16_t supervision_timeout, uint16_t min_ce_length, uint16_t max_ce_length, uint16_t *handle, int to)
Definition: hci.c:3875
int hci_read_local_name(int dd, int len, char *name, int to)
Definition: hci.c:1943
int hci_delete_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t all, int to)
Definition: hci.c:2670
static int hci_filter_test_event(int e, struct hci_filter *f)
Definition: hci_lib.h:217
int hci_read_bd_addr(int dd, bdaddr_t *bdaddr, int to)
Definition: hci.c:2412
int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to)
Definition: hci.c:3520
static int hci_test_bit(int nr, void *addr)
Definition: hci_lib.h:183
int hci_le_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to)
Definition: hci.c:3982
int hci_read_remote_name_cancel(int dd, const bdaddr_t *bdaddr, int to)
Definition: hci.c:2068
int hci_encrypt_link(int dd, uint16_t handle, uint8_t encrypt, int to)
Definition: hci.c:2732
char * hci_lmtostr(unsigned int ptype)
Definition: hci.c:415
int hci_le_set_advertise_enable(int dev_id, uint8_t enable, int to)
Definition: hci.c:3827
static void hci_filter_set_opcode(int opcode, struct hci_filter *f)
Definition: hci_lib.h:225
int hci_le_set_address_resolution_enable(int dev_id, uint8_t enable, int to)
Definition: hci.c:1908
int hci_inquiry(int dev_id, int len, int num_rsp, const uint8_t *lap, inquiry_info **ii, long flags)
Definition: hci.c:1212
int hci_read_remote_name_with_clock_offset(int dd, const bdaddr_t *bdaddr, uint8_t pscan_rep_mode, uint16_t clkoffset, int len, char *name, int to)
Definition: hci.c:2007
static void hci_filter_clear_event(int e, struct hci_filter *f)
Definition: hci_lib.h:213
int hci_le_read_white_list_size(int dd, uint8_t *size, int to)
Definition: hci.c:1697
int hci_read_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t all, int to)
Definition: hci.c:2615
int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to)
Definition: hci.c:2229
int hci_write_simple_pairing_mode(int dd, uint8_t mode, int to)
Definition: hci.c:3222
int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void *param)
Definition: hci.c:1343
uint16_t manufacturer
Definition: hci_lib.h:44
static void hci_clear_bit(int nr, void *addr)
Definition: hci_lib.h:178
static int hci_filter_test_opcode(int opcode, struct hci_filter *f)
Definition: hci_lib.h:233
#define HCI_FLT_TYPE_BITS
Definition: hci.h:2358
int event
Definition: hci_lib.h:36
int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
Definition: hci.c:1622
char * hci_cmdtostr(unsigned int cmd)
Definition: hci.c:722
int hci_write_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t *key, int to)
Definition: hci.c:2642
int hci_read_local_version(int dd, struct hci_version *ver, int to)
Definition: hci.c:2267
int hci_read_class_of_dev(int dd, uint8_t *cls, int to)
Definition: hci.c:2445
int hci_write_ext_inquiry_response(int dd, uint8_t fec, uint8_t *data, int to)
Definition: hci.c:3154
uint8_t lmp_ver
Definition: hci_lib.h:47
int hci_read_inquiry_mode(int dd, uint8_t *mode, int to)
Definition: hci.c:2985
char * hci_ptypetostr(unsigned int ptype)
Definition: hci.c:323
int hci_le_clear_white_list(int dd, int to)
Definition: hci.c:1731
static void hci_filter_clear(struct hci_filter *f)
Definition: hci_lib.h:189
char * hci_vertostr(unsigned int ver)
Definition: hci.c:797
int hci_for_each_dev(int flag, int(*func)(int dd, int dev_id, long arg), long arg)
Definition: hci.c:1019
int hci_change_link_key(int dd, uint16_t handle, int to)
Definition: hci.c:2768
#define HCI_VENDOR_PKT
Definition: hci.h:118
int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to)
Definition: hci.c:2053
int hci_read_local_oob_data(int dd, uint8_t *hash, uint8_t *randomizer, int to)
Definition: hci.c:3259
uint8_t hci_ver
Definition: hci_lib.h:45
int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to)
Definition: hci.c:2139
int pal_strtover(char *str, unsigned int *ver)
Definition: hci.c:860
char * cmd
int hci_send_req(int dd, struct hci_request *req, int timeout)
Definition: hci.c:1381
int hci_write_link_policy(int dd, uint16_t handle, uint16_t policy, int to)
Definition: hci.c:3447
int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to)
Definition: hci.c:3485
char * hci_dtypetostr(int type)
Definition: hci.c:217
char * hci_lptostr(unsigned int ptype)
Definition: hci.c:379
uint16_t ogf
Definition: hci_lib.h:34
int hci_strtoscoptype(char *str, unsigned int *val)
Definition: hci.c:358
int hci_read_inquiry_transmit_power_level(int dd, int8_t *level, int to)
Definition: hci.c:3322
char * lmp_featurestostr(uint8_t *features, char *pref, int width)
Definition: hci.c:962
int hci_devinfo(int dev_id, struct hci_dev_info *di)
Definition: hci.c:1155
int hci_le_set_scan_parameters(int dev_id, uint8_t type, uint16_t interval, uint16_t window, uint8_t own_type, uint8_t filter, int to)
Definition: hci.c:3785
int hci_strtolm(char *str, unsigned int *val)
Definition: hci.c:443
int hci_write_inquiry_transmit_power_level(int dd, int8_t level, int to)
Definition: hci.c:3335
int hci_read_link_quality(int dd, uint16_t handle, uint8_t *link_quality, int to)
Definition: hci.c:3595
char * hci_typetostr(int type)
Definition: hci.c:228
int hci_write_voice_setting(int dd, uint16_t vs, int to)
Definition: hci.c:2531
int hci_strtover(char *str, unsigned int *ver)
Definition: hci.c:809
int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to)
Definition: hci.c:2841
int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to)
Definition: hci.c:1584
int hci_open_dev(int dev_id)
Definition: hci.c:1287
uint32_t event_mask[2]
Definition: hci.h:2354
int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to)
Definition: hci.c:3665
int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
Definition: hci.c:1660
uint8_t opcode
Definition: att.c:140
static void hci_filter_set_event(int e, struct hci_filter *f)
Definition: hci_lib.h:209
int hci_read_remote_ext_features(int dd, uint16_t handle, uint8_t page, uint8_t *max_page, uint8_t *features, int to)
Definition: hci.c:2182
#define HCI_FLT_EVENT_BITS
Definition: hci.h:2359
int hci_switch_role(int dd, bdaddr_t *bdaddr, uint8_t role, int to)
Definition: hci.c:2804
int hci_write_local_name(int dd, const char *name, int to)
Definition: hci.c:1975
char * hci_dflagstostr(uint32_t flags)
Definition: hci.c:260
static void hci_filter_clear_ptype(int t, struct hci_filter *f)
Definition: hci_lib.h:197
void * cparam
Definition: hci_lib.h:37
int hci_le_conn_update(int dd, uint16_t handle, uint16_t min_interval, uint16_t max_interval, uint16_t latency, uint16_t supervision_timeout, int to)
Definition: hci.c:3936
int hci_write_afh_mode(int dd, uint8_t mode, int to)
Definition: hci.c:3083
int hci_le_rm_resolving_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
Definition: hci.c:1807
int hci_strtoptype(char *str, unsigned int *val)
Definition: hci.c:335
int hci_read_local_features(int dd, uint8_t *features, int to)
Definition: hci.c:2335
uint32_t type_mask
Definition: hci.h:2353
int hci_create_connection(int dd, const bdaddr_t *bdaddr, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to)
Definition: hci.c:1539
static void hci_filter_set_ptype(int t, struct hci_filter *f)
Definition: hci_lib.h:193