blob: 729272c6eb79f89fb47fae7f8db68cc181314e0c [file] [log] [blame]
Chris Manton53efad72019-07-19 13:54:52 -07001/*
2 * Copyright 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <cstdint>
20
21namespace bluetooth {
22namespace l2cap {
23
24using Cid = uint16_t;
25
26constexpr Cid kInvalidCid = 0;
27constexpr Cid kFirstFixedChannel = 1;
28constexpr Cid kLastFixedChannel = 63;
29constexpr Cid kFirstDynamicChannel = kLastFixedChannel + 1;
Hansong Zhangc2297582019-09-20 14:14:01 -070030constexpr Cid kLastDynamicChannel = (uint16_t)(0xffff);
Chris Manton53efad72019-07-19 13:54:52 -070031
Jack Heb4b4a372019-08-09 15:10:44 -070032constexpr Cid kClassicSignallingCid = 1;
33constexpr Cid kConnectionlessCid = 2;
34constexpr Cid kLeAttributeCid = 4;
35constexpr Cid kLeSignallingCid = 5;
36constexpr Cid kSmpCid = 6;
37constexpr Cid kSmpBrCid = 7;
38
Martin Brabhama3a60f42019-11-21 09:22:00 -080039constexpr Cid kClassicPairingTriggerCid = kLastFixedChannel - 1;
40
Chris Manton53efad72019-07-19 13:54:52 -070041} // namespace l2cap
42} // namespace bluetooth