From a48d8b4639f36e6fc2d7e87cac92e178674caaa1 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Fri, 8 Mar 2002 21:10:06 +0000 Subject: Initial revision --- include/hci_lib.h | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 include/hci_lib.h (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h new file mode 100644 index 00000000..0776e1ba --- /dev/null +++ b/include/hci_lib.h @@ -0,0 +1,115 @@ +/* + BlueZ - Bluetooth protocol stack for Linux + Copyright (C) 2000-2001 Qualcomm Incorporated + + Written 2000,2001 by Maxim Krasnyansky + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation; + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY + CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, + COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS + SOFTWARE IS DISCLAIMED. +*/ + +/* + * $Id$ + */ + +#ifndef __HCI_LIB_H +#define __HCI_LIB_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct hci_request { + uint16_t ogf; + uint16_t ocf; + int event; + void *cparam; + int clen; + void *rparam; + int rlen; +}; + +struct hci_version { + uint16_t manufacturer; + uint8_t hci_ver; + uint16_t hci_rev; + uint8_t lmp_ver; + uint16_t lmp_subver; +}; + +int hci_open_dev(int dev_id); +int hci_close_dev(int dd); +int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void *param); +int hci_send_req(int dd, struct hci_request *req, int timeout); + +int hci_create_connection(int dd, bdaddr_t *ba, int ptype, int rswitch, int to); +int hci_disconnect(int dd, int hndl, int res, int to); + +inquiry_info *hci_inquiry(int dev_id, int len, int *num_rsp, uint8_t *lap, long flags); +int hci_devinfo(int dev_id, struct hci_dev_info *di); + +int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); +int hci_read_remote_features(int dd, int hndl, uint8_t *features, int to); +int hci_read_remote_version(int dd, int hndl, struct hci_version *ver, int to); +int hci_read_local_version(int dd, struct hci_version *ver, int to); + +char *hci_dtypetostr(int type); +char *hci_dflagstostr(uint32_t flags); +char *hci_ptypetostr(unsigned int ptype); +int hci_strtoptype(char *str, unsigned int *val); +char *hci_lptostr(unsigned int ptype); +int hci_strtolp(char *str, unsigned int *val); +char *hci_lmtostr(unsigned int ptype); +int hci_strtolm(char *str, unsigned int *val); + +static inline void hci_set_bit(int nr, void *addr) +{ + *((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31)); +} + +static inline int hci_test_bit(int nr, void *addr) +{ + return *((uint32_t *) addr + (nr >> 5)) & (1 << (nr & 31)); +} + +/* HCI filter tools */ +static inline void hci_filter_clear(struct hci_filter *f) +{ + memset(f, 0, sizeof(*f)); +} +static inline void hci_filter_set_ptype(int t, struct hci_filter *f) +{ + hci_set_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); +} +static inline void hci_filter_set_event(int e, struct hci_filter *f) +{ + hci_set_bit((e & HCI_FLT_EVENT_BITS), &f->event_mask); +} +static inline void hci_filter_all_events(struct hci_filter *f) +{ + memset((void *)f->event_mask, 0xff, sizeof(f->event_mask)); +} +static inline void hci_filter_set_opcode(int opcode, struct hci_filter *f) +{ + f->opcode = opcode; +} + +#ifdef __cplusplus +} +#endif + +#endif /* __HCI_LIB_H */ -- cgit From 9ff2c721bb4ff84ad15e4593404bf47941315337 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 19 Mar 2002 17:35:54 +0000 Subject: Added hci_local_name function. --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 0776e1ba..5a5d2ae7 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -62,6 +62,7 @@ int hci_disconnect(int dd, int hndl, int res, int to); inquiry_info *hci_inquiry(int dev_id, int len, int *num_rsp, uint8_t *lap, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); +int hci_local_name(int dd, int len, char *name, int to); int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_features(int dd, int hndl, uint8_t *features, int to); int hci_read_remote_version(int dd, int hndl, struct hci_version *ver, int to); -- cgit From be6ddaecae3cb232e79c2f7bbcc2c9277ec4494b Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 19 Mar 2002 18:19:12 +0000 Subject: HCI filter additions. --- include/hci_lib.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 5a5d2ae7..28a32993 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -96,6 +96,10 @@ static inline void hci_filter_set_ptype(int t, struct hci_filter *f) { hci_set_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); } +static inline void hci_filter_all_ptypes(struct hci_filter *f) +{ + memset((void *)&f->type_mask, 0xff, sizeof(f->type_mask)); +} static inline void hci_filter_set_event(int e, struct hci_filter *f) { hci_set_bit((e & HCI_FLT_EVENT_BITS), &f->event_mask); -- cgit From a51747b602f9cd03c7431788f80431c1710f5827 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Thu, 21 Mar 2002 23:20:32 +0000 Subject: Additional strtoXX and XXtostr functions. --- include/hci_lib.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 28a32993..c590150d 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -77,6 +77,11 @@ int hci_strtolp(char *str, unsigned int *val); char *hci_lmtostr(unsigned int ptype); int hci_strtolm(char *str, unsigned int *val); +char *hci_vertostr(unsigned int ver); +int hci_strtover(char *str, unsigned int *ver); +char *lmp_vertostr(unsigned int ver); +int lmp_strtover(char *str, unsigned int *ver); + static inline void hci_set_bit(int nr, void *addr) { *((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31)); -- cgit From 0a6472fe170438016c23c71d9129e627f26cd398 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Fri, 22 Mar 2002 19:45:46 +0000 Subject: Fixed compiler options and warnings. Proper parameter types. Cleanup. --- include/hci_lib.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index c590150d..ed3306ab 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -56,16 +56,16 @@ int hci_close_dev(int dd); int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void *param); int hci_send_req(int dd, struct hci_request *req, int timeout); -int hci_create_connection(int dd, bdaddr_t *ba, int ptype, int rswitch, int to); -int hci_disconnect(int dd, int hndl, int res, int to); +int hci_create_connection(int dd, bdaddr_t *ba, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to); +int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to); inquiry_info *hci_inquiry(int dev_id, int len, int *num_rsp, uint8_t *lap, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_local_name(int dd, int len, char *name, int to); int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); -int hci_read_remote_features(int dd, int hndl, uint8_t *features, int to); -int hci_read_remote_version(int dd, int hndl, struct hci_version *ver, int to); +int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); +int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); char *hci_dtypetostr(int type); -- cgit From 8dab9b0bcab616bde55a3a137bd6fb8818ced4a5 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Thu, 11 Apr 2002 16:56:10 +0000 Subject: Added LMP features to sting translation function and table. --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index ed3306ab..10374a30 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -82,6 +82,8 @@ int hci_strtover(char *str, unsigned int *ver); char *lmp_vertostr(unsigned int ver); int lmp_strtover(char *str, unsigned int *ver); +char *lmp_featurestostr(uint8_t *features, char *pref, int width); + static inline void hci_set_bit(int nr, void *addr) { *((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31)); -- cgit From 083ac35c0e178f548da930e91fe4154a4993af0e Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Thu, 11 Apr 2002 18:19:58 +0000 Subject: Added hci_class_of_dev function. hci_req initialization cleanup. --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 10374a30..5a49fd35 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -67,6 +67,7 @@ int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); +int hci_class_of_dev(int dd, uint8_t *class, int to); char *hci_dtypetostr(int type); char *hci_dflagstostr(uint32_t flags); -- cgit From 16591cb20976879e8189d46d24ed1b41b0941a27 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Mon, 22 Apr 2002 20:12:15 +0000 Subject: Additional hci_filter_ functions --- include/hci_lib.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 5a49fd35..ecf180be 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -90,6 +90,11 @@ static inline void hci_set_bit(int nr, void *addr) *((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31)); } +static inline void hci_clear_bit(int nr, void *addr) +{ + *((uint32_t *) addr + (nr >> 5)) &= ~(1 << (nr & 31)); +} + static inline int hci_test_bit(int nr, void *addr) { return *((uint32_t *) addr + (nr >> 5)) & (1 << (nr & 31)); @@ -104,6 +109,14 @@ static inline void hci_filter_set_ptype(int t, struct hci_filter *f) { hci_set_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); } +static inline void hci_filter_clear_ptype(int t, struct hci_filter *f) +{ + hci_clear_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); +} +static inline int hci_filter_test_ptype(int t, struct hci_filter *f) +{ + return hci_test_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); +} static inline void hci_filter_all_ptypes(struct hci_filter *f) { memset((void *)&f->type_mask, 0xff, sizeof(f->type_mask)); @@ -112,6 +125,14 @@ static inline void hci_filter_set_event(int e, struct hci_filter *f) { hci_set_bit((e & HCI_FLT_EVENT_BITS), &f->event_mask); } +static inline void hci_filter_clear_event(int e, struct hci_filter *f) +{ + hci_clear_bit((e & HCI_FLT_EVENT_BITS), &f->event_mask); +} +static inline int hci_filter_test_event(int e, struct hci_filter *f) +{ + return hci_test_bit((e & HCI_FLT_EVENT_BITS), &f->event_mask); +} static inline void hci_filter_all_events(struct hci_filter *f) { memset((void *)f->event_mask, 0xff, sizeof(f->event_mask)); @@ -120,6 +141,14 @@ static inline void hci_filter_set_opcode(int opcode, struct hci_filter *f) { f->opcode = opcode; } +static inline void hci_filter_clear_opcode(int opcode, struct hci_filter *f) +{ + f->opcode = 0; +} +static inline int hci_filter_test_opcode(int opcode, struct hci_filter *f) +{ + return (f->opcode == opcode); +} #ifdef __cplusplus } -- cgit From bf19cd7953fbc8cc916b9514d8f11fc8557f0cec Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Fri, 17 May 2002 17:12:30 +0000 Subject: Add hci_devba function --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index ecf180be..02c56a1f 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -61,6 +61,7 @@ int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to); inquiry_info *hci_inquiry(int dev_id, int len, int *num_rsp, uint8_t *lap, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); +int hci_devba(int dev_id, bdaddr_t *ba); int hci_local_name(int dd, int len, char *name, int to); int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); -- cgit From 4837bd7e9ba55361aeca45610a160dd107d5be2f Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 18 Jun 2002 16:46:54 +0000 Subject: Fix inquiry function to return errors and accept user buffers. New functions hci_for_each_dev and hci_get_route. --- include/hci_lib.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 02c56a1f..7fd95cfc 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -59,7 +59,7 @@ int hci_send_req(int dd, struct hci_request *req, int timeout); int hci_create_connection(int dd, bdaddr_t *ba, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to); int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to); -inquiry_info *hci_inquiry(int dev_id, int len, int *num_rsp, uint8_t *lap, long flags); +int hci_inquiry(int dev_id, int len, int num_rsp, uint8_t *lap, inquiry_info **ii, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *ba); @@ -70,6 +70,9 @@ int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, in int hci_read_local_version(int dd, struct hci_version *ver, int to); int hci_class_of_dev(int dd, uint8_t *class, int to); +int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); +int hci_get_route(bdaddr_t *bdaddr); + char *hci_dtypetostr(int type); char *hci_dflagstostr(uint32_t flags); char *hci_ptypetostr(unsigned int ptype); -- cgit From d316a5fbab4a41ce3f8321eef407db9c53b57e85 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 18 Jun 2002 18:15:13 +0000 Subject: Added hci_devid function. --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 7fd95cfc..982c7608 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -62,6 +62,7 @@ int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to); int hci_inquiry(int dev_id, int len, int num_rsp, uint8_t *lap, inquiry_info **ii, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *ba); +int hci_devid(bdaddr_t *ba); int hci_local_name(int dd, int len, char *name, int to); int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); -- cgit From 9942261d0febb9ef243ffe810421451e97925e68 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 18 Jun 2002 18:32:44 +0000 Subject: improved hci_devid --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 982c7608..b988de5f 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -62,7 +62,7 @@ int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to); int hci_inquiry(int dev_id, int len, int num_rsp, uint8_t *lap, inquiry_info **ii, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *ba); -int hci_devid(bdaddr_t *ba); +int hci_devid(char *str); int hci_local_name(int dd, int len, char *name, int to); int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); -- cgit From 803bf105508009f7efc87276a539dda244527690 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Wed, 21 Aug 2002 16:38:15 +0000 Subject: implement hci_{read, write}_current_iac_lap() --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index b988de5f..afa2fb51 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -70,6 +70,8 @@ int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to) int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); int hci_class_of_dev(int dd, uint8_t *class, int to); +int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); +int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 9aa01920bf2e6f3b9b23b44d7c5e48dadc2f8da8 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Thu, 22 Aug 2002 09:19:29 +0000 Subject: implement hci_{read, write}_class_of_dev() --- include/hci_lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index afa2fb51..ba33be73 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -69,7 +69,8 @@ int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); -int hci_class_of_dev(int dd, uint8_t *class, int to); +int hci_read_class_of_dev(int dd, uint8_t *cls, int to); +int hci_write_class_of_dev(int dd, uint32_t cls, int to); int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); -- cgit From e329c9ff80a76cb34ff616bce80df0d161731d0b Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Thu, 22 Aug 2002 10:04:18 +0000 Subject: hci_write_local_name() --- include/hci_lib.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index ba33be73..4108dc06 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -64,8 +64,9 @@ int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *ba); int hci_devid(char *str); -int hci_local_name(int dd, int len, char *name, int to); -int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); +int hci_read_local_name(int dd, int len, char *name, int to); +int hci_write_local_name(int dd, char *name, int to); +int hci_read_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); -- cgit From 66d1c38bdf157527c00cf7bde69e1de7bdd3ea28 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Thu, 22 Aug 2002 17:17:57 +0000 Subject: resurrect hci_local_name(); fix whitespace --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 4108dc06..685eb413 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -64,6 +64,8 @@ int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *ba); int hci_devid(char *str); +// deprecated: preserve compatibility +int hci_local_name(int dd, int len, char *name, int to); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, char *name, int to); int hci_read_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); -- cgit From 96cd06b189af2a09bde5d752552f58fd495d5646 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Wed, 18 Sep 2002 00:37:04 +0000 Subject: resurrect hci_remote_name() --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 685eb413..8f17a8dd 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -68,6 +68,7 @@ int hci_devid(char *str); int hci_local_name(int dd, int len, char *name, int to); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, char *name, int to); +int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); -- cgit From e101b08ba577ff8f6a2a789eb67d128977859fd3 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 22 Nov 2002 20:27:51 +0000 Subject: Remove the opcode parameter in hci_filter_clear_opcode() --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 8f17a8dd..e7aa8bcd 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -153,7 +153,7 @@ static inline void hci_filter_set_opcode(int opcode, struct hci_filter *f) { f->opcode = opcode; } -static inline void hci_filter_clear_opcode(int opcode, struct hci_filter *f) +static inline void hci_filter_clear_opcode(struct hci_filter *f) { f->opcode = 0; } -- cgit From d6cbeb4c61f5dc0c0d04dd022139b44f81964b18 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 15 Dec 2002 13:18:53 +0000 Subject: Support for voice setting --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index e7aa8bcd..81d29ecf 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -75,6 +75,8 @@ int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, in int hci_read_local_version(int dd, struct hci_version *ver, int to); int hci_read_class_of_dev(int dd, uint8_t *cls, int to); int hci_write_class_of_dev(int dd, uint32_t cls, int to); +int hci_read_voice_setting(int dd, uint16_t *vs, int to); +int hci_write_voice_setting(int dd, uint16_t vs, int to); int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); -- cgit From 109bfa547ab9e24672472371e2183dcec24d0058 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Tue, 11 Feb 2003 10:22:23 +0000 Subject: add const to fn sigs; fns to auth and enc links --- include/hci_lib.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 81d29ecf..d6d76214 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -56,20 +56,20 @@ int hci_close_dev(int dd); int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void *param); int hci_send_req(int dd, struct hci_request *req, int timeout); -int hci_create_connection(int dd, bdaddr_t *ba, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to); +int hci_create_connection(int dd, const bdaddr_t *ba, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to); int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to); -int hci_inquiry(int dev_id, int len, int num_rsp, uint8_t *lap, inquiry_info **ii, long flags); +int hci_inquiry(int dev_id, int len, int num_rsp, const uint8_t *lap, inquiry_info **ii, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *ba); -int hci_devid(char *str); +int hci_devid(const char *str); // deprecated: preserve compatibility int hci_local_name(int dd, int len, char *name, int to); int hci_read_local_name(int dd, int len, char *name, int to); -int hci_write_local_name(int dd, char *name, int to); -int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); -int hci_read_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to); +int hci_write_local_name(int dd, const char *name, int to); +int hci_remote_name(int dd, const bdaddr_t *ba, int len, char *name, int to); +int hci_read_remote_name(int dd, const bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); @@ -79,6 +79,8 @@ int hci_read_voice_setting(int dd, uint16_t *vs, int to); int hci_write_voice_setting(int dd, uint16_t vs, int to); int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); +int hci_authenticate_link(int dd, uint16_t handle, int to); +int hci_encrypt_link(int dd, uint16_t handle, int on, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 1c9576607a611e033e0bac0f56d91146c120a16d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 22 Mar 2003 08:00:36 +0000 Subject: Support for reading the clock offset --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index d6d76214..79866a45 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -72,6 +72,7 @@ int hci_remote_name(int dd, const bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_name(int dd, const bdaddr_t *ba, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); +int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); int hci_read_class_of_dev(int dd, uint8_t *cls, int to); int hci_write_class_of_dev(int dd, uint32_t cls, int to); -- cgit From 2c375c1f2c5cff353e2f767ac14f8251452392e9 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Tue, 20 May 2003 11:33:53 +0000 Subject: add role switch --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 79866a45..31995411 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -82,6 +82,8 @@ int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); int hci_authenticate_link(int dd, uint16_t handle, int to); int hci_encrypt_link(int dd, uint16_t handle, int on, int to); +// role == 0 is master, 1 is slave +int hci_switch_role(int dd, bdaddr_t peer, int role, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 5624d6cc20e5fb63d4b34b672b2421eb38b849e5 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 26 Jun 2003 21:17:37 +0000 Subject: Add functions for park mode --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 31995411..6b7b6f63 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -84,6 +84,8 @@ int hci_authenticate_link(int dd, uint16_t handle, int to); int hci_encrypt_link(int dd, uint16_t handle, int on, int to); // role == 0 is master, 1 is slave int hci_switch_role(int dd, bdaddr_t peer, int role, int to); +int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to); +int hci_exit_park_mode(int dd, uint16_t handle, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 764abe23a0d4ede999f1f34ee0e310c0eeaaff79 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 3 Apr 2004 05:11:38 +0000 Subject: Update copyright information --- include/hci_lib.h | 58 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 6b7b6f63..e048375e 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -1,29 +1,31 @@ -/* - BlueZ - Bluetooth protocol stack for Linux - Copyright (C) 2000-2001 Qualcomm Incorporated - - Written 2000,2001 by Maxim Krasnyansky - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation; - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY - CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, - COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS - SOFTWARE IS DISCLAIMED. -*/ - /* - * $Id$ + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2000-2001 Qualcomm Incorporated + * Copyright (C) 2002-2003 Maxim Krasnyansky + * Copyright (C) 2002-2004 Marcel Holtmann + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS + * SOFTWARE IS DISCLAIMED. + * + * + * $Id$ */ #ifndef __HCI_LIB_H @@ -64,7 +66,7 @@ int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *ba); int hci_devid(const char *str); -// deprecated: preserve compatibility +/* deprecated: preserve compatibility */ int hci_local_name(int dd, int len, char *name, int to); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, const char *name, int to); @@ -82,7 +84,7 @@ int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); int hci_authenticate_link(int dd, uint16_t handle, int to); int hci_encrypt_link(int dd, uint16_t handle, int on, int to); -// role == 0 is master, 1 is slave +/* role == 0 is master, 1 is slave */ int hci_switch_role(int dd, bdaddr_t peer, int role, int to); int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to); int hci_exit_park_mode(int dd, uint16_t handle, int to); @@ -108,7 +110,7 @@ char *lmp_featurestostr(uint8_t *features, char *pref, int width); static inline void hci_set_bit(int nr, void *addr) { - *((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31)); + *((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31)); } static inline void hci_clear_bit(int nr, void *addr) -- cgit From 6caf64335ab07e1bd138e11a1823ba9baa209fef Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 24 Apr 2004 12:09:53 +0000 Subject: Add features and packet types from EDR prototyping specification --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index e048375e..70d39264 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -96,6 +96,8 @@ char *hci_dtypetostr(int type); char *hci_dflagstostr(uint32_t flags); char *hci_ptypetostr(unsigned int ptype); int hci_strtoptype(char *str, unsigned int *val); +char *hci_scoptypetostr(unsigned int ptype); +int hci_strtoscoptype(char *str, unsigned int *val); char *hci_lptostr(unsigned int ptype); int hci_strtolp(char *str, unsigned int *val); char *hci_lmtostr(unsigned int ptype); -- cgit From 81c45f31a8b4897e0a6267fb3a84b3f6b73557b7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 23 Oct 2004 17:51:55 +0000 Subject: For vendor packets set bit 0 in the packet type bitmask of the filter --- include/hci_lib.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 70d39264..49857768 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -132,19 +132,19 @@ static inline void hci_filter_clear(struct hci_filter *f) } static inline void hci_filter_set_ptype(int t, struct hci_filter *f) { - hci_set_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); + hci_set_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask); } static inline void hci_filter_clear_ptype(int t, struct hci_filter *f) { - hci_clear_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); + hci_clear_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask); } static inline int hci_filter_test_ptype(int t, struct hci_filter *f) { - return hci_test_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask); + return hci_test_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask); } static inline void hci_filter_all_ptypes(struct hci_filter *f) { - memset((void *)&f->type_mask, 0xff, sizeof(f->type_mask)); + memset((void *) &f->type_mask, 0xff, sizeof(f->type_mask)); } static inline void hci_filter_set_event(int e, struct hci_filter *f) { @@ -160,7 +160,7 @@ static inline int hci_filter_test_event(int e, struct hci_filter *f) } static inline void hci_filter_all_events(struct hci_filter *f) { - memset((void *)f->event_mask, 0xff, sizeof(f->event_mask)); + memset((void *) f->event_mask, 0xff, sizeof(f->event_mask)); } static inline void hci_filter_set_opcode(int opcode, struct hci_filter *f) { -- cgit From cc0deab6cac822b062e1c6ab7322d1e1d75d463e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 25 Oct 2004 06:44:47 +0000 Subject: Cleanup the API to prevent endian bugs --- include/hci_lib.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 49857768..8c321d90 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -58,20 +58,20 @@ int hci_close_dev(int dd); int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void *param); int hci_send_req(int dd, struct hci_request *req, int timeout); -int hci_create_connection(int dd, const bdaddr_t *ba, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to); +int hci_create_connection(int dd, const bdaddr_t *bdaddr, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to); int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to); int hci_inquiry(int dev_id, int len, int num_rsp, const uint8_t *lap, inquiry_info **ii, long flags); int hci_devinfo(int dev_id, struct hci_dev_info *di); -int hci_devba(int dev_id, bdaddr_t *ba); +int hci_devba(int dev_id, bdaddr_t *bdaddr); int hci_devid(const char *str); /* deprecated: preserve compatibility */ int hci_local_name(int dd, int len, char *name, int to); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, const char *name, int to); -int hci_remote_name(int dd, const bdaddr_t *ba, int len, char *name, int to); -int hci_read_remote_name(int dd, const bdaddr_t *ba, int len, char *name, int to); +int hci_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); +int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); @@ -83,9 +83,9 @@ int hci_write_voice_setting(int dd, uint16_t vs, int to); int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); int hci_authenticate_link(int dd, uint16_t handle, int to); -int hci_encrypt_link(int dd, uint16_t handle, int on, int to); +int hci_encrypt_link(int dd, uint16_t handle, uint8_t encrypt, int to); /* role == 0 is master, 1 is slave */ -int hci_switch_role(int dd, bdaddr_t peer, int role, int to); +int hci_switch_role(int dd, bdaddr_t *bdaddr, uint8_t role, int to); int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to); int hci_exit_park_mode(int dd, uint16_t handle, int to); -- cgit From 1a04074615c182634202f03fd74a73f62107b93c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 25 Oct 2004 07:36:45 +0000 Subject: Add functions for reading and writing the inquiry mode --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 8c321d90..e40a1afd 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -88,6 +88,8 @@ int hci_encrypt_link(int dd, uint16_t handle, uint8_t encrypt, int to); int hci_switch_role(int dd, bdaddr_t *bdaddr, uint8_t role, int to); int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to); int hci_exit_park_mode(int dd, uint16_t handle, int to); +int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); +int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 9427f5dc51c6962692eecd7250f2a1130dbc49ad Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 4 Nov 2004 11:21:34 +0000 Subject: Add hci_change_link_key() function --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index e40a1afd..0d9867f9 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -84,6 +84,7 @@ int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); int hci_authenticate_link(int dd, uint16_t handle, int to); int hci_encrypt_link(int dd, uint16_t handle, uint8_t encrypt, int to); +int hci_change_link_key(int dd, uint16_t handle, int to); /* role == 0 is master, 1 is slave */ int hci_switch_role(int dd, bdaddr_t *bdaddr, uint8_t role, int to); int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to); -- cgit From 0bae50cd5c691f338f6fa820a8b803a45c0de181 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 9 Nov 2004 21:33:17 +0000 Subject: Add hci_{read|write}_afh_mode() functions --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 0d9867f9..356e4edd 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -91,6 +91,8 @@ int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_i int hci_exit_park_mode(int dd, uint16_t handle, int to); int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); +int hci_read_afh_mode(int dd, uint8_t *mode, int to); +int hci_write_afh_mode(int dd, uint8_t mode, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 213febe584cdd8c7b5fd2defc2d56f0c84677e51 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 9 Nov 2004 22:29:55 +0000 Subject: Add hci_read_afh_map() function --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 356e4edd..095a0b80 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -93,6 +93,7 @@ int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); +int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 0792c0b319112503dd5129f05536f3c6ae4c746c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 9 Nov 2004 22:52:40 +0000 Subject: Add hci_set_afh_classification() function --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 095a0b80..b8dbd432 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -93,6 +93,7 @@ int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); +int hci_set_afh_classification(int dd, uint8_t *map, int to); int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); -- cgit From 6c2fed4529b256285e495ccdb066de331db42ff4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Jan 2005 20:05:05 +0000 Subject: Remove deprecated functions --- include/hci_lib.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index b8dbd432..5c83b5e8 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -67,10 +67,8 @@ int hci_devba(int dev_id, bdaddr_t *bdaddr); int hci_devid(const char *str); /* deprecated: preserve compatibility */ -int hci_local_name(int dd, int len, char *name, int to); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, const char *name, int to); -int hci_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); @@ -102,18 +100,18 @@ int hci_get_route(bdaddr_t *bdaddr); char *hci_dtypetostr(int type); char *hci_dflagstostr(uint32_t flags); char *hci_ptypetostr(unsigned int ptype); -int hci_strtoptype(char *str, unsigned int *val); +int hci_strtoptype(char *str, unsigned int *val); char *hci_scoptypetostr(unsigned int ptype); -int hci_strtoscoptype(char *str, unsigned int *val); +int hci_strtoscoptype(char *str, unsigned int *val); char *hci_lptostr(unsigned int ptype); -int hci_strtolp(char *str, unsigned int *val); +int hci_strtolp(char *str, unsigned int *val); char *hci_lmtostr(unsigned int ptype); -int hci_strtolm(char *str, unsigned int *val); +int hci_strtolm(char *str, unsigned int *val); char *hci_vertostr(unsigned int ver); -int hci_strtover(char *str, unsigned int *ver); +int hci_strtover(char *str, unsigned int *ver); char *lmp_vertostr(unsigned int ver); -int lmp_strtover(char *str, unsigned int *ver); +int lmp_strtover(char *str, unsigned int *ver); char *lmp_featurestostr(uint8_t *features, char *pref, int width); -- cgit From 32c8a21b7da2397da204015f4bf45983226cbed9 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Jan 2005 20:16:40 +0000 Subject: Add function for reading the RSSI and the link quality --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 5c83b5e8..969db1f2 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -92,6 +92,8 @@ int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); int hci_set_afh_classification(int dd, uint8_t *map, int to); +int hci_read_link_quality(int dd, uint16_t handle, uint8_t *link_quality, int to); +int hci_read_rssi(int dd, uint16_t handle, int8_t *rssi, int to); int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to); int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); -- cgit From 3d400b430ca82b915570be699d98b10648c593ac Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Jan 2005 22:37:58 +0000 Subject: Add link supervision timeout functions --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 969db1f2..2edc9e0e 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -91,6 +91,8 @@ int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); +int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to); +int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to); int hci_set_afh_classification(int dd, uint8_t *map, int to); int hci_read_link_quality(int dd, uint16_t handle, uint8_t *link_quality, int to); int hci_read_rssi(int dd, uint16_t handle, int8_t *rssi, int to); -- cgit From ef8d27c6202740ad13ec702f6a29a1a71be5acc4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Jan 2005 22:38:50 +0000 Subject: Remove comments --- include/hci_lib.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 2edc9e0e..7e6acfaf 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -66,7 +66,6 @@ int hci_devinfo(int dev_id, struct hci_dev_info *di); int hci_devba(int dev_id, bdaddr_t *bdaddr); int hci_devid(const char *str); -/* deprecated: preserve compatibility */ int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, const char *name, int to); int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); @@ -83,7 +82,6 @@ int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); int hci_authenticate_link(int dd, uint16_t handle, int to); int hci_encrypt_link(int dd, uint16_t handle, uint8_t encrypt, int to); int hci_change_link_key(int dd, uint16_t handle, int to); -/* role == 0 is master, 1 is slave */ int hci_switch_role(int dd, bdaddr_t *bdaddr, uint8_t role, int to); int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to); int hci_exit_park_mode(int dd, uint16_t handle, int to); -- cgit From 84cc44acd712f84ff544b7e1b96d1410c732dc8c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Jan 2005 22:57:36 +0000 Subject: Add function for reading the transmit power level --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 7e6acfaf..3c44bd8a 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -89,6 +89,7 @@ int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); +int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, uint8_t *level, int to); int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to); int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to); int hci_set_afh_classification(int dd, uint8_t *map, int to); -- cgit From badafc6e227a175022370017008f0d839ec90b25 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 23 Jan 2005 08:10:42 +0000 Subject: Add functions hci_{local|remote}_name() --- include/hci_lib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 3c44bd8a..f6259f51 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -97,6 +97,9 @@ int hci_read_link_quality(int dd, uint16_t handle, uint8_t *link_quality, int to int hci_read_rssi(int dd, uint16_t handle, int8_t *rssi, int to); int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to); +int hci_local_name(int dd, int len, char *name, int to); +int hci_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); + int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); -- cgit From 1e2dec5679c175fc52d2e19ebe06b9e1a7b05461 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 25 Jan 2005 21:36:28 +0000 Subject: Add hci_read_clock() function --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index f6259f51..ed7ad291 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -96,6 +96,7 @@ int hci_set_afh_classification(int dd, uint8_t *map, int to); int hci_read_link_quality(int dd, uint16_t handle, uint8_t *link_quality, int to); int hci_read_rssi(int dd, uint16_t handle, int8_t *rssi, int to); int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to); +int hci_read_clock(int dd, uint16_t handle, uint8_t which, uint32_t *clock, uint16_t *accuracy, int to); int hci_local_name(int dd, int len, char *name, int to); int hci_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); -- cgit From f1d23ac858b0593afe27e6b8e00a55d92804a6bb Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Jan 2005 03:08:19 +0000 Subject: Update the copyright year --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index ed7ad291..7c53f0ed 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2004 Marcel Holtmann + * Copyright (C) 2002-2005 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From e6589c0f2a6d1dd3060a86a27d859c8fb08bf278 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Jan 2005 03:24:48 +0000 Subject: Add functions for reading the BD_ADDR and the features --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 7c53f0ed..1e5ecc96 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -73,6 +73,8 @@ int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to) int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); +int hci_read_local_features(int dd, uint8_t *features, int to); +int hci_read_bd_addr(int dd, bdaddr_t *bdaddr, int to); int hci_read_class_of_dev(int dd, uint8_t *cls, int to); int hci_write_class_of_dev(int dd, uint32_t cls, int to); int hci_read_voice_setting(int dd, uint16_t *vs, int to); -- cgit From c608311e7472325514f0578a20d59efc86792e39 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 11 Feb 2005 04:17:16 +0000 Subject: Add function for getting the remote name with a clock offset --- include/hci_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 1e5ecc96..e2f06fda 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -69,6 +69,7 @@ int hci_devid(const char *str); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, const char *name, int to); int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); +int hci_read_remote_name_with_clock_offset(int dd, const bdaddr_t *bdaddr, uint16_t clkoffset, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); -- cgit From db01d7596aa2ba2e40df5d3c7ef9b7cd0489ecad Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 22 Feb 2005 02:37:49 +0000 Subject: The transmit power level is a signed integer --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index e2f06fda..d140444a 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -92,7 +92,7 @@ int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); -int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, uint8_t *level, int to); +int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, int8_t *level, int to); int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to); int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to); int hci_set_afh_classification(int dd, uint8_t *map, int to); -- cgit From 1ec0481800a50aa14afe0513f69b4c7c04d5962a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 22 Feb 2005 11:42:03 +0000 Subject: Support pscan_rep_mode for remote name request --- include/hci_lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index d140444a..b1ab43cd 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -69,7 +69,8 @@ int hci_devid(const char *str); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, const char *name, int to); int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); -int hci_read_remote_name_with_clock_offset(int dd, const bdaddr_t *bdaddr, uint16_t clkoffset, int len, char *name, int to); +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); +int hci_read_remote_name_cancel(int dd, const bdaddr_t *bdaddr, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); -- cgit From be2d979b6a592484862e78bed355d079f7eeb1e6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 17 Apr 2005 23:14:52 +0000 Subject: Add funtions for reading local supported commands and extended features --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index b1ab43cd..36347d5a 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -75,7 +75,9 @@ int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to) int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); +int hci_read_local_commands(int dd, uint8_t *commands, int to); int hci_read_local_features(int dd, uint8_t *features, int to); +int hci_read_local_ext_features(int dd, uint8_t page, uint8_t *max_page, uint8_t *features, int to); int hci_read_bd_addr(int dd, bdaddr_t *bdaddr, int to); int hci_read_class_of_dev(int dd, uint8_t *cls, int to); int hci_write_class_of_dev(int dd, uint32_t cls, int to); -- cgit From 0887d119a0b61e38cbd3d30e207c09eb5a5ff463 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 17 Apr 2005 23:31:54 +0000 Subject: Add function for remote extended features --- include/hci_lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 36347d5a..2ffdef78 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -71,8 +71,9 @@ int hci_write_local_name(int dd, const char *name, int to); int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); 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); int hci_read_remote_name_cancel(int dd, const bdaddr_t *bdaddr, int to); -int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); +int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); +int hci_read_remote_ext_features(int dd, uint16_t handle, uint8_t page, uint8_t *max_page, uint8_t *features, int to); int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); int hci_read_local_version(int dd, struct hci_version *ver, int to); int hci_read_local_commands(int dd, uint8_t *commands, int to); -- cgit From 48954bd49fdd7189bb725038801f3ca0ff2f4d12 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 1 May 2005 14:52:53 +0000 Subject: Add functions for stored link keys --- include/hci_lib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 2ffdef78..7761bb99 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -86,6 +86,9 @@ int hci_read_voice_setting(int dd, uint16_t *vs, int to); int hci_write_voice_setting(int dd, uint16_t vs, int to); int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to); int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to); +int hci_read_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t all, int to); +int hci_write_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t *key, int to); +int hci_delete_stored_link_key(int dd, bdaddr_t *bdaddr, uint8_t all, int to); int hci_authenticate_link(int dd, uint16_t handle, int to); int hci_encrypt_link(int dd, uint16_t handle, uint8_t encrypt, int to); int hci_change_link_key(int dd, uint16_t handle, int to); -- cgit From f38a7523b3e2ec2109cd5c5f65803da5a354da03 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 16 Jun 2005 13:53:08 +0000 Subject: Add support for reading and writing the inquiry scan type --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 7761bb99..eac144e7 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -95,6 +95,8 @@ int hci_change_link_key(int dd, uint16_t handle, int to); int hci_switch_role(int dd, bdaddr_t *bdaddr, uint8_t role, int to); int hci_park_mode(int dd, uint16_t handle, uint16_t max_interval, uint16_t min_interval, int to); int hci_exit_park_mode(int dd, uint16_t handle, int to); +int hci_read_inquiry_scan_type(int dd, uint8_t *type, int to); +int hci_write_inquiry_scan_type(int dd, uint8_t type, int to); int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); -- cgit From 631f20f4f87398b68b658acc3c374c6b36c1b7eb Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 21 Jun 2005 16:40:29 +0000 Subject: Fix some errno usages --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index eac144e7..4bfc5197 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -113,7 +113,7 @@ int hci_read_clock(int dd, uint16_t handle, uint8_t which, uint32_t *clock, uint int hci_local_name(int dd, int len, char *name, int to); int hci_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); -int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg); +int hci_for_each_dev(int flag, int(*func)(int dd, int dev_id, long arg), long arg); int hci_get_route(bdaddr_t *bdaddr); char *hci_dtypetostr(int type); -- cgit From f544b5e43cc3c64d43e73a3fbfc5fd045b6de00c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 25 Aug 2005 00:54:48 +0000 Subject: Add functions for the extended inquiry response --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 4bfc5197..b27980ad 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -101,6 +101,8 @@ int hci_read_inquiry_mode(int dd, uint8_t *mode, int to); int hci_write_inquiry_mode(int dd, uint8_t mode, int to); int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); +int hci_read_ext_inquiry_response(int dd, uint8_t *fec, uint8_t *data, int to); +int hci_write_ext_inquiry_response(int dd, uint8_t fec, uint8_t *data, int to); int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, int8_t *level, int to); int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to); int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to); -- cgit From b48bccaf6c89da2af3a20617f4a496be4a633c5b Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 7 Sep 2005 16:14:55 +0000 Subject: Add support for identification of supported commands --- include/hci_lib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index b27980ad..03305547 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -129,6 +129,9 @@ int hci_strtolp(char *str, unsigned int *val); char *hci_lmtostr(unsigned int ptype); int hci_strtolm(char *str, unsigned int *val); +char *hci_cmdtostr(unsigned int cmd); +char *hci_commandstostr(uint8_t *commands, char *pref, int width); + char *hci_vertostr(unsigned int ver); int hci_strtover(char *str, unsigned int *ver); char *lmp_vertostr(unsigned int ver); -- cgit From c0d524486a50e8366c12c5ebea1a4441e9db46aa Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Oct 2005 19:25:42 +0000 Subject: Big cleanup of CVS relics --- include/hci_lib.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 03305547..66a22e7e 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -8,24 +8,19 @@ * * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY - * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, - * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS - * SOFTWARE IS DISCLAIMED. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * - * - * $Id$ */ #ifndef __HCI_LIB_H -- cgit From 197a2aee34d9a1643cd474f8f167552ca6395d01 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 3 Jan 2006 12:56:09 +0000 Subject: Update copyright information --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 66a22e7e..20af8bdb 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2005 Marcel Holtmann + * Copyright (C) 2002-2006 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From 25effaf3a661c4de960ebae7125ba56a990ad628 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 13 Jan 2007 17:50:06 +0000 Subject: Update copyright information --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 20af8bdb..a784a08b 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2006 Marcel Holtmann + * Copyright (C) 2002-2007 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From a3cc218cd5f213922cd529ebfb5da5ba1b1f1aca Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 1 Aug 2007 07:29:23 +0000 Subject: Add definitions and functions for Simple Pairing --- include/hci_lib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index a784a08b..1215a62f 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -98,6 +98,9 @@ int hci_read_afh_mode(int dd, uint8_t *mode, int to); int hci_write_afh_mode(int dd, uint8_t mode, int to); int hci_read_ext_inquiry_response(int dd, uint8_t *fec, uint8_t *data, int to); int hci_write_ext_inquiry_response(int dd, uint8_t fec, uint8_t *data, int to); +int hci_read_simple_pairing_mode(int dd, uint8_t *mode, int to); +int hci_write_simple_pairing_mode(int dd, uint8_t mode, int to); +int hci_read_local_oob_data(int dd, uint8_t *hash, uint8_t *randomizer, int to); int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, int8_t *level, int to); int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to); int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to); -- cgit From f4afe8ea387410929ee303a510fd7cdfd1cc7552 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 5 Oct 2007 11:23:35 +0000 Subject: Add support for inquiry transmit power level --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 1215a62f..7b728283 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -101,6 +101,8 @@ int hci_write_ext_inquiry_response(int dd, uint8_t fec, uint8_t *data, int to); int hci_read_simple_pairing_mode(int dd, uint8_t *mode, int to); int hci_write_simple_pairing_mode(int dd, uint8_t mode, int to); int hci_read_local_oob_data(int dd, uint8_t *hash, uint8_t *randomizer, int to); +int hci_read_inquiry_transmit_power_level(int dd, int8_t *level, int to); +int hci_write_inquiry_transmit_power_level(int dd, int8_t level, int to); int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, int8_t *level, int to); int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to); int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to); -- cgit From 7208028266fc19d380ac77c97c46b6f2fdc80e1d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 2 Feb 2008 03:11:09 +0000 Subject: Update copyright information --- include/hci_lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index 7b728283..b2b78e80 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2007 Marcel Holtmann + * Copyright (C) 2002-2008 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From a39a1b4c3e075e80d05caad61646a352693f5455 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 12 Jun 2008 21:40:14 +0000 Subject: Add functions for reading and writing the link policy settings --- include/hci_lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hci_lib.h') diff --git a/include/hci_lib.h b/include/hci_lib.h index b2b78e80..ccd155a5 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -104,6 +104,8 @@ int hci_read_local_oob_data(int dd, uint8_t *hash, uint8_t *randomizer, int to); int hci_read_inquiry_transmit_power_level(int dd, int8_t *level, int to); int hci_write_inquiry_transmit_power_level(int dd, int8_t level, int to); int hci_read_transmit_power_level(int dd, uint16_t handle, uint8_t type, int8_t *level, int to); +int hci_read_link_policy(int dd, uint16_t handle, uint16_t *policy, int to); +int hci_write_link_policy(int dd, uint16_t handle, uint16_t policy, int to); int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout, int to); int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout, int to); int hci_set_afh_classification(int dd, uint8_t *map, int to); -- cgit