3 * MCAP for BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2010 GSyC/LibreSoft, Universidad Rey Juan Carlos.
6 * Copyright (C) 2010 Signove
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #define MCAP_VERSION 0x0100 /* current version 01.00 */
33 /* bytes to get MCAP Supported Procedures */
34 #define MCAP_SUP_PROC 0x06
36 /* maximum transmission unit for channels */
37 #define MCAP_CC_MTU 48
38 #define MCAP_DC_MTU L2CAP_DEFAULT_MTU
40 /* MCAP Standard Op Codes */
41 #define MCAP_ERROR_RSP 0x00
42 #define MCAP_MD_CREATE_MDL_REQ 0x01
43 #define MCAP_MD_CREATE_MDL_RSP 0x02
44 #define MCAP_MD_RECONNECT_MDL_REQ 0x03
45 #define MCAP_MD_RECONNECT_MDL_RSP 0x04
46 #define MCAP_MD_ABORT_MDL_REQ 0x05
47 #define MCAP_MD_ABORT_MDL_RSP 0x06
48 #define MCAP_MD_DELETE_MDL_REQ 0x07
49 #define MCAP_MD_DELETE_MDL_RSP 0x08
51 /* MCAP Clock Sync Op Codes */
52 #define MCAP_MD_SYNC_CAP_REQ 0x11
53 #define MCAP_MD_SYNC_CAP_RSP 0x12
54 #define MCAP_MD_SYNC_SET_REQ 0x13
55 #define MCAP_MD_SYNC_SET_RSP 0x14
56 #define MCAP_MD_SYNC_INFO_IND 0x15
58 /* MCAP Response codes */
59 #define MCAP_SUCCESS 0x00
60 #define MCAP_INVALID_OP_CODE 0x01
61 #define MCAP_INVALID_PARAM_VALUE 0x02
62 #define MCAP_INVALID_MDEP 0x03
63 #define MCAP_MDEP_BUSY 0x04
64 #define MCAP_INVALID_MDL 0x05
65 #define MCAP_MDL_BUSY 0x06
66 #define MCAP_INVALID_OPERATION 0x07
67 #define MCAP_RESOURCE_UNAVAILABLE 0x08
68 #define MCAP_UNSPECIFIED_ERROR 0x09
69 #define MCAP_REQUEST_NOT_SUPPORTED 0x0A
70 #define MCAP_CONFIGURATION_REJECTED 0x0B
73 #define MCAP_MDLID_RESERVED 0x0000
74 #define MCAP_MDLID_INITIAL 0x0001
75 #define MCAP_MDLID_FINAL 0xFEFF
76 #define MCAP_ALL_MDLIDS 0xFFFF
79 #define MCAP_MDEPID_INITIAL 0x00
80 #define MCAP_MDEPID_FINAL 0x7F
82 /* CSP special values */
83 #define MCAP_BTCLOCK_IMMEDIATE 0xffffffffUL
84 #define MCAP_TMSTAMP_DONTSET 0xffffffffffffffffULL
85 #define MCAP_BTCLOCK_MAX 0x0fffffff
86 #define MCAP_BTCLOCK_FIELD (MCAP_BTCLOCK_MAX + 1)
89 * MCAP Request Packet Format
97 } __attribute__ ((packed)) mcap_md_create_mdl_req;
102 } __attribute__ ((packed)) mcap_md_req;
105 * MCAP Response Packet Format
113 } __attribute__ ((packed)) mcap_rsp;
116 * MCAP Clock Synchronization Protocol
122 } __attribute__ ((packed)) mcap_md_sync_cap_req;
127 } __attribute__ ((packed)) mcap_md_sync_rsp;
136 } __attribute__ ((packed)) mcap_md_sync_cap_rsp;
143 } __attribute__ ((packed)) mcap_md_sync_set_req;
151 } __attribute__ ((packed)) mcap_md_sync_set_rsp;
158 } __attribute__ ((packed)) mcap_md_sync_info_ind;
164 #endif /* __MCAP_H */