From c98b2f82a4e532ca61592b08e3ad60749eb9f8d7 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Fri, 8 Mar 2002 21:12:35 +0000 Subject: Initial revision --- tools/hcisecfilter.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 tools/hcisecfilter.c (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c new file mode 100644 index 00000000..bee16df1 --- /dev/null +++ b/tools/hcisecfilter.c @@ -0,0 +1,79 @@ +#include +#include + +#include +#include +#include + +int main(void) +{ + uint32_t type_mask; + uint32_t event_mask[2]; + uint32_t ocf_mask[4]; + + // Packet types + memset((void *)&type_mask, 0, sizeof(type_mask)); + hci_set_bit(HCI_EVENT_PKT, &type_mask); + + printf("Type mask: { 0x%lx }\n", type_mask); + + // Events + memset((void *)event_mask, 0, sizeof(event_mask)); + hci_set_bit(EVT_INQUIRY_COMPLETE, event_mask); + hci_set_bit(EVT_INQUIRY_RESULT, event_mask); + + hci_set_bit(EVT_CONN_COMPLETE, event_mask); + hci_set_bit(EVT_CONN_REQUEST, event_mask); + hci_set_bit(EVT_DISCONN_COMPLETE, event_mask); + + hci_set_bit(EVT_AUTH_COMPLETE, event_mask); + hci_set_bit(EVT_ENCRYPT_CHANGE, event_mask); + + hci_set_bit(EVT_CMD_COMPLETE, event_mask); + hci_set_bit(EVT_CMD_STATUS, event_mask); + + hci_set_bit(EVT_READ_REMOTE_FEATURES_COMPLETE, event_mask); + hci_set_bit(EVT_READ_REMOTE_VERSION_COMPLETE, event_mask); + hci_set_bit(EVT_REMOTE_NAME_REQ_COMPLETE, event_mask); + + printf("Event mask: { 0x%lx, 0x%lx }\n", event_mask[0], event_mask[1]); + + // OGF_LINK_CTL + memset((void *) ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_INQUIRY, ocf_mask); + hci_set_bit(OCF_REMOTE_NAME_REQ, ocf_mask); + hci_set_bit(OCF_READ_REMOTE_FEATURES, ocf_mask); + hci_set_bit(OCF_READ_REMOTE_VERSION, ocf_mask); + + printf("OGF_LINK_CTL: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + + // OGF_LINK_POLICY + memset((void *) ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_ROLE_DISCOVERY, ocf_mask); + hci_set_bit(OCF_READ_LINK_POLICY, ocf_mask); + + printf("OGF_LINK_POLICY: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + + // OGF_HOST_CTL + memset((void *) ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_READ_AUTH_ENABLE, ocf_mask); + hci_set_bit(OCF_READ_ENCRYPT_MODE, ocf_mask); + hci_set_bit(OCF_READ_LOCAL_NAME, ocf_mask); + hci_set_bit(OCF_READ_CLASS_OF_DEV, ocf_mask); + + printf("OGF_HOST_CTL: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + + // OGF_INFO_PARAM + memset((void *) ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_READ_LOCAL_VERSION, ocf_mask); + hci_set_bit(OCF_READ_LOCAL_FEATURES, ocf_mask); + hci_set_bit(OCF_READ_BUFFER_SIZE, ocf_mask); + hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); + hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); + + printf("OGF_INFO_PARAM: { 0x%lx, 0x%lx, 0x%lx, 0x%lx}\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); +} -- cgit From 85f1b67672730596df37adc362f490c17ff6d4f3 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 17 Dec 2002 05:31:24 +0000 Subject: Support for voice setting --- tools/hcisecfilter.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index bee16df1..8cd47420 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -62,6 +62,7 @@ int main(void) hci_set_bit(OCF_READ_ENCRYPT_MODE, ocf_mask); hci_set_bit(OCF_READ_LOCAL_NAME, ocf_mask); hci_set_bit(OCF_READ_CLASS_OF_DEV, ocf_mask); + hci_set_bit(OCF_READ_VOICE_SETTING, ocf_mask); printf("OGF_HOST_CTL: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); -- cgit From f03489827214efb7e5314e61b57278eec173b786 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 28 Jan 2003 01:55:08 +0000 Subject: Added OGF_PARAM_STATUS --- tools/hcisecfilter.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 8cd47420..13dee183 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -77,4 +77,14 @@ int main(void) printf("OGF_INFO_PARAM: { 0x%lx, 0x%lx, 0x%lx, 0x%lx}\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + + // OGF_INFO_PARAM + memset((void *) ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_READ_FAILED_CONTACT_COUNTER, ocf_mask); + hci_set_bit(OCF_RESET_FAILED_CONTACT_COUNTER, ocf_mask); + hci_set_bit(OCF_GET_LINK_QUALITY, ocf_mask); + hci_set_bit(OCF_READ_RSSI, ocf_mask); + + printf("OGF_STATUS_PARAM: { 0x%lx, 0x%lx, 0x%lx, 0x%lx}\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); } -- cgit From 529a4a6e9be63df61d41a82787adae204822a6e7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 27 Jun 2003 10:49:13 +0000 Subject: Support for reading transmit power level --- tools/hcisecfilter.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 13dee183..2ff5c48a 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -63,6 +63,7 @@ int main(void) hci_set_bit(OCF_READ_LOCAL_NAME, ocf_mask); hci_set_bit(OCF_READ_CLASS_OF_DEV, ocf_mask); hci_set_bit(OCF_READ_VOICE_SETTING, ocf_mask); + hci_set_bit(OCF_READ_TRANSMIT_POWER_LEVEL, ocf_mask); printf("OGF_HOST_CTL: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); -- cgit From fab001c1250c40ef96b85a60a7b8111596688452 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 24 Apr 2004 11:22:47 +0000 Subject: Fix warning in hcisecfilter --- tools/hcisecfilter.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 2ff5c48a..9aaead0f 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -15,7 +15,7 @@ int main(void) memset((void *)&type_mask, 0, sizeof(type_mask)); hci_set_bit(HCI_EVENT_PKT, &type_mask); - printf("Type mask: { 0x%lx }\n", type_mask); + printf("Type mask: { 0x%x }\n", type_mask); // Events memset((void *)event_mask, 0, sizeof(event_mask)); @@ -36,7 +36,7 @@ int main(void) hci_set_bit(EVT_READ_REMOTE_VERSION_COMPLETE, event_mask); hci_set_bit(EVT_REMOTE_NAME_REQ_COMPLETE, event_mask); - printf("Event mask: { 0x%lx, 0x%lx }\n", event_mask[0], event_mask[1]); + printf("Event mask: { 0x%x, 0x%x }\n", event_mask[0], event_mask[1]); // OGF_LINK_CTL memset((void *) ocf_mask, 0, sizeof(ocf_mask)); @@ -45,7 +45,7 @@ int main(void) hci_set_bit(OCF_READ_REMOTE_FEATURES, ocf_mask); hci_set_bit(OCF_READ_REMOTE_VERSION, ocf_mask); - printf("OGF_LINK_CTL: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", + printf("OGF_LINK_CTL: { 0x%x, 0x%x, 0x%x, 0x%x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); // OGF_LINK_POLICY @@ -53,7 +53,7 @@ int main(void) hci_set_bit(OCF_ROLE_DISCOVERY, ocf_mask); hci_set_bit(OCF_READ_LINK_POLICY, ocf_mask); - printf("OGF_LINK_POLICY: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", + printf("OGF_LINK_POLICY: { 0x%x, 0x%x, 0x%x, 0x%x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); // OGF_HOST_CTL @@ -65,7 +65,7 @@ int main(void) hci_set_bit(OCF_READ_VOICE_SETTING, ocf_mask); hci_set_bit(OCF_READ_TRANSMIT_POWER_LEVEL, ocf_mask); - printf("OGF_HOST_CTL: { 0x%lx, 0x%lx, 0x%lx, 0x%lx }\n", + printf("OGF_HOST_CTL: { 0x%x, 0x%x, 0x%x, 0x%x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); // OGF_INFO_PARAM @@ -76,7 +76,7 @@ int main(void) hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); - printf("OGF_INFO_PARAM: { 0x%lx, 0x%lx, 0x%lx, 0x%lx}\n", + printf("OGF_INFO_PARAM: { 0x%x, 0x%x, 0x%x, 0x%x}\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); // OGF_INFO_PARAM @@ -86,6 +86,8 @@ int main(void) hci_set_bit(OCF_GET_LINK_QUALITY, ocf_mask); hci_set_bit(OCF_READ_RSSI, ocf_mask); - printf("OGF_STATUS_PARAM: { 0x%lx, 0x%lx, 0x%lx, 0x%lx}\n", + printf("OGF_STATUS_PARAM: { 0x%x, 0x%x, 0x%x, 0x%x}\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + + return 0; } -- cgit From b66d3f9b2cb8934a0eb7ac07f347001984488ac6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 28 Apr 2004 10:39:47 +0000 Subject: Unify copyright and license information --- tools/hcisecfilter.c | 63 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 15 deletions(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 9aaead0f..fd296afd 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -1,3 +1,36 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * 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$ + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include @@ -11,23 +44,23 @@ int main(void) uint32_t event_mask[2]; uint32_t ocf_mask[4]; - // Packet types + /* Packet types */ memset((void *)&type_mask, 0, sizeof(type_mask)); hci_set_bit(HCI_EVENT_PKT, &type_mask); - + printf("Type mask: { 0x%x }\n", type_mask); - // Events + /* Events */ memset((void *)event_mask, 0, sizeof(event_mask)); - hci_set_bit(EVT_INQUIRY_COMPLETE, event_mask); - hci_set_bit(EVT_INQUIRY_RESULT, event_mask); + hci_set_bit(EVT_INQUIRY_COMPLETE, event_mask); + hci_set_bit(EVT_INQUIRY_RESULT, event_mask); - hci_set_bit(EVT_CONN_COMPLETE, event_mask); - hci_set_bit(EVT_CONN_REQUEST, event_mask); - hci_set_bit(EVT_DISCONN_COMPLETE, event_mask); + hci_set_bit(EVT_CONN_COMPLETE, event_mask); + hci_set_bit(EVT_CONN_REQUEST, event_mask); + hci_set_bit(EVT_DISCONN_COMPLETE, event_mask); - hci_set_bit(EVT_AUTH_COMPLETE, event_mask); - hci_set_bit(EVT_ENCRYPT_CHANGE, event_mask); + hci_set_bit(EVT_AUTH_COMPLETE, event_mask); + hci_set_bit(EVT_ENCRYPT_CHANGE, event_mask); hci_set_bit(EVT_CMD_COMPLETE, event_mask); hci_set_bit(EVT_CMD_STATUS, event_mask); @@ -38,7 +71,7 @@ int main(void) printf("Event mask: { 0x%x, 0x%x }\n", event_mask[0], event_mask[1]); - // OGF_LINK_CTL + /* OGF_LINK_CTL */ memset((void *) ocf_mask, 0, sizeof(ocf_mask)); hci_set_bit(OCF_INQUIRY, ocf_mask); hci_set_bit(OCF_REMOTE_NAME_REQ, ocf_mask); @@ -48,7 +81,7 @@ int main(void) printf("OGF_LINK_CTL: { 0x%x, 0x%x, 0x%x, 0x%x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); - // OGF_LINK_POLICY + /* OGF_LINK_POLICY */ memset((void *) ocf_mask, 0, sizeof(ocf_mask)); hci_set_bit(OCF_ROLE_DISCOVERY, ocf_mask); hci_set_bit(OCF_READ_LINK_POLICY, ocf_mask); @@ -56,7 +89,7 @@ int main(void) printf("OGF_LINK_POLICY: { 0x%x, 0x%x, 0x%x, 0x%x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); - // OGF_HOST_CTL + /* OGF_HOST_CTL */ memset((void *) ocf_mask, 0, sizeof(ocf_mask)); hci_set_bit(OCF_READ_AUTH_ENABLE, ocf_mask); hci_set_bit(OCF_READ_ENCRYPT_MODE, ocf_mask); @@ -68,7 +101,7 @@ int main(void) printf("OGF_HOST_CTL: { 0x%x, 0x%x, 0x%x, 0x%x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); - // OGF_INFO_PARAM + /* OGF_INFO_PARAM */ memset((void *) ocf_mask, 0, sizeof(ocf_mask)); hci_set_bit(OCF_READ_LOCAL_VERSION, ocf_mask); hci_set_bit(OCF_READ_LOCAL_FEATURES, ocf_mask); @@ -79,7 +112,7 @@ int main(void) printf("OGF_INFO_PARAM: { 0x%x, 0x%x, 0x%x, 0x%x}\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); - // OGF_INFO_PARAM + /* OGF_INFO_PARAM */ memset((void *) ocf_mask, 0, sizeof(ocf_mask)); hci_set_bit(OCF_READ_FAILED_CONTACT_COUNTER, ocf_mask); hci_set_bit(OCF_RESET_FAILED_CONTACT_COUNTER, ocf_mask); -- cgit From 76b0ca8e1c813892561ddae4593e024659783068 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 14 Jan 2005 00:14:50 +0000 Subject: Fix security filter definitions --- tools/hcisecfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index fd296afd..d3c658c8 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -116,7 +116,7 @@ int main(void) memset((void *) ocf_mask, 0, sizeof(ocf_mask)); hci_set_bit(OCF_READ_FAILED_CONTACT_COUNTER, ocf_mask); hci_set_bit(OCF_RESET_FAILED_CONTACT_COUNTER, ocf_mask); - hci_set_bit(OCF_GET_LINK_QUALITY, ocf_mask); + hci_set_bit(OCF_READ_LINK_QUALITY, ocf_mask); hci_set_bit(OCF_READ_RSSI, ocf_mask); printf("OGF_STATUS_PARAM: { 0x%x, 0x%x, 0x%x, 0x%x}\n", -- cgit From 5a1c827dde80ace68f94641edb21d39c1ccacbbc Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 8 Sep 2005 11:51:20 +0000 Subject: Update security filter definitions --- tools/hcisecfilter.c | 152 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 91 insertions(+), 61 deletions(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index d3c658c8..02d0d554 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -3,7 +3,7 @@ * BlueZ - Bluetooth protocol stack for Linux * * 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 @@ -45,82 +45,112 @@ int main(void) uint32_t ocf_mask[4]; /* Packet types */ - memset((void *)&type_mask, 0, sizeof(type_mask)); + memset(&type_mask, 0, sizeof(type_mask)); hci_set_bit(HCI_EVENT_PKT, &type_mask); - printf("Type mask: { 0x%x }\n", type_mask); + printf("Type mask: { 0x%02x }\n", type_mask); /* Events */ - memset((void *)event_mask, 0, sizeof(event_mask)); - hci_set_bit(EVT_INQUIRY_COMPLETE, event_mask); - hci_set_bit(EVT_INQUIRY_RESULT, event_mask); - - hci_set_bit(EVT_CONN_COMPLETE, event_mask); - hci_set_bit(EVT_CONN_REQUEST, event_mask); - hci_set_bit(EVT_DISCONN_COMPLETE, event_mask); - - hci_set_bit(EVT_AUTH_COMPLETE, event_mask); - hci_set_bit(EVT_ENCRYPT_CHANGE, event_mask); - - hci_set_bit(EVT_CMD_COMPLETE, event_mask); - hci_set_bit(EVT_CMD_STATUS, event_mask); - - hci_set_bit(EVT_READ_REMOTE_FEATURES_COMPLETE, event_mask); - hci_set_bit(EVT_READ_REMOTE_VERSION_COMPLETE, event_mask); - hci_set_bit(EVT_REMOTE_NAME_REQ_COMPLETE, event_mask); - - printf("Event mask: { 0x%x, 0x%x }\n", event_mask[0], event_mask[1]); + memset(event_mask, 0, sizeof(event_mask)); + hci_set_bit(EVT_INQUIRY_COMPLETE, event_mask); + hci_set_bit(EVT_INQUIRY_RESULT, event_mask); + hci_set_bit(EVT_CONN_COMPLETE, event_mask); + hci_set_bit(EVT_CONN_REQUEST, event_mask); + hci_set_bit(EVT_DISCONN_COMPLETE, event_mask); + hci_set_bit(EVT_AUTH_COMPLETE, event_mask); + hci_set_bit(EVT_REMOTE_NAME_REQ_COMPLETE, event_mask); + hci_set_bit(EVT_ENCRYPT_CHANGE, event_mask); + hci_set_bit(EVT_READ_REMOTE_FEATURES_COMPLETE, event_mask); + hci_set_bit(EVT_READ_REMOTE_VERSION_COMPLETE, event_mask); + hci_set_bit(EVT_CMD_COMPLETE, event_mask); + hci_set_bit(EVT_CMD_STATUS, event_mask); + hci_set_bit(EVT_READ_CLOCK_OFFSET_COMPLETE, event_mask); + hci_set_bit(EVT_INQUIRY_RESULT_WITH_RSSI, event_mask); + hci_set_bit(EVT_READ_REMOTE_EXT_FEATURES_COMPLETE, event_mask); + hci_set_bit(EVT_SYNC_CONN_COMPLETE, event_mask); + hci_set_bit(EVT_SYNC_CONN_CHANGED, event_mask); + //hci_set_bit(EVT_EXTENDED_INQUIRY_RESULT, event_mask); + + printf("Event mask: { 0x%08x, 0x%08x }\n", + event_mask[0], event_mask[1]); /* OGF_LINK_CTL */ - memset((void *) ocf_mask, 0, sizeof(ocf_mask)); - hci_set_bit(OCF_INQUIRY, ocf_mask); - hci_set_bit(OCF_REMOTE_NAME_REQ, ocf_mask); - hci_set_bit(OCF_READ_REMOTE_FEATURES, ocf_mask); - hci_set_bit(OCF_READ_REMOTE_VERSION, ocf_mask); - - printf("OGF_LINK_CTL: { 0x%x, 0x%x, 0x%x, 0x%x }\n", - ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + memset(ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_INQUIRY, ocf_mask); + hci_set_bit(OCF_INQUIRY_CANCEL, ocf_mask); + hci_set_bit(OCF_REMOTE_NAME_REQ, ocf_mask); + hci_set_bit(OCF_REMOTE_NAME_REQ_CANCEL, ocf_mask); + hci_set_bit(OCF_READ_REMOTE_FEATURES, ocf_mask); + hci_set_bit(OCF_READ_REMOTE_EXT_FEATURES, ocf_mask); + hci_set_bit(OCF_READ_REMOTE_VERSION, ocf_mask); + hci_set_bit(OCF_READ_CLOCK_OFFSET, ocf_mask); + hci_set_bit(OCF_READ_LMP_HANDLE, ocf_mask); + + printf("OGF_LINK_CTL: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_LINK_POLICY */ - memset((void *) ocf_mask, 0, sizeof(ocf_mask)); - hci_set_bit(OCF_ROLE_DISCOVERY, ocf_mask); - hci_set_bit(OCF_READ_LINK_POLICY, ocf_mask); + memset(ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_ROLE_DISCOVERY, ocf_mask); + hci_set_bit(OCF_READ_LINK_POLICY, ocf_mask); + hci_set_bit(OCF_READ_DEFAULT_LINK_POLICY, ocf_mask); - printf("OGF_LINK_POLICY: { 0x%x, 0x%x, 0x%x, 0x%x }\n", + printf("OGF_LINK_POLICY: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_HOST_CTL */ - memset((void *) ocf_mask, 0, sizeof(ocf_mask)); - hci_set_bit(OCF_READ_AUTH_ENABLE, ocf_mask); - hci_set_bit(OCF_READ_ENCRYPT_MODE, ocf_mask); - hci_set_bit(OCF_READ_LOCAL_NAME, ocf_mask); - hci_set_bit(OCF_READ_CLASS_OF_DEV, ocf_mask); - hci_set_bit(OCF_READ_VOICE_SETTING, ocf_mask); - hci_set_bit(OCF_READ_TRANSMIT_POWER_LEVEL, ocf_mask); - - printf("OGF_HOST_CTL: { 0x%x, 0x%x, 0x%x, 0x%x }\n", - ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + memset(ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_READ_PIN_TYPE, ocf_mask); + hci_set_bit(OCF_READ_LOCAL_NAME, ocf_mask); + hci_set_bit(OCF_READ_CONN_ACCEPT_TIMEOUT, ocf_mask); + hci_set_bit(OCF_READ_PAGE_TIMEOUT, ocf_mask); + hci_set_bit(OCF_READ_SCAN_ENABLE, ocf_mask); + hci_set_bit(OCF_READ_PAGE_ACTIVITY, ocf_mask); + hci_set_bit(OCF_READ_INQ_ACTIVITY, ocf_mask); + hci_set_bit(OCF_READ_AUTH_ENABLE, ocf_mask); + hci_set_bit(OCF_READ_ENCRYPT_MODE, ocf_mask); + hci_set_bit(OCF_READ_CLASS_OF_DEV, ocf_mask); + hci_set_bit(OCF_READ_VOICE_SETTING, ocf_mask); + hci_set_bit(OCF_READ_AUTOMATIC_FLUSH_TIMEOUT, ocf_mask); + hci_set_bit(OCF_READ_NUM_BROADCAST_RETRANS, ocf_mask); + hci_set_bit(OCF_READ_HOLD_MODE_ACTIVITY, ocf_mask); + hci_set_bit(OCF_READ_TRANSMIT_POWER_LEVEL, ocf_mask); + hci_set_bit(OCF_READ_LINK_SUPERVISION_TIMEOUT, ocf_mask); + hci_set_bit(OCF_READ_NUM_SUPPORTED_IAC, ocf_mask); + hci_set_bit(OCF_READ_CURRENT_IAC_LAP, ocf_mask); + hci_set_bit(OCF_READ_PAGE_SCAN_PERIOD_MODE, ocf_mask); + hci_set_bit(OCF_READ_PAGE_SCAN_MODE, ocf_mask); + hci_set_bit(OCF_READ_INQUIRY_SCAN_TYPE, ocf_mask); + hci_set_bit(OCF_READ_INQUIRY_MODE, ocf_mask); + hci_set_bit(OCF_READ_PAGE_SCAN_TYPE, ocf_mask); + hci_set_bit(OCF_READ_AFH_MODE, ocf_mask); + + printf("OGF_HOST_CTL: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_INFO_PARAM */ - memset((void *) ocf_mask, 0, sizeof(ocf_mask)); - hci_set_bit(OCF_READ_LOCAL_VERSION, ocf_mask); - hci_set_bit(OCF_READ_LOCAL_FEATURES, ocf_mask); - hci_set_bit(OCF_READ_BUFFER_SIZE, ocf_mask); - hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); - hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); + memset(ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_READ_LOCAL_VERSION, ocf_mask); + hci_set_bit(OCF_READ_LOCAL_COMMANDS, ocf_mask); + hci_set_bit(OCF_READ_LOCAL_FEATURES, ocf_mask); + hci_set_bit(OCF_READ_LOCAL_EXT_FEATURES, ocf_mask); + hci_set_bit(OCF_READ_BUFFER_SIZE, ocf_mask); + hci_set_bit(OCF_READ_COUNTRY_CODE, ocf_mask); + hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); + + printf("OGF_INFO_PARAM: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); - printf("OGF_INFO_PARAM: { 0x%x, 0x%x, 0x%x, 0x%x}\n", - ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + /* OGF_STATUS_PARAM */ + memset(ocf_mask, 0, sizeof(ocf_mask)); + hci_set_bit(OCF_READ_FAILED_CONTACT_COUNTER, ocf_mask); + hci_set_bit(OCF_READ_LINK_QUALITY, ocf_mask); + hci_set_bit(OCF_READ_RSSI, ocf_mask); + hci_set_bit(OCF_READ_AFH_MAP, ocf_mask); + hci_set_bit(OCF_READ_CLOCK, ocf_mask); - /* OGF_INFO_PARAM */ - memset((void *) ocf_mask, 0, sizeof(ocf_mask)); - hci_set_bit(OCF_READ_FAILED_CONTACT_COUNTER, ocf_mask); - hci_set_bit(OCF_RESET_FAILED_CONTACT_COUNTER, ocf_mask); - hci_set_bit(OCF_READ_LINK_QUALITY, ocf_mask); - hci_set_bit(OCF_READ_RSSI, ocf_mask); - - printf("OGF_STATUS_PARAM: { 0x%x, 0x%x, 0x%x, 0x%x}\n", - ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); + printf("OGF_STATUS_PARAM: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); return 0; } -- cgit From 2ed8bc58caa1e27dffad6766a59f8f9f0930dc08 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 9 Sep 2005 04:10:59 +0000 Subject: Don't forget the command for reading the extended inquiry response --- tools/hcisecfilter.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 02d0d554..5827f143 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -124,6 +124,7 @@ int main(void) hci_set_bit(OCF_READ_INQUIRY_MODE, ocf_mask); hci_set_bit(OCF_READ_PAGE_SCAN_TYPE, ocf_mask); hci_set_bit(OCF_READ_AFH_MODE, ocf_mask); + //hci_set_bit(OCF_READ_EXT_INQUIRY_RESPONSE, ocf_mask); printf("OGF_HOST_CTL: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); -- cgit From dd3e8a6ab8938c4d8f62765e7c03a005807fbb64 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 27 Oct 2005 22:49:49 +0000 Subject: Update security filter for Extended Inquiry Response (EIR) --- tools/hcisecfilter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 5827f143..ce0082e9 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -69,7 +69,7 @@ int main(void) hci_set_bit(EVT_READ_REMOTE_EXT_FEATURES_COMPLETE, event_mask); hci_set_bit(EVT_SYNC_CONN_COMPLETE, event_mask); hci_set_bit(EVT_SYNC_CONN_CHANGED, event_mask); - //hci_set_bit(EVT_EXTENDED_INQUIRY_RESULT, event_mask); + hci_set_bit(EVT_EXTENDED_INQUIRY_RESULT, event_mask); printf("Event mask: { 0x%08x, 0x%08x }\n", event_mask[0], event_mask[1]); @@ -86,7 +86,7 @@ int main(void) hci_set_bit(OCF_READ_CLOCK_OFFSET, ocf_mask); hci_set_bit(OCF_READ_LMP_HANDLE, ocf_mask); - printf("OGF_LINK_CTL: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + printf("OGF_LINK_CTL: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_LINK_POLICY */ @@ -95,7 +95,7 @@ int main(void) hci_set_bit(OCF_READ_LINK_POLICY, ocf_mask); hci_set_bit(OCF_READ_DEFAULT_LINK_POLICY, ocf_mask); - printf("OGF_LINK_POLICY: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + printf("OGF_LINK_POLICY: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_HOST_CTL */ @@ -124,9 +124,9 @@ int main(void) hci_set_bit(OCF_READ_INQUIRY_MODE, ocf_mask); hci_set_bit(OCF_READ_PAGE_SCAN_TYPE, ocf_mask); hci_set_bit(OCF_READ_AFH_MODE, ocf_mask); - //hci_set_bit(OCF_READ_EXT_INQUIRY_RESPONSE, ocf_mask); + hci_set_bit(OCF_READ_EXT_INQUIRY_RESPONSE, ocf_mask); - printf("OGF_HOST_CTL: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + printf("OGF_HOST_CTL: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_INFO_PARAM */ @@ -139,7 +139,7 @@ int main(void) hci_set_bit(OCF_READ_COUNTRY_CODE, ocf_mask); hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); - printf("OGF_INFO_PARAM: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + printf("OGF_INFO_PARAM: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_STATUS_PARAM */ @@ -150,7 +150,7 @@ int main(void) hci_set_bit(OCF_READ_AFH_MAP, ocf_mask); hci_set_bit(OCF_READ_CLOCK, ocf_mask); - printf("OGF_STATUS_PARAM: { 0x%08x, 0x%08x, 0x%04x, 0x%02x }\n", + printf("OGF_STATUS_PARAM: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); return 0; -- cgit From 632a9432774ff3a0c6e556e8f32a565b38890767 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Oct 2005 22:36:31 +0000 Subject: Big cleanup of CVS relics --- tools/hcisecfilter.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index ce0082e9..1d557ce1 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -7,24 +7,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$ */ #ifdef HAVE_CONFIG_H -- cgit From f2e48c44a7e4c9ee31b8ce2e302186f6047cfeab Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 3 Jan 2006 13:28:56 +0000 Subject: Update copyright information --- tools/hcisecfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 1d557ce1..6114f57f 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -3,7 +3,7 @@ * BlueZ - Bluetooth protocol stack for Linux * * 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 607695ed109340f4b7a5628420e0a8e8aee34f4e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 13 Jan 2007 17:48:12 +0000 Subject: Update copyright information --- tools/hcisecfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 6114f57f..6a4f897b 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -3,7 +3,7 @@ * BlueZ - Bluetooth protocol stack for Linux * * 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 b42e7c67689f7c93e2eb7a54dd677a5c5e23df59 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 1 Aug 2007 08:07:42 +0000 Subject: Add commands for Simple Pairing --- tools/hcisecfilter.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 6a4f897b..5bab6389 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -81,7 +81,7 @@ int main(void) hci_set_bit(OCF_READ_CLOCK_OFFSET, ocf_mask); hci_set_bit(OCF_READ_LMP_HANDLE, ocf_mask); - printf("OGF_LINK_CTL: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", + printf("OGF_LINK_CTL: { 0x%08x, 0x%08x, 0x%08x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_LINK_POLICY */ @@ -90,7 +90,7 @@ int main(void) hci_set_bit(OCF_READ_LINK_POLICY, ocf_mask); hci_set_bit(OCF_READ_DEFAULT_LINK_POLICY, ocf_mask); - printf("OGF_LINK_POLICY: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", + printf("OGF_LINK_POLICY: { 0x%08x, 0x%08x, 0x%08x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_HOST_CTL */ @@ -120,8 +120,11 @@ int main(void) hci_set_bit(OCF_READ_PAGE_SCAN_TYPE, ocf_mask); hci_set_bit(OCF_READ_AFH_MODE, ocf_mask); hci_set_bit(OCF_READ_EXT_INQUIRY_RESPONSE, ocf_mask); + hci_set_bit(OCF_READ_SIMPLE_PAIRING_MODE, ocf_mask); + hci_set_bit(OCF_READ_INQUIRY_TRANSMIT_POWER_LEVEL, ocf_mask); + hci_set_bit(OCF_READ_DEFAULT_ERROR_DATA_REPORTING, ocf_mask); - printf("OGF_HOST_CTL: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", + printf("OGF_HOST_CTL: { 0x%08x, 0x%08x, 0x%08x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_INFO_PARAM */ @@ -134,7 +137,7 @@ int main(void) hci_set_bit(OCF_READ_COUNTRY_CODE, ocf_mask); hci_set_bit(OCF_READ_BD_ADDR, ocf_mask); - printf("OGF_INFO_PARAM: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", + printf("OGF_INFO_PARAM: { 0x%08x, 0x%08x, 0x%08x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); /* OGF_STATUS_PARAM */ @@ -145,7 +148,7 @@ int main(void) hci_set_bit(OCF_READ_AFH_MAP, ocf_mask); hci_set_bit(OCF_READ_CLOCK, ocf_mask); - printf("OGF_STATUS_PARAM: { 0x%08x, 0x%08x, 0x%06x, 0x%02x }\n", + printf("OGF_STATUS_PARAM: { 0x%08x, 0x%08x, 0x%08x, 0x%02x }\n", ocf_mask[0], ocf_mask[1], ocf_mask[2], ocf_mask[3]); return 0; -- cgit From e823c15e43a6f924779e466d434c51157002d9ee Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 2 Feb 2008 03:37:05 +0000 Subject: Update copyright information --- tools/hcisecfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/hcisecfilter.c') diff --git a/tools/hcisecfilter.c b/tools/hcisecfilter.c index 5bab6389..81a2fca4 100644 --- a/tools/hcisecfilter.c +++ b/tools/hcisecfilter.c @@ -3,7 +3,7 @@ * BlueZ - Bluetooth protocol stack for Linux * * 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