2 BlueZ - Bluetooth protocol stack for Linux
4 Copyright (C) 2010 Nokia Corporation
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation;
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
13 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
14 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
15 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
20 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
21 SOFTWARE IS DISCLAIMED.
28 #define MGMT_HDR_SIZE 4
30 #define MGMT_OP_READ_VERSION 0x0001
31 struct mgmt_rp_read_version {
36 #define MGMT_OP_READ_INDEX_LIST 0x0003
37 struct mgmt_rp_read_index_list {
38 __le16 num_controllers;
42 #define MGMT_OP_READ_INFO 0x0004
43 struct mgmt_cp_read_info {
46 struct mgmt_rp_read_info {
67 #define MGMT_OP_SET_POWERED 0x0005
69 #define MGMT_OP_SET_DISCOVERABLE 0x0006
71 #define MGMT_OP_SET_CONNECTABLE 0x0007
73 #define MGMT_OP_SET_PAIRABLE 0x0008
75 #define MGMT_OP_ADD_UUID 0x0009
76 struct mgmt_cp_add_uuid {
82 #define MGMT_OP_REMOVE_UUID 0x000A
83 struct mgmt_cp_remove_uuid {
88 #define MGMT_OP_SET_DEV_CLASS 0x000B
89 struct mgmt_cp_set_dev_class {
95 #define MGMT_OP_SET_SERVICE_CACHE 0x000C
96 struct mgmt_cp_set_service_cache {
101 #define MGMT_EV_CMD_COMPLETE 0x0001
102 struct mgmt_ev_cmd_complete {
107 #define MGMT_EV_CMD_STATUS 0x0002
108 struct mgmt_ev_cmd_status {
113 #define MGMT_EV_CONTROLLER_ERROR 0x0003
114 struct mgmt_ev_controller_error {
119 #define MGMT_EV_INDEX_ADDED 0x0004
120 struct mgmt_ev_index_added {
124 #define MGMT_EV_INDEX_REMOVED 0x0005
125 struct mgmt_ev_index_removed {
129 #define MGMT_EV_POWERED 0x0006
131 #define MGMT_EV_DISCOVERABLE 0x0007
133 #define MGMT_EV_CONNECTABLE 0x0008
135 #define MGMT_EV_PAIRABLE 0x0009