Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame^] | 1 | /* |
| 2 | BlueZ - Bluetooth protocol stack for Linux |
| 3 | |
| 4 | Copyright (C) 2010 Nokia Corporation |
| 5 | |
| 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; |
| 9 | |
| 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. |
| 18 | |
| 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. |
| 22 | */ |
| 23 | |
| 24 | struct mgmt_hdr { |
| 25 | __le16 opcode; |
| 26 | __le16 len; |
| 27 | } __packed; |
| 28 | #define MGMT_HDR_SIZE 4 |
| 29 | |
| 30 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
| 31 | struct mgmt_ev_cmd_complete { |
| 32 | __le16 opcode; |
| 33 | __u8 data[0]; |
| 34 | } __packed; |
| 35 | |
| 36 | #define MGMT_EV_CMD_STATUS 0x0002 |
| 37 | struct mgmt_ev_cmd_status { |
| 38 | __u8 status; |
| 39 | __le16 opcode; |
| 40 | } __packed; |
| 41 | |
| 42 | #define MGMT_EV_CONTROLLER_ERROR 0x0003 |
| 43 | struct mgmt_ev_controller_error { |
| 44 | __le16 index; |
| 45 | __u8 error_code; |
| 46 | } __packed; |